blob: 6123e21109c78964fd943ef98bad97ac429d1e19 [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
Victor Stinner2c7085f2017-05-02 16:55:50 +0200686HAS_GIT
687GITBRANCH
688GITTAG
689GITVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100691ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000692AR
693RANLIB
694GNULD
695LINKCC
696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
699BLDLIBRARY
700DLLLIBRARY
701LDLIBRARY
702LIBRARY
703BUILDEXEEXT
704EGREP
705GREP
706CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100707MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100708ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000709MAINCC
710CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718EXPORT_MACOSX_DEPLOYMENT_TARGET
719CONFIGURE_MACOSX_DEPLOYMENT_TARGET
720EXTRAMACHDEPPATH
721EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200722PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000723SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100724_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000725MACHDEP
726FRAMEWORKINSTALLAPPSPREFIX
727FRAMEWORKUNIXTOOLSPREFIX
728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100743PYTHON_FOR_BUILD
Victor Stinner8a19eb22017-05-05 03:14:23 +0200744PYTHON_FOR_REGEN
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100745host_os
746host_vendor
747host_cpu
748host
749build_os
750build_vendor
751build_cpu
752build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000753target_alias
754host_alias
755build_alias
756LIBS
757ECHO_T
758ECHO_N
759ECHO_C
760DEFS
761mandir
762localedir
763libdir
764psdir
765pdfdir
766dvidir
767htmldir
768infodir
769docdir
770oldincludedir
771includedir
772localstatedir
773sharedstatedir
774sysconfdir
775datadir
776datarootdir
777libexecdir
778sbindir
779bindir
780program_transform_name
781prefix
782exec_prefix
783PACKAGE_URL
784PACKAGE_BUGREPORT
785PACKAGE_STRING
786PACKAGE_VERSION
787PACKAGE_TARNAME
788PACKAGE_NAME
789PATH_SEPARATOR
790SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000791ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000792ac_user_opts='
793enable_option_checking
794enable_universalsdk
795with_universal_archs
796with_framework_name
797enable_framework
798with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600799with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000800with_cxx_main
801with_suffix
802enable_shared
803enable_profiling
804with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +0000805enable_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000806with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000807enable_toolbox_glue
808with_libs
809with_system_expat
810with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700811with_tcltk_includes
812with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000813with_dbmliborder
814with_signal_module
815with_dec_threads
816with_threads
817with_thread
818with_pth
819enable_ipv6
820with_doc_strings
821with_tsc
822with_pymalloc
823with_valgrind
824with_wctype_functions
825with_fpectl
826with_libm
827with_libc
828enable_big_digits
829enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500830with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800831with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000832'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833 ac_precious_vars='build_alias
834host_alias
835target_alias
836CC
837CFLAGS
838LDFLAGS
839LIBS
840CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500841CPP
842PKG_CONFIG
843PKG_CONFIG_PATH
844PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000848ac_init_help=
849ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000850ac_unrecognized_opts=
851ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# The variables have the same names as the options, with
853# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857no_recursion=
858prefix=NONE
859program_prefix=NONE
860program_suffix=NONE
861program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866x_includes=NONE
867x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000868
869# Installation directory options.
870# These are left unexpanded so users can "make install exec_prefix=/foo"
871# and all the variables that are supposed to be based on exec_prefix
872# by default will actually change.
873# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875bindir='${exec_prefix}/bin'
876sbindir='${exec_prefix}/sbin'
877libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878datarootdir='${prefix}/share'
879datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880sysconfdir='${prefix}/etc'
881sharedstatedir='${prefix}/com'
882localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883includedir='${prefix}/include'
884oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
886infodir='${datarootdir}/info'
887htmldir='${docdir}'
888dvidir='${docdir}'
889pdfdir='${docdir}'
890psdir='${docdir}'
891libdir='${exec_prefix}/lib'
892localedir='${datarootdir}/locale'
893mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000898do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 # If the previous option needs an argument, assign it.
900 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 ac_prev=
903 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000907 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
908 *=) ac_optarg= ;;
909 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912 # Accept the important Cygnus configure options, so we can diagnose typos.
913
Martin v. Löwiseba40652007-08-30 20:10:57 +0000914 case $ac_dashdash$ac_option in
915 --)
916 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918 -bindir | --bindir | --bindi | --bind | --bin | --bi)
919 ac_prev=bindir ;;
920 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 -cache-file | --cache-file | --cache-fil | --cache-fi \
929 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
930 ac_prev=cache_file ;;
931 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
932 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 cache_file=$ac_optarg ;;
934
935 --config-cache | -C)
936 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
Martin v. Löwiseba40652007-08-30 20:10:57 +0000943 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
944 | --dataroo | --dataro | --datar)
945 ac_prev=datarootdir ;;
946 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
947 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
948 datarootdir=$ac_optarg ;;
949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000951 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000953 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000954 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000955 ac_useropt_orig=$ac_useropt
956 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
957 case $ac_user_opts in
958 *"
959"enable_$ac_useropt"
960"*) ;;
961 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
962 ac_unrecognized_sep=', ';;
963 esac
964 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000965
966 -docdir | --docdir | --docdi | --doc | --do)
967 ac_prev=docdir ;;
968 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
969 docdir=$ac_optarg ;;
970
971 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
972 ac_prev=dvidir ;;
973 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
974 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000977 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000979 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000980 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000981 ac_useropt_orig=$ac_useropt
982 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
983 case $ac_user_opts in
984 *"
985"enable_$ac_useropt"
986"*) ;;
987 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
988 ac_unrecognized_sep=', ';;
989 esac
990 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
993 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
994 | --exec | --exe | --ex)
995 ac_prev=exec_prefix ;;
996 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
997 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
998 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --with-gas.
1003 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 -help | --help | --hel | --he | -h)
1006 ac_init_help=long ;;
1007 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1008 ac_init_help=recursive ;;
1009 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1010 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwiseba40652007-08-30 20:10:57 +00001017 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1018 ac_prev=htmldir ;;
1019 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1020 | --ht=*)
1021 htmldir=$ac_optarg ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -includedir | --includedir | --includedi | --included | --include \
1024 | --includ | --inclu | --incl | --inc)
1025 ac_prev=includedir ;;
1026 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1027 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -infodir | --infodir | --infodi | --infod | --info | --inf)
1031 ac_prev=infodir ;;
1032 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -libdir | --libdir | --libdi | --libd)
1036 ac_prev=libdir ;;
1037 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1041 | --libexe | --libex | --libe)
1042 ac_prev=libexecdir ;;
1043 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1044 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Martin v. Löwiseba40652007-08-30 20:10:57 +00001047 -localedir | --localedir | --localedi | --localed | --locale)
1048 ac_prev=localedir ;;
1049 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1050 localedir=$ac_optarg ;;
1051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001053 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 ac_prev=localstatedir ;;
1055 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001056 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1060 ac_prev=mandir ;;
1061 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Obsolete; use --without-fp.
1066 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 no_create=yes ;;
1071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1073 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1074 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1077 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1078 | --oldin | --oldi | --old | --ol | --o)
1079 ac_prev=oldincludedir ;;
1080 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1081 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1082 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1086 ac_prev=prefix ;;
1087 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1091 | --program-pre | --program-pr | --program-p)
1092 ac_prev=program_prefix ;;
1093 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1094 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1098 | --program-suf | --program-su | --program-s)
1099 ac_prev=program_suffix ;;
1100 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1101 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-transform-name | --program-transform-name \
1105 | --program-transform-nam | --program-transform-na \
1106 | --program-transform-n | --program-transform- \
1107 | --program-transform | --program-transfor \
1108 | --program-transfo | --program-transf \
1109 | --program-trans | --program-tran \
1110 | --progr-tra | --program-tr | --program-t)
1111 ac_prev=program_transform_name ;;
1112 -program-transform-name=* | --program-transform-name=* \
1113 | --program-transform-nam=* | --program-transform-na=* \
1114 | --program-transform-n=* | --program-transform-=* \
1115 | --program-transform=* | --program-transfor=* \
1116 | --program-transfo=* | --program-transf=* \
1117 | --program-trans=* | --program-tran=* \
1118 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
Martin v. Löwiseba40652007-08-30 20:10:57 +00001121 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1122 ac_prev=pdfdir ;;
1123 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1124 pdfdir=$ac_optarg ;;
1125
1126 -psdir | --psdir | --psdi | --psd | --ps)
1127 ac_prev=psdir ;;
1128 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1129 psdir=$ac_optarg ;;
1130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1132 | -silent | --silent | --silen | --sile | --sil)
1133 silent=yes ;;
1134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1136 ac_prev=sbindir ;;
1137 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1138 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140
1141 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1142 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1143 | --sharedst | --shareds | --shared | --share | --shar \
1144 | --sha | --sh)
1145 ac_prev=sharedstatedir ;;
1146 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1147 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1148 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1149 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 -site | --site | --sit)
1153 ac_prev=site ;;
1154 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1158 ac_prev=srcdir ;;
1159 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1163 | --syscon | --sysco | --sysc | --sys | --sy)
1164 ac_prev=sysconfdir ;;
1165 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1166 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1175 verbose=yes ;;
1176
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 -version | --version | --versio | --versi | --vers | -V)
1178 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001181 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001184 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001185 ac_useropt_orig=$ac_useropt
1186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187 case $ac_user_opts in
1188 *"
1189"with_$ac_useropt"
1190"*) ;;
1191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1192 ac_unrecognized_sep=', ';;
1193 esac
1194 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 --x)
1213 # Obsolete; use --with-x.
1214 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1217 | --x-incl | --x-inc | --x-in | --x-i)
1218 ac_prev=x_includes ;;
1219 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1220 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1224 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1225 ac_prev=x_libraries ;;
1226 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1227 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001230 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1231Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 *=*)
1235 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1236 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001237 case $ac_envvar in #(
1238 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001239 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001240 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001241 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 export $ac_envvar ;;
1243
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001244 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001249 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
1252 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253done
1254
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258fi
1259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001260if test -n "$ac_unrecognized_opts"; then
1261 case $enable_option_checking in
1262 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001263 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001264 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1265 esac
1266fi
1267
1268# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001269for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1270 datadir sysconfdir sharedstatedir localstatedir includedir \
1271 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naoki6a04ef72017-03-29 01:50:48 +09001272 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001274 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001275 # Remove trailing slashes.
1276 case $ac_val in
1277 */ )
1278 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1279 eval $ac_var=\$ac_val;;
1280 esac
1281 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001283 [\\/$]* | ?:[\\/]* ) continue;;
1284 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001286 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001287done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
Martin v. Löwis11437992002-04-12 09:54:03 +00001289# There might be people who depend on the old broken behavior: `$host'
1290# used to hold the argument of --host etc.
1291# FIXME: To remove some day.
1292build=$build_alias
1293host=$host_alias
1294target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295
Martin v. Löwis11437992002-04-12 09:54:03 +00001296# FIXME: To remove some day.
1297if test "x$host_alias" != x; then
1298 if test "x$build_alias" = x; then
1299 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 elif test "x$build_alias" != "x$host_alias"; then
1301 cross_compiling=yes
1302 fi
1303fi
1304
1305ac_tool_prefix=
1306test -n "$host_alias" && ac_tool_prefix=$host_alias-
1307
1308test "$silent" = yes && exec 6>/dev/null
1309
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311ac_pwd=`pwd` && test -n "$ac_pwd" &&
1312ac_ls_di=`ls -di .` &&
1313ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001314 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001315test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001316 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001317
1318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319# Find the source files, if location was not specified.
1320if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001323 ac_confdir=`$as_dirname -- "$as_myself" ||
1324$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1325 X"$as_myself" : 'X\(//\)[^/]' \| \
1326 X"$as_myself" : 'X\(//\)$' \| \
1327 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1328$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)[^/].*/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)$/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\).*/{
1342 s//\1/
1343 q
1344 }
1345 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001347 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348 srcdir=..
1349 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350else
1351 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001353if test ! -r "$srcdir/$ac_unique_file"; then
1354 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001355 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001357ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1358ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001359 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001360 pwd)`
1361# When building in place, set srcdir=.
1362if test "$ac_abs_confdir" = "$ac_pwd"; then
1363 srcdir=.
1364fi
1365# Remove unnecessary trailing slashes from srcdir.
1366# Double slashes in file names in object file debugging info
1367# mess up M-x gdb in Emacs.
1368case $srcdir in
1369*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1370esac
1371for ac_var in $ac_precious_vars; do
1372 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1373 eval ac_env_${ac_var}_value=\$${ac_var}
1374 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1375 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1376done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378#
1379# Report the --help message.
1380#
1381if test "$ac_init_help" = "long"; then
1382 # Omit some internal or obsolete options to make the list less imposing.
1383 # This message is too long to be a string in the A/UX 3.1 sh.
1384 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001385\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Usage: $0 [OPTION]... [VAR=VALUE]...
1388
1389To assign environment variables (e.g., CC, CFLAGS...), specify them as
1390VAR=VALUE. See below for descriptions of some of the useful variables.
1391
1392Defaults for the options are specified in brackets.
1393
1394Configuration:
1395 -h, --help display this help and exit
1396 --help=short display options specific to this package
1397 --help=recursive display the short help of all the included packages
1398 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001399 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 --cache-file=FILE cache test results in FILE [disabled]
1401 -C, --config-cache alias for \`--cache-file=config.cache'
1402 -n, --no-create do not create output files
1403 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405Installation directories:
1406 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001407 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001409 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411By default, \`make install' will install all the files in
1412\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1413an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1414for instance \`--prefix=\$HOME'.
1415
1416For better control, use the options below.
1417
1418Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001419 --bindir=DIR user executables [EPREFIX/bin]
1420 --sbindir=DIR system admin executables [EPREFIX/sbin]
1421 --libexecdir=DIR program executables [EPREFIX/libexec]
1422 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1423 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1424 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1425 --libdir=DIR object code libraries [EPREFIX/lib]
1426 --includedir=DIR C header files [PREFIX/include]
1427 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1428 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1429 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1430 --infodir=DIR info documentation [DATAROOTDIR/info]
1431 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1432 --mandir=DIR man documentation [DATAROOTDIR/man]
1433 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1434 --htmldir=DIR html documentation [DOCDIR]
1435 --dvidir=DIR dvi documentation [DOCDIR]
1436 --pdfdir=DIR pdf documentation [DOCDIR]
1437 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438_ACEOF
1439
1440 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001441
1442System types:
1443 --build=BUILD configure for building on BUILD [guessed]
1444 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001445 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446_ACEOF
1447fi
1448
1449if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001450 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001451 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001452 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 cat <<\_ACEOF
1454
1455Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001456 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1458 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001459 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001460 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --enable-framework[=INSTALLDIR]
1462 Build (MacOSX|Darwin) framework
1463 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001464 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00001465 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1466 etc). Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1468 --enable-ipv6 Enable ipv6 (with ipv4) support
1469 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001470 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001471 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001473 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
1475Optional Packages:
1476 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1477 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001478 --with-universal-archs=ARCH
1479 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001480 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001481 --with-framework-name=FRAMEWORK
1482 specify an alternate name of the framework built
1483 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001485 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001486 --with-cxx-main=<compiler>
1487 compile main() and link python executable with C++
1488 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-suffix=.exe set executable suffix
1490 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001491 --with-lto Enable Link Time Optimization in PGO builds.
1492 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001494 --with-system-expat build pyexpat module using an installed expat
1495 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001496 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001497 --with-tcltk-includes='-I...'
1498 override search for Tcl and Tk include files
1499 --with-tcltk-libs='-L...'
1500 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001501 --with-dbmliborder=db1:db2:...
1502 order to check db backends for dbm. Valid value is a
1503 colon separated string with the backend names
1504 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with-signal-module disable/enable signal module
1506 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1507 --with(out)-threads[=DIRECTORY]
1508 disable/enable thread support
1509 --with(out)-thread[=DIRECTORY]
1510 deprecated; use --with(out)-threads
1511 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001513 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001515 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-fpectl enable SIGFPE catching
1518 --with-libm=STRING math library
1519 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001520 --with(out)-computed-gotos
1521 Use computed gotos in evaluation loop (enabled by
1522 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001523 --with(out)-ensurepip=[=OPTION]
1524 "install" or "upgrade" using bundled pip, default is
1525 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527Some influential environment variables:
1528 CC C compiler command
1529 CFLAGS C compiler flags
1530 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1531 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001532 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001533 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001536 PKG_CONFIG path to pkg-config utility
1537 PKG_CONFIG_PATH
1538 directories to add to pkg-config's search path
1539 PKG_CONFIG_LIBDIR
1540 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Use these variables to override the choices made by `configure' or to help
1543it to find libraries and programs with nonstandard names/locations.
1544
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001545Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001547ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001548fi
1549
1550if test "$ac_init_help" = "recursive"; then
1551 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001553 test -d "$ac_dir" ||
1554 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1555 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_builddir=.
1557
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558case "$ac_dir" in
1559.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001561 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001563 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001564 case $ac_top_builddir_sub in
1565 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1567 esac ;;
1568esac
1569ac_abs_top_builddir=$ac_pwd
1570ac_abs_builddir=$ac_pwd$ac_dir_suffix
1571# for backward compatibility:
1572ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001573
1574case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 ac_top_srcdir=$ac_top_builddir_sub
1578 ac_abs_top_srcdir=$ac_pwd ;;
1579 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001581 ac_top_srcdir=$srcdir
1582 ac_abs_top_srcdir=$srcdir ;;
1583 *) # Relative name.
1584 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1585 ac_top_srcdir=$ac_top_build_prefix$srcdir
1586 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001587esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001589
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 cd "$ac_dir" || { ac_status=$?; continue; }
1591 # Check for guested configure.
1592 if test -f "$ac_srcdir/configure.gnu"; then
1593 echo &&
1594 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1595 elif test -f "$ac_srcdir/configure"; then
1596 echo &&
1597 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001599 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001600 fi || ac_status=$?
1601 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 done
1603fi
1604
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001606if $ac_init_version; then
1607 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001608python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001609generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001611Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001612This configure script is free software; the Free Software Foundation
1613gives unlimited permission to copy, distribute and modify it.
1614_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001615 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001617
1618## ------------------------ ##
1619## Autoconf initialization. ##
1620## ------------------------ ##
1621
1622# ac_fn_c_try_compile LINENO
1623# --------------------------
1624# Try to compile conftest.$ac_ext, and return whether this succeeded.
1625ac_fn_c_try_compile ()
1626{
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 rm -f conftest.$ac_objext
1629 if { { ac_try="$ac_compile"
1630case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633esac
1634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635$as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_compile") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644 test $ac_status = 0; } && {
1645 test -z "$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 } && test -s conftest.$ac_objext; then :
1648 ac_retval=0
1649else
1650 $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_compile
1659
1660# ac_fn_c_try_cpp LINENO
1661# ----------------------
1662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_cpp ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if { { ac_try="$ac_cpp conftest.$ac_ext"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001681 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 }; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_cpp
1696
1697# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1698# -------------------------------------------------------
1699# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1700# the include files in INCLUDES and setting the cache variable VAR
1701# accordingly.
1702ac_fn_c_check_header_mongrel ()
1703{
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001705 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1707$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001708if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001709 $as_echo_n "(cached) " >&6
1710fi
1711eval ac_res=\$$3
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713$as_echo "$ac_res" >&6; }
1714else
1715 # Is the header compilable?
1716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1717$as_echo_n "checking $2 usability... " >&6; }
1718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1719/* end confdefs.h. */
1720$4
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_compile "$LINENO"; then :
1724 ac_header_compiler=yes
1725else
1726 ac_header_compiler=no
1727fi
1728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1730$as_echo "$ac_header_compiler" >&6; }
1731
1732# Is the header present?
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1734$as_echo_n "checking $2 presence... " >&6; }
1735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h. */
1737#include <$2>
1738_ACEOF
1739if ac_fn_c_try_cpp "$LINENO"; then :
1740 ac_header_preproc=yes
1741else
1742 ac_header_preproc=no
1743fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001744rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1746$as_echo "$ac_header_preproc" >&6; }
1747
1748# So? What about this header?
1749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1750 yes:no: )
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1752$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1754$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1755 ;;
1756 no:yes:* )
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1758$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1760$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1762$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1764$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1766$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001767( $as_echo "## --------------------------------------- ##
1768## Report this to https://bugs.python.org/ ##
1769## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001770 ) | sed "s/^/$as_me: WARNING: /" >&2
1771 ;;
1772esac
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001775if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001776 $as_echo_n "(cached) " >&6
1777else
1778 eval "$3=\$ac_header_compiler"
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001785
1786} # ac_fn_c_check_header_mongrel
1787
1788# ac_fn_c_try_run LINENO
1789# ----------------------
1790# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1791# that executables *can* be run.
1792ac_fn_c_try_run ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { { ac_try="$ac_link"
1796case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799esac
1800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801$as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>&5
1803 ac_status=$?
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1806 { { case "(($ac_try" in
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1809esac
1810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811$as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_try") 2>&5
1813 ac_status=$?
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; }; }; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: program exited with status $ac_status" >&5
1819 $as_echo "$as_me: failed program was:" >&5
1820sed 's/^/| /' conftest.$ac_ext >&5
1821
1822 ac_retval=$ac_status
1823fi
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001826 as_fn_set_status $ac_retval
1827
1828} # ac_fn_c_try_run
1829
1830# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1831# -------------------------------------------------------
1832# Tests whether HEADER exists and can be compiled using the include files in
1833# INCLUDES, setting the cache variable VAR accordingly.
1834ac_fn_c_check_header_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001839if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845#include <$2>
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 eval "$3=yes"
1849else
1850 eval "$3=no"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001858
1859} # ac_fn_c_check_header_compile
1860
1861# ac_fn_c_try_link LINENO
1862# -----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded.
1864ac_fn_c_try_link ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 rm -f conftest.$ac_objext conftest$ac_exeext
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>conftest.err
1876 ac_status=$?
1877 if test -s conftest.err; then
1878 grep -v '^ *+' conftest.err >conftest.er1
1879 cat conftest.er1 >&5
1880 mv -f conftest.er1 conftest.err
1881 fi
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; } && {
1884 test -z "$ac_c_werror_flag" ||
1885 test ! -s conftest.err
1886 } && test -s conftest$ac_exeext && {
1887 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001888 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001889 }; then :
1890 ac_retval=0
1891else
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=1
1896fi
1897 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1898 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1899 # interfere with the next link command; also delete a directory that is
1900 # left behind by Apple's compiler. We do this before executing the actions.
1901 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001902 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001903 as_fn_set_status $ac_retval
1904
1905} # ac_fn_c_try_link
1906
1907# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1908# -------------------------------------------
1909# Tests whether TYPE exists after having included INCLUDES, setting cache
1910# variable VAR accordingly.
1911ac_fn_c_check_type ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001916if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=no"
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921/* end confdefs.h. */
1922$4
1923int
1924main ()
1925{
1926if (sizeof ($2))
1927 return 0;
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
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
1947else
1948 eval "$3=yes"
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001958
1959} # ac_fn_c_check_type
1960
1961# ac_fn_c_find_uintX_t LINENO BITS VAR
1962# ------------------------------------
1963# Finds an unsigned integer type with width BITS, setting cache variable VAR
1964# accordingly.
1965ac_fn_c_find_uintX_t ()
1966{
1967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1969$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001970if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971 $as_echo_n "(cached) " >&6
1972else
1973 eval "$3=no"
1974 # Order is important - never check a type that is potentially smaller
1975 # than half of the expected target width.
1976 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1977 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
1981int
1982main ()
1983{
1984static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001985test_array [0] = 0;
1986return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001987
1988 ;
1989 return 0;
1990}
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 case $ac_type in #(
1994 uint$2_t) :
1995 eval "$3=yes" ;; #(
1996 *) :
1997 eval "$3=\$ac_type" ;;
1998esac
1999fi
2000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002001 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002002
2003else
2004 break
2005fi
2006 done
2007fi
2008eval ac_res=\$$3
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2010$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002012
2013} # ac_fn_c_find_uintX_t
2014
2015# ac_fn_c_find_intX_t LINENO BITS VAR
2016# -----------------------------------
2017# Finds a signed integer type with width BITS, setting cache variable VAR
2018# accordingly.
2019ac_fn_c_find_intX_t ()
2020{
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2023$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002024if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025 $as_echo_n "(cached) " >&6
2026else
2027 eval "$3=no"
2028 # Order is important - never check a type that is potentially smaller
2029 # than half of the expected target width.
2030 for ac_type in int$2_t 'int' 'long int' \
2031 'long long int' 'short int' 'signed char'; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002035 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002036int
2037main ()
2038{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002039static 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 +01002040test_array [0] = 0;
2041return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002051 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002052int
2053main ()
2054{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002055static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002057test_array [0] = 0;
2058return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065
2066else
2067 case $ac_type in #(
2068 int$2_t) :
2069 eval "$3=yes" ;; #(
2070 *) :
2071 eval "$3=\$ac_type" ;;
2072esac
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002077 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002078
2079else
2080 break
2081fi
2082 done
2083fi
2084eval ac_res=\$$3
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002087 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002088
2089} # ac_fn_c_find_intX_t
2090
2091# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2092# --------------------------------------------
2093# Tries to find the compile-time value of EXPR in a program that includes
2094# INCLUDES, setting VAR accordingly. Returns whether the value could be
2095# computed
2096ac_fn_c_compute_int ()
2097{
2098 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099 if test "$cross_compiling" = yes; then
2100 # Depending upon the size, compute the lo and hi bounds.
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002108test_array [0] = 0;
2109return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_lo=0 ac_mid=0
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002125test_array [0] = 0;
2126return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_hi=$ac_mid; break
2134else
2135 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2136 if test $ac_lo -le $ac_mid; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148int
2149main ()
2150{
2151static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002152test_array [0] = 0;
2153return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_compile "$LINENO"; then :
2160 ac_hi=-1 ac_mid=-1
2161 while :; do
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
2166main ()
2167{
2168static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002169test_array [0] = 0;
2170return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_lo=$ac_mid; break
2178else
2179 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180 if test $ac_mid -le $ac_hi; then
2181 ac_lo= ac_hi=
2182 break
2183 fi
2184 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 done
2188else
2189 ac_lo= ac_hi=
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194# Binary search between lo and hi bounds.
2195while test "x$ac_lo" != "x$ac_hi"; do
2196 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002204test_array [0] = 0;
2205return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002206
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 ac_hi=$ac_mid
2213else
2214 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2215fi
2216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217done
2218case $ac_lo in #((
2219?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2220'') ac_retval=1 ;;
2221esac
2222 else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226static long int longval () { return $2; }
2227static unsigned long int ulongval () { return $2; }
2228#include <stdio.h>
2229#include <stdlib.h>
2230int
2231main ()
2232{
2233
2234 FILE *f = fopen ("conftest.val", "w");
2235 if (! f)
2236 return 1;
2237 if (($2) < 0)
2238 {
2239 long int i = longval ();
2240 if (i != ($2))
2241 return 1;
2242 fprintf (f, "%ld", i);
2243 }
2244 else
2245 {
2246 unsigned long int i = ulongval ();
2247 if (i != ($2))
2248 return 1;
2249 fprintf (f, "%lu", i);
2250 }
2251 /* Do not output a trailing newline, as this causes \r\n confusion
2252 on some platforms. */
2253 return ferror (f) || fclose (f) != 0;
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_run "$LINENO"; then :
2260 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2261else
2262 ac_retval=1
2263fi
2264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2265 conftest.$ac_objext conftest.beam conftest.$ac_ext
2266rm -f conftest.val
2267
2268 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002270 as_fn_set_status $ac_retval
2271
2272} # ac_fn_c_compute_int
2273
2274# ac_fn_c_check_func LINENO FUNC VAR
2275# ----------------------------------
2276# Tests whether FUNC exists, setting the cache variable VAR accordingly
2277ac_fn_c_check_func ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2281$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002282if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2289#define $2 innocuous_$2
2290
2291/* System header to define __stub macros and hopefully few prototypes,
2292 which can conflict with char $2 (); below.
2293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2294 <limits.h> exists even on freestanding compilers. */
2295
2296#ifdef __STDC__
2297# include <limits.h>
2298#else
2299# include <assert.h>
2300#endif
2301
2302#undef $2
2303
2304/* Override any GCC internal prototype to avoid an error.
2305 Use char because int might match the return type of a GCC
2306 builtin and then its argument prototype would still apply. */
2307#ifdef __cplusplus
2308extern "C"
2309#endif
2310char $2 ();
2311/* The GNU C library defines this for functions which it implements
2312 to always fail with ENOSYS. Some functions are actually named
2313 something starting with __ and the normal name is an alias. */
2314#if defined __stub_$2 || defined __stub___$2
2315choke me
2316#endif
2317
2318int
2319main ()
2320{
2321return $2 ();
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_link "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext \
2332 conftest$ac_exeext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002338
2339} # ac_fn_c_check_func
2340
2341# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2342# ----------------------------------------------------
2343# Tries to find if the field MEMBER exists in type AGGR, after including
2344# INCLUDES, setting cache variable VAR accordingly.
2345ac_fn_c_check_member ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2349$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002350if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002351 $as_echo_n "(cached) " >&6
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (sizeof ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 eval "$4=no"
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391eval ac_res=\$$4
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002395
2396} # ac_fn_c_check_member
2397
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002398# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2399# ---------------------------------------------
2400# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2401# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002402ac_fn_c_check_decl ()
2403{
2404 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002405 as_decl_name=`echo $2|sed 's/ *(.*//'`
2406 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2408$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002409if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002410 $as_echo_n "(cached) " >&6
2411else
2412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413/* end confdefs.h. */
2414$4
2415int
2416main ()
2417{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002418#ifndef $as_decl_name
2419#ifdef __cplusplus
2420 (void) $as_decl_use;
2421#else
2422 (void) $as_decl_name;
2423#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424#endif
2425
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
2431 eval "$3=yes"
2432else
2433 eval "$3=no"
2434fi
2435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2436fi
2437eval ac_res=\$$3
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002441
2442} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002443cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002444This file contains any messages produced by compilers while
2445running configure, to aid debugging if configure makes a mistake.
2446
Martin v. Löwis174440b2008-10-03 08:59:41 +00002447It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002448generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002449
2450 $ $0 $@
2451
2452_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002454{
2455cat <<_ASUNAME
2456## --------- ##
2457## Platform. ##
2458## --------- ##
2459
2460hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2461uname -m = `(uname -m) 2>/dev/null || echo unknown`
2462uname -r = `(uname -r) 2>/dev/null || echo unknown`
2463uname -s = `(uname -s) 2>/dev/null || echo unknown`
2464uname -v = `(uname -v) 2>/dev/null || echo unknown`
2465
2466/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2467/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2468
2469/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2470/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2471/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002473/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2474/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2475/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2476
2477_ASUNAME
2478
2479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002484 $as_echo "PATH: $as_dir"
2485 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002487
2488} >&5
2489
2490cat >&5 <<_ACEOF
2491
2492
2493## ----------- ##
2494## Core tests. ##
2495## ----------- ##
2496
2497_ACEOF
2498
2499
2500# Keep a trace of the command line.
2501# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002503# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002504# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002505ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002506ac_configure_args0=
2507ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002508ac_must_keep_next=false
2509for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002510do
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 for ac_arg
2512 do
2513 case $ac_arg in
2514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2516 | -silent | --silent | --silen | --sile | --sil)
2517 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002519 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 esac
2521 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002522 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002526 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002528 case $ac_arg in
2529 *=* | --config-cache | -C | -disable-* | --disable-* \
2530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2532 | -with-* | --with-* | -without-* | --without-* | --x)
2533 case "$ac_configure_args0 " in
2534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2535 esac
2536 ;;
2537 -* ) ac_must_keep_next=true ;;
2538 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002540 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002545{ ac_configure_args0=; unset ac_configure_args0;}
2546{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
2548# When interrupted or exit'd, cleanup temporary files, and complete
2549# config.log. We remove comments because anyway the quotes in there
2550# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551# WARNING: Use '\'' to represent an apostrophe within the trap.
2552# 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 +00002553trap 'exit_status=$?
2554 # Save into config.log some information that might help in debugging.
2555 {
2556 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002557
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002558 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002560## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
2562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563(
2564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in #(
2567 *${as_nl}*)
2568 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2570$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 esac
2572 case $ac_var in #(
2573 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2575 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac ;;
2577 esac
2578 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2581 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 "s/'\''/'\''\\\\'\'''\''/g;
2584 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2585 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002586 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002588 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac |
2590 sort
2591)
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002593
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002594 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002595## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002596## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 echo
2598 for ac_var in $ac_subst_vars
2599 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 eval ac_val=\$$ac_var
2601 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002602 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002604 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002605 done | sort
2606 echo
2607
2608 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002611## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 echo
2613 for ac_var in $ac_subst_files
2614 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 eval ac_val=\$$ac_var
2616 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 done | sort
2621 echo
2622 fi
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002625 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002626## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002627## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 echo
2631 fi
2632 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002633 $as_echo "$as_me: caught signal $ac_signal"
2634 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636 rm -f core *.core core.conftest.* &&
2637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002640for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002641 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002642done
2643ac_signal=0
2644
2645# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002648$as_echo "/* confdefs.h */" > confdefs.h
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650# Predefined preprocessor variables.
2651
2652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_NAME "$PACKAGE_NAME"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_VERSION "$PACKAGE_VERSION"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_STRING "$PACKAGE_STRING"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2670_ACEOF
2671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_URL "$PACKAGE_URL"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676
2677# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002678# Prefer an explicitly selected file to automatically selected ones.
2679ac_site_file1=NONE
2680ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002682 # We do not want a PATH search for config.site.
2683 case $CONFIG_SITE in #((
2684 -*) ac_site_file1=./$CONFIG_SITE;;
2685 */*) ac_site_file1=$CONFIG_SITE;;
2686 *) ac_site_file1=./$CONFIG_SITE;;
2687 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002689 ac_site_file1=$prefix/share/config.site
2690 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692 ac_site_file1=$ac_default_prefix/share/config.site
2693 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 test "x$ac_site_file" = xNONE && continue
2698 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2700$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002702 . "$ac_site_file" \
2703 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002706See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707 fi
2708done
2709
2710if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 # Some versions of bash will fail to source /dev/null (special files
2712 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2713 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2715$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 esac
2720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002722 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2723$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 >$cache_file
2725fi
2726
2727# Check that the precious variables saved in the cache have kept the same
2728# value.
2729ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2732 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 case $ac_old_set,$ac_new_set in
2736 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2738$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 +00002739 ac_cache_corrupted=: ;;
2740 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2742$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 ac_cache_corrupted=: ;;
2744 ,);;
2745 *)
2746 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747 # differences in whitespace do not lead to failure.
2748 ac_old_val_w=`echo x $ac_old_val`
2749 ac_new_val_w=`echo x $ac_new_val`
2750 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2752$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2753 ac_cache_corrupted=:
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2756$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2757 eval $ac_var=\$ac_old_val
2758 fi
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2760$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2762$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 fi;;
2764 esac
2765 # Pass precious variables to config.status.
2766 if test "$ac_new_set" = set; then
2767 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002768 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 *) ac_arg=$ac_var=$ac_new_val ;;
2770 esac
2771 case " $ac_configure_args " in
2772 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002773 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 esac
2775 fi
2776done
2777if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2781$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002782 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002784## -------------------- ##
2785## Main body of script. ##
2786## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787
Guido van Rossum7f43da71994-08-01 12:15:30 +00002788ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793
Guido van Rossum627b2d71993-12-24 10:39:16 +00002794
Michael W. Hudson54241132001-12-07 15:38:26 +00002795
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
2798
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002799ac_aux_dir=
2800for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2801 if test -f "$ac_dir/install-sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install-sh -c"
2804 break
2805 elif test -f "$ac_dir/install.sh"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/install.sh -c"
2808 break
2809 elif test -f "$ac_dir/shtool"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/shtool install -c"
2812 break
2813 fi
2814done
2815if test -z "$ac_aux_dir"; then
2816 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2817fi
2818
2819# These three variables are undocumented and unsupported,
2820# and are intended to be withdrawn in a future Autoconf release.
2821# They can cause serious problems if a builder's source tree is in a directory
2822# whose full name contains unusual characters.
2823ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2824ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2825ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2826
2827
2828# Make sure we can run config.sub.
2829$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2830 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2833$as_echo_n "checking build system type... " >&6; }
2834if ${ac_cv_build+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 ac_build_alias=$build_alias
2838test "x$ac_build_alias" = x &&
2839 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2840test "x$ac_build_alias" = x &&
2841 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2842ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2844
2845fi
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2847$as_echo "$ac_cv_build" >&6; }
2848case $ac_cv_build in
2849*-*-*) ;;
2850*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2851esac
2852build=$ac_cv_build
2853ac_save_IFS=$IFS; IFS='-'
2854set x $ac_cv_build
2855shift
2856build_cpu=$1
2857build_vendor=$2
2858shift; shift
2859# Remember, the first character of IFS is used to create $*,
2860# except with old shells:
2861build_os=$*
2862IFS=$ac_save_IFS
2863case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2864
2865
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2867$as_echo_n "checking host system type... " >&6; }
2868if ${ac_cv_host+:} false; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 if test "x$host_alias" = x; then
2872 ac_cv_host=$ac_cv_build
2873else
2874 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2875 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2876fi
2877
2878fi
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2880$as_echo "$ac_cv_host" >&6; }
2881case $ac_cv_host in
2882*-*-*) ;;
2883*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2884esac
2885host=$ac_cv_host
2886ac_save_IFS=$IFS; IFS='-'
2887set x $ac_cv_host
2888shift
2889host_cpu=$1
2890host_vendor=$2
2891shift; shift
2892# Remember, the first character of IFS is used to create $*,
2893# except with old shells:
2894host_os=$*
2895IFS=$ac_save_IFS
2896case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2897
2898
2899
2900
2901
Ned Deily983df862014-08-22 13:30:59 -07002902# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2903rm -f pybuilddir.txt
2904
Victor Stinner8a19eb22017-05-05 03:14:23 +02002905for ac_prog in python$PACKAGE_VERSION python3 python
2906do
2907 # Extract the first word of "$ac_prog", so it can be a program name with args.
2908set dummy $ac_prog; ac_word=$2
2909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2910$as_echo_n "checking for $ac_word... " >&6; }
2911if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2912 $as_echo_n "(cached) " >&6
2913else
2914 if test -n "$PYTHON_FOR_REGEN"; then
2915 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
2916else
2917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2918for as_dir in $PATH
2919do
2920 IFS=$as_save_IFS
2921 test -z "$as_dir" && as_dir=.
2922 for ac_exec_ext in '' $ac_executable_extensions; do
2923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2924 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
2925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2926 break 2
2927 fi
2928done
2929 done
2930IFS=$as_save_IFS
2931
2932fi
2933fi
2934PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2935if test -n "$PYTHON_FOR_REGEN"; then
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2937$as_echo "$PYTHON_FOR_REGEN" >&6; }
2938else
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2940$as_echo "no" >&6; }
2941fi
2942
2943
2944 test -n "$PYTHON_FOR_REGEN" && break
2945done
2946test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
2947
2948
2949
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002950if test "$cross_compiling" = yes; then
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2952$as_echo_n "checking for python interpreter for cross build... " >&6; }
2953 if test -z "$PYTHON_FOR_BUILD"; then
2954 for interp in python$PACKAGE_VERSION python2 python; do
2955 which $interp >/dev/null 2>&1 || continue
2956 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2957 break
2958 fi
2959 interp=
2960 done
2961 if test x$interp = x; then
2962 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2963 fi
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2965$as_echo "$interp" >&6; }
Victor Stinner8a19eb22017-05-05 03:14:23 +02002966 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002967 fi
2968elif test "$cross_compiling" = maybe; then
2969 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2970else
2971 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2972fi
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Georg Brandlbcd64a32009-03-31 21:45:18 +00002976if test "$prefix" != "/"; then
2977 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
2982
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002983# We don't use PACKAGE_ variables, and they cause conflicts
2984# with other autoconf-based packages that include Python.h
2985grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2986rm confdefs.h
2987mv confdefs.h.new confdefs.h
2988
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002989
Martin v. Löwis174440b2008-10-03 08:59:41 +00002990VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002991
Martin v. Löwis1142de32002-03-29 16:28:31 +00002992
2993SOVERSION=1.0
2994
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002995# The later defininition of _XOPEN_SOURCE disables certain features
2996# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002998$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999
3000
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3002# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3003# them.
3004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003006
3007
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3010# them.
3011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003012$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003013
3014
Martin v. Löwisd6320502004-08-12 13:45:08 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003019
3020
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003021# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3022# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3023# them.
3024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003025$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003026
3027
3028
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003029define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003030
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003031# Arguments passed to configure.
3032
3033CONFIG_ARGS="$ac_configure_args"
3034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3036$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003037# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003038if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003039 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003040 case $enableval in
3041 yes)
3042 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003043 if test ! -d "${enableval}"
3044 then
3045 enableval=/
3046 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003047 ;;
3048 esac
3049 case $enableval in
3050 no)
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053 ;;
3054 *)
3055 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003056 if test ! -d "${UNIVERSALSDK}"
3057 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003058 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003059 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003060 ;;
3061 esac
3062
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003063
Ronald Oussoren988117f2006-04-29 11:31:35 +00003064else
3065
3066 UNIVERSALSDK=
3067 enable_universalsdk=
3068
Martin v. Löwiseba40652007-08-30 20:10:57 +00003069fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003070
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003071if test -n "${UNIVERSALSDK}"
3072then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3074$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3077$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003078fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003079
Martin v. Löwiseba40652007-08-30 20:10:57 +00003080
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003081
Ned Deily8e60f6e2013-05-30 00:14:29 -07003082ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003083
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003084UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003090if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003091 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3093$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003094 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003095 if test "${enable_universalsdk}" ; then
3096 :
3097 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003098 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003099 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003100
3101else
3102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3104$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003105
3106fi
3107
3108
3109
3110
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003111
3112# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003113if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003114 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003115 if test "${enable_framework}"; then
3116 :
3117 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003118 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003119 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003120 PYTHONFRAMEWORK=${withval}
3121 PYTHONFRAMEWORKDIR=${withval}.framework
3122 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3123
3124else
3125
3126 PYTHONFRAMEWORK=Python
3127 PYTHONFRAMEWORKDIR=Python.framework
3128 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3129
3130fi
3131
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003133if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003134 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003135 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003136 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003137 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 esac
3139 case $enableval in
3140 no)
3141 PYTHONFRAMEWORK=
3142 PYTHONFRAMEWORKDIR=no-framework
3143 PYTHONFRAMEWORKPREFIX=
3144 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003145 FRAMEWORKINSTALLFIRST=
3146 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003147 FRAMEWORKALTINSTALLFIRST=
3148 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003149 if test "x${prefix}" = "xNONE"; then
3150 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3151 else
3152 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3153 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003154 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003155 ;;
3156 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003157 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003158 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003159 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003160 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003161 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3162 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003164
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003165 if test "x${prefix}" = "xNONE" ; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003167
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003168 else
3169 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3170 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003171
3172 case "${enableval}" in
3173 /System*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 if test "${prefix}" = "NONE" ; then
3176 # See below
3177 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3178 fi
3179 ;;
3180
3181 /Library*)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184
3185 */Library/Frameworks)
3186 MDIR="`dirname "${enableval}"`"
3187 MDIR="`dirname "${MDIR}"`"
3188 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3189
3190 if test "${prefix}" = "NONE"; then
3191 # User hasn't specified the
3192 # --prefix option, but wants to install
3193 # the framework in a non-default location,
3194 # ensure that the compatibility links get
3195 # installed relative to that prefix as well
3196 # instead of in /usr/local.
3197 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3198 fi
3199 ;;
3200
3201 *)
3202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3203 ;;
3204 esac
3205
Jack Jansen127e56e2001-09-11 14:41:54 +00003206 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003207
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003208 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003209 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003211
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003213
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003215
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003216 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3217
3218 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003221
Guido van Rossum563e7081996-09-10 18:20:48 +00003222else
Martin v. Löwis11437992002-04-12 09:54:03 +00003223
Jack Jansene578a632001-08-15 01:27:14 +00003224 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003225 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003226 PYTHONFRAMEWORKPREFIX=
3227 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003228 FRAMEWORKINSTALLFIRST=
3229 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003230 FRAMEWORKALTINSTALLFIRST=
3231 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003232 if test "x${prefix}" = "xNONE" ; then
3233 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3234 else
3235 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3236 fi
Jack Jansene578a632001-08-15 01:27:14 +00003237 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003239
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240fi
3241
Michael W. Hudson54241132001-12-07 15:38:26 +00003242
3243
3244
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003247
3248
Ronald Oussoren5b787322006-06-06 19:50:24 +00003249
3250
3251
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003252
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003253
Jack Jansene578a632001-08-15 01:27:14 +00003254##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003255## AS_HELP_STRING([--with-dyld],
3256## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003257##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258# Set name for machine-dependent library files
3259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3261$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262if test -z "$MACHDEP"
3263then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003264 # avoid using uname for cross builds
3265 if test "$cross_compiling" = yes; then
3266 # ac_sys_system and ac_sys_release are only used for setting
3267 # `define_xopen_source' in the case statement below. For the
3268 # current supported cross builds, this macro is not adjusted.
3269 case "$host" in
3270 *-*-linux*)
3271 ac_sys_system=Linux
3272 ;;
3273 *-*-cygwin*)
3274 ac_sys_system=Cygwin
3275 ;;
3276 *)
3277 # for now, limit cross builds to known configurations
3278 MACHDEP="unknown"
3279 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3280 esac
3281 ac_sys_release=
3282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003284 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003285 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003286 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003288 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003290 fi
3291 ac_md_system=`echo $ac_sys_system |
3292 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3293 ac_md_release=`echo $ac_sys_release |
3294 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3295 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003296
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003297 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003298 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003299 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003300 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003301 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003304 esac
3305fi
3306
3307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003326 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003328fi
Guido van Rossum91922671997-10-09 20:24:13 +00003329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003352
3353 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003354 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003360
3361 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003365 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 +00003366 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003396 Darwin/1[0-9].*)
3397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003419$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3423 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3424 # several APIs are not declared. Since this is also needed in some
3425 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003427$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003430
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003431$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
3433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003439# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003455
3456PLATDIR=plat-$MACHDEP
3457
Jack Jansen83f898c2002-12-30 22:23:40 +00003458# And add extra plat-mac for darwin
3459
Jack Jansen7b59b422003-03-17 15:44:10 +00003460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3462$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003463if test -z "$EXTRAPLATDIR"
3464then
3465 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003466 darwin)
3467 EXTRAPLATDIR="\$(PLATMACDIRS)"
3468 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3469 ;;
3470 *)
3471 EXTRAPLATDIR=""
3472 EXTRAMACHDEPPATH=""
3473 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003474 esac
3475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3477$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003478
Jack Jansen6b08a402004-06-03 12:41:45 +00003479# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3480# it may influence the way we can build extensions, so distutils
3481# needs to check it
3482
Ronald Oussoren988117f2006-04-29 11:31:35 +00003483
Jack Jansen6b08a402004-06-03 12:41:45 +00003484CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003485EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003486
Guido van Rossum627b2d71993-12-24 10:39:16 +00003487# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003488
3489# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3490# for debug/optimization stuff. BASECFLAGS is for flags that are required
3491# just to get things to compile and link. Users are free to override OPT
3492# when running configure or make. The build should not break if they do.
3493# BASECFLAGS should generally not be messed with, however.
3494
3495# XXX shouldn't some/most/all of this code be merged with the stuff later
3496# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3498$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003499
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003503 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003504 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003505 without_gcc=yes;;
3506 yes) CC=gcc
3507 without_gcc=no;;
3508 *) CC=$withval
3509 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003511else
Martin v. Löwis11437992002-04-12 09:54:03 +00003512
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003513 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003514 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003515 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003516 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003517 case $BE_HOST_CPU in
3518 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003519 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003520 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003521 BASECFLAGS="$BASECFLAGS -export pragma"
3522 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003523 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003524 ;;
3525 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003526 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003527 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003528 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003529 ;;
3530 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003531 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003532 ;;
3533 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003534 AR="\$(srcdir)/Modules/ar_beos"
3535 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003536 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003537 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003538 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003539fi
3540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3542$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003543
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3545$as_echo_n "checking for --with-icc... " >&6; }
3546
3547# Check whether --with-icc was given.
3548if test "${with_icc+set}" = set; then :
3549 withval=$with_icc;
3550 case $withval in
3551 no) CC=${CC:-cc}
3552 with_icc=no;;
3553 yes) CC=icc
3554 CXX=icpc
3555 with_icc=yes;;
3556 *) CC=$withval
3557 with_icc=$withval;;
3558 esac
3559else
3560
3561 with_icc=no
3562fi
3563
3564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3565$as_echo "$with_icc" >&6; }
3566
Guido van Rossum8b131c51995-03-09 14:10:13 +00003567# If the user switches compilers, we can't believe the cache
3568if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3569then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003570 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003571(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003572fi
3573
Trent Nelson15daa352012-12-13 06:46:39 +00003574if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3575 # Normally, MIPSpro CC treats #error directives as warnings, which means
3576 # a successful exit code is returned (0). This is a problem because IRIX
3577 # has a bunch of system headers with this guard at the top:
3578 #
3579 # #ifndef __c99
3580 # #error This header file is to be used only for c99 mode compilations
3581 # #else
3582 #
3583 # When autoconf tests for such a header, like stdint.h, this happens:
3584 #
3585 # configure:4619: cc -c conftest.c >&5
3586 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3587 # #error directive: This header file is to be used only for c99 mode
3588 # compilations
3589 #
3590 # #error This header file is to be used only for c99 mode compilations
3591 # ^
3592 #
3593 # configure:4619: $? = 0
3594 # configure:4619: result: yes
3595 #
3596 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3597 # warning as an error, which causes cc to return a non-zero result,
3598 # which autoconf can interpret correctly.
3599 CFLAGS="$CFLAGS -diag_error 1035"
3600 # Whilst we're here, we might as well make sure CXX defaults to something
3601 # sensible if we're not using gcc.
3602 if test -z "$CXX"; then
3603 CXX="CC"
3604 fi
3605fi
3606
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003607# If the user set CFLAGS, use this instead of the automatically
3608# determined setting
3609preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615if test -n "$ac_tool_prefix"; then
3616 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3617set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003620if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622else
3623 if test -n "$CC"; then
3624 ac_cv_prog_CC="$CC" # Let the user override the test.
3625else
Martin v. Löwis11437992002-04-12 09:54:03 +00003626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 $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 +00003635 break 2
3636 fi
3637done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003643CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003644if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3646$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654if test -z "$ac_cv_prog_CC"; then
3655 ac_ct_CC=$CC
3656 # Extract the first word of "gcc", so it can be a program name with args.
3657set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003660if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 if test -n "$ac_ct_CC"; then
3664 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3665else
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 break 2
3676 fi
3677done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
3681fi
3682fi
3683ac_ct_CC=$ac_cv_prog_ac_ct_CC
3684if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3686$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692 if test "x$ac_ct_CC" = x; then
3693 CC=""
3694 else
3695 case $cross_compiling:$ac_tool_warned in
3696yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699ac_tool_warned=yes ;;
3700esac
3701 CC=$ac_ct_CC
3702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
3704 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003705fi
3706
Jack Jansendd19cf82001-12-06 22:36:17 +00003707if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 if test -n "$ac_tool_prefix"; then
3709 # 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 +00003710set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003713if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003727 $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 +00003728 break 2
3729 fi
3730done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003731 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
3734fi
3735fi
3736CC=$ac_cv_prog_CC
3737if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3739$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
3744
Martin v. Löwiseba40652007-08-30 20:10:57 +00003745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$CC"; then
3749 # Extract the first word of "cc", so it can be a program name with args.
3750set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003753if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3768 ac_prog_rejected=yes
3769 continue
3770 fi
3771 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 break 2
3774 fi
3775done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test $ac_prog_rejected = yes; then
3780 # We found a bogon in the path, so make sure we never use it.
3781 set dummy $ac_cv_prog_CC
3782 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784 # We chose a different compiler from the bogus one.
3785 # However, it has the same basename, so the bogon will be chosen
3786 # first if we set CC to just the basename; use the full file name.
3787 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003788 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003789 fi
3790fi
3791fi
3792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3796$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800fi
3801
Martin v. Löwiseba40652007-08-30 20:10:57 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803fi
3804if test -z "$CC"; then
3805 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 do
3808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003812if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 $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 +00003827 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003829done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
3833fi
3834fi
3835CC=$ac_cv_prog_CC
3836if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3838$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3841$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003842fi
3843
Martin v. Löwiseba40652007-08-30 20:10:57 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 test -n "$CC" && break
3846 done
3847fi
3848if test -z "$CC"; then
3849 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003850 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003851do
3852 # Extract the first word of "$ac_prog", so it can be a program name with args.
3853set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003856if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003858else
3859 if test -n "$ac_ct_CC"; then
3860 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3861else
3862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863for as_dir in $PATH
3864do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870 $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 +00003871 break 2
3872 fi
3873done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003874 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878fi
3879ac_ct_CC=$ac_cv_prog_ac_ct_CC
3880if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3882$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003887
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 test -n "$ac_ct_CC" && break
3890done
Michael W. Hudson54241132001-12-07 15:38:26 +00003891
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 if test "x$ac_ct_CC" = x; then
3893 CC=""
3894 else
3895 case $cross_compiling:$ac_tool_warned in
3896yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899ac_tool_warned=yes ;;
3900esac
3901 CC=$ac_ct_CC
3902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903fi
3904
3905fi
3906
3907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003908test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003910as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003911See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
3913# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003914$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3915set X $ac_compile
3916ac_compiler=$2
3917for ac_option in --version -v -V -qversion; do
3918 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
3925 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927 if test -s conftest.err; then
3928 sed '10a\
3929... rest of stderr output deleted ...
3930 10q' conftest.err >conftest.er1
3931 cat conftest.er1 >&5
3932 fi
3933 rm -f conftest.er1 conftest.err
3934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }
3936done
Martin v. Löwis11437992002-04-12 09:54:03 +00003937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003940
Martin v. Löwis11437992002-04-12 09:54:03 +00003941int
3942main ()
3943{
3944
3945 ;
3946 return 0;
3947}
3948_ACEOF
3949ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003950ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003951# Try to create an executable without -o first, disregard a.out.
3952# It will help us diagnose broken compilers, and finding out an intuition
3953# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3955$as_echo_n "checking whether the C compiler works... " >&6; }
3956ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3957
3958# The possible output files:
3959ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3960
Martin v. Löwiseba40652007-08-30 20:10:57 +00003961ac_rmfiles=
3962for ac_file in $ac_files
3963do
3964 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003966 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3967 esac
3968done
3969rm -f $ac_rmfiles
3970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003971if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972case "(($ac_try" in
3973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974 *) ac_try_echo=$ac_try;;
3975esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3983# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3984# in a Makefile. We should not override ac_cv_exeext if it was cached,
3985# so that the user can short-circuit this test for compilers unknown to
3986# Autoconf.
3987for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003988do
3989 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003991 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003992 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003993 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003994 # We found the default executable, but exeext='' is most
3995 # certainly right.
3996 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003997 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003999 then :; else
4000 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4001 fi
4002 # We set ac_cv_exeext here because the later test for it is not
4003 # safe: cross compilers may not add the suffix if given an `-o'
4004 # argument, so we may need to know it at that point already.
4005 # Even if this section looks crufty: it has the advantage of
4006 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00004007 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004008 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004009 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 esac
4011done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004012test "$ac_cv_exeext" = no && ac_cv_exeext=
4013
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004014else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015 ac_file=''
4016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017if test -z "$ac_file"; then :
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4019$as_echo "no" >&6; }
4020$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004021sed 's/^/| /' conftest.$ac_ext >&5
4022
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004025as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01004026See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004027else
4028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4029$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4032$as_echo_n "checking for C compiler default output file name... " >&6; }
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4034$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004035ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004038ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4040$as_echo_n "checking for suffix of executables... " >&6; }
4041if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4053# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4054# work properly (i.e., refer to `conftest.exe'), while it won't with
4055# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004056for ac_file in conftest.exe conftest conftest.*; do
4057 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004059 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004061 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004062 * ) break;;
4063 esac
4064done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004068as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004069See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004071rm -f conftest conftest$ac_cv_exeext
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4073$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004074
4075rm -f conftest.$ac_ext
4076EXEEXT=$ac_cv_exeext
4077ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079/* end confdefs.h. */
4080#include <stdio.h>
4081int
4082main ()
4083{
4084FILE *f = fopen ("conftest.out", "w");
4085 return ferror (f) || fclose (f) != 0;
4086
4087 ;
4088 return 0;
4089}
Skip Montanaro6dead952003-09-25 14:50:04 +00004090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091ac_clean_files="$ac_clean_files conftest.out"
4092# Check that the compiler produces executables we can run. If not, either
4093# the compiler is broken, or we cross compile.
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4095$as_echo_n "checking whether we are cross compiling... " >&6; }
4096if test "$cross_compiling" != yes; then
4097 { { ac_try="$ac_link"
4098case "(($ac_try" in
4099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4100 *) ac_try_echo=$ac_try;;
4101esac
4102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4103$as_echo "$ac_try_echo"; } >&5
4104 (eval "$ac_link") 2>&5
4105 ac_status=$?
4106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4107 test $ac_status = 0; }
4108 if { ac_try='./conftest$ac_cv_exeext'
4109 { { case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_try") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }; }; then
4119 cross_compiling=no
4120 else
4121 if test "$cross_compiling" = maybe; then
4122 cross_compiling=yes
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004126as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004128See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129 fi
4130 fi
4131fi
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4133$as_echo "$cross_compiling" >&6; }
4134
4135rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4136ac_clean_files=$ac_clean_files_save
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4138$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004139if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 $as_echo_n "(cached) " >&6
4141else
4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004144
Martin v. Löwis11437992002-04-12 09:54:03 +00004145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004154if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004155case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4160$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004161 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4164 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004165 for ac_file in conftest.o conftest.obj conftest.*; do
4166 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4170 break;;
4171 esac
4172done
4173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004175sed 's/^/| /' conftest.$ac_ext >&5
4176
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004179as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004180See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004182rm -f conftest.$ac_cv_objext conftest.$ac_ext
4183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4185$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004186OBJEXT=$ac_cv_objext
4187ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4189$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004190if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199#ifndef __GNUC__
4200 choke me
4201#endif
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 ac_compiler_gnu=yes
4209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004210 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_cv_c_compiler_gnu=$ac_compiler_gnu
4214
4215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4217$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4218if test $ac_compiler_gnu = yes; then
4219 GCC=yes
4220else
4221 GCC=
4222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004223ac_test_CFLAGS=${CFLAGS+set}
4224ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4226$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004227if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004229else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004230 ac_save_c_werror_flag=$ac_c_werror_flag
4231 ac_c_werror_flag=yes
4232 ac_cv_prog_cc_g=no
4233 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248 CFLAGS=""
4249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250/* end confdefs.h. */
4251
4252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262else
4263 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266/* end confdefs.h. */
4267
4268int
4269main ()
4270{
4271
4272 ;
4273 return 0;
4274}
4275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 ac_c_werror_flag=$ac_save_c_werror_flag
4285fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4287$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290elif test $ac_cv_prog_cc_g = yes; then
4291 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292 CFLAGS="-g -O2"
4293 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295 fi
4296else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297 if test "$GCC" = yes; then
4298 CFLAGS="-O2"
4299 else
4300 CFLAGS=
4301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4304$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004305if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004306 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004308 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004309ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004311/* end confdefs.h. */
4312#include <stdarg.h>
4313#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004314struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4316struct buf { int x; };
4317FILE * (*rcsopen) (struct buf *, struct stat *, int);
4318static char *e (p, i)
4319 char **p;
4320 int i;
4321{
4322 return p[i];
4323}
4324static char *f (char * (*g) (char **, int), char **p, ...)
4325{
4326 char *s;
4327 va_list v;
4328 va_start (v,p);
4329 s = g (p, va_arg (v,int));
4330 va_end (v);
4331 return s;
4332}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004333
4334/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4335 function prototypes and stuff, but not '\xHH' hex character constants.
4336 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004337 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4339 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004341int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4342
Martin v. Löwiseba40652007-08-30 20:10:57 +00004343/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4344 inside strings and character constants. */
4345#define FOO(x) 'x'
4346int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4347
Skip Montanaro6dead952003-09-25 14:50:04 +00004348int test (int i, double x);
4349struct s1 {int (*f) (int a);};
4350struct s2 {int (*f) (double a);};
4351int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4352int argc;
4353char **argv;
4354int
4355main ()
4356{
4357return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4358 ;
4359 return 0;
4360}
4361_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4363 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004364do
4365 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004366 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369rm -f core conftest.err conftest.$ac_objext
4370 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004371done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004373CC=$ac_save_CC
4374
4375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004376# AC_CACHE_VAL
4377case "x$ac_cv_prog_cc_c89" in
4378 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4380$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4383$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004384 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004385 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4387$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004388esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004389if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004392
Martin v. Löwis11437992002-04-12 09:54:03 +00004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004399if test ! -z "$preset_cflags"
4400then
4401 CFLAGS=$preset_cflags
4402fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004403
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004404
4405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4407$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004408
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004411 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004412
4413 case $withval in
4414 no) with_cxx_main=no
4415 MAINCC='$(CC)';;
4416 yes) with_cxx_main=yes
4417 MAINCC='$(CXX)';;
4418 *) with_cxx_main=yes
4419 MAINCC=$withval
4420 if test -z "$CXX"
4421 then
4422 CXX=$withval
4423 fi;;
4424 esac
4425else
4426
4427 with_cxx_main=no
4428 MAINCC='$(CC)'
4429
Martin v. Löwiseba40652007-08-30 20:10:57 +00004430fi
4431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4433$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004434
4435preset_cxx="$CXX"
4436if test -z "$CXX"
4437then
4438 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004439 gcc) if test -n "$ac_tool_prefix"; then
4440 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4441set dummy ${ac_tool_prefix}g++; ac_word=$2
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443$as_echo_n "checking for $ac_word... " >&6; }
4444if ${ac_cv_path_CXX+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446else
4447 case $CXX in
4448 [\\/]* | ?:[\\/]*)
4449 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4450 ;;
4451 *)
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in notfound
4454do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
4457 for ac_exec_ext in '' $ac_executable_extensions; do
4458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4461 break 2
4462 fi
4463done
4464 done
4465IFS=$as_save_IFS
4466
4467 ;;
4468esac
4469fi
4470CXX=$ac_cv_path_CXX
4471if test -n "$CXX"; then
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4473$as_echo "$CXX" >&6; }
4474else
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
4477fi
4478
4479
4480fi
4481if test -z "$ac_cv_path_CXX"; then
4482 ac_pt_CXX=$CXX
4483 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004484set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004487if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004488 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004489else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004490 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004491 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004492 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 +00004493 ;;
4494 *)
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in notfound
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004500 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004502 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503 $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 +00004504 break 2
4505 fi
4506done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004507 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004508IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004509
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004510 ;;
4511esac
4512fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004513ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4514if test -n "$ac_pt_CXX"; then
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4516$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004521
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004522 if test "x$ac_pt_CXX" = x; then
4523 CXX="g++"
4524 else
4525 case $cross_compiling:$ac_tool_warned in
4526yes:)
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4529ac_tool_warned=yes ;;
4530esac
4531 CXX=$ac_pt_CXX
4532 fi
4533else
4534 CXX="$ac_cv_path_CXX"
4535fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004537 cc) if test -n "$ac_tool_prefix"; then
4538 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4539set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4541$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004542if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004544else
4545 case $CXX in
4546 [\\/]* | ?:[\\/]*)
4547 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4548 ;;
4549 *)
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4551for as_dir in notfound
4552do
4553 IFS=$as_save_IFS
4554 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004555 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004557 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004558 $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 +00004559 break 2
4560 fi
4561done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004563IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004564
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004565 ;;
4566esac
4567fi
4568CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004569if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4571$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4574$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004576
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004577
4578fi
4579if test -z "$ac_cv_path_CXX"; then
4580 ac_pt_CXX=$CXX
4581 # Extract the first word of "c++", so it can be a program name with args.
4582set dummy c++; ac_word=$2
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4584$as_echo_n "checking for $ac_word... " >&6; }
4585if ${ac_cv_path_ac_pt_CXX+:} false; then :
4586 $as_echo_n "(cached) " >&6
4587else
4588 case $ac_pt_CXX in
4589 [\\/]* | ?:[\\/]*)
4590 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4591 ;;
4592 *)
4593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in notfound
4595do
4596 IFS=$as_save_IFS
4597 test -z "$as_dir" && as_dir=.
4598 for ac_exec_ext in '' $ac_executable_extensions; do
4599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4600 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602 break 2
4603 fi
4604done
4605 done
4606IFS=$as_save_IFS
4607
4608 ;;
4609esac
4610fi
4611ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4612if test -n "$ac_pt_CXX"; then
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4614$as_echo "$ac_pt_CXX" >&6; }
4615else
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4617$as_echo "no" >&6; }
4618fi
4619
4620 if test "x$ac_pt_CXX" = x; then
4621 CXX="c++"
4622 else
4623 case $cross_compiling:$ac_tool_warned in
4624yes:)
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4627ac_tool_warned=yes ;;
4628esac
4629 CXX=$ac_pt_CXX
4630 fi
4631else
4632 CXX="$ac_cv_path_CXX"
4633fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004634 ;;
4635 esac
4636 if test "$CXX" = "notfound"
4637 then
4638 CXX=""
4639 fi
4640fi
4641if test -z "$CXX"
4642then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004643 if test -n "$ac_tool_prefix"; then
4644 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4645 do
4646 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004650if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004651 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652else
4653 if test -n "$CXX"; then
4654 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4655else
4656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4657for as_dir in $PATH
4658do
4659 IFS=$as_save_IFS
4660 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004661 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004663 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004664 $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 +00004665 break 2
4666 fi
4667done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004668 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004669IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004670
4671fi
4672fi
4673CXX=$ac_cv_prog_CXX
4674if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4676$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004680fi
4681
Martin v. Löwiseba40652007-08-30 20:10:57 +00004682
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004683 test -n "$CXX" && break
4684 done
4685fi
4686if test -z "$CXX"; then
4687 ac_ct_CXX=$CXX
4688 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4689do
4690 # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4695 $as_echo_n "(cached) " >&6
4696else
4697 if test -n "$ac_ct_CXX"; then
4698 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4699else
4700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in $PATH
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
4706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4707 ac_cv_prog_ac_ct_CXX="$ac_prog"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004711done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004712 done
4713IFS=$as_save_IFS
4714
4715fi
4716fi
4717ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4718if test -n "$ac_ct_CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4720$as_echo "$ac_ct_CXX" >&6; }
4721else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
4724fi
4725
4726
4727 test -n "$ac_ct_CXX" && break
4728done
4729
4730 if test "x$ac_ct_CXX" = x; then
4731 CXX="notfound"
4732 else
4733 case $cross_compiling:$ac_tool_warned in
4734yes:)
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4737ac_tool_warned=yes ;;
4738esac
4739 CXX=$ac_ct_CXX
4740 fi
4741fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004742
4743 if test "$CXX" = "notfound"
4744 then
4745 CXX=""
4746 fi
4747fi
4748if test "$preset_cxx" != "$CXX"
4749then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004751
4752 By default, distutils will build C++ extension modules with \"$CXX\".
4753 If this is not intended, then set CXX on the configure command line.
4754 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004756
4757 By default, distutils will build C++ extension modules with \"$CXX\".
4758 If this is not intended, then set CXX on the configure command line.
4759 " >&2;}
4760fi
4761
doko@python.org4e63fbe2013-01-25 13:08:27 +01004762MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4763
4764
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004765
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004766# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004767
4768ac_ext=c
4769ac_cpp='$CPP $CPPFLAGS'
4770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4772ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4774$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004775# On Suns, sometimes $CPP names a directory.
4776if test -n "$CPP" && test -d "$CPP"; then
4777 CPP=
4778fi
4779if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004780 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 # Double quotes because CPP needs to be expanded
4784 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4785 do
4786 ac_preproc_ok=false
4787for ac_c_preproc_warn_flag in '' yes
4788do
4789 # Use a header file that comes with gcc, so configuring glibc
4790 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004791 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4792 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004793 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004796/* end confdefs.h. */
4797#ifdef __STDC__
4798# include <limits.h>
4799#else
4800# include <assert.h>
4801#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004802 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004804if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806else
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 # Broken: fails on valid input.
4808continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004809fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004810rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004811
Martin v. Löwiseba40652007-08-30 20:10:57 +00004812 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004813 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004816#include <ac_nonexistent.h>
4817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004818if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 # Broken: success on invalid input.
4820continue
4821else
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 # Passes both tests.
4823ac_preproc_ok=:
4824break
4825fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004826rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004827
4828done
4829# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004830rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004832 break
4833fi
4834
4835 done
4836 ac_cv_prog_CPP=$CPP
4837
4838fi
4839 CPP=$ac_cv_prog_CPP
4840else
4841 ac_cv_prog_CPP=$CPP
4842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4844$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004845ac_preproc_ok=false
4846for ac_c_preproc_warn_flag in '' yes
4847do
4848 # Use a header file that comes with gcc, so configuring glibc
4849 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004850 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4851 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004852 # On the NeXT, cc -E runs the code through the compiler's parser,
4853 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004855/* end confdefs.h. */
4856#ifdef __STDC__
4857# include <limits.h>
4858#else
4859# include <assert.h>
4860#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004861 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865else
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # Broken: fails on valid input.
4867continue
4868fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004869rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004870
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004875#include <ac_nonexistent.h>
4876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 # Broken: success on invalid input.
4879continue
4880else
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 # Passes both tests.
4882ac_preproc_ok=:
4883break
4884fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004885rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004886
4887done
4888# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004889rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004890if $ac_preproc_ok; then :
4891
Martin v. Löwis11437992002-04-12 09:54:03 +00004892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004895as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004896See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004897fi
4898
4899ac_ext=c
4900ac_cpp='$CPP $CPPFLAGS'
4901ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4903ac_compiler_gnu=$ac_cv_c_compiler_gnu
4904
4905
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4907$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004908if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004909 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004910else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004913 # Loop through the user's path and test for each of PROGNAME-LIST
4914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004915for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4916do
4917 IFS=$as_save_IFS
4918 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 for ac_prog in grep ggrep; do
4920 for ac_exec_ext in '' $ac_executable_extensions; do
4921 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004922 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004924 # Check for GNU $ac_path_GREP
4925case `"$ac_path_GREP" --version 2>&1` in
4926*GNU*)
4927 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4928*)
4929 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004930 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931 while :
4932 do
4933 cat "conftest.in" "conftest.in" >"conftest.tmp"
4934 mv "conftest.tmp" "conftest.in"
4935 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4938 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4941 # Best one so far, save it but keep looking for a better one
4942 ac_cv_path_GREP="$ac_path_GREP"
4943 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004944 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 # 10*(2^10) chars as input seems more than enough
4946 test $ac_count -gt 10 && break
4947 done
4948 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4949esac
4950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004951 $ac_path_GREP_found && break 3
4952 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004954 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004955IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004956 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004957 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 +00004958 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004959else
4960 ac_cv_path_GREP=$GREP
4961fi
4962
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4965$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966 GREP="$ac_cv_path_GREP"
4967
4968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4970$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004971if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004972 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973else
4974 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4975 then ac_cv_path_EGREP="$GREP -E"
4976 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979 # Loop through the user's path and test for each of PROGNAME-LIST
4980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4982do
4983 IFS=$as_save_IFS
4984 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985 for ac_prog in egrep; do
4986 for ac_exec_ext in '' $ac_executable_extensions; do
4987 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004988 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004990 # Check for GNU $ac_path_EGREP
4991case `"$ac_path_EGREP" --version 2>&1` in
4992*GNU*)
4993 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4994*)
4995 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004996 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997 while :
4998 do
4999 cat "conftest.in" "conftest.in" >"conftest.tmp"
5000 mv "conftest.tmp" "conftest.in"
5001 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005003 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5004 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00005006 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5007 # Best one so far, save it but keep looking for a better one
5008 ac_cv_path_EGREP="$ac_path_EGREP"
5009 ac_path_EGREP_max=$ac_count
5010 fi
5011 # 10*(2^10) chars as input seems more than enough
5012 test $ac_count -gt 10 && break
5013 done
5014 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5015esac
5016
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005017 $ac_path_EGREP_found && break 3
5018 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005019 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005020 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005022 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005023 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 +00005024 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005025else
5026 ac_cv_path_EGREP=$EGREP
5027fi
5028
Martin v. Löwiseba40652007-08-30 20:10:57 +00005029 fi
5030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5032$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005033 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005034
5035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5037$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005038if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005039 $as_echo_n "(cached) " >&6
5040else
5041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005042/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043#include <stdlib.h>
5044#include <stdarg.h>
5045#include <string.h>
5046#include <float.h>
5047
5048int
5049main ()
5050{
5051
5052 ;
5053 return 0;
5054}
5055_ACEOF
5056if ac_fn_c_try_compile "$LINENO"; then :
5057 ac_cv_header_stdc=yes
5058else
5059 ac_cv_header_stdc=no
5060fi
5061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5062
5063if test $ac_cv_header_stdc = yes; then
5064 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5066/* end confdefs.h. */
5067#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005068
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005069_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005071 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005074 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005075fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005076rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005077
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005078fi
5079
5080if test $ac_cv_header_stdc = yes; then
5081 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5083/* end confdefs.h. */
5084#include <stdlib.h>
5085
5086_ACEOF
5087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5088 $EGREP "free" >/dev/null 2>&1; then :
5089
5090else
5091 ac_cv_header_stdc=no
5092fi
5093rm -f conftest*
5094
5095fi
5096
5097if test $ac_cv_header_stdc = yes; then
5098 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5099 if test "$cross_compiling" = yes; then :
5100 :
5101else
5102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103/* end confdefs.h. */
5104#include <ctype.h>
5105#include <stdlib.h>
5106#if ((' ' & 0x0FF) == 0x020)
5107# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5108# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5109#else
5110# define ISLOWER(c) \
5111 (('a' <= (c) && (c) <= 'i') \
5112 || ('j' <= (c) && (c) <= 'r') \
5113 || ('s' <= (c) && (c) <= 'z'))
5114# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5115#endif
5116
5117#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5118int
5119main ()
5120{
5121 int i;
5122 for (i = 0; i < 256; i++)
5123 if (XOR (islower (i), ISLOWER (i))
5124 || toupper (i) != TOUPPER (i))
5125 return 2;
5126 return 0;
5127}
5128_ACEOF
5129if ac_fn_c_try_run "$LINENO"; then :
5130
5131else
5132 ac_cv_header_stdc=no
5133fi
5134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5135 conftest.$ac_objext conftest.beam conftest.$ac_ext
5136fi
5137
5138fi
5139fi
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5141$as_echo "$ac_cv_header_stdc" >&6; }
5142if test $ac_cv_header_stdc = yes; then
5143
5144$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5145
5146fi
5147
5148# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5149for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5150 inttypes.h stdint.h unistd.h
5151do :
5152 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5153ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5154"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005155if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156 cat >>confdefs.h <<_ACEOF
5157#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5158_ACEOF
5159
5160fi
5161
5162done
5163
5164
5165
5166 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 +01005167if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005168 MINIX=yes
5169else
5170 MINIX=
5171fi
5172
5173
5174 if test "$MINIX" = yes; then
5175
5176$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5177
5178
5179$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5180
5181
5182$as_echo "#define _MINIX 1" >>confdefs.h
5183
5184 fi
5185
5186
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5188$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005189if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005190 $as_echo_n "(cached) " >&6
5191else
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193/* end confdefs.h. */
5194
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005195# define __EXTENSIONS__ 1
5196 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005197int
5198main ()
5199{
5200
5201 ;
5202 return 0;
5203}
5204_ACEOF
5205if ac_fn_c_try_compile "$LINENO"; then :
5206 ac_cv_safe_to_define___extensions__=yes
5207else
5208 ac_cv_safe_to_define___extensions__=no
5209fi
5210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5211fi
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5213$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5214 test $ac_cv_safe_to_define___extensions__ = yes &&
5215 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5216
5217 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5218
5219 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5220
5221 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5222
5223 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5224
5225
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227# Check for unsupported systems
5228case $ac_sys_system/$ac_sys_release in
5229atheos*|Linux*/1*)
5230 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5231 echo See README for details.
5232 exit 1;;
5233esac
5234
5235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5237$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238
5239# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241 withval=$with_suffix;
5242 case $withval in
5243 no) EXEEXT=;;
5244 yes) EXEEXT=.exe;;
5245 *) EXEEXT=$withval;;
5246 esac
5247fi
5248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5250$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251
5252# Test whether we're running on a non-case-sensitive system, in which
5253# case we give a warning if no ext is given
5254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5256$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257if test ! -d CaseSensitiveTestDir; then
5258mkdir CaseSensitiveTestDir
5259fi
5260
5261if test -d casesensitivetestdir
5262then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5264$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265 BUILDEXEEXT=.exe
5266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269 BUILDEXEEXT=$EXEEXT
5270fi
5271rmdir CaseSensitiveTestDir
5272
5273case $MACHDEP in
5274bsdos*)
5275 case $CC in
5276 gcc) CC="$CC -D_HAVE_BSDI";;
5277 esac;;
5278esac
5279
5280case $ac_sys_system in
5281hp*|HP*)
5282 case $CC in
5283 cc|*/cc) CC="$CC -Ae";;
5284 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285SunOS*)
5286 # Some functions have a prototype only with that define, e.g. confstr
5287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005288$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289
5290 ;;
5291esac
5292
5293
5294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5296$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297if test -z "$LIBRARY"
5298then
5299 LIBRARY='libpython$(VERSION).a'
5300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5302$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303
5304# LDLIBRARY is the name of the library to link against (as opposed to the
5305# name of the library into which to insert object files). BLDLIBRARY is also
5306# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5307# is blank as the main program is not linked directly against LDLIBRARY.
5308# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5309# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5310# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5311# DLLLIBRARY is the shared (i.e., DLL) library.
5312#
5313# RUNSHARED is used to run shared python without installed libraries
5314#
5315# INSTSONAME is the name of the shared library that will be use to install
5316# on the system - some systems like version suffix, others don't
5317
5318
5319
5320
5321
5322
5323LDLIBRARY="$LIBRARY"
5324BLDLIBRARY='$(LDLIBRARY)'
5325INSTSONAME='$(LDLIBRARY)'
5326DLLLIBRARY=''
5327LDLIBRARYDIR=''
5328RUNSHARED=''
5329
5330# LINKCC is the command that links the python executable -- default is $(CC).
5331# If CXX is set, and if it is needed to link a main function that was
5332# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5333# python might then depend on the C++ runtime
5334# This is altered for AIX in order to build the export list before
5335# linking.
5336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5338$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339if test -z "$LINKCC"
5340then
5341 LINKCC='$(PURIFY) $(MAINCC)'
5342 case $ac_sys_system in
5343 AIX*)
5344 exp_extra="\"\""
5345 if test $ac_sys_release -ge 5 -o \
5346 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5347 exp_extra="."
5348 fi
5349 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350 QNX*)
5351 # qcc must be used because the other compilers do not
5352 # support -N.
5353 LINKCC=qcc;;
5354 esac
5355fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5357$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358
5359# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5360# make sure we default having it set to "no": this is used by
5361# distutils.unixccompiler to know if it should add --enable-new-dtags
5362# to linker command lines, and failing to detect GNU ld simply results
5363# in the same bahaviour as before.
5364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5366$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005367ac_prog=ld
5368if test "$GCC" = yes; then
5369 ac_prog=`$CC -print-prog-name=ld`
5370fi
5371case `"$ac_prog" -V 2>&1 < /dev/null` in
5372 *GNU*)
5373 GNULD=yes;;
5374 *)
5375 GNULD=no;;
5376esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5378$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5381$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005382# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005383if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 enableval=$enable_shared;
5385fi
5386
5387
5388if test -z "$enable_shared"
5389then
5390 case $ac_sys_system in
5391 CYGWIN* | atheos*)
5392 enable_shared="yes";;
5393 *)
5394 enable_shared="no";;
5395 esac
5396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5398$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5401$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005402# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005404 enableval=$enable_profiling;
5405fi
5406
5407if test "x$enable_profiling" = xyes; then
5408 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005409 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005411/* end confdefs.h. */
5412int main() { return 0; }
5413_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005414if ac_fn_c_try_link "$LINENO"; then :
5415
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005417 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005419rm -f core conftest.err conftest.$ac_objext \
5420 conftest$ac_exeext conftest.$ac_ext
5421 CC="$ac_save_cc"
5422else
5423 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005424fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5426$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005428if test "x$enable_profiling" = xyes; then
5429 BASECFLAGS="-pg $BASECFLAGS"
5430 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431fi
5432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5434$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435
5436# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5437# library that we build, but we do not want to link against it (we
5438# will find it with a -framework option). For this reason there is an
5439# extra variable BLDLIBRARY against which Python and the extension
5440# modules are linked, BLDLIBRARY. This is normally the same as
5441# LDLIBRARY, but empty for MacOSX framework builds.
5442if test "$enable_framework"
5443then
5444 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005445 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446 BLDLIBRARY=''
5447else
5448 BLDLIBRARY='$(LDLIBRARY)'
5449fi
5450
5451# Other platforms follow
5452if test $enable_shared = "yes"; then
5453
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005454$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005455
5456 case $ac_sys_system in
5457 BeOS*)
5458 LDLIBRARY='libpython$(VERSION).so'
5459 ;;
5460 CYGWIN*)
5461 LDLIBRARY='libpython$(VERSION).dll.a'
5462 DLLLIBRARY='libpython$(VERSION).dll'
5463 ;;
5464 SunOS*)
5465 LDLIBRARY='libpython$(VERSION).so'
5466 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005467 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005468 INSTSONAME="$LDLIBRARY".$SOVERSION
5469 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005470 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471 LDLIBRARY='libpython$(VERSION).so'
5472 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005473 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 case $ac_sys_system in
5475 FreeBSD*)
5476 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5477 ;;
5478 esac
5479 INSTSONAME="$LDLIBRARY".$SOVERSION
5480 ;;
5481 hp*|HP*)
5482 case `uname -m` in
5483 ia64)
5484 LDLIBRARY='libpython$(VERSION).so'
5485 ;;
5486 *)
5487 LDLIBRARY='libpython$(VERSION).sl'
5488 ;;
5489 esac
5490 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005491 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 ;;
5493 OSF*)
5494 LDLIBRARY='libpython$(VERSION).so'
5495 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005496 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497 ;;
5498 atheos*)
5499 LDLIBRARY='libpython$(VERSION).so'
5500 BLDLIBRARY='-L. -lpython$(VERSION)'
5501 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5502 ;;
5503 Darwin*)
5504 LDLIBRARY='libpython$(VERSION).dylib'
5505 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005506 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005508 AIX*)
5509 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005510 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005511 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005512
5513 esac
5514else # shared is disabled
5515 case $ac_sys_system in
5516 CYGWIN*)
5517 BLDLIBRARY='$(LIBRARY)'
5518 LDLIBRARY='libpython$(VERSION).dll.a'
5519 ;;
5520 esac
5521fi
5522
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005523if test "$cross_compiling" = yes; then
5524 RUNSHARED=
5525fi
5526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5528$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529
5530if test -n "$ac_tool_prefix"; then
5531 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5532set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005535if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005536 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005537else
5538 if test -n "$RANLIB"; then
5539 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5540else
5541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5542for as_dir in $PATH
5543do
5544 IFS=$as_save_IFS
5545 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005548 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550 break 2
5551 fi
5552done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005553 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005554IFS=$as_save_IFS
5555
5556fi
5557fi
5558RANLIB=$ac_cv_prog_RANLIB
5559if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5561$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5564$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005565fi
5566
5567
5568fi
5569if test -z "$ac_cv_prog_RANLIB"; then
5570 ac_ct_RANLIB=$RANLIB
5571 # Extract the first word of "ranlib", so it can be a program name with args.
5572set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5574$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005575if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005576 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005577else
5578 if test -n "$ac_ct_RANLIB"; then
5579 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5580else
5581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5582for as_dir in $PATH
5583do
5584 IFS=$as_save_IFS
5585 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005586 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005588 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590 break 2
5591 fi
5592done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005593 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005594IFS=$as_save_IFS
5595
5596fi
5597fi
5598ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5599if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5601$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605fi
5606
5607 if test "x$ac_ct_RANLIB" = x; then
5608 RANLIB=":"
5609 else
5610 case $cross_compiling:$ac_tool_warned in
5611yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614ac_tool_warned=yes ;;
5615esac
5616 RANLIB=$ac_ct_RANLIB
5617 fi
5618else
5619 RANLIB="$ac_cv_prog_RANLIB"
5620fi
5621
5622
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005623if test -n "$ac_tool_prefix"; then
5624 for ac_prog in ar aal
5625 do
5626 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5627set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005630if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005631 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005632else
5633 if test -n "$AR"; then
5634 ac_cv_prog_AR="$AR" # Let the user override the test.
5635else
5636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5637for as_dir in $PATH
5638do
5639 IFS=$as_save_IFS
5640 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005643 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005645 break 2
5646 fi
5647done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005648 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005649IFS=$as_save_IFS
5650
5651fi
5652fi
5653AR=$ac_cv_prog_AR
5654if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5656$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005660fi
5661
5662
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005663 test -n "$AR" && break
5664 done
5665fi
5666if test -z "$AR"; then
5667 ac_ct_AR=$AR
5668 for ac_prog in ar aal
5669do
5670 # Extract the first word of "$ac_prog", so it can be a program name with args.
5671set dummy $ac_prog; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
5674if ${ac_cv_prog_ac_ct_AR+:} false; then :
5675 $as_echo_n "(cached) " >&6
5676else
5677 if test -n "$ac_ct_AR"; then
5678 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5679else
5680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683 IFS=$as_save_IFS
5684 test -z "$as_dir" && as_dir=.
5685 for ac_exec_ext in '' $ac_executable_extensions; do
5686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5687 ac_cv_prog_ac_ct_AR="$ac_prog"
5688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689 break 2
5690 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005691done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005692 done
5693IFS=$as_save_IFS
5694
5695fi
5696fi
5697ac_ct_AR=$ac_cv_prog_ac_ct_AR
5698if test -n "$ac_ct_AR"; then
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5700$as_echo "$ac_ct_AR" >&6; }
5701else
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703$as_echo "no" >&6; }
5704fi
5705
5706
5707 test -n "$ac_ct_AR" && break
5708done
5709
5710 if test "x$ac_ct_AR" = x; then
5711 AR="ar"
5712 else
5713 case $cross_compiling:$ac_tool_warned in
5714yes:)
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5717ac_tool_warned=yes ;;
5718esac
5719 AR=$ac_ct_AR
5720 fi
5721fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722
5723
5724# tweak ARFLAGS only if the user didn't set it on the command line
5725
5726if test -z "$ARFLAGS"
5727then
5728 ARFLAGS="rc"
5729fi
5730
5731
Victor Stinner2c7085f2017-05-02 16:55:50 +02005732
5733
5734
Victor Stinnerdf569252017-05-03 00:05:45 +02005735if test -e $srcdir/.git
Victor Stinner2c7085f2017-05-02 16:55:50 +02005736then
5737# Extract the first word of "git", so it can be a program name with args.
5738set dummy git; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinner2c7085f2017-05-02 16:55:50 +02005741if ${ac_cv_prog_HAS_GIT+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005742 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005743else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005744 if test -n "$HAS_GIT"; then
5745 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005746else
5747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748for as_dir in $PATH
5749do
5750 IFS=$as_save_IFS
5751 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005752 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005754 ac_cv_prog_HAS_GIT="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005756 break 2
5757 fi
5758done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005759 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005760IFS=$as_save_IFS
5761
Victor Stinner2c7085f2017-05-02 16:55:50 +02005762 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005763fi
5764fi
Victor Stinner2c7085f2017-05-02 16:55:50 +02005765HAS_GIT=$ac_cv_prog_HAS_GIT
5766if test -n "$HAS_GIT"; then
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
5768$as_echo "$HAS_GIT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772fi
5773
5774
Victor Stinner2c7085f2017-05-02 16:55:50 +02005775else
5776HAS_GIT=no-repository
5777fi
5778if test $HAS_GIT = found
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005780 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
5781 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
5782 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005784 GITVERSION=""
5785 GITTAG=""
5786 GITBRANCH=""
Georg Brandl3a5508e2011-03-06 10:42:21 +01005787fi
5788
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789case $MACHDEP in
5790bsdos*|hp*|HP*)
5791 # install -d does not work on BSDI or HP-UX
5792 if test -z "$INSTALL"
5793 then
5794 INSTALL="${srcdir}/install-sh -c"
5795 fi
5796esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797# Find a good install program. We prefer a C program (faster),
5798# so one script is as good as another. But avoid the broken or
5799# incompatible versions:
5800# SysV /etc/install, /usr/sbin/install
5801# SunOS /usr/etc/install
5802# IRIX /sbin/install
5803# AIX /bin/install
5804# AmigaOS /C/install, which installs bootblocks on floppy discs
5805# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5806# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5807# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5808# OS/2's system install, which has a completely different semantic
5809# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810# Reject install programs that cannot install multiple files.
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5812$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005814if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005815 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816else
5817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5818for as_dir in $PATH
5819do
5820 IFS=$as_save_IFS
5821 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822 # Account for people who put trailing slashes in PATH elements.
5823case $as_dir/ in #((
5824 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827 /usr/ucb/* ) ;;
5828 *)
5829 # OSF1 and SCO ODT 3.0 have their own names for install.
5830 # Don't use installbsd from OSF since it installs stuff as root
5831 # by default.
5832 for ac_prog in ginstall scoinst install; do
5833 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005834 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005835 if test $ac_prog = install &&
5836 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5837 # AIX install. It has an incompatible calling convention.
5838 :
5839 elif test $ac_prog = install &&
5840 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5841 # program-specific install script used by HP pwplus--don't use.
5842 :
5843 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005844 rm -rf conftest.one conftest.two conftest.dir
5845 echo one > conftest.one
5846 echo two > conftest.two
5847 mkdir conftest.dir
5848 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5849 test -s conftest.one && test -s conftest.two &&
5850 test -s conftest.dir/conftest.one &&
5851 test -s conftest.dir/conftest.two
5852 then
5853 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5854 break 3
5855 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856 fi
5857 fi
5858 done
5859 done
5860 ;;
5861esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862
5863 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005864IFS=$as_save_IFS
5865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005866rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005867
5868fi
5869 if test "${ac_cv_path_install+set}" = set; then
5870 INSTALL=$ac_cv_path_install
5871 else
5872 # As a last resort, use the slow shell script. Don't cache a
5873 # value for INSTALL within a source directory, because that will
5874 # break other packages using the cache if that directory is
5875 # removed, or if the value is a relative name.
5876 INSTALL=$ac_install_sh
5877 fi
5878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5880$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881
5882# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5883# It thinks the first close brace ends the variable substitution.
5884test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5885
5886test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5887
5888test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5889
Trent Nelsonf6407a12012-08-30 14:56:13 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5891$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5892if test -z "$MKDIR_P"; then
5893 if ${ac_cv_path_mkdir+:} false; then :
5894 $as_echo_n "(cached) " >&6
5895else
5896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5898do
5899 IFS=$as_save_IFS
5900 test -z "$as_dir" && as_dir=.
5901 for ac_prog in mkdir gmkdir; do
5902 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005903 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005904 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5905 'mkdir (GNU coreutils) '* | \
5906 'mkdir (coreutils) '* | \
5907 'mkdir (fileutils) '4.1*)
5908 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5909 break 3;;
5910 esac
5911 done
5912 done
5913 done
5914IFS=$as_save_IFS
5915
5916fi
5917
5918 test -d ./--version && rmdir ./--version
5919 if test "${ac_cv_path_mkdir+set}" = set; then
5920 MKDIR_P="$ac_cv_path_mkdir -p"
5921 else
5922 # As a last resort, use the slow shell script. Don't cache a
5923 # value for MKDIR_P within a source directory, because that will
5924 # break other packages using the cache if that directory is
5925 # removed, or if the value is a relative name.
5926 MKDIR_P="$ac_install_sh -d"
5927 fi
5928fi
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5930$as_echo "$MKDIR_P" >&6; }
5931
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932
5933# Not every filesystem supports hard links
5934
5935if test -z "$LN" ; then
5936 case $ac_sys_system in
5937 BeOS*) LN="ln -s";;
5938 CYGWIN*) LN="ln -s";;
5939 atheos*) LN="ln -s";;
5940 *) LN=ln;;
5941 esac
5942fi
5943
5944# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5946$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005947
5948# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005949if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950 withval=$with_pydebug;
5951if test "$withval" != no
5952then
5953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5957$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961fi
5962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005965fi
5966
5967
5968# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5969# merged with this chunk of code?
5970
5971# Optimizer/debugger flags
5972# ------------------------
5973# (The following bit of code is complicated enough - please keep things
5974# indented properly. Just pretend you're editing Python code. ;-)
5975
5976# There are two parallel sets of case statements below, one that checks to
5977# see if OPT was set and one that does BASECFLAGS setting based upon
5978# compiler and platform. BASECFLAGS tweaks need to be made even if the
5979# user set OPT.
5980
5981# tweak OPT based on compiler and platform, only if the user didn't set
5982# it on the command line
5983
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005984if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985then
5986 case $GCC in
5987 yes)
5988 if test "$CC" != 'g++' ; then
5989 STRICT_PROTO="-Wstrict-prototypes"
5990 fi
5991 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5992 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5993 WRAP="-fwrapv"
5994 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005995
5996 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005997 case $CC in
5998 *clang*) WRAP="-fwrapv"
5999 ;;
6000 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006001
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002 case $ac_cv_prog_cc_g in
6003 yes)
6004 if test "$Py_DEBUG" = 'true' ; then
6005 # Optimization messes up debuggers, so turn it off for
6006 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006007 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008 else
6009 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6010 fi
6011 ;;
6012 *)
6013 OPT="-O3 -Wall $STRICT_PROTO"
6014 ;;
6015 esac
6016 case $ac_sys_system in
6017 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6018 ;;
6019 esac
6020 ;;
6021
6022 *)
6023 OPT="-O"
6024 ;;
6025 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026fi
6027
6028
6029
6030# The -arch flags for universal builds on OSX
6031UNIVERSAL_ARCH_FLAGS=
6032
6033
6034# tweak BASECFLAGS based on compiler and platform
6035case $GCC in
6036yes)
6037 # Python violates C99 rules, by casting between incompatible
6038 # pointer types. GCC may generate bad code as a result of that,
6039 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6041$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006042 ac_save_cc="$CC"
6043 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006044 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006045 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006049
6050int
6051main ()
6052{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006053
Gregory P. Smith373469a2009-11-01 21:03:38 +00006054 ;
6055 return 0;
6056}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006059 ac_cv_no_strict_aliasing_ok=yes
6060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006064fi
6065
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006066 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6068$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069 if test $ac_cv_no_strict_aliasing_ok = yes
6070 then
6071 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6072 fi
6073
6074 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6075 # support. Without this, treatment of subnormals doesn't follow
6076 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006077 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078 alpha*)
6079 BASECFLAGS="$BASECFLAGS -mieee"
6080 ;;
6081 esac
6082
6083 case $ac_sys_system in
6084 SCO_SV*)
6085 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6086 ;;
6087 # is there any other compiler on Darwin besides gcc?
6088 Darwin*)
6089 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6090 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006091 if test "${CC}" = gcc
6092 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6094$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006095 case "${UNIVERSALSDK}" in
6096 */MacOSX10.4u.sdk)
6097 # Build using 10.4 SDK, force usage of gcc when the
6098 # compiler is gcc, otherwise the user will get very
6099 # confusing error messages when building on OSX 10.6
6100 CC=gcc-4.0
6101 CPP=cpp-4.0
6102 ;;
6103 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6105$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106 fi
6107
6108 # Calculate the right deployment target for this build.
6109 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006110 cur_target_major=`sw_vers -productVersion | \
6111 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6112 cur_target_minor=`sw_vers -productVersion | \
6113 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6114 cur_target="${cur_target_major}.${cur_target_minor}"
6115 if test ${cur_target_major} -eq 10 && \
6116 test ${cur_target_minor} -ge 3
6117 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006118 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006119 if test ${enable_universalsdk}; then
6120 if test "${UNIVERSAL_ARCHS}" = "all"; then
6121 # Ensure that the default platform for a
6122 # 4-way universal build is OSX 10.5,
6123 # that's the first OS release where
6124 # 4-way builds make sense.
6125 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006126
6127 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6128 cur_target='10.5'
6129
6130 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6131 cur_target='10.5'
6132
6133 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6134 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006135 fi
6136 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006137 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006138 # On Intel macs default to a deployment
6139 # target of 10.4, that's the first OSX
6140 # release with Intel support.
6141 cur_target="10.4"
6142 fi
6143 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006144 fi
6145 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6146
6147 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6148 # environment with a value that is the same as what we'll use
6149 # in the Makefile to ensure that we'll get the same compiler
6150 # environment during configure and build time.
6151 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6152 export MACOSX_DEPLOYMENT_TARGET
6153 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6154
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006155 if test "${enable_universalsdk}"; then
6156 UNIVERSAL_ARCH_FLAGS=""
6157 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6158 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6159 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006160 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006161
6162 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6163 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6164 LIPO_32BIT_FLAGS=""
6165 ARCH_RUN_32BIT="true"
6166
6167 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6168 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6169 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006170 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006171
6172 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6173 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6174 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006175 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006176
6177 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6178 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6179 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006180 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006181
6182 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006183 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 +00006184
6185 fi
6186
6187
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006188 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6189 if test "${UNIVERSALSDK}" != "/"
6190 then
6191 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6192 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6193 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006194 fi
6195
6196 fi
6197
6198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006199 ;;
6200 OSF*)
6201 BASECFLAGS="$BASECFLAGS -mieee"
6202 ;;
6203 esac
6204 ;;
6205
6206*)
6207 case $ac_sys_system in
6208 OpenUNIX*|UnixWare*)
6209 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6210 ;;
6211 OSF*)
6212 BASECFLAGS="$BASECFLAGS -ieee -std"
6213 ;;
6214 SCO_SV*)
6215 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6216 ;;
6217 esac
6218 ;;
6219esac
6220
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006221# ICC needs -fp-model strict or floats behave badly
6222case "$CC" in
6223*icc*)
6224 BASECFLAGS="$BASECFLAGS -fp-model strict"
6225 ;;
6226esac
6227
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006228if test "$Py_DEBUG" = 'true'; then
6229 :
6230else
6231 OPT="-DNDEBUG $OPT"
6232fi
6233
6234if test "$ac_arch_flags"
6235then
6236 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6237fi
6238
6239# disable check for icc since it seems to pass, but generates a warning
6240if test "$CC" = icc
6241then
6242 ac_cv_opt_olimit_ok=no
6243fi
6244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6246$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006247if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249else
6250 ac_save_cc="$CC"
6251CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006254
6255int
6256main ()
6257{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006258
Gregory P. Smith373469a2009-11-01 21:03:38 +00006259 ;
6260 return 0;
6261}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006263if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264 ac_cv_opt_olimit_ok=yes
6265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006267
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006268fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270CC="$ac_save_cc"
6271fi
6272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6274$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275if test $ac_cv_opt_olimit_ok = yes; then
6276 case $ac_sys_system in
6277 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6278 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6279 # environment?
6280 Darwin*)
6281 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006282 # XXX thankfully this useless troublemaker of a flag has been
6283 # eradicated in the 3.x line. For now, make sure it isn't picked
6284 # up by any of our other platforms that use CC.
6285 AIX*|SunOS*|HP-UX*|IRIX*)
6286 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287 *)
6288 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6289 ;;
6290 esac
6291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6293$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006294 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006295 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296else
6297 ac_save_cc="$CC"
6298 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006301
6302int
6303main ()
6304{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006305
Gregory P. Smith373469a2009-11-01 21:03:38 +00006306 ;
6307 return 0;
6308}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311 ac_cv_olimit_ok=yes
6312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006314
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317 CC="$ac_save_cc"
6318fi
6319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6321$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006322 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006323 case $ac_sys_system in
6324 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6325 HP-UX*)
6326 ;;
6327 *)
6328 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6329 ;;
6330 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006331 fi
6332fi
6333
6334# Check whether GCC supports PyArg_ParseTuple format
6335if test "$GCC" = "yes"
6336then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6338$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006339 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006340 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342/* end confdefs.h. */
6343
6344 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006345int
6346main ()
6347{
6348
6349 ;
6350 return 0;
6351}
Matthias Klosec511b472010-05-08 11:01:39 +00006352
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355
Matthias Klosec511b472010-05-08 11:01:39 +00006356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358
Matthias Klosec511b472010-05-08 11:01:39 +00006359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006361
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362else
Matthias Klosec511b472010-05-08 11:01:39 +00006363
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006365$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366
6367fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6369 CFLAGS=$save_CFLAGS
6370fi
6371
Brett Cannon4ff151a2015-09-18 15:09:42 -07006372
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006373# Enable optimization flags
6374
6375
6376Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6378$as_echo_n "checking for --enable-optimizations... " >&6; }
6379# Check whether --enable-optimizations was given.
6380if test "${enable_optimizations+set}" = set; then :
6381 enableval=$enable_optimizations;
INADA Naoki6a04ef72017-03-29 01:50:48 +09006382if test "$enableval" != no
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006383then
6384 Py_OPT='true'
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6386$as_echo "yes" >&6; };
6387else
6388 Py_OPT='false'
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; };
6391fi
6392else
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
6397if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006398 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6399 # compile working code using it and both test_distutils and test_gdb are
6400 # broken when you do managed to get a toolchain that works with it. People
6401 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006402 Py_LTO='true'
6403 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006404 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006405 DEF_MAKE_RULE="build_all"
6406else
6407 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006408 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006409 DEF_MAKE_RULE="all"
6410fi
6411
6412
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006413# Enable LTO flags
6414
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6416$as_echo_n "checking for --with-lto... " >&6; }
6417
6418# Check whether --with-lto was given.
6419if test "${with_lto+set}" = set; then :
6420 withval=$with_lto;
6421if test "$withval" != no
6422then
6423 Py_LTO='true'
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6425$as_echo "yes" >&6; };
6426else
6427 Py_LTO='false'
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; };
6430fi
6431else
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; }
6434fi
6435
6436if test "$Py_LTO" = 'true' ; then
6437 case $CC in
6438 *clang*)
6439 # Any changes made here should be reflected in the GCC+Darwin case below
6440 LTOFLAGS="-flto"
6441 ;;
6442 *gcc*)
6443 case $ac_sys_system in
6444 Darwin*)
6445 LTOFLAGS="-flto"
6446 ;;
6447 *)
6448 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6449 ;;
6450 esac
6451 ;;
6452 esac
6453fi
6454
6455
Brett Cannon4ff151a2015-09-18 15:09:42 -07006456# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006457
6458
6459
6460
6461
Gregory P. Smith794b2912016-09-08 00:07:40 -07006462# Make this work on systems where llvm tools are not installed with their
6463# normal names in the default $PATH (ie: Ubuntu). They exist under the
6464# non-suffixed name in their versioned llvm directory.
6465llvm_bin_dir=''
6466llvm_path="${PATH}"
6467if test "${CC}" = "clang"
6468then
6469 clang_bin=`which clang`
6470 # Some systems install clang elsewhere as a symlink to the real path
6471 # which is where the related llvm tools are located.
6472 if test -L "${clang_bin}"
6473 then
6474 clang_dir=`dirname "${clang_bin}"`
6475 clang_bin=`readlink "${clang_bin}"`
6476 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6477 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6478 fi
6479fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006480
Gregory P. Smith794b2912016-09-08 00:07:40 -07006481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6482$as_echo_n "checking target system type... " >&6; }
6483if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006484 $as_echo_n "(cached) " >&6
6485else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006486 if test "x$target_alias" = x; then
6487 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006488else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006489 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6490 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6491fi
6492
6493fi
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6495$as_echo "$ac_cv_target" >&6; }
6496case $ac_cv_target in
6497*-*-*) ;;
6498*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6499esac
6500target=$ac_cv_target
6501ac_save_IFS=$IFS; IFS='-'
6502set x $ac_cv_target
6503shift
6504target_cpu=$1
6505target_vendor=$2
6506shift; shift
6507# Remember, the first character of IFS is used to create $*,
6508# except with old shells:
6509target_os=$*
6510IFS=$ac_save_IFS
6511case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6512
6513
6514# The aliases save the names the user supplied, while $host etc.
6515# will get canonicalized.
6516test -n "$target_alias" &&
6517 test "$program_prefix$program_suffix$program_transform_name" = \
6518 NONENONEs,x,x, &&
6519 program_prefix=${target_alias}-
6520# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6521set dummy $target_alias-llvm-profdata; ac_word=$2
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6523$as_echo_n "checking for $ac_word... " >&6; }
6524if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6525 $as_echo_n "(cached) " >&6
6526else
6527 case $LLVM_PROFDATA in
6528 [\\/]* | ?:[\\/]*)
6529 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6530 ;;
6531 *)
6532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006534do
6535 IFS=$as_save_IFS
6536 test -z "$as_dir" && as_dir=.
6537 for ac_exec_ext in '' $ac_executable_extensions; do
6538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006539 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6541 break 2
6542 fi
6543done
6544 done
6545IFS=$as_save_IFS
6546
Gregory P. Smith794b2912016-09-08 00:07:40 -07006547 ;;
6548esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006549fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006550LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6551if test -n "$LLVM_PROFDATA"; then
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6553$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006554else
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556$as_echo "no" >&6; }
6557fi
6558
6559
Gregory P. Smith794b2912016-09-08 00:07:40 -07006560if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6561 if test "$build" = "$target"; then
6562 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6563 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6564set dummy llvm-profdata; ac_word=$2
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566$as_echo_n "checking for $ac_word... " >&6; }
6567if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6568 $as_echo_n "(cached) " >&6
6569else
6570 case $ac_pt_LLVM_PROFDATA in
6571 [\\/]* | ?:[\\/]*)
6572 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6573 ;;
6574 *)
6575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576for as_dir in ${llvm_path}
6577do
6578 IFS=$as_save_IFS
6579 test -z "$as_dir" && as_dir=.
6580 for ac_exec_ext in '' $ac_executable_extensions; do
6581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6582 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6584 break 2
6585 fi
6586done
6587 done
6588IFS=$as_save_IFS
6589
6590 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6591 ;;
6592esac
6593fi
6594ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6595if test -n "$ac_pt_LLVM_PROFDATA"; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6597$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6598else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
6601fi
6602
6603 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6604 else
6605 LLVM_PROFDATA="''"
6606 fi
6607else
6608 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6609fi
6610
6611
6612if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6613then
6614 LLVM_PROF_FOUND="found"
6615else
6616 LLVM_PROF_FOUND="not-found"
6617fi
6618if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6619then
6620 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6621 if test -n "${found_llvm_profdata}"
6622 then
6623 # llvm-profdata isn't directly in $PATH in some cases.
6624 # https://apple.stackexchange.com/questions/197053/
6625 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6626 LLVM_PROF_FOUND=found
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6628$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6629 fi
6630fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006631LLVM_PROF_ERR=no
6632case $CC in
6633 *clang*)
6634 # Any changes made here should be reflected in the GCC+Darwin case below
6635 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6636 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006637 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006638 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6639 if test $LLVM_PROF_FOUND = not-found
6640 then
6641 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006642 if test "${REQUIRE_PGO}" = "yes"
6643 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006644 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 -07006645 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006646 fi
6647 ;;
6648 *gcc*)
6649 case $ac_sys_system in
6650 Darwin*)
6651 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6652 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006653 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006654 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006655 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006656 then
6657 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006658 if test "${REQUIRE_PGO}" = "yes"
6659 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006660 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 -07006661 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006662 fi
6663 ;;
6664 *)
6665 PGO_PROF_GEN_FLAG="-fprofile-generate"
6666 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6667 LLVM_PROF_MERGER="true"
6668 LLVM_PROF_FILE=""
6669 ;;
6670 esac
6671 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006672 *icc*)
6673 PGO_PROF_GEN_FLAG="-prof-gen"
6674 PGO_PROF_USE_FLAG="-prof-use"
6675 LLVM_PROF_MERGER="true"
6676 LLVM_PROF_FILE=""
6677 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006678esac
6679
6680
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006681# On some compilers, pthreads are available without further options
6682# (e.g. MacOS X). On some of these systems, the compiler will not
6683# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6684# So we have to see first whether pthreads are available without
6685# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6687$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006688if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006692 ac_cv_pthread_is_default=no
6693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006695/* end confdefs.h. */
6696
Stefan Krahae66ca62012-11-22 22:36:57 +01006697#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006698#include <pthread.h>
6699
6700void* routine(void* p){return NULL;}
6701
6702int main(){
6703 pthread_t p;
6704 if(pthread_create(&p,NULL,routine,NULL)!=0)
6705 return 1;
6706 (void)pthread_detach(p);
6707 return 0;
6708}
6709
6710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006711if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006712
6713 ac_cv_pthread_is_default=yes
6714 ac_cv_kthread=no
6715 ac_cv_pthread=no
6716
6717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006722fi
6723
6724
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725fi
6726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6728$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006729
6730
6731if test $ac_cv_pthread_is_default = yes
6732then
6733 ac_cv_kpthread=no
6734else
6735# -Kpthread, if available, provides the right #defines
6736# and linker options to make pthread_create available
6737# Some compilers won't report that they do not support -Kpthread,
6738# so we need to run a program to see whether it really made the
6739# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6741$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006742if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006744else
6745 ac_save_cc="$CC"
6746CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006748 ac_cv_kpthread=no
6749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006751/* end confdefs.h. */
6752
Stefan Krahae66ca62012-11-22 22:36:57 +01006753#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006754#include <pthread.h>
6755
6756void* routine(void* p){return NULL;}
6757
6758int main(){
6759 pthread_t p;
6760 if(pthread_create(&p,NULL,routine,NULL)!=0)
6761 return 1;
6762 (void)pthread_detach(p);
6763 return 0;
6764}
6765
6766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768 ac_cv_kpthread=yes
6769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006774fi
6775
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006776CC="$ac_save_cc"
6777fi
6778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6780$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006781fi
6782
6783if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6784then
6785# -Kthread, if available, provides the right #defines
6786# and linker options to make pthread_create available
6787# Some compilers won't report that they do not support -Kthread,
6788# so we need to run a program to see whether it really made the
6789# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6791$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006792if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006794else
6795 ac_save_cc="$CC"
6796CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798 ac_cv_kthread=no
6799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801/* end confdefs.h. */
6802
Stefan Krahae66ca62012-11-22 22:36:57 +01006803#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804#include <pthread.h>
6805
6806void* routine(void* p){return NULL;}
6807
6808int main(){
6809 pthread_t p;
6810 if(pthread_create(&p,NULL,routine,NULL)!=0)
6811 return 1;
6812 (void)pthread_detach(p);
6813 return 0;
6814}
6815
6816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006818 ac_cv_kthread=yes
6819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006824fi
6825
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006826CC="$ac_save_cc"
6827fi
6828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6830$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831fi
6832
6833if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6834then
6835# -pthread, if available, provides the right #defines
6836# and linker options to make pthread_create available
6837# Some compilers won't report that they do not support -pthread,
6838# so we need to run a program to see whether it really made the
6839# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6841$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006842if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006844else
6845 ac_save_cc="$CC"
6846CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006848 ac_cv_pthread=no
6849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006851/* end confdefs.h. */
6852
Stefan Krahae66ca62012-11-22 22:36:57 +01006853#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006854#include <pthread.h>
6855
6856void* routine(void* p){return NULL;}
6857
6858int main(){
6859 pthread_t p;
6860 if(pthread_create(&p,NULL,routine,NULL)!=0)
6861 return 1;
6862 (void)pthread_detach(p);
6863 return 0;
6864}
6865
6866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868 ac_cv_pthread=yes
6869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874fi
6875
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006876CC="$ac_save_cc"
6877fi
6878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6880$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881fi
6882
6883# If we have set a CC compiler flag for thread support then
6884# check if it works for CXX, too.
6885ac_cv_cxx_thread=no
6886if test ! -z "$CXX"
6887then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6889$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006890ac_save_cxx="$CXX"
6891
6892if test "$ac_cv_kpthread" = "yes"
6893then
6894 CXX="$CXX -Kpthread"
6895 ac_cv_cxx_thread=yes
6896elif test "$ac_cv_kthread" = "yes"
6897then
6898 CXX="$CXX -Kthread"
6899 ac_cv_cxx_thread=yes
6900elif test "$ac_cv_pthread" = "yes"
6901then
6902 CXX="$CXX -pthread"
6903 ac_cv_cxx_thread=yes
6904fi
6905
6906if test $ac_cv_cxx_thread = yes
6907then
6908 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6909 $CXX -c conftest.$ac_ext 2>&5
6910 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6911 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6912 then
6913 ac_cv_cxx_thread=yes
6914 else
6915 ac_cv_cxx_thread=no
6916 fi
6917 rm -fr conftest*
6918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6920$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006921fi
6922CXX="$ac_save_cxx"
6923
6924
6925# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6927$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006928if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006932/* end confdefs.h. */
6933#include <stdlib.h>
6934#include <stdarg.h>
6935#include <string.h>
6936#include <float.h>
6937
6938int
6939main ()
6940{
6941
6942 ;
6943 return 0;
6944}
6945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006946if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006947 ac_cv_header_stdc=yes
6948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006950fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6952
6953if test $ac_cv_header_stdc = yes; then
6954 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006956/* end confdefs.h. */
6957#include <string.h>
6958
6959_ACEOF
6960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961 $EGREP "memchr" >/dev/null 2>&1; then :
6962
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006963else
6964 ac_cv_header_stdc=no
6965fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006966rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006967
6968fi
6969
6970if test $ac_cv_header_stdc = yes; then
6971 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006973/* end confdefs.h. */
6974#include <stdlib.h>
6975
6976_ACEOF
6977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978 $EGREP "free" >/dev/null 2>&1; then :
6979
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980else
6981 ac_cv_header_stdc=no
6982fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006983rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006984
6985fi
6986
6987if test $ac_cv_header_stdc = yes; then
6988 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006990 :
6991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006993/* end confdefs.h. */
6994#include <ctype.h>
6995#include <stdlib.h>
6996#if ((' ' & 0x0FF) == 0x020)
6997# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6998# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6999#else
7000# define ISLOWER(c) \
7001 (('a' <= (c) && (c) <= 'i') \
7002 || ('j' <= (c) && (c) <= 'r') \
7003 || ('s' <= (c) && (c) <= 'z'))
7004# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7005#endif
7006
7007#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7008int
7009main ()
7010{
7011 int i;
7012 for (i = 0; i < 256; i++)
7013 if (XOR (islower (i), ISLOWER (i))
7014 || toupper (i) != TOUPPER (i))
7015 return 2;
7016 return 0;
7017}
7018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019if ac_fn_c_try_run "$LINENO"; then :
7020
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007026fi
7027
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007028fi
7029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7031$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007032if test $ac_cv_header_stdc = yes; then
7033
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007035
7036fi
7037
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007038for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007039fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007040ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007041shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007042unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007043sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7044sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007045sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007046sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007047sys/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 +00007048sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007049bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050do :
7051 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7052ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007053if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007056_ACEOF
7057
7058fi
7059
Guido van Rossum627b2d71993-12-24 10:39:16 +00007060done
7061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007063for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007064 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7066$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007067if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007071/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072#include <sys/types.h>
7073#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075int
7076main ()
7077{
7078if ((DIR *) 0)
7079return 0;
7080 ;
7081 return 0;
7082}
7083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007085 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091eval ac_res=\$$as_ac_Header
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7093$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007094if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007097_ACEOF
7098
7099ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007102done
7103# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7104if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7106$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007107if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007109else
Martin v. Löwis11437992002-04-12 09:54:03 +00007110 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007113
Martin v. Löwiseba40652007-08-30 20:10:57 +00007114/* Override any GCC internal prototype to avoid an error.
7115 Use char because int might match the return type of a GCC
7116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007117#ifdef __cplusplus
7118extern "C"
7119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007120char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007121int
7122main ()
7123{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007125 ;
7126 return 0;
7127}
7128_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129for ac_lib in '' dir; do
7130 if test -z "$ac_lib"; then
7131 ac_res="none required"
7132 else
7133 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007134 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007135 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007137 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139rm -f core conftest.err conftest.$ac_objext \
7140 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007141 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007144done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007145if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147else
7148 ac_cv_search_opendir=no
7149fi
7150rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007151LIBS=$ac_func_search_save_LIBS
7152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7154$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007156if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007160
Michael W. Hudson54241132001-12-07 15:38:26 +00007161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7163$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007164if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007166else
7167 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007170
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171/* Override any GCC internal prototype to avoid an error.
7172 Use char because int might match the return type of a GCC
7173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007174#ifdef __cplusplus
7175extern "C"
7176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007177char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007178int
7179main ()
7180{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007181return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007182 ;
7183 return 0;
7184}
7185_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186for ac_lib in '' x; do
7187 if test -z "$ac_lib"; then
7188 ac_res="none required"
7189 else
7190 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007191 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196rm -f core conftest.err conftest.$ac_objext \
7197 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007198 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007201done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007202if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203
Martin v. Löwiseba40652007-08-30 20:10:57 +00007204else
7205 ac_cv_search_opendir=no
7206fi
7207rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007208LIBS=$ac_func_search_save_LIBS
7209fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7211$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007216fi
7217
7218fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007219
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7221$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007222if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007226/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007227#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007228int
7229main ()
7230{
7231return makedev(0, 0);
7232 ;
7233 return 0;
7234}
7235_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007237 ac_cv_header_sys_types_h_makedev=yes
7238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241rm -f core conftest.err conftest.$ac_objext \
7242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007243
7244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7246$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007247
7248if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249ac_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 +01007250if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007253
7254fi
7255
7256
7257
7258 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259 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 +01007260if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007263
7264fi
7265
7266
7267 fi
7268fi
7269
Michael W. Hudson54241132001-12-07 15:38:26 +00007270
Martin v. Löwis11017b12006-01-14 18:12:57 +00007271# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007272for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273do :
7274 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 +00007275#ifdef HAVE_ASM_TYPES_H
7276#include <asm/types.h>
7277#endif
7278#ifdef HAVE_SYS_SOCKET_H
7279#include <sys/socket.h>
7280#endif
7281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007283if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007284 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007286_ACEOF
7287
7288fi
7289
7290done
7291
7292
Guido van Rossum627b2d71993-12-24 10:39:16 +00007293# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007294was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7296$as_echo_n "checking for clock_t in time.h... " >&6; }
7297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007300
7301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305else
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
7307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007308$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007310
Guido van Rossum627b2d71993-12-24 10:39:16 +00007311fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007312rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7315$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007316
Neal Norwitz11690112002-07-30 01:08:28 +00007317# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7319$as_echo_n "checking for makedev... " >&6; }
7320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007321/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007322
7323#if defined(MAJOR_IN_MKDEV)
7324#include <sys/mkdev.h>
7325#elif defined(MAJOR_IN_SYSMACROS)
7326#include <sys/sysmacros.h>
7327#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007328#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007329#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007330int
7331main ()
7332{
7333 makedev(0, 0)
7334 ;
7335 return 0;
7336}
7337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007339 ac_cv_has_makedev=yes
7340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343rm -f core conftest.err conftest.$ac_objext \
7344 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007345if test "$ac_cv_has_makedev" = "no"; then
7346 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007348/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007349
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007350#define _OSF_SOURCE 1
7351#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007352
Neal Norwitz11690112002-07-30 01:08:28 +00007353int
7354main ()
7355{
7356 makedev(0, 0)
7357 ;
7358 return 0;
7359}
7360_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007362 ac_cv_has_makedev=yes
7363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366rm -f core conftest.err conftest.$ac_objext \
7367 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007368 if test "$ac_cv_has_makedev" = "yes"; then
7369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007371
7372 fi
7373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7375$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007376if test "$ac_cv_has_makedev" = "yes"; then
7377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007379
7380fi
7381
Martin v. Löwis399a6892002-10-04 10:22:02 +00007382# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7383# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7384# defined, but the compiler does not support pragma redefine_extname,
7385# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7386# structures (such as rlimit64) without declaring them. As a
7387# work-around, disable LFS on such configurations
7388
7389use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7391$as_echo_n "checking Solaris LFS bug... " >&6; }
7392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007393/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007394
7395#define _LARGEFILE_SOURCE 1
7396#define _FILE_OFFSET_BITS 64
7397#include <sys/resource.h>
7398
Martin v. Löwis399a6892002-10-04 10:22:02 +00007399int
7400main ()
7401{
7402struct rlimit foo;
7403 ;
7404 return 0;
7405}
7406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007408 sol_lfs_bug=no
7409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7414$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007415if test "$sol_lfs_bug" = "yes"; then
7416 use_lfs=no
7417fi
7418
7419if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007420# Two defines needed to enable largefile support on various platforms
7421# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007422case $ac_sys_system/$ac_sys_release in
7423AIX*)
7424
7425$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7426
7427 ;;
7428esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007430$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007431
7432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007434
Martin v. Löwis399a6892002-10-04 10:22:02 +00007435fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007436
Guido van Rossum84e7b241996-08-19 21:59:00 +00007437# Add some code to confdefs.h so that the test for off_t works on SCO
7438cat >> confdefs.h <<\EOF
7439#if defined(SCO_DS)
7440#undef _OFF_T
7441#endif
7442EOF
7443
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007446if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007448else
Martin v. Löwis11437992002-04-12 09:54:03 +00007449
7450cat >>confdefs.h <<_ACEOF
7451#define mode_t int
7452_ACEOF
7453
7454fi
7455
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007457if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007458
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007459else
Martin v. Löwis11437992002-04-12 09:54:03 +00007460
7461cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007463_ACEOF
7464
7465fi
7466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007468if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007470else
Martin v. Löwis11437992002-04-12 09:54:03 +00007471
7472cat >>confdefs.h <<_ACEOF
7473#define pid_t int
7474_ACEOF
7475
7476fi
7477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007478
Martin v. Löwis11437992002-04-12 09:54:03 +00007479cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007480#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007484if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007485
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007486else
Martin v. Löwis11437992002-04-12 09:54:03 +00007487
7488cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007489#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007490_ACEOF
7491
7492fi
7493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7495$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007500/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007501#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007502
7503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007506 ac_cv_type_uid_t=yes
7507else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508 ac_cv_type_uid_t=no
7509fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007510rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7514$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007515if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007518
7519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007521
7522fi
7523
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007524
7525# There are two separate checks for each of the exact-width integer types we
7526# need. First we check whether the type is available using the usual
7527# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7528# and <stdint.h> where available). We then also use the special type checks of
7529# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7530# directly, #define's uint32_t to be a suitable type.
7531
7532ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7533if test "x$ac_cv_type_uint32_t" = xyes; then :
7534
7535$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7536
7537fi
7538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7540case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007541 no|yes) ;; #(
7542 *)
7543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007545
7546
7547cat >>confdefs.h <<_ACEOF
7548#define uint32_t $ac_cv_c_uint32_t
7549_ACEOF
7550;;
7551 esac
7552
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007553
7554ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7555if test "x$ac_cv_type_uint64_t" = xyes; then :
7556
7557$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7558
7559fi
7560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7562case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007563 no|yes) ;; #(
7564 *)
7565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007567
7568
7569cat >>confdefs.h <<_ACEOF
7570#define uint64_t $ac_cv_c_uint64_t
7571_ACEOF
7572;;
7573 esac
7574
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007575
7576ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7577if test "x$ac_cv_type_int32_t" = xyes; then :
7578
7579$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7580
7581fi
7582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007583ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7584case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007585 no|yes) ;; #(
7586 *)
7587
7588cat >>confdefs.h <<_ACEOF
7589#define int32_t $ac_cv_c_int32_t
7590_ACEOF
7591;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007592esac
7593
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007594
7595ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7596if test "x$ac_cv_type_int64_t" = xyes; then :
7597
7598$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7599
7600fi
7601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007602ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7603case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007604 no|yes) ;; #(
7605 *)
7606
7607cat >>confdefs.h <<_ACEOF
7608#define int64_t $ac_cv_c_int64_t
7609_ACEOF
7610;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007611esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007612
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007615if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007617$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007618
7619fi
7620
Jack Jansendd19cf82001-12-06 22:36:17 +00007621
Michael W. Hudson54241132001-12-07 15:38:26 +00007622# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007623# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624# The cast to long int works around a bug in the HP C Compiler
7625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7627# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7629$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007630if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633 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 +00007634
Martin v. Löwis11437992002-04-12 09:54:03 +00007635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636 if test "$ac_cv_type_int" = yes; then
7637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007639as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007640See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641 else
7642 ac_cv_sizeof_int=0
7643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7648$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649
7650
7651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007653#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007654_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007655
7656
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657# The cast to long int works around a bug in the HP C Compiler
7658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7660# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7662$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007663if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666 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 +00007667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 if test "$ac_cv_type_long" = yes; then
7670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007672as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007673See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 else
7675 ac_cv_sizeof_long=0
7676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7681$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682
7683
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007686#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007687_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007688
7689
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690# The cast to long int works around a bug in the HP C Compiler
7691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7693# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7695$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007696if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699 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 +00007700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702 if test "$ac_cv_type_void_p" = yes; then
7703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007705as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007706See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 else
7708 ac_cv_sizeof_void_p=0
7709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7714$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715
7716
7717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007719#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007720_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007721
7722
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723# The cast to long int works around a bug in the HP C Compiler
7724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7726# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7728$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007729if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732 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 +00007733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735 if test "$ac_cv_type_short" = yes; then
7736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007738as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007739See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740 else
7741 ac_cv_sizeof_short=0
7742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744
Martin v. Löwis11437992002-04-12 09:54:03 +00007745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7747$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748
7749
7750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007752#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007753_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007754
7755
Martin v. Löwiseba40652007-08-30 20:10:57 +00007756# The cast to long int works around a bug in the HP C Compiler
7757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7759# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7761$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007762if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765 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 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007768 if test "$ac_cv_type_float" = yes; then
7769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007771as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007772See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 else
7774 ac_cv_sizeof_float=0
7775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7780$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781
7782
7783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007785#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007786_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007787
7788
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789# The cast to long int works around a bug in the HP C Compiler
7790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7792# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7794$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007795if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 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 +00007799
Martin v. Löwis11437992002-04-12 09:54:03 +00007800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007801 if test "$ac_cv_type_double" = yes; then
7802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007804as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007805See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806 else
7807 ac_cv_sizeof_double=0
7808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7813$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814
7815
7816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007818#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007819_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007820
7821
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822# The cast to long int works around a bug in the HP C Compiler
7823# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7824# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7825# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7827$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007828if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007831 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 +00007832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007834 if test "$ac_cv_type_fpos_t" = yes; then
7835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007837as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007838See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839 else
7840 ac_cv_sizeof_fpos_t=0
7841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7846$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007847
7848
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007851#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007852_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007853
Michael W. Hudson54241132001-12-07 15:38:26 +00007854
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855# The cast to long int works around a bug in the HP C Compiler
7856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7858# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7860$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007861if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864 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 +00007865
Martin v. Löwis18e16552006-02-15 17:27:45 +00007866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867 if test "$ac_cv_type_size_t" = yes; then
7868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007870as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 else
7873 ac_cv_sizeof_size_t=0
7874 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007876
Martin v. Löwis18e16552006-02-15 17:27:45 +00007877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7879$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880
7881
7882
Martin v. Löwis18e16552006-02-15 17:27:45 +00007883cat >>confdefs.h <<_ACEOF
7884#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7885_ACEOF
7886
7887
Christian Heimes951cc0f2008-01-31 23:08:23 +00007888# The cast to long int works around a bug in the HP C Compiler
7889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7891# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7893$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007894if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897 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 +00007898
Christian Heimes951cc0f2008-01-31 23:08:23 +00007899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900 if test "$ac_cv_type_pid_t" = yes; then
7901 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007903as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007904See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007905 else
7906 ac_cv_sizeof_pid_t=0
7907 fi
7908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909
Christian Heimes951cc0f2008-01-31 23:08:23 +00007910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7912$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007913
7914
7915
7916cat >>confdefs.h <<_ACEOF
7917#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7918_ACEOF
7919
7920
Michael W. Hudson54241132001-12-07 15:38:26 +00007921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7923$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007924have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007931long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
7938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007940
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007941 have_long_long=yes
7942
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7946$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007947if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948# The cast to long int works around a bug in the HP C Compiler
7949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7951# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7953$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007954if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957 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 +00007958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960 if test "$ac_cv_type_long_long" = yes; then
7961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007963as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007964See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965 else
7966 ac_cv_sizeof_long_long=0
7967 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7972$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973
7974
7975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007977#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007978_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007979
Michael W. Hudson54241132001-12-07 15:38:26 +00007980
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981fi
7982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7984$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007985have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007987/* end confdefs.h. */
7988
7989int
7990main ()
7991{
Matthias Klosec511b472010-05-08 11:01:39 +00007992long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007998
7999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008000$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008001
8002 have_long_double=yes
8003
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008004fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8007$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008008if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8014$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008015if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008016 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018 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 +00008019
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021 if test "$ac_cv_type_long_double" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008024as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008025See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008026 else
8027 ac_cv_sizeof_long_double=0
8028 fi
8029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8033$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008034
8035
8036
8037cat >>confdefs.h <<_ACEOF
8038#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8039_ACEOF
8040
8041
8042fi
8043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8045$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008046have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008048/* end confdefs.h. */
8049
8050int
8051main ()
8052{
8053_Bool x; x = (_Bool)0;
8054 ;
8055 return 0;
8056}
8057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008059
8060
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008062
8063 have_c99_bool=yes
8064
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8068$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008069if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070# The cast to long int works around a bug in the HP C Compiler
8071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8073# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8075$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008076if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079 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 +00008080
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082 if test "$ac_cv_type__Bool" = yes; then
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008085as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008086See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 else
8088 ac_cv_sizeof__Bool=0
8089 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8094$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095
8096
8097
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008098cat >>confdefs.h <<_ACEOF
8099#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8100_ACEOF
8101
8102
8103fi
8104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105ac_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 +00008106 #include <stdint.h>
8107 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008108 #ifdef HAVE_INTTYPES_H
8109 #include <inttypes.h>
8110 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008112if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008113
8114cat >>confdefs.h <<_ACEOF
8115#define HAVE_UINTPTR_T 1
8116_ACEOF
8117
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118# The cast to long int works around a bug in the HP C Compiler
8119# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8120# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8121# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8123$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008124if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008127 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 +00008128
Martin v. Löwis11437992002-04-12 09:54:03 +00008129else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008130 if test "$ac_cv_type_uintptr_t" = yes; then
8131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008133as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008134See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008135 else
8136 ac_cv_sizeof_uintptr_t=0
8137 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139
Martin v. Löwis11437992002-04-12 09:54:03 +00008140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8142$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143
8144
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008147#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008149
Michael W. Hudson54241132001-12-07 15:38:26 +00008150
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008151fi
8152
Martin v. Löwisebe26702006-10-02 14:55:51 +00008153
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008154# The cast to long int works around a bug in the HP C Compiler
8155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8157# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8159$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008160if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008164#ifdef HAVE_SYS_TYPES_H
8165#include <sys/types.h>
8166#endif
8167
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008169
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171 if test "$ac_cv_type_off_t" = yes; then
8172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008174as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008175See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008176 else
8177 ac_cv_sizeof_off_t=0
8178 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008179fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8183$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008184
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008188#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008190
Michael W. Hudson54241132001-12-07 15:38:26 +00008191
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008192
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8194$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008195if test "$have_long_long" = yes
8196then
8197if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008198 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008199
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008200$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008201
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8203$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008207fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008211fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008213# The cast to long int works around a bug in the HP C Compiler
8214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8216# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8218$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008219if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008223#ifdef HAVE_SYS_TYPES_H
8224#include <sys/types.h>
8225#endif
8226#ifdef HAVE_TIME_H
8227#include <time.h>
8228#endif
8229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008231
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008233 if test "$ac_cv_type_time_t" = yes; then
8234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008236as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008237See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008238 else
8239 ac_cv_sizeof_time_t=0
8240 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8245$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008247
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008250#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008251_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008252
Michael W. Hudson54241132001-12-07 15:38:26 +00008253
8254
Trent Mick635f6fb2000-08-23 21:33:05 +00008255# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008256ac_save_cc="$CC"
8257if test "$ac_cv_kpthread" = "yes"
8258then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008259elif test "$ac_cv_kthread" = "yes"
8260then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008261elif test "$ac_cv_pthread" = "yes"
8262then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008263fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8265$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008266have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008268/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008269
8270 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008271int
8272main ()
8273{
Guido van Rossum12580492000-09-24 16:47:19 +00008274pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ;
8276 return 0;
8277}
Matthias Klosec511b472010-05-08 11:01:39 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008281 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8285$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008286if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8290# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8292$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008293if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008294 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008297#ifdef HAVE_PTHREAD_H
8298#include <pthread.h>
8299#endif
8300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008301"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008302
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304 if test "$ac_cv_type_pthread_t" = yes; then
8305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008307as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008308See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008309 else
8310 ac_cv_sizeof_pthread_t=0
8311 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008313
Trent Mick635f6fb2000-08-23 21:33:05 +00008314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8316$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008318
8319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008321#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008322_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008323
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008324
Trent Mick635f6fb2000-08-23 21:33:05 +00008325fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008326CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008327
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8329$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008332 enableval=$enable_toolbox_glue;
8333fi
Jack Jansene578a632001-08-15 01:27:14 +00008334
8335
8336if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008337then
Jack Jansene578a632001-08-15 01:27:14 +00008338 case $ac_sys_system/$ac_sys_release in
8339 Darwin/*)
8340 enable_toolbox_glue="yes";;
8341 *)
8342 enable_toolbox_glue="no";;
8343 esac
8344fi
8345case "$enable_toolbox_glue" in
8346yes)
Jack Jansene578a632001-08-15 01:27:14 +00008347 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008348 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008350$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008351
8352 ;;
8353*)
Jack Jansene578a632001-08-15 01:27:14 +00008354 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008355 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008356 ;;
8357esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8359$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008360
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008361
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008362
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008363case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008364 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008365 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8366 ;;
8367 Darwin/*)
8368 OTHER_LIBTOOL_OPT=""
8369 ;;
8370esac
8371
8372
Ronald Oussoren25967582009-09-06 10:00:26 +00008373
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008374case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008375 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008376 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8377 if test "${enable_universalsdk}"; then
8378 :
8379 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008380 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008381 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008383 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008384 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008385 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008386 if test ${gcc_version} '<' 4.0
8387 then
8388 LIBTOOL_CRUFT="-lcc_dynamic"
8389 else
8390 LIBTOOL_CRUFT=""
8391 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008392 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008393 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008396/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008397
Ronald Oussoren25967582009-09-06 10:00:26 +00008398 #include <unistd.h>
8399 int main(int argc, char*argv[])
8400 {
8401 if (sizeof(long) == 4) {
8402 return 0;
8403 } else {
8404 return 1;
8405 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008406 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008407
Ronald Oussoren25967582009-09-06 10:00:26 +00008408_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008409if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008410 ac_osx_32bit=yes
8411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008412 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8415 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008416fi
8417
8418
Ronald Oussoren25967582009-09-06 10:00:26 +00008419 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008420 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008421 i386)
8422 MACOSX_DEFAULT_ARCH="i386"
8423 ;;
8424 ppc)
8425 MACOSX_DEFAULT_ARCH="ppc"
8426 ;;
8427 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008428 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008429 ;;
8430 esac
8431 else
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="x86_64"
8435 ;;
8436 ppc)
8437 MACOSX_DEFAULT_ARCH="ppc64"
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
8444 #ARCH_RUN_32BIT="true"
8445 fi
8446
8447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008449 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008450esac
8451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8453$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008454if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008455then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008456 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008458 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008460$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8463$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008464 if test $enable_shared = "yes"
8465 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008466 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 +00008467 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8470$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008471fi
8472
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8474$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008475case $ac_sys_system/$ac_sys_release in
8476 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008478$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8481$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008482 ;;
8483 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008486 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008487esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008488
Guido van Rossum0a516c91994-09-12 10:58:40 +00008489# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008490
Michael W. Hudson54241132001-12-07 15:38:26 +00008491
8492
8493
8494
Ronald Oussoren75912852010-04-08 08:13:31 +00008495
Guido van Rossum0a516c91994-09-12 10:58:40 +00008496# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008497# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8499$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008500if test -z "$SO"
8501then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008502 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008503 hp*|HP*)
8504 case `uname -m` in
8505 ia64) SO=.so;;
8506 *) SO=.sl;;
8507 esac
8508 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008509 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008510 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008511 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008512else
8513 # this might also be a termcap variable, see #610332
8514 echo
8515 echo '====================================================================='
8516 echo '+ +'
8517 echo '+ WARNING: You have set SO in your environment. +'
8518 echo '+ Do you really mean to change the extension for shared libraries? +'
8519 echo '+ Continuing in 10 seconds to let you to ponder. +'
8520 echo '+ +'
8521 echo '====================================================================='
8522 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8525$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008526
Ronald Oussoren79f90492009-01-02 10:44:46 +00008527
Neal Norwitz58e28882006-05-19 07:00:58 +00008528cat >>confdefs.h <<_ACEOF
8529#define SHLIB_EXT "$SO"
8530_ACEOF
8531
Guido van Rossum0a516c91994-09-12 10:58:40 +00008532# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008533# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008534# (Shared libraries in this instance are shared modules to be loaded into
8535# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8537$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008538if test -z "$LDSHARED"
8539then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008540 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008541 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008542 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008543 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008544 ;;
8545 BeOS*)
8546 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008547 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008548 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008549 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008550 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008552 if test "$GCC" = "yes" ; then
8553 LDSHARED='$(CC) -shared'
8554 LDCXXSHARED='$(CXX) -shared'
8555 else
8556 LDSHARED='$(CC) -G'
8557 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008558 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008559 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008560 if test "$GCC" = "yes" ; then
8561 LDSHARED='$(CC) -shared'
8562 LDCXXSHARED='$(CXX) -shared'
8563 else
8564 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008565 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008566 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008567 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008568 LDSHARED='$(CC) -bundle'
8569 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008570 if test "$enable_framework" ; then
8571 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008572 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8573 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008574 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008575 else
8576 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008577 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008578 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008579 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008580 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008581 LDSHARED='$(CC) -bundle'
8582 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008583 if test "$enable_framework" ; then
8584 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008585 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8586 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008587 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008588 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008589 # No framework, use the Python app as bundle-loader
8590 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008591 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008592 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008593 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008594 Darwin/*)
8595 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8596 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008597
Ned Deilyc40b9032014-06-25 13:48:46 -07008598 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8599 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8600 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8601 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8602 if test ${dep_target_major} -eq 10 && \
8603 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008604 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008605 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008606 LDSHARED='$(CC) -bundle'
8607 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008608 if test "$enable_framework" ; then
8609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008612 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008613 else
8614 # No framework, use the Python app as bundle-loader
8615 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8616 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008617 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008618 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008619 else
8620 # building for OS X 10.3 and later
8621 if test "${enable_universalsdk}"; then
8622 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8623 fi
8624 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8625 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8626 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008627 fi
8628 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008629 Linux*|GNU*|QNX*)
8630 LDSHARED='$(CC) -shared'
8631 LDCXXSHARED='$(CXX) -shared';;
8632 BSD/OS*/4*)
8633 LDSHARED="gcc -shared"
8634 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008635 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008636 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008637 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008638 LDSHARED='$(CC) -shared'
8639 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008640 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008641 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008642 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008643 OpenBSD*)
8644 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8645 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008646 LDSHARED='$(CC) -shared $(CCSHARED)'
8647 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008648 else
8649 case `uname -r` in
8650 [01].* | 2.[0-7] | 2.[0-7].*)
8651 LDSHARED="ld -Bshareable ${LDFLAGS}"
8652 ;;
8653 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008654 LDSHARED='$(CC) -shared $(CCSHARED)'
8655 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008656 ;;
8657 esac
8658 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008659 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008660 LDSHARED='$(CC) -shared'
8661 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008662 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008663 if test "$GCC" = "yes" ; then
8664 LDSHARED='$(CC) -shared'
8665 LDCXXSHARED='$(CXX) -shared'
8666 else
8667 LDSHARED='$(CC) -G'
8668 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008669 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008670 SCO_SV*)
8671 LDSHARED='$(CC) -Wl,-G,-Bexport'
8672 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8673 CYGWIN*)
8674 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8675 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8676 atheos*)
8677 LDSHARED="gcc -shared"
8678 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008679 *) LDSHARED="ld";;
8680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8683$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008684LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008685BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008686# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8689$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008690if test -z "$CCSHARED"
8691then
Guido van Rossum07397971997-04-29 21:49:50 +00008692 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008693 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008694 then CCSHARED="-fPIC";
8695 elif test `uname -p` = sparc;
8696 then CCSHARED="-xcode=pic32";
8697 else CCSHARED="-Kpic";
8698 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008699 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008700 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008701 else CCSHARED="+z";
8702 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008703 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008704 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008705 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008706 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008707 if test "$GCC" = "yes"
8708 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008709 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008710 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008711 SCO_SV*)
8712 if test "$GCC" = "yes"
8713 then CCSHARED="-fPIC"
8714 else CCSHARED="-Kpic -belf"
8715 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008716 IRIX*/6*) case $CC in
8717 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008718 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008719 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008720 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8724$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008726# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8728$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729if test -z "$LINKFORSHARED"
8730then
Guido van Rossum07397971997-04-29 21:49:50 +00008731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008732 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008733 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008734 LINKFORSHARED="-Wl,-E -Wl,+s";;
8735# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008736 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008737 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008738 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008740 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8741 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008742 # not used by the core itself but which needs to be in the core so
8743 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008744 # -prebind is no longer used, because it actually seems to give a
8745 # slowdown in stead of a speedup, maybe due to the large number of
8746 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008747
8748 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008749 if test "$enable_framework"
8750 then
Jack Jansenda49e192005-01-07 13:08:22 +00008751 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008752 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008753 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008754 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008755 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008756 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008757 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008758 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8759 then
8760 LINKFORSHARED="-Wl,--export-dynamic"
8761 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008762 SunOS/5*) case $CC in
8763 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008764 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008765 then
8766 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008767 fi;;
8768 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008769 CYGWIN*)
8770 if test $enable_shared = "no"
8771 then
8772 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8773 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008774 QNX*)
8775 # -Wl,-E causes the symbols to be added to the dynamic
8776 # symbol table so that they can be found when a module
8777 # is loaded. -N 2048K causes the stack size to be set
8778 # to 2048 kilobytes so that the stack doesn't overflow
8779 # when running test_compile.py.
8780 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8784$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785
Michael W. Hudson54241132001-12-07 15:38:26 +00008786
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8789$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008790if test ! "$LIBRARY" = "$LDLIBRARY"
8791then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008792 case $ac_sys_system in
8793 CYGWIN*)
8794 # Cygwin needs CCSHARED when building extension DLLs
8795 # but not when building the interpreter DLL.
8796 CFLAGSFORSHARED='';;
8797 *)
8798 CFLAGSFORSHARED='$(CCSHARED)'
8799 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8802$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008803
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008804# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8805# library (with --enable-shared).
8806# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008807# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8808# if it is not required, since it creates a dependency of the shared library
8809# to LIBS. This, in turn, means that applications linking the shared libpython
8810# don't need to link LIBS explicitly. The default should be only changed
8811# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8814$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008815case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008816 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008817 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008818esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8820$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008821
8822
Guido van Rossum627b2d71993-12-24 10:39:16 +00008823# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8825$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008826if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008828else
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008830LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834/* Override any GCC internal prototype to avoid an error.
8835 Use char because int might match the return type of a GCC
8836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837#ifdef __cplusplus
8838extern "C"
8839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008840char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008841int
8842main ()
8843{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 ;
8846 return 0;
8847}
8848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854rm -f core conftest.err conftest.$ac_objext \
8855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008856LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8859$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008860if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 cat >>confdefs.h <<_ACEOF
8862#define HAVE_LIBDL 1
8863_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008864
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008865 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008866
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008867fi
8868 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8870$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008871if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008873else
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008875LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879/* Override any GCC internal prototype to avoid an error.
8880 Use char because int might match the return type of a GCC
8881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882#ifdef __cplusplus
8883extern "C"
8884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008885char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
8893_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899rm -f core conftest.err conftest.$ac_objext \
8900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8904$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008905if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 cat >>confdefs.h <<_ACEOF
8907#define HAVE_LIBDLD 1
8908_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008910 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912fi
8913 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008914
Ronald Oussoren79f90492009-01-02 10:44:46 +00008915# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008916if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8918$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008919if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008920 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008921else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008922 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008925
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926/* Override any GCC internal prototype to avoid an error.
8927 Use char because int might match the return type of a GCC
8928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929#ifdef __cplusplus
8930extern "C"
8931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008932char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ;
8938 return 0;
8939}
8940_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941for ac_lib in '' pthread rt posix4; do
8942 if test -z "$ac_lib"; then
8943 ac_res="none required"
8944 else
8945 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008946 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951rm -f core conftest.err conftest.$ac_objext \
8952 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008953 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008956done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008957if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959else
8960 ac_cv_search_sem_init=no
8961fi
8962rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008963LIBS=$ac_func_search_save_LIBS
8964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8966$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008970
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008971fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008972 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008973 # posix4 on Solaris 2.6
8974 # pthread (first!) on Linux
8975fi
8976
Martin v. Löwis19d17342003-06-14 21:03:05 +00008977# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8979$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008980if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008982else
8983 ac_check_lib_save_LIBS=$LIBS
8984LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008987
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988/* Override any GCC internal prototype to avoid an error.
8989 Use char because int might match the return type of a GCC
8990 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008991#ifdef __cplusplus
8992extern "C"
8993#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008994char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008995int
8996main ()
8997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008999 ;
9000 return 0;
9001}
9002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009004 ac_cv_lib_intl_textdomain=yes
9005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008rm -f core conftest.err conftest.$ac_objext \
9009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009010LIBS=$ac_check_lib_save_LIBS
9011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9013$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009014if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009017
9018fi
9019
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009020
9021# checks for system dependent C++ extensions support
9022case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009023 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9024$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009027
Georg Brandl94800df2011-02-25 11:09:02 +00009028 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009029int
9030main ()
9031{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009032loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ;
9034 return 0;
9035}
Matthias Klosec511b472010-05-08 11:01:39 +00009036
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009039
Matthias Klosec511b472010-05-08 11:01:39 +00009040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009041$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009042
Matthias Klosec511b472010-05-08 11:01:39 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009045
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009046else
Matthias Klosec511b472010-05-08 11:01:39 +00009047
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009050
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052rm -f core conftest.err conftest.$ac_objext \
9053 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009054 *) ;;
9055esac
9056
Guido van Rossum70c7f481998-03-26 18:44:10 +00009057# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009058# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9060$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009061if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009063else
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009065LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009068
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069/* Override any GCC internal prototype to avoid an error.
9070 Use char because int might match the return type of a GCC
9071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009072#ifdef __cplusplus
9073extern "C"
9074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009075char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009076int
9077main ()
9078{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 ;
9081 return 0;
9082}
9083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089rm -f core conftest.err conftest.$ac_objext \
9090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009091LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9094$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009095if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009096 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009097fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009098 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9100$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009101if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009103else
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009105LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009108
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109/* Override any GCC internal prototype to avoid an error.
9110 Use char because int might match the return type of a GCC
9111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009112#ifdef __cplusplus
9113extern "C"
9114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009115char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009116int
9117main ()
9118{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009120 ;
9121 return 0;
9122}
9123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129rm -f core conftest.err conftest.$ac_objext \
9130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009131LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9134$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009135if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009136 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009137fi
9138 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009139
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009140case "$ac_sys_system" in
9141BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9143$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009144if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009148LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009151
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152/* Override any GCC internal prototype to avoid an error.
9153 Use char because int might match the return type of a GCC
9154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155#ifdef __cplusplus
9156extern "C"
9157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009158char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009159int
9160main ()
9161{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ;
9164 return 0;
9165}
9166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009170 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009174LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009175fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9177$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009178if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009179 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009180fi
9181 # BeOS
9182;;
9183esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9186$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009187
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009189if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9192$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009193LIBS="$withval $LIBS"
9194
9195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9197$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198fi
9199
Guido van Rossum7f43da71994-08-01 12:15:30 +00009200
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009201
9202
9203
9204
9205
9206
9207
9208if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9209 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009210 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9211set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9213$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009214if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009216else
9217 case $PKG_CONFIG in
9218 [\\/]* | ?:[\\/]*)
9219 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9220 ;;
9221 *)
9222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9223for as_dir in $PATH
9224do
9225 IFS=$as_save_IFS
9226 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009227 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009229 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009231 break 2
9232 fi
9233done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009234 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009235IFS=$as_save_IFS
9236
9237 ;;
9238esac
9239fi
9240PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9241if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9243$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9246$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009247fi
9248
9249
9250fi
9251if test -z "$ac_cv_path_PKG_CONFIG"; then
9252 ac_pt_PKG_CONFIG=$PKG_CONFIG
9253 # Extract the first word of "pkg-config", so it can be a program name with args.
9254set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009257if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009259else
9260 case $ac_pt_PKG_CONFIG in
9261 [\\/]* | ?:[\\/]*)
9262 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9263 ;;
9264 *)
9265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268 IFS=$as_save_IFS
9269 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009271 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009272 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009274 break 2
9275 fi
9276done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009277 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009278IFS=$as_save_IFS
9279
9280 ;;
9281esac
9282fi
9283ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9284if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9286$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009290fi
9291
9292 if test "x$ac_pt_PKG_CONFIG" = x; then
9293 PKG_CONFIG=""
9294 else
9295 case $cross_compiling:$ac_tool_warned in
9296yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009299ac_tool_warned=yes ;;
9300esac
9301 PKG_CONFIG=$ac_pt_PKG_CONFIG
9302 fi
9303else
9304 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9305fi
9306
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009307fi
9308if test -n "$PKG_CONFIG"; then
9309 _pkg_min_version=0.9.0
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9311$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9312 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9314$as_echo "yes" >&6; }
9315 else
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
9318 PKG_CONFIG=""
9319 fi
9320fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009321
9322# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9324$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009325
9326# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009327if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009328 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009329else
9330 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009331fi
9332
9333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9335$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009336
9337# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9339$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009340
9341# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009342if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009343 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009344else
9345 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009346fi
9347
9348
9349if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009350 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9351else
9352 LIBFFI_INCLUDEDIR=""
9353fi
9354
9355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9357$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009358
Ned Deilya2a9f572013-10-25 00:30:10 -07009359# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9360
9361
9362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9363$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9364
9365# Check whether --with-tcltk-includes was given.
9366if test "${with_tcltk_includes+set}" = set; then :
9367 withval=$with_tcltk_includes;
9368else
9369 with_tcltk_includes="default"
9370fi
9371
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9373$as_echo "$with_tcltk_includes" >&6; }
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9375$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9376
9377# Check whether --with-tcltk-libs was given.
9378if test "${with_tcltk_libs+set}" = set; then :
9379 withval=$with_tcltk_libs;
9380else
9381 with_tcltk_libs="default"
9382fi
9383
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9385$as_echo "$with_tcltk_libs" >&6; }
9386if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9387then
9388 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9389 then
9390 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9391 fi
9392 TCLTK_INCLUDES=""
9393 TCLTK_LIBS=""
9394else
9395 TCLTK_INCLUDES="$with_tcltk_includes"
9396 TCLTK_LIBS="$with_tcltk_libs"
9397fi
9398
Benjamin Peterson867475c2009-04-29 20:36:25 +00009399# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9401$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009402
9403# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009405 withval=$with_dbmliborder;
9406if test x$with_dbmliborder = xyes
9407then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009408as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009409else
9410 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9411 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9412 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009413 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009414 fi
9415 done
9416fi
9417fi
9418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9420$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009421
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009422# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009423
9424
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9426$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 withval=$with_signal_module;
9431fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009432
9433
9434if test -z "$with_signal_module"
9435then with_signal_module="yes"
9436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9438$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009439
9440if test "${with_signal_module}" = "yes"; then
9441 USE_SIGNAL_MODULE=""
9442 SIGNAL_OBJS=""
9443else
9444 USE_SIGNAL_MODULE="#"
9445 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9446fi
9447
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009448# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009449
Barry Warsawc0d24d82000-06-29 16:12:00 +00009450USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9453$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Guido van Rossumec2f0731997-01-22 20:54:01 +00009455
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9460$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009461LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009462if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009463 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009464fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9467$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468fi
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
9471# Templates for things AC_DEFINEd more than once.
9472# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009473
9474
Martin v. Löwis11437992002-04-12 09:54:03 +00009475
9476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9478$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 withval=$with_threads;
9483fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009484
9485
Barry Warsawc0d24d82000-06-29 16:12:00 +00009486# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 withval=$with_thread; with_threads=$with_thread
9491fi
9492
Barry Warsawc0d24d82000-06-29 16:12:00 +00009493
9494if test -z "$with_threads"
9495then with_threads="yes"
9496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9498$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009499
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009500
Barry Warsawc0d24d82000-06-29 16:12:00 +00009501if test "$with_threads" = "no"
9502then
9503 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009504elif test "$ac_cv_pthread_is_default" = yes
9505then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009507
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009508 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009509 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009510
9511 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009513elif test "$ac_cv_kpthread" = "yes"
9514then
9515 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009516 if test "$ac_cv_cxx_thread" = "yes"; then
9517 CXX="$CXX -Kpthread"
9518 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009521 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009522 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009523elif test "$ac_cv_kthread" = "yes"
9524then
9525 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009526 if test "$ac_cv_cxx_thread" = "yes"; then
9527 CXX="$CXX -Kthread"
9528 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009530
9531 posix_threads=yes
9532 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009533elif test "$ac_cv_pthread" = "yes"
9534then
9535 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009536 if test "$ac_cv_cxx_thread" = "yes"; then
9537 CXX="$CXX -pthread"
9538 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009540
9541 posix_threads=yes
9542 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009543else
9544 if test ! -z "$with_threads" -a -d "$with_threads"
9545 then LDFLAGS="$LDFLAGS -L$with_threads"
9546 fi
9547 if test ! -z "$withval" -a -d "$withval"
9548 then LDFLAGS="$LDFLAGS -L$withval"
9549 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009550
9551 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009552 # define _POSIX_THREADS in unistd.h. Some apparently don't
9553 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9555$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009557/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009559#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009560#ifdef _POSIX_THREADS
9561yes
9562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009563
9564_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009567 unistd_defines_pthreads=yes
9568else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009569 unistd_defines_pthreads=no
9570fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009571rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9574$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009576 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009579if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009583
Martin v. Löwis11437992002-04-12 09:54:03 +00009584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009586
9587 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009588 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009589else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591 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 +01009592if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009596
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009599
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009600 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009601else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9604$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607if test "${with_pth+set}" = set; then :
9608 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9609$as_echo "$withval" >&6; }
9610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
9612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009614
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009615 LIBS="-lpth $LIBS"
9616 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009620
9621 # Just looking for pthread_create in libpthread is not enough:
9622 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9623 # So we really have to include pthread.h, and then link.
9624 _libs=$LIBS
9625 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9627$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009630
9631#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009632#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009633
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009634void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009635int
9636main ()
9637{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009638
9639pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ;
9641 return 0;
9642}
9643_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9647$as_echo "yes" >&6; }
9648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009649
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009650 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009651 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009652else
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009654 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009656if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009658
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009659 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009660 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009661else
Guido van Rossumad678af1998-10-02 14:42:15 +00009662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663 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 +01009664if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009666
9667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669
9670 THREADOBJ="Python/thread.o"
9671else
9672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009673 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 +01009674if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009676
9677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009679
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009680 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009681else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009682
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9684$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009685if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9718$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009719if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009722 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009723 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009724 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009725else
Greg Steinadf63d62000-07-05 10:38:09 +00009726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9728$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009729if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009733LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737/* Override any GCC internal prototype to avoid an error.
9738 Use char because int might match the return type of a GCC
9739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740#ifdef __cplusplus
9741extern "C"
9742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009743char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ;
9749 return 0;
9750}
9751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009755 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757rm -f core conftest.err conftest.$ac_objext \
9758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9762$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009763if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009765
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009766 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009767 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009768 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009769else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9772$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009773if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009775else
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009777LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009787char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9806$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009807if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009809
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009810 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009811 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009812 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009813else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9816$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009817if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009819else
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009821LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825/* Override any GCC internal prototype to avoid an error.
9826 Use char because int might match the return type of a GCC
9827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828#ifdef __cplusplus
9829extern "C"
9830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009831char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009832int
9833main ()
9834{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ;
9837 return 0;
9838}
9839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845rm -f core conftest.err conftest.$ac_objext \
9846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009847LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9850$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009851if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009853
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009854 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009855 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009856 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009857else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009858
Martin v. Löwis130fb172001-07-19 11:00:41 +00009859 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009860fi
9861
Guido van Rossum627b2d71993-12-24 10:39:16 +00009862
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009863fi
9864
Guido van Rossum0be3e491997-05-22 20:33:33 +00009865fi
9866
Guido van Rossum49545951997-12-02 19:28:29 +00009867fi
9868
Guido van Rossumb93a8621998-05-07 13:27:32 +00009869fi
9870
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009871
Michael W. Hudson54241132001-12-07 15:38:26 +00009872fi
9873
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009874
9875fi
9876
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880fi
9881
Martin v. Löwis11437992002-04-12 09:54:03 +00009882fi
9883
9884
9885fi
9886
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009887
Michael W. Hudson54241132001-12-07 15:38:26 +00009888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9890$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009891if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009892 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009893else
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009895LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009898
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899/* Override any GCC internal prototype to avoid an error.
9900 Use char because int might match the return type of a GCC
9901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009902#ifdef __cplusplus
9903extern "C"
9904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009905char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009906int
9907main ()
9908{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009910 ;
9911 return 0;
9912}
9913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919rm -f core conftest.err conftest.$ac_objext \
9920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009921LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9924$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009925if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009927
Martin v. Löwis130fb172001-07-19 11:00:41 +00009928 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009929 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009930 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009931fi
9932
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009933
Neal Norwitza978ab02002-11-02 16:58:05 +00009934 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9936$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009937if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009939else
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009941LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009944
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945/* Override any GCC internal prototype to avoid an error.
9946 Use char because int might match the return type of a GCC
9947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009948#ifdef __cplusplus
9949extern "C"
9950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009951char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009952int
9953main ()
9954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 ;
9957 return 0;
9958}
9959_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009967LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9970$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009971if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009973
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009974 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009975 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009976 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009977fi
9978
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009979 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009980
Martin v. Löwis130fb172001-07-19 11:00:41 +00009981 if test "$USE_THREAD_MODULE" != "#"
9982 then
9983 # If the above checks didn't disable threads, (at least) OSF1
9984 # needs this '-threads' argument during linking.
9985 case $ac_sys_system in
9986 OSF1) LDLAST=-threads;;
9987 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009988 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009989fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009990
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009991if test "$posix_threads" = "yes"; then
9992 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995
9996 fi
9997
9998 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9999 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010000 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010002
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003 ;;
10004 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010005$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010006
10007 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010008 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010010
10011 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010012 esac
10013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10015$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010016 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010019 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010020 ac_cv_pthread_system_supported=no
10021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010024
10025 #include <stdio.h>
10026 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010027 void *foo(void *parm) {
10028 return NULL;
10029 }
10030 main() {
10031 pthread_attr_t attr;
10032 pthread_t id;
10033 if (pthread_attr_init(&attr)) exit(-1);
10034 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10035 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10036 exit(0);
10037 }
10038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040 ac_cv_pthread_system_supported=yes
10041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010047
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048
Guido van Rossum627b2d71993-12-24 10:39:16 +000010049fi
10050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10052$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010053 if test "$ac_cv_pthread_system_supported" = "yes"; then
10054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010056
10057 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058 for ac_func in pthread_sigmask
10059do :
10060 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010061if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010062 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010063#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010064_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010065 case $ac_sys_system in
10066 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010069
10070 ;;
10071 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010072fi
10073done
10074
Christian Heimes0d604cf2013-08-21 13:26:05 +020010075 for ac_func in pthread_atfork
10076do :
10077 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10078if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10079 cat >>confdefs.h <<_ACEOF
10080#define HAVE_PTHREAD_ATFORK 1
10081_ACEOF
10082
10083fi
10084done
10085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086fi
10087
10088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10092$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010095 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010099 ipv6=no
10100 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10102$as_echo "yes" >&6; }
10103 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104
10105 ipv6=yes
10106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112 /* AF_INET6 available check */
10113#include <sys/types.h>
10114#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010115int
10116main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010118int domain = AF_INET6;
10119 ;
10120 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010121}
Martin v. Löwis11437992002-04-12 09:54:03 +000010122_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010123if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10126$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010129else
Matthias Klosec511b472010-05-08 11:01:39 +000010130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010138if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10140$as_echo_n "checking if RFC2553 API is available... " >&6; }
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010143
10144 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010145#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010146int
10147main ()
10148{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010149struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010150 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 ;
10152 return 0;
10153}
Matthias Klosec511b472010-05-08 11:01:39 +000010154
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010157
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010160 ipv6=yes
10161
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010162else
Matthias Klosec511b472010-05-08 11:01:39 +000010163
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010166 ipv6=no
10167
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010170fi
10171
10172if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010174
10175fi
10176
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177fi
10178
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179
10180ipv6type=unknown
10181ipv6lib=none
10182ipv6trylibc=no
10183
10184if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10186$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010187 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10188 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189 case $i in
10190 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194#include <netinet/in.h>
10195#ifdef IPV6_INRIA_VERSION
10196yes
10197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010200 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010201 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010202fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010203rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010204
10205 ;;
10206 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210#include <netinet/in.h>
10211#ifdef __KAME__
10212yes
10213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010214_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217 ipv6type=$i;
10218 ipv6lib=inet6
10219 ipv6libdir=/usr/local/v6/lib
10220 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010221fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010222rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010223
10224 ;;
10225 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229#include <features.h>
10230#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10231yes
10232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010236 ipv6type=$i;
10237 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010238fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010239rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010240
10241 ;;
10242 linux-inet6)
10243 if test -d /usr/inet6; then
10244 ipv6type=$i
10245 ipv6lib=inet6
10246 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010247 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248 fi
10249 ;;
10250 solaris)
10251 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010252 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010253 ipv6type=$i
10254 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010255 fi
10256 fi
10257 ;;
10258 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010260/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010261
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262#include <sys/param.h>
10263#ifdef _TOSHIBA_INET6
10264yes
10265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010266_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269 ipv6type=$i;
10270 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010271 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010273rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010274
10275 ;;
10276 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010279
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010280#include </usr/local/v6/include/sys/v6config.h>
10281#ifdef __V6D__
10282yes
10283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287 ipv6type=$i;
10288 ipv6lib=v6;
10289 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010290 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010291fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010292rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293
10294 ;;
10295 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010298
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299#include <sys/param.h>
10300#ifdef _ZETA_MINAMI_INET6
10301yes
10302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306 ipv6type=$i;
10307 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010308 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010309fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010310rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010311
10312 ;;
10313 esac
10314 if test "$ipv6type" != "unknown"; then
10315 break
10316 fi
10317 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10319$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010320fi
10321
10322if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10323 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10324 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10325 echo "using lib$ipv6lib"
10326 else
10327 if test $ipv6trylibc = "yes"; then
10328 echo "using libc"
10329 else
10330 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10331 echo "You need to fetch lib$ipv6lib.a from appropriate"
10332 echo 'ipv6 kit and compile beforehand.'
10333 exit 1
10334 fi
10335 fi
10336fi
10337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10339$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010341/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010342
10343 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010344int
10345main ()
10346{
10347FSIORefNum fRef = 0
10348 ;
10349 return 0;
10350}
Mark Dickinson0712b562010-05-08 19:13:21 +000010351
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010352_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010353if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010354
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010356$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10359$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010360
Mark Dickinson0712b562010-05-08 19:13:21 +000010361else
10362
10363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10364$as_echo "no" >&6; }
10365
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010366fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10368
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010369# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10371$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010372
Martin v. Löwiseba40652007-08-30 20:10:57 +000010373# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010375 withval=$with_doc_strings;
10376fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010377
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010378
10379if test -z "$with_doc_strings"
10380then with_doc_strings="yes"
10381fi
10382if test "$with_doc_strings" != "no"
10383then
10384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010386
10387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10389$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010390
Neil Schemenauera35c6882001-02-27 04:45:05 +000010391# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10393$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010394
Martin v. Löwiseba40652007-08-30 20:10:57 +000010395# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010396if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010398if test "$withval" != no
10399then
10400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10404$as_echo "yes" >&6; }
10405else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010407fi
10408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411fi
10412
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010413
10414# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10416$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010417
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010420 withval=$with_pymalloc;
10421fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010422
Neil Schemenauera35c6882001-02-27 04:45:05 +000010423
Neil Schemenauer16c22972002-03-22 15:34:49 +000010424if test -z "$with_pymalloc"
10425then with_pymalloc="yes"
10426fi
10427if test "$with_pymalloc" != "no"
10428then
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010430$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010431
10432fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10434$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010435
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010436# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10438$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010439
10440# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010442 withval=$with_valgrind;
10443else
10444 with_valgrind=no
10445fi
10446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10448$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010449if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450 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 +010010451if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010454
10455else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010456 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010457
10458fi
10459
10460
10461fi
10462
Barry Warsawef82cd72000-06-30 16:21:01 +000010463# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10465$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010466
Martin v. Löwiseba40652007-08-30 20:10:57 +000010467# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010470if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010471then
10472
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10476$as_echo "yes" >&6; }
10477else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010479fi
10480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483fi
10484
Barry Warsawef82cd72000-06-30 16:21:01 +000010485
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010486# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010487
Guido van Rossum98935bf2001-09-05 19:13:16 +000010488DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010489
Guido van Rossume97ee181999-12-20 21:27:22 +000010490# the dlopen() function means we might want to use dynload_shlib.o. some
10491# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010492for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493do :
10494 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010495if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010499
Guido van Rossume97ee181999-12-20 21:27:22 +000010500fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010501done
Guido van Rossume97ee181999-12-20 21:27:22 +000010502
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Guido van Rossume97ee181999-12-20 21:27:22 +000010504# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10505# loading of modules.
10506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10508$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010509if test -z "$DYNLOADFILE"
10510then
10511 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010512 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10513 if test "$ac_cv_func_dlopen" = yes
10514 then DYNLOADFILE="dynload_shlib.o"
10515 else DYNLOADFILE="dynload_aix.o"
10516 fi
10517 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010518 BeOS*) DYNLOADFILE="dynload_beos.o";;
10519 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010520 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10521 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010522 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010523 *)
10524 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10525 # out any dynamic loading
10526 if test "$ac_cv_func_dlopen" = yes
10527 then DYNLOADFILE="dynload_shlib.o"
10528 else DYNLOADFILE="dynload_stub.o"
10529 fi
10530 ;;
10531 esac
10532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10534$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010535if test "$DYNLOADFILE" != "dynload_stub.o"
10536then
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010539
10540fi
10541
Neil Schemenauer4e425612001-06-19 15:44:15 +000010542# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10543
Michael W. Hudson54241132001-12-07 15:38:26 +000010544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10546$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010547if test -z "$MACHDEP_OBJS"
10548then
Jack Jansene578a632001-08-15 01:27:14 +000010549 MACHDEP_OBJS=$extra_machdep_objs
10550else
10551 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10554$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010555
Guido van Rossum627b2d71993-12-24 10:39:16 +000010556# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010557for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10558 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010559 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10560 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010561 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010562 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010563 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010564 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010565 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10566 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010567 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010568 setlocale setregid setreuid setresuid setresgid \
10569 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010570 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010571 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010572 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573do :
10574 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10575ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010576if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010577 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010579_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010580
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010581fi
10582done
10583
Michael W. Hudson54241132001-12-07 15:38:26 +000010584
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585# For some functions, having a definition is not sufficient, since
10586# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10588$as_echo_n "checking for chroot... " >&6; }
10589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010591#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010592int
10593main ()
10594{
10595void *x=chroot
10596 ;
10597 return 0;
10598}
10599_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010603
Matthias Klosec511b472010-05-08 11:01:39 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010609
10610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10613$as_echo_n "checking for link... " >&6; }
10614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010616#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010617int
10618main ()
10619{
10620void *x=link
10621 ;
10622 return 0;
10623}
10624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010628
Matthias Klosec511b472010-05-08 11:01:39 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010634
10635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10638$as_echo_n "checking for symlink... " >&6; }
10639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010641#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010642int
10643main ()
10644{
10645void *x=symlink
10646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010653
Matthias Klosec511b472010-05-08 11:01:39 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010659
10660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10663$as_echo_n "checking for fchdir... " >&6; }
10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010666#include <unistd.h>
10667int
10668main ()
10669{
10670void *x=fchdir
10671 ;
10672 return 0;
10673}
10674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010678
Matthias Klosec511b472010-05-08 11:01:39 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010684
10685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10688$as_echo_n "checking for fsync... " >&6; }
10689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010691#include <unistd.h>
10692int
10693main ()
10694{
10695void *x=fsync
10696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010703
Matthias Klosec511b472010-05-08 11:01:39 +000010704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010709
10710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10713$as_echo_n "checking for fdatasync... " >&6; }
10714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010716#include <unistd.h>
10717int
10718main ()
10719{
10720void *x=fdatasync
10721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010727$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010728
Matthias Klosec511b472010-05-08 11:01:39 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010734
10735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10738$as_echo_n "checking for epoll... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010740/* end confdefs.h. */
10741#include <sys/epoll.h>
10742int
10743main ()
10744{
10745void *x=epoll_create
10746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010753
Matthias Klosec511b472010-05-08 11:01:39 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010759
10760fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10763$as_echo_n "checking for kqueue... " >&6; }
10764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010765/* end confdefs.h. */
10766
10767#include <sys/types.h>
10768#include <sys/event.h>
10769
10770int
10771main ()
10772{
10773int x=kqueue()
10774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010780$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010781
Matthias Klosec511b472010-05-08 11:01:39 +000010782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10786$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010787
10788fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010790# On some systems (eg. FreeBSD 5), we would find a definition of the
10791# functions ctermid_r, setgroups in the library, but no prototype
10792# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10793# address to avoid compiler warnings and potential miscompilations
10794# because of the missing prototypes.
10795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10797$as_echo_n "checking for ctermid_r... " >&6; }
10798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010800
Martin v. Löwisd5843682002-11-21 20:41:28 +000010801#include <stdio.h>
10802
Martin v. Löwisd5843682002-11-21 20:41:28 +000010803int
10804main ()
10805{
10806void* p = ctermid_r
10807 ;
10808 return 0;
10809}
10810_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010814
Matthias Klosec511b472010-05-08 11:01:39 +000010815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10819$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010820
10821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10823
Antoine Pitroub170f172010-09-10 18:47:36 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10825$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010826if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010827 $as_echo_n "(cached) " >&6
10828else
10829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010831#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010832int
10833main ()
10834{
10835void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010836
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010837 ;
10838 return 0;
10839}
10840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010842 ac_cv_flock_decl=yes
10843else
10844 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010845
10846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010848
Antoine Pitroub170f172010-09-10 18:47:36 +000010849fi
10850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10851$as_echo "$ac_cv_flock_decl" >&6; }
10852if test "x${ac_cv_flock_decl}" = xyes; then
10853 for ac_func in flock
10854do :
10855 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010856if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010857 cat >>confdefs.h <<_ACEOF
10858#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010859_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010860
Antoine Pitrou85729812010-09-07 14:55:24 +000010861else
Antoine Pitroub170f172010-09-10 18:47:36 +000010862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010863$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010864if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010865 $as_echo_n "(cached) " >&6
10866else
10867 ac_check_lib_save_LIBS=$LIBS
10868LIBS="-lbsd $LIBS"
10869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870/* end confdefs.h. */
10871
10872/* Override any GCC internal prototype to avoid an error.
10873 Use char because int might match the return type of a GCC
10874 builtin and then its argument prototype would still apply. */
10875#ifdef __cplusplus
10876extern "C"
10877#endif
10878char flock ();
10879int
10880main ()
10881{
10882return flock ();
10883 ;
10884 return 0;
10885}
10886_ACEOF
10887if ac_fn_c_try_link "$LINENO"; then :
10888 ac_cv_lib_bsd_flock=yes
10889else
10890 ac_cv_lib_bsd_flock=no
10891fi
10892rm -f core conftest.err conftest.$ac_objext \
10893 conftest$ac_exeext conftest.$ac_ext
10894LIBS=$ac_check_lib_save_LIBS
10895fi
10896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10897$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010898if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010899 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010900
10901
10902$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10903
10904
10905fi
10906
10907
10908fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010909done
10910
Antoine Pitrou85729812010-09-07 14:55:24 +000010911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10914$as_echo_n "checking for getpagesize... " >&6; }
10915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010916/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010917
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010918#include <unistd.h>
10919
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010920int
10921main ()
10922{
10923void* p = getpagesize
10924 ;
10925 return 0;
10926}
10927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010931
Matthias Klosec511b472010-05-08 11:01:39 +000010932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010937
10938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010940
Charles-François Natali93a11752011-11-27 13:01:35 +010010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10942$as_echo_n "checking for broken unsetenv... " >&6; }
10943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944/* end confdefs.h. */
10945
10946#include <stdlib.h>
10947
10948int
10949main ()
10950{
10951int res = unsetenv("DUMMY")
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956if ac_fn_c_try_compile "$LINENO"; then :
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
10959else
10960
10961$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10962
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10964$as_echo "yes" >&6; }
10965
10966fi
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010969for ac_prog in true
10970do
10971 # Extract the first word of "$ac_prog", so it can be a program name with args.
10972set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10974$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010975if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977else
10978 if test -n "$TRUE"; then
10979 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10980else
10981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982for as_dir in $PATH
10983do
10984 IFS=$as_save_IFS
10985 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989 $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 +000010990 break 2
10991 fi
10992done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010994IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010995
10996fi
10997fi
10998TRUE=$ac_cv_prog_TRUE
10999if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11001$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011005fi
11006
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011008 test -n "$TRUE" && break
11009done
11010test -n "$TRUE" || TRUE="/bin/true"
11011
11012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11014$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011015if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011017else
11018 ac_check_lib_save_LIBS=$LIBS
11019LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011022
Martin v. Löwiseba40652007-08-30 20:10:57 +000011023/* Override any GCC internal prototype to avoid an error.
11024 Use char because int might match the return type of a GCC
11025 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011026#ifdef __cplusplus
11027extern "C"
11028#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011029char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011030int
11031main ()
11032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011034 ;
11035 return 0;
11036}
11037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011038if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011039 ac_cv_lib_c_inet_aton=yes
11040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043rm -f core conftest.err conftest.$ac_objext \
11044 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011045LIBS=$ac_check_lib_save_LIBS
11046fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11048$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011049if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011050 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11053$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011054if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056else
11057 ac_check_lib_save_LIBS=$LIBS
11058LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011061
Martin v. Löwiseba40652007-08-30 20:10:57 +000011062/* Override any GCC internal prototype to avoid an error.
11063 Use char because int might match the return type of a GCC
11064 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011065#ifdef __cplusplus
11066extern "C"
11067#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011068char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069int
11070main ()
11071{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011072return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073 ;
11074 return 0;
11075}
11076_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011078 ac_cv_lib_resolv_inet_aton=yes
11079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011080 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082rm -f core conftest.err conftest.$ac_objext \
11083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084LIBS=$ac_check_lib_save_LIBS
11085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11087$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011088if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011089 cat >>confdefs.h <<_ACEOF
11090#define HAVE_LIBRESOLV 1
11091_ACEOF
11092
11093 LIBS="-lresolv $LIBS"
11094
11095fi
11096
11097
11098fi
11099
11100
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011101# On Tru64, chflags seems to be present, but calling it will
11102# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11104$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011105if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011109 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011112/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011113
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011114#include <sys/stat.h>
11115#include <unistd.h>
11116int main(int argc, char*argv[])
11117{
11118 if(chflags(argv[0], 0) != 0)
11119 return 1;
11120 return 0;
11121}
Ned Deily43e10542011-06-27 23:41:53 -070011122
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011125 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011131fi
11132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011133
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11136$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011137if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011139if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011140 ac_cv_have_chflags="yes"
11141else
11142 ac_cv_have_chflags="no"
11143fi
11144
11145fi
11146if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011149
11150fi
11151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11153$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011154if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011158 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011161/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011162
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011163#include <sys/stat.h>
11164#include <unistd.h>
11165int main(int argc, char*argv[])
11166{
11167 if(lchflags(argv[0], 0) != 0)
11168 return 1;
11169 return 0;
11170}
Ned Deily43e10542011-06-27 23:41:53 -070011171
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011174 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11179 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011180fi
11181
11182
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11185$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011186if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011188if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011189 ac_cv_have_lchflags="yes"
11190else
11191 ac_cv_have_lchflags="no"
11192fi
11193
11194fi
11195if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011198
11199fi
11200
Ronald Oussorenf8752642006-07-06 10:13:35 +000011201case $ac_sys_system/$ac_sys_release in
11202Darwin/*)
11203 _CUR_CFLAGS="${CFLAGS}"
11204 _CUR_LDFLAGS="${LDFLAGS}"
11205 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11206 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11207 ;;
11208esac
11209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11211$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011212if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011214else
11215 ac_check_lib_save_LIBS=$LIBS
11216LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011218/* end confdefs.h. */
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220/* Override any GCC internal prototype to avoid an error.
11221 Use char because int might match the return type of a GCC
11222 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011223#ifdef __cplusplus
11224extern "C"
11225#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011226char inflateCopy ();
11227int
11228main ()
11229{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011230return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011236 ac_cv_lib_z_inflateCopy=yes
11237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240rm -f core conftest.err conftest.$ac_objext \
11241 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011242LIBS=$ac_check_lib_save_LIBS
11243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11245$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011246if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011249
11250fi
11251
11252
Ronald Oussorenf8752642006-07-06 10:13:35 +000011253case $ac_sys_system/$ac_sys_release in
11254Darwin/*)
11255 CFLAGS="${_CUR_CFLAGS}"
11256 LDFLAGS="${_CUR_LDFLAGS}"
11257 ;;
11258esac
11259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11261$as_echo_n "checking for hstrerror... " >&6; }
11262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011264
Martin v. Löwise9416172003-05-03 10:12:45 +000011265#include <netdb.h>
11266
Martin v. Löwise9416172003-05-03 10:12:45 +000011267int
11268main ()
11269{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011270void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011271 ;
11272 return 0;
11273}
11274_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011278
Matthias Klosec511b472010-05-08 11:01:39 +000011279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011284
11285fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286rm -f core conftest.err conftest.$ac_objext \
11287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11290$as_echo_n "checking for inet_aton... " >&6; }
11291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011293
Martin v. Löwis86d66262006-02-17 08:40:11 +000011294#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011295#include <sys/socket.h>
11296#include <netinet/in.h>
11297#include <arpa/inet.h>
11298
Martin v. Löwise9416172003-05-03 10:12:45 +000011299int
11300main ()
11301{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011302void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011303 ;
11304 return 0;
11305}
11306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011310
Matthias Klosec511b472010-05-08 11:01:39 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011316
11317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011318rm -f core conftest.err conftest.$ac_objext \
11319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11322$as_echo_n "checking for inet_pton... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011325
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011326#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011327#include <sys/socket.h>
11328#include <netinet/in.h>
11329#include <arpa/inet.h>
11330
Martin v. Löwise9416172003-05-03 10:12:45 +000011331int
11332main ()
11333{
11334void* p = inet_pton
11335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011342
Matthias Klosec511b472010-05-08 11:01:39 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011348
11349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011351
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011352# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11354$as_echo_n "checking for setgroups... " >&6; }
11355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011357
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011358#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011359#ifdef HAVE_GRP_H
11360#include <grp.h>
11361#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011362
Martin v. Löwisd5843682002-11-21 20:41:28 +000011363int
11364main ()
11365{
11366void* p = setgroups
11367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011374
Matthias Klosec511b472010-05-08 11:01:39 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011380
11381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011383
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011384# check for openpty and forkpty
11385
11386for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387do :
11388 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011389if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011392_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11396$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011397if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011399else
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011401LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
Martin v. Löwiseba40652007-08-30 20:10:57 +000011405/* Override any GCC internal prototype to avoid an error.
11406 Use char because int might match the return type of a GCC
11407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011408#ifdef __cplusplus
11409extern "C"
11410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011411char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011412int
11413main ()
11414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 ;
11417 return 0;
11418}
11419_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425rm -f core conftest.err conftest.$ac_objext \
11426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011427LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11430$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011431if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011433 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11436$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011437if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011438 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011439else
11440 ac_check_lib_save_LIBS=$LIBS
11441LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011443/* end confdefs.h. */
11444
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445/* Override any GCC internal prototype to avoid an error.
11446 Use char because int might match the return type of a GCC
11447 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011448#ifdef __cplusplus
11449extern "C"
11450#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011451char openpty ();
11452int
11453main ()
11454{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011461 ac_cv_lib_bsd_openpty=yes
11462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465rm -f core conftest.err conftest.$ac_objext \
11466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011467LIBS=$ac_check_lib_save_LIBS
11468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11470$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011471if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011473 LIBS="$LIBS -lbsd"
11474fi
11475
11476
11477fi
11478
Fred Drake8cef4cf2000-06-28 16:40:38 +000011479
11480fi
11481done
11482
11483for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484do :
11485 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011486if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011489_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490
Fred Drake8cef4cf2000-06-28 16:40:38 +000011491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11493$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011494if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496else
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502/* Override any GCC internal prototype to avoid an error.
11503 Use char because int might match the return type of a GCC
11504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011505#ifdef __cplusplus
11506extern "C"
11507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011508char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011509int
11510main ()
11511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011520 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522rm -f core conftest.err conftest.$ac_objext \
11523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011524LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11527$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011528if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011530 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11533$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011534if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011535 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011536else
11537 ac_check_lib_save_LIBS=$LIBS
11538LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011540/* end confdefs.h. */
11541
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542/* Override any GCC internal prototype to avoid an error.
11543 Use char because int might match the return type of a GCC
11544 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011545#ifdef __cplusplus
11546extern "C"
11547#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011548char forkpty ();
11549int
11550main ()
11551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011552return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011553 ;
11554 return 0;
11555}
11556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011557if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011558 ac_cv_lib_bsd_forkpty=yes
11559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011561fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562rm -f core conftest.err conftest.$ac_objext \
11563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011564LIBS=$ac_check_lib_save_LIBS
11565fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11567$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011568if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570 LIBS="$LIBS -lbsd"
11571fi
11572
11573
11574fi
11575
Fred Drake8cef4cf2000-06-28 16:40:38 +000011576
11577fi
11578done
11579
Jack Jansendd19cf82001-12-06 22:36:17 +000011580
Brett Cannonaa5778d2008-03-18 04:09:00 +000011581# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011582for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583do :
11584 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011585if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011586 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011588_ACEOF
11589
11590fi
11591done
11592
11593
Michael W. Hudson54241132001-12-07 15:38:26 +000011594# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011595for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596do :
11597 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11598ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011599if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011602_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011604fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011605done
11606
Michael W. Hudson54241132001-12-07 15:38:26 +000011607
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011608ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011609if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011610 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011611
Martin v. Löwis1142de32002-03-29 16:28:31 +000011612else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011614 *" dup2.$ac_objext "* ) ;;
11615 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011616 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011617esac
11618
Martin v. Löwis1142de32002-03-29 16:28:31 +000011619fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011620
11621ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011622if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011623 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11624
11625else
11626 case " $LIBOBJS " in
11627 *" getcwd.$ac_objext "* ) ;;
11628 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11629 ;;
11630esac
11631
11632fi
11633
11634ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011635if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011636 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11637
11638else
11639 case " $LIBOBJS " in
11640 *" strdup.$ac_objext "* ) ;;
11641 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11642 ;;
11643esac
11644
11645fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011646
11647
11648for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649do :
11650 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011651if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011657#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011658int
11659main ()
11660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 ;
11663 return 0;
11664}
11665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011669
Guido van Rossum627b2d71993-12-24 10:39:16 +000011670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011672
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011674done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011675
Jack Jansen150753c2003-03-29 22:07:47 +000011676for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677do :
11678 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011679if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011680 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011682_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011685#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011686int
11687main ()
11688{
11689setpgrp(0,0);
11690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011695
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011697
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011700
11701fi
11702done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011703
Thomas Wouters3a584202000-08-05 23:28:51 +000011704for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011705do :
11706 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011707if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011709#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011712/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011713#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011714int
11715main ()
11716{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011717gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011718 ;
11719 return 0;
11720}
11721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722if ac_fn_c_try_compile "$LINENO"; then :
11723
Guido van Rossum627b2d71993-12-24 10:39:16 +000011724else
Skip Montanaro6dead952003-09-25 14:50:04 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011727
Martin v. Löwis11437992002-04-12 09:54:03 +000011728
Guido van Rossum627b2d71993-12-24 10:39:16 +000011729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011733done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734
Michael W. Hudson54241132001-12-07 15:38:26 +000011735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11737$as_echo_n "checking for major... " >&6; }
11738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011739/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011740
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011741#if defined(MAJOR_IN_MKDEV)
11742#include <sys/mkdev.h>
11743#elif defined(MAJOR_IN_SYSMACROS)
11744#include <sys/sysmacros.h>
11745#else
11746#include <sys/types.h>
11747#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011748
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011749int
11750main ()
11751{
11752
11753 makedev(major(0),minor(0));
11754
11755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011760
11761
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011762$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11765$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011766
11767else
Skip Montanaro6dead952003-09-25 14:50:04 +000011768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011771
11772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773rm -f core conftest.err conftest.$ac_objext \
11774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011775
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011776# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011777# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11779$as_echo_n "checking for getaddrinfo... " >&6; }
11780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011781/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011782
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011783#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011784#include <sys/socket.h>
11785#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011786#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011787
Martin v. Löwis11437992002-04-12 09:54:03 +000011788int
11789main ()
11790{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011791getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 ;
11793 return 0;
11794}
11795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011797 have_getaddrinfo=yes
11798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801rm -f core conftest.err conftest.$ac_objext \
11802 conftest$ac_exeext conftest.$ac_ext
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11804$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011805if test $have_getaddrinfo = yes
11806then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11808$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011809 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011810 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011813
11814if test "${enable_ipv6+set}" = set; then
11815 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11816else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011817 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011818fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011822
Stefan Krah0afe4e42012-11-22 23:56:51 +010011823#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011824#include <sys/types.h>
11825#include <netdb.h>
11826#include <string.h>
11827#include <sys/socket.h>
11828#include <netinet/in.h>
11829
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011830int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011831{
11832 int passive, gaierr, inet4 = 0, inet6 = 0;
11833 struct addrinfo hints, *ai, *aitop;
11834 char straddr[INET6_ADDRSTRLEN], strport[16];
11835
11836 for (passive = 0; passive <= 1; passive++) {
11837 memset(&hints, 0, sizeof(hints));
11838 hints.ai_family = AF_UNSPEC;
11839 hints.ai_flags = passive ? AI_PASSIVE : 0;
11840 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011841 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011842 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11843 (void)gai_strerror(gaierr);
11844 goto bad;
11845 }
11846 for (ai = aitop; ai; ai = ai->ai_next) {
11847 if (ai->ai_addr == NULL ||
11848 ai->ai_addrlen == 0 ||
11849 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11850 straddr, sizeof(straddr), strport, sizeof(strport),
11851 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11852 goto bad;
11853 }
11854 switch (ai->ai_family) {
11855 case AF_INET:
11856 if (strcmp(strport, "54321") != 0) {
11857 goto bad;
11858 }
11859 if (passive) {
11860 if (strcmp(straddr, "0.0.0.0") != 0) {
11861 goto bad;
11862 }
11863 } else {
11864 if (strcmp(straddr, "127.0.0.1") != 0) {
11865 goto bad;
11866 }
11867 }
11868 inet4++;
11869 break;
11870 case AF_INET6:
11871 if (strcmp(strport, "54321") != 0) {
11872 goto bad;
11873 }
11874 if (passive) {
11875 if (strcmp(straddr, "::") != 0) {
11876 goto bad;
11877 }
11878 } else {
11879 if (strcmp(straddr, "::1") != 0) {
11880 goto bad;
11881 }
11882 }
11883 inet6++;
11884 break;
11885 case AF_UNSPEC:
11886 goto bad;
11887 break;
11888 default:
11889 /* another family support? */
11890 break;
11891 }
11892 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011893 freeaddrinfo(aitop);
11894 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011895 }
11896
11897 if (!(inet4 == 0 || inet4 == 2))
11898 goto bad;
11899 if (!(inet6 == 0 || inet6 == 2))
11900 goto bad;
11901
11902 if (aitop)
11903 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011904 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011905
11906 bad:
11907 if (aitop)
11908 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011909 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011910}
11911
Martin v. Löwis11437992002-04-12 09:54:03 +000011912_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011914 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011922fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011925
Benjamin Peterson75fed812010-11-01 01:47:19 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11927$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11928
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011929if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011930then
11931 if test $ipv6 = yes
11932 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011933 echo 'Fatal: You must get working getaddrinfo() function.'
11934 echo ' or you can specify "--disable-ipv6"'.
11935 exit 1
11936 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011937else
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011940
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011941fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011942
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011943for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944do :
11945 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011946if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011947 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011949_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011950
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951fi
11952done
11953
Michael W. Hudson54241132001-12-07 15:38:26 +000011954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11957$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011958if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011962/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011963#include <sys/types.h>
11964#include <sys/time.h>
11965#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011966
Martin v. Löwis11437992002-04-12 09:54:03 +000011967int
11968main ()
11969{
11970if ((struct tm *) 0)
11971return 0;
11972 ;
11973 return 0;
11974}
11975_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011977 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11984$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011985if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011988
11989fi
11990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11992$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011993if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011994 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011997/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011998#include <sys/types.h>
11999#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001int
12002main ()
12003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012004struct tm tm;
12005 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ;
12008 return 0;
12009}
12010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012 ac_cv_struct_tm=time.h
12013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12019$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012020if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023
12024fi
12025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026ac_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 +000012027#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012029"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012030if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
12032cat >>confdefs.h <<_ACEOF
12033#define HAVE_STRUCT_TM_TM_ZONE 1
12034_ACEOF
12035
12036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042
12043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12045"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012046if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012050fi
12051
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054_ACEOF
12055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12057$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012058if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012063#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012064#if !HAVE_DECL_TZNAME
12065extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012067
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012071return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077 ac_cv_var_tzname=yes
12078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12085$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012086 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012090 fi
12091fi
12092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093ac_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 +010012094if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
12096cat >>confdefs.h <<_ACEOF
12097#define HAVE_STRUCT_STAT_ST_RDEV 1
12098_ACEOF
12099
12100
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012101fi
12102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103ac_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 +010012104if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012105
Martin v. Löwis11437992002-04-12 09:54:03 +000012106cat >>confdefs.h <<_ACEOF
12107#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12108_ACEOF
12109
12110
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012111fi
12112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113ac_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 +010012114if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012115
12116cat >>confdefs.h <<_ACEOF
12117#define HAVE_STRUCT_STAT_ST_FLAGS 1
12118_ACEOF
12119
12120
12121fi
12122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123ac_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 +010012124if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012125
12126cat >>confdefs.h <<_ACEOF
12127#define HAVE_STRUCT_STAT_ST_GEN 1
12128_ACEOF
12129
12130
12131fi
12132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133ac_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 +010012134if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012135
12136cat >>confdefs.h <<_ACEOF
12137#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12138_ACEOF
12139
12140
12141fi
12142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143ac_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 +010012144if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012145
Martin v. Löwis11437992002-04-12 09:54:03 +000012146cat >>confdefs.h <<_ACEOF
12147#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12148_ACEOF
12149
12150
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012151fi
12152
Michael W. Hudson54241132001-12-07 15:38:26 +000012153
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12155$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012156if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158else
Matthias Klosec511b472010-05-08 11:01:39 +000012159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012161/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012162#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012172 ac_cv_header_time_altzone=yes
12173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012177
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178fi
12179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12181$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185
12186fi
12187
Guido van Rossumda88dad1995-01-26 00:46:29 +000012188was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12190$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012192/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012193
12194#include <sys/types.h>
12195#include <sys/select.h>
12196#include <sys/time.h>
12197
Martin v. Löwis11437992002-04-12 09:54:03 +000012198int
12199main ()
12200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201;
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
12208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012211 was_it_defined=yes
12212
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12216$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12219$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012220if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012224/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012225#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012229struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ;
12231 return 0;
12232}
12233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012235 ac_cv_struct_addrinfo=yes
12236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12240fi
12241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12243$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012244if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012247
12248fi
12249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12251$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012252if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012256/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012257
12258# include <sys/types.h>
12259# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269 ac_cv_struct_sockaddr_storage=yes
12270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12274fi
12275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12277$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012278if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281
12282fi
12283
Guido van Rossum627b2d71993-12-24 10:39:16 +000012284# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12287$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012288if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012293$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012294int
12295main ()
12296{
12297static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012298test_array [0] = 0;
12299return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012300
12301 ;
12302 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012303}
Martin v. Löwis11437992002-04-12 09:54:03 +000012304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012306 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12313$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012315 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316
12317fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12320$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012321if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012322 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012325/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327int
12328main ()
12329{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012332 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012334 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 char const *const *pcpcc;
12337 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 /* NEC SVR4.0.2 mips cc rejects this. */
12339 struct point {int x, y;};
12340 static struct point const zero = {0,0};
12341 /* AIX XL C 1.02.0.0 rejects this.
12342 It does not let you subtract one const X* pointer from another in
12343 an arm of an if-expression whose if-part is not a constant
12344 expression */
12345 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348 ++pcpcc;
12349 ppc = (char**) pcpcc;
12350 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012351 { /* SCO 3.2v4 cc rejects this sort of thing. */
12352 char tx;
12353 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 }
12359 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12360 int x[] = {25, 17};
12361 const int *foo = &x[0];
12362 ++foo;
12363 }
12364 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12365 typedef const int *iptr;
12366 iptr p = 0;
12367 ++p;
12368 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012369 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012371 struct s { int j; const int *ap[3]; } bx;
12372 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 }
12374 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12375 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012379#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ;
12382 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012383}
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012386 ac_cv_c_const=yes
12387else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12393$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397
12398fi
12399
Michael W. Hudson54241132001-12-07 15:38:26 +000012400
Guido van Rossumda88dad1995-01-26 00:46:29 +000012401works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12403$as_echo_n "checking for working volatile... " >&6; }
12404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012405/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012406
Martin v. Löwis11437992002-04-12 09:54:03 +000012407int
12408main ()
12409{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012410volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 ;
12412 return 0;
12413}
12414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012416 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012417else
Skip Montanaro6dead952003-09-25 14:50:04 +000012418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012420
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012421
Guido van Rossum627b2d71993-12-24 10:39:16 +000012422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12425$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012426
Guido van Rossumda88dad1995-01-26 00:46:29 +000012427works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12429$as_echo_n "checking for working signed char... " >&6; }
12430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012432
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 ;
12438 return 0;
12439}
12440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012442 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012443else
Skip Montanaro6dead952003-09-25 14:50:04 +000012444
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012446
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012447
Guido van Rossum7f43da71994-08-01 12:15:30 +000012448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12451$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012452
Guido van Rossumda88dad1995-01-26 00:46:29 +000012453have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12455$as_echo_n "checking for prototypes... " >&6; }
12456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012458int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 ;
12464 return 0;
12465}
12466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012469$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Matthias Klosec511b472010-05-08 11:01:39 +000012471 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12475$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476
Guido van Rossumda88dad1995-01-26 00:46:29 +000012477works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12479$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012482
12483#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012484int foo(int x, ...) {
12485 va_list va;
12486 va_start(va, x);
12487 va_arg(va, int);
12488 va_arg(va, char *);
12489 va_arg(va, double);
12490 return 0;
12491}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493int
12494main ()
12495{
Guido van Rossum90eea071996-08-30 20:58:57 +000012496return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 ;
12498 return 0;
12499}
12500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
12503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012506 works=yes
12507
Guido van Rossum627b2d71993-12-24 10:39:16 +000012508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12511$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512
Martin v. Löwisd6320502004-08-12 13:45:08 +000012513# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12515$as_echo_n "checking for socketpair... " >&6; }
12516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012517/* end confdefs.h. */
12518
12519#include <sys/types.h>
12520#include <sys/socket.h>
12521
12522int
12523main ()
12524{
12525void *x=socketpair
12526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012533
Matthias Klosec511b472010-05-08 11:01:39 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012539
12540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012542
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12545$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012548#include <sys/types.h>
12549#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012550int
12551main ()
12552{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012553struct sockaddr x;
12554x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559if ac_fn_c_try_compile "$LINENO"; then :
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12561$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012563$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012564
12565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012568
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012571
Guido van Rossumda88dad1995-01-26 00:46:29 +000012572va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12574$as_echo_n "checking whether va_list is an array... " >&6; }
12575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577
12578#ifdef HAVE_STDARG_PROTOTYPES
12579#include <stdarg.h>
12580#else
12581#include <varargs.h>
12582#endif
12583
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012587va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012592if ac_fn_c_try_compile "$LINENO"; then :
12593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012594else
Skip Montanaro6dead952003-09-25 14:50:04 +000012595
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Guido van Rossumda88dad1995-01-26 00:46:29 +000012599 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12604$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012606# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
12608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012610if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12615$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012616 OLD_CFLAGS=$CFLAGS
12617 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012619/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012620
12621# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012622
Martin v. Löwis11437992002-04-12 09:54:03 +000012623int
12624main ()
12625{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012626
12627 char *name;
12628 struct hostent *he, *res;
12629 char buffer[2048];
12630 int buflen = 2048;
12631 int h_errnop;
12632
12633 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
12635 ;
12636 return 0;
12637}
12638_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012642
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012644$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12647$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012649else
Skip Montanaro6dead952003-09-25 14:50:04 +000012650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
12653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12654$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012658# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012663
12664 char *name;
12665 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012666 char buffer[2048];
12667 int buflen = 2048;
12668 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012669
Matthias Klosec511b472010-05-08 11:01:39 +000012670 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012671
12672 ;
12673 return 0;
12674}
12675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012679
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Klosec511b472010-05-08 11:01:39 +000012681$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12684$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012686else
Skip Montanaro6dead952003-09-25 14:50:04 +000012687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12691$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693/* end confdefs.h. */
12694
12695# include <netdb.h>
12696
12697int
12698main ()
12699{
12700
12701 char *name;
12702 struct hostent *he;
12703 struct hostent_data data;
12704
12705 (void) gethostbyname_r(name, he, &data);
12706
12707 ;
12708 return 0;
12709}
12710_ACEOF
12711if ac_fn_c_try_compile "$LINENO"; then :
12712
12713 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12714
12715
12716$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12717
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12719$as_echo "yes" >&6; }
12720
12721else
12722
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012734 CFLAGS=$OLD_CFLAGS
12735
12736else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738 for ac_func in gethostbyname
12739do :
12740 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012741if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012744_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012745
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012746fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012747done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012748
Michael W. Hudson54241132001-12-07 15:38:26 +000012749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012750fi
12751
Michael W. Hudson54241132001-12-07 15:38:26 +000012752
12753
12754
12755
12756
12757
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758# checks for system services
12759# (none yet)
12760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012763if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012764
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12767$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012768if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012769 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012772LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776/* Override any GCC internal prototype to avoid an error.
12777 Use char because int might match the return type of a GCC
12778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012779#ifdef __cplusplus
12780extern "C"
12781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012782char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012786return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 ;
12788 return 0;
12789}
12790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796rm -f core conftest.err conftest.$ac_objext \
12797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12801$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012802if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 cat >>confdefs.h <<_ACEOF
12804#define HAVE_LIBIEEE 1
12805_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012807 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012808
Guido van Rossum627b2d71993-12-24 10:39:16 +000012809fi
12810
Michael W. Hudson54241132001-12-07 15:38:26 +000012811
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012812fi
12813
Michael W. Hudson54241132001-12-07 15:38:26 +000012814
Guido van Rossum7f253911997-05-09 02:42:48 +000012815# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12817$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012821 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012822if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012823then
12824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12828$as_echo "yes" >&6; }
12829else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12830$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012831fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12834$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835fi
12836
Guido van Rossum7f253911997-05-09 02:42:48 +000012837
Guido van Rossum7f43da71994-08-01 12:15:30 +000012838# check for --with-libm=...
12839
Guido van Rossum563e7081996-09-10 18:20:48 +000012840case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012841Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012842BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012843*) LIBM=-lm
12844esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12846$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012851if test "$withval" = no
12852then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12854$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012855elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012856then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12858$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012859else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012860fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12863$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864fi
12865
Guido van Rossum7f43da71994-08-01 12:15:30 +000012866
12867# check for --with-libc=...
12868
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12870$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012875if test "$withval" = no
12876then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12878$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012879elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012880then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12882$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012883else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012884fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12887$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012888fi
12889
Guido van Rossum7f43da71994-08-01 12:15:30 +000012890
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012891# **************************************************
12892# * Check for various properties of floating point *
12893# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12896$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012897if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012899else
12900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012902 ac_cv_little_endian_double=no
12903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012905/* end confdefs.h. */
12906
12907#include <string.h>
12908int main() {
12909 double x = 9006104071832581.0;
12910 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12911 return 0;
12912 else
12913 return 1;
12914}
12915
12916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012918 ac_cv_little_endian_double=yes
12919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012924fi
12925
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012926fi
12927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12929$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012930if test "$ac_cv_little_endian_double" = yes
12931then
12932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012933$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012934
12935fi
12936
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12938$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012939if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012941else
12942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012944 ac_cv_big_endian_double=no
12945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012947/* end confdefs.h. */
12948
12949#include <string.h>
12950int main() {
12951 double x = 9006104071832581.0;
12952 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12953 return 0;
12954 else
12955 return 1;
12956}
12957
12958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012960 ac_cv_big_endian_double=yes
12961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012966fi
12967
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012968fi
12969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12971$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012972if test "$ac_cv_big_endian_double" = yes
12973then
12974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012976
12977fi
12978
12979# Some ARM platforms use a mixed-endian representation for doubles.
12980# While Python doesn't currently have full support for these platforms
12981# (see e.g., issue 1762561), we can at least make sure that float <-> string
12982# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12984$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012985if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012987else
12988
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012990 ac_cv_mixed_endian_double=no
12991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012993/* end confdefs.h. */
12994
12995#include <string.h>
12996int main() {
12997 double x = 9006104071832581.0;
12998 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12999 return 0;
13000 else
13001 return 1;
13002}
13003
13004_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013006 ac_cv_mixed_endian_double=yes
13007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013012fi
13013
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013014fi
13015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13017$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013018if test "$ac_cv_mixed_endian_double" = yes
13019then
13020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013022
13023fi
13024
13025# The short float repr introduced in Python 3.1 requires the
13026# correctly-rounded string <-> double conversion functions from
13027# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13028# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013029# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013030# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013031
13032# This inline assembler syntax may also work for suncc and icc,
13033# so we try it on all platforms.
13034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13036$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013038/* end confdefs.h. */
13039
13040int
13041main ()
13042{
13043
Mark Dickinsona548dee2009-11-15 13:12:43 +000013044 unsigned short cw;
13045 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13046 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013047
13048 ;
13049 return 0;
13050}
13051_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013052if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013053 have_gcc_asm_for_x87=yes
13054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013056fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13060$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013061if test "$have_gcc_asm_for_x87" = yes
13062then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013065
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013066fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013067
Mark Dickinson04b27232009-01-04 12:29:36 +000013068# Detect whether system arithmetic is subject to x87-style double
13069# rounding issues. The result of this test has little meaning on non
13070# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13071# mode is round-to-nearest and double rounding issues are present, and
13072# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13074$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013075# $BASECFLAGS may affect the result
13076ac_save_cc="$CC"
13077CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013079 ac_cv_x87_double_rounding=no
13080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013082/* end confdefs.h. */
13083
13084#include <stdlib.h>
13085#include <math.h>
13086int main() {
13087 volatile double x, y, z;
13088 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13089 x = 0.99999999999999989; /* 1-2**-53 */
13090 y = 1./x;
13091 if (y != 1.)
13092 exit(0);
13093 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13094 x = 1e16;
13095 y = 2.99999;
13096 z = x + y;
13097 if (z != 1e16+4.)
13098 exit(0);
13099 /* both tests show evidence of double rounding */
13100 exit(1);
13101}
13102
13103_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013105 ac_cv_x87_double_rounding=no
13106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013108fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013111fi
13112
Mark Dickinson99abd142009-10-24 13:44:16 +000013113CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13115$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013116if test "$ac_cv_x87_double_rounding" = yes
13117then
13118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013120
13121fi
13122
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013123# ************************************
13124# * Check for mathematical functions *
13125# ************************************
13126
13127LIBS_SAVE=$LIBS
13128LIBS="$LIBS $LIBM"
13129
Mark Dickinson265d7382008-04-21 22:32:24 +000013130# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13131# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13133$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013134if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013136else
13137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013139 ac_cv_tanh_preserves_zero_sign=no
13140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013142/* end confdefs.h. */
13143
13144#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013145#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013146int main() {
13147 /* return 0 if either negative zeros don't exist
13148 on this platform or if negative zeros exist
13149 and tanh(-0.) == -0. */
13150 if (atan2(0., -1.) == atan2(-0., -1.) ||
13151 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13152 else exit(1);
13153}
13154
13155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013157 ac_cv_tanh_preserves_zero_sign=yes
13158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013163fi
13164
Mark Dickinson265d7382008-04-21 22:32:24 +000013165fi
13166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13168$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013169if test "$ac_cv_tanh_preserves_zero_sign" = yes
13170then
13171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013173
13174fi
13175
Mark Dickinson65898e02009-09-05 10:27:00 +000013176for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177do :
13178 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13179ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013180if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013181 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013183_ACEOF
13184
13185fi
13186done
13187
Mark Dickinson65898e02009-09-05 10:27:00 +000013188for ac_func in hypot lgamma log1p round tgamma
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 :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013193 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013195_ACEOF
13196
13197fi
13198done
13199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13201"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013202if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013203 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013205 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013206fi
13207
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013208cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13212"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013213if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013217fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013218
13219cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13223"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013224if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013225 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013226else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013228fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013229
13230cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013231#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013232_ACEOF
13233
13234
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013235LIBS=$LIBS_SAVE
13236
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013237# For multiprocessing module, check that sem_open
13238# actually works. For FreeBSD versions <= 7.2,
13239# the kernel module that provides POSIX semaphores
13240# isn't loaded by default, so an attempt to call
13241# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13243$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013244if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013247 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013248 ac_cv_posix_semaphores_enabled=yes
13249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013251/* end confdefs.h. */
13252
13253#include <unistd.h>
13254#include <fcntl.h>
13255#include <stdio.h>
13256#include <semaphore.h>
13257#include <sys/stat.h>
13258
13259int main(void) {
13260 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13261 if (a == SEM_FAILED) {
13262 perror("sem_open");
13263 return 1;
13264 }
13265 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013266 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013267 return 0;
13268}
13269
13270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013272 ac_cv_posix_semaphores_enabled=yes
13273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013278fi
13279
13280
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013281fi
13282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13284$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013285if test $ac_cv_posix_semaphores_enabled = no
13286then
13287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013289
13290fi
13291
13292# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13294$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013295if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013299 ac_cv_broken_sem_getvalue=yes
13300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013302/* end confdefs.h. */
13303
13304#include <unistd.h>
13305#include <fcntl.h>
13306#include <stdio.h>
13307#include <semaphore.h>
13308#include <sys/stat.h>
13309
13310int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013311 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013312 int count;
13313 int res;
13314 if(a==SEM_FAILED){
13315 perror("sem_open");
13316 return 1;
13317
13318 }
13319 res = sem_getvalue(a, &count);
13320 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013321 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013322 return res==-1 ? 1 : 0;
13323}
13324
13325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013327 ac_cv_broken_sem_getvalue=no
13328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013329 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013333fi
13334
13335
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013336fi
13337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13339$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013340if test $ac_cv_broken_sem_getvalue = yes
13341then
13342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013344
13345fi
13346
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013347# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13349$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013350# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013351if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013352 enableval=$enable_big_digits; case $enable_big_digits in
13353yes)
13354 enable_big_digits=30 ;;
13355no)
13356 enable_big_digits=15 ;;
1335715|30)
13358 ;;
13359*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013360 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 +000013361esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13363$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013364
13365cat >>confdefs.h <<_ACEOF
13366#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13367_ACEOF
13368
13369
13370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13372$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013373fi
13374
13375
Guido van Rossumef2255b2000-03-10 22:30:29 +000013376# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013378if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
13380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013383 wchar_h="yes"
13384
Guido van Rossumef2255b2000-03-10 22:30:29 +000013385else
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013387
13388fi
13389
Michael W. Hudson54241132001-12-07 15:38:26 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013392# determine wchar_t size
13393if test "$wchar_h" = yes
13394then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13398# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13400$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013401if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13405"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408 if test "$ac_cv_type_wchar_t" = yes; then
13409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013411as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013412See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413 else
13414 ac_cv_sizeof_wchar_t=0
13415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13420$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421
13422
13423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013425#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013426_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013427
Michael W. Hudson54241132001-12-07 15:38:26 +000013428
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013429fi
13430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13432$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013433have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013436
13437#include <tcl.h>
13438#if TCL_UTF_MAX != 6
13439# error "NOT UCS4_TCL"
13440#endif
13441int
13442main ()
13443{
13444
13445 ;
13446 return 0;
13447}
13448_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013450
13451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013453
13454 have_ucs4_tcl=yes
13455
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13459$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013460
Skip Montanaro6dead952003-09-25 14:50:04 +000013461# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013462if test "$wchar_h" = yes
13463then
13464 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13466$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013467 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013469else
13470
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013472 ac_cv_wchar_t_signed=yes
13473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013475/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013476
13477 #include <wchar.h>
13478 int main()
13479 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013480 /* Success: exit code 0 */
13481 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013482 }
13483
13484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013486 ac_cv_wchar_t_signed=yes
13487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013492fi
13493
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013494fi
13495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13497$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498fi
13499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13501$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013502# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013505else
13506 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013507fi
13508
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013509
13510if test $enable_unicode = yes
13511then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013512 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013513 case "$have_ucs4_tcl" in
13514 yes) enable_unicode="ucs4"
13515 ;;
13516 *) enable_unicode="ucs2"
13517 ;;
13518 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013519fi
13520
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013521
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013522case "$enable_unicode" in
13523ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013525
13526 ;;
13527ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013529
13530 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013531no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013532*) 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 +000013533esac
13534
Michael W. Hudson54241132001-12-07 15:38:26 +000013535
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
13537
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013538if test "$enable_unicode" = "no"
13539then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013540 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13542$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013543else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013544 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013546$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013547
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013548
13549 # wchar_t is only usable if it maps to an unsigned type
13550 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013551 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013552 then
13553 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013555$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013558
13559 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13560 then
13561 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013563
13564 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13565 then
13566 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013568
13569 else
13570 PY_UNICODE_TYPE="no type found"
13571 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13573$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013574fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013575
13576# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13578$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013579if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582 ac_cv_c_bigendian=unknown
13583 # See if we're dealing with a universal compiler.
13584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13585/* end confdefs.h. */
13586#ifndef __APPLE_CC__
13587 not a universal capable compiler
13588 #endif
13589 typedef int dummy;
13590
Skip Montanaro6dead952003-09-25 14:50:04 +000013591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592if ac_fn_c_try_compile "$LINENO"; then :
13593
13594 # Check for potential -arch flags. It is not universal unless
13595 # there are at least two -arch flags with different values.
13596 ac_arch=
13597 ac_prev=
13598 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13599 if test -n "$ac_prev"; then
13600 case $ac_word in
13601 i?86 | x86_64 | ppc | ppc64)
13602 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13603 ac_arch=$ac_word
13604 else
13605 ac_cv_c_bigendian=universal
13606 break
13607 fi
13608 ;;
13609 esac
13610 ac_prev=
13611 elif test "x$ac_word" = "x-arch"; then
13612 ac_prev=arch
13613 fi
13614 done
13615fi
13616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13617 if test $ac_cv_c_bigendian = unknown; then
13618 # See if sys/param.h defines the BYTE_ORDER macro.
13619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013620/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013621#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013623
Martin v. Löwis11437992002-04-12 09:54:03 +000013624int
13625main ()
13626{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13628 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13629 && LITTLE_ENDIAN)
13630 bogus endian macros
13631 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
13633 ;
13634 return 0;
13635}
13636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013640/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013641#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644int
13645main ()
13646{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013647#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648 not big endian
13649 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
13651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013656 ac_cv_c_bigendian=yes
13657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661fi
13662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663 fi
13664 if test $ac_cv_c_bigendian = unknown; then
13665 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668#include <limits.h>
13669
Martin v. Löwis11437992002-04-12 09:54:03 +000013670int
13671main ()
13672{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13674 bogus endian macros
13675 #endif
13676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 ;
13678 return 0;
13679}
13680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681if ac_fn_c_try_compile "$LINENO"; then :
13682 # It does; now see whether it defined to _BIG_ENDIAN or not.
13683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13684/* end confdefs.h. */
13685#include <limits.h>
13686
13687int
13688main ()
13689{
13690#ifndef _BIG_ENDIAN
13691 not big endian
13692 #endif
13693
13694 ;
13695 return 0;
13696}
13697_ACEOF
13698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704fi
13705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706 fi
13707 if test $ac_cv_c_bigendian = unknown; then
13708 # Compile a test program.
13709 if test "$cross_compiling" = yes; then :
13710 # Try to guess by grepping values from an object file.
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712/* end confdefs.h. */
13713short int ascii_mm[] =
13714 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13715 short int ascii_ii[] =
13716 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13717 int use_ascii (int i) {
13718 return ascii_mm[i] + ascii_ii[i];
13719 }
13720 short int ebcdic_ii[] =
13721 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13722 short int ebcdic_mm[] =
13723 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13724 int use_ebcdic (int i) {
13725 return ebcdic_mm[i] + ebcdic_ii[i];
13726 }
13727 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729int
13730main ()
13731{
13732return use_ascii (foo) == use_ebcdic (foo);
13733 ;
13734 return 0;
13735}
13736_ACEOF
13737if ac_fn_c_try_compile "$LINENO"; then :
13738 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13739 ac_cv_c_bigendian=yes
13740 fi
13741 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13742 if test "$ac_cv_c_bigendian" = unknown; then
13743 ac_cv_c_bigendian=no
13744 else
13745 # finding both strings is unlikely to happen, but who knows?
13746 ac_cv_c_bigendian=unknown
13747 fi
13748 fi
13749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013753/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013755int
13756main ()
13757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759 /* Are we little or big endian? From Harbison&Steele. */
13760 union
13761 {
13762 long int l;
13763 char c[sizeof (long int)];
13764 } u;
13765 u.l = 1;
13766 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767
13768 ;
13769 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013770}
Martin v. Löwis11437992002-04-12 09:54:03 +000013771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013773 ac_cv_c_bigendian=no
13774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013775 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13784$as_echo "$ac_cv_c_bigendian" >&6; }
13785 case $ac_cv_c_bigendian in #(
13786 yes)
13787 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13788;; #(
13789 no)
13790 ;; #(
13791 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795 ;; #(
13796 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013797 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013798 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013800
Michael W. Hudson54241132001-12-07 15:38:26 +000013801
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013802# Check whether right shifting a negative integer extends the sign bit
13803# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13805$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013806if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013811 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013815
13816int main()
13817{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013818 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013819}
13820
Martin v. Löwis11437992002-04-12 09:54:03 +000013821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013823 ac_cv_rshift_extends_sign=yes
13824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013829fi
13830
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831fi
13832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13834$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013835if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013836then
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013839
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013840fi
13841
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013842# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13844$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013845if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013847else
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013851#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013852int
13853main ()
13854{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013855
13856 FILE *f = fopen("/dev/null", "r");
13857 flockfile(f);
13858 getc_unlocked(f);
13859 funlockfile(f);
13860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 ;
13862 return 0;
13863}
13864_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013866 ac_cv_have_getc_unlocked=yes
13867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868 ac_cv_have_getc_unlocked=no
13869fi
13870rm -f core conftest.err conftest.$ac_objext \
13871 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13875$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013876if test "$ac_cv_have_getc_unlocked" = yes
13877then
Martin v. Löwis11437992002-04-12 09:54:03 +000013878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013880
13881fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013882
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013883# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013884# save the value of LIBS so we don't actually link Python with readline
13885LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013886
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013887# On some systems we need to link readline to a termcap compatible
13888# library. NOTE: Keep the precedence of listed libraries synchronised
13889# with setup.py.
13890py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13892$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013893for py_libtermcap in "" ncursesw ncurses curses termcap; do
13894 if test -z "$py_libtermcap"; then
13895 READLINE_LIBS="-lreadline"
13896 else
13897 READLINE_LIBS="-lreadline -l$py_libtermcap"
13898 fi
13899 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013901/* end confdefs.h. */
13902
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903/* Override any GCC internal prototype to avoid an error.
13904 Use char because int might match the return type of a GCC
13905 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013906#ifdef __cplusplus
13907extern "C"
13908#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013909char readline ();
13910int
13911main ()
13912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013919 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921rm -f core conftest.err conftest.$ac_objext \
13922 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013923 if test $py_cv_lib_readline = yes; then
13924 break
13925 fi
13926done
13927# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13928#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013929if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13931$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13934$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013937
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013938fi
13939
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013940# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13942$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013943if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013944 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013945else
13946 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013947LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013949/* end confdefs.h. */
13950
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951/* Override any GCC internal prototype to avoid an error.
13952 Use char because int might match the return type of a GCC
13953 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013954#ifdef __cplusplus
13955extern "C"
13956#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013957char rl_callback_handler_install ();
13958int
13959main ()
13960{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013961return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013962 ;
13963 return 0;
13964}
13965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013966if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013967 ac_cv_lib_readline_rl_callback_handler_install=yes
13968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013969 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971rm -f core conftest.err conftest.$ac_objext \
13972 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013973LIBS=$ac_check_lib_save_LIBS
13974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13976$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013977if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013979$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013980
13981fi
13982
13983
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013984# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013986/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013987#include <readline/readline.h>
13988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013989if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013990 have_readline=yes
13991else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013992 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013993
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013994fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013995rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013996if test $have_readline = yes
13997then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014000#include <readline/readline.h>
14001
14002_ACEOF
14003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014006$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014007
14008fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014009rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014012/* end confdefs.h. */
14013#include <readline/readline.h>
14014
14015_ACEOF
14016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014020
14021fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014022rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014023
14024fi
14025
Martin v. Löwis0daad592001-09-30 21:09:59 +000014026# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14028$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014029if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014031else
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014033LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014036
Martin v. Löwiseba40652007-08-30 20:10:57 +000014037/* Override any GCC internal prototype to avoid an error.
14038 Use char because int might match the return type of a GCC
14039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014040#ifdef __cplusplus
14041extern "C"
14042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014043char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014044int
14045main ()
14046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 ;
14049 return 0;
14050}
14051_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057rm -f core conftest.err conftest.$ac_objext \
14058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014059LIBS=$ac_check_lib_save_LIBS
14060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14062$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014063if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014066
Martin v. Löwis0daad592001-09-30 21:09:59 +000014067fi
14068
Michael W. Hudson54241132001-12-07 15:38:26 +000014069
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014070# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14072$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014073if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014074 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014075else
14076 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014077LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014079/* end confdefs.h. */
14080
14081/* Override any GCC internal prototype to avoid an error.
14082 Use char because int might match the return type of a GCC
14083 builtin and then its argument prototype would still apply. */
14084#ifdef __cplusplus
14085extern "C"
14086#endif
14087char rl_completion_display_matches_hook ();
14088int
14089main ()
14090{
14091return rl_completion_display_matches_hook ();
14092 ;
14093 return 0;
14094}
14095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014097 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014100fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101rm -f core conftest.err conftest.$ac_objext \
14102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014103LIBS=$ac_check_lib_save_LIBS
14104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14106$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014107if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014110
14111fi
14112
14113
Martin Pantera70c3232016-04-03 02:54:58 +000014114# also in 4.0, but not in editline
14115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14116$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14117if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14118 $as_echo_n "(cached) " >&6
14119else
14120 ac_check_lib_save_LIBS=$LIBS
14121LIBS="-lreadline $READLINE_LIBS $LIBS"
14122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123/* end confdefs.h. */
14124
14125/* Override any GCC internal prototype to avoid an error.
14126 Use char because int might match the return type of a GCC
14127 builtin and then its argument prototype would still apply. */
14128#ifdef __cplusplus
14129extern "C"
14130#endif
14131char rl_resize_terminal ();
14132int
14133main ()
14134{
14135return rl_resize_terminal ();
14136 ;
14137 return 0;
14138}
14139_ACEOF
14140if ac_fn_c_try_link "$LINENO"; then :
14141 ac_cv_lib_readline_rl_resize_terminal=yes
14142else
14143 ac_cv_lib_readline_rl_resize_terminal=no
14144fi
14145rm -f core conftest.err conftest.$ac_objext \
14146 conftest$ac_exeext conftest.$ac_ext
14147LIBS=$ac_check_lib_save_LIBS
14148fi
14149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14150$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14151if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14152
14153$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14154
14155fi
14156
14157
Martin v. Löwis0daad592001-09-30 21:09:59 +000014158# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14160$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014161if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014162 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014163else
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014165LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014168
Martin v. Löwiseba40652007-08-30 20:10:57 +000014169/* Override any GCC internal prototype to avoid an error.
14170 Use char because int might match the return type of a GCC
14171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014172#ifdef __cplusplus
14173extern "C"
14174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014175char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014176int
14177main ()
14178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014179return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 ;
14181 return 0;
14182}
14183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189rm -f core conftest.err conftest.$ac_objext \
14190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014191LIBS=$ac_check_lib_save_LIBS
14192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14194$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014195if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014197$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014198
Guido van Rossum353ae582001-07-10 16:45:32 +000014199fi
14200
Jack Jansendd19cf82001-12-06 22:36:17 +000014201
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014202# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014204/* end confdefs.h. */
14205#include <readline/readline.h>
14206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014208 have_readline=yes
14209else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014210 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014211
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014212fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014213rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014214if test $have_readline = yes
14215then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014217/* end confdefs.h. */
14218#include <readline/readline.h>
14219
14220_ACEOF
14221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014222 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014224$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014225
14226fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014227rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014228
14229fi
14230
Martin v. Löwis82bca632006-02-10 20:49:30 +000014231# End of readline checks: restore LIBS
14232LIBS=$LIBS_no_readline
14233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14235$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014236if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014241 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014245
14246int main()
14247{
14248 int val1 = nice(1);
14249 if (val1 != -1 && val1 == nice(2))
14250 exit(0);
14251 exit(1);
14252}
14253
Martin v. Löwis11437992002-04-12 09:54:03 +000014254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014256 ac_cv_broken_nice=yes
14257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014259fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14261 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014262fi
14263
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264fi
14265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14267$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014268if test "$ac_cv_broken_nice" = yes
14269then
Martin v. Löwis11437992002-04-12 09:54:03 +000014270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014272
14273fi
14274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14276$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014277if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014280 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014281 ac_cv_broken_poll=no
14282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014284/* end confdefs.h. */
14285
14286#include <poll.h>
14287
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014288int main()
14289{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014290 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014291 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014292
14293 close (42);
14294
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014295 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014296 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014297 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014298 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014299 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014300 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014301 return 1;
14302}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014303
14304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014306 ac_cv_broken_poll=yes
14307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014314fi
14315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14317$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014318if test "$ac_cv_broken_poll" = yes
14319then
14320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014322
14323fi
14324
Brett Cannon43802422005-02-10 20:48:03 +000014325# 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 +000014326# (which is not required by ISO C or UNIX spec) and/or if we support
14327# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328ac_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 +000014329#include <$ac_cv_struct_tm>
14330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014331"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014332if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014333
14334cat >>confdefs.h <<_ACEOF
14335#define HAVE_STRUCT_TM_TM_ZONE 1
14336_ACEOF
14337
14338
14339fi
14340
14341if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014344
14345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14347"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014348if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352fi
14353
Martin v. Löwiseba40652007-08-30 20:10:57 +000014354cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014356_ACEOF
14357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14359$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014360if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014364/* end confdefs.h. */
14365#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366#if !HAVE_DECL_TZNAME
14367extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014368#endif
14369
14370int
14371main ()
14372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014373return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014379 ac_cv_var_tzname=yes
14380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014381 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383rm -f core conftest.err conftest.$ac_objext \
14384 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14387$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014388 if test $ac_cv_var_tzname = yes; then
14389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014391
14392 fi
14393fi
14394
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014395
Martin v. Löwis1d459062005-03-14 21:23:33 +000014396# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14398$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014399if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014401else
14402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014404 ac_cv_working_tzset=no
14405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014407/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014408
14409#include <stdlib.h>
14410#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014411#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014412
14413#if HAVE_TZNAME
14414extern char *tzname[];
14415#endif
14416
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014417int main()
14418{
Brett Cannon18367812003-09-19 00:59:16 +000014419 /* Note that we need to ensure that not only does tzset(3)
14420 do 'something' with localtime, but it works as documented
14421 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014422 This includes making sure that tzname is set properly if
14423 tm->tm_zone does not exist since it is the alternative way
14424 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014425
14426 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014427 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014428 */
14429
Martin v. Löwis1d459062005-03-14 21:23:33 +000014430 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014431 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14432
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014433 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014434 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014435 if (localtime(&groundhogday)->tm_hour != 0)
14436 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014437#if HAVE_TZNAME
14438 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14439 if (strcmp(tzname[0], "UTC") ||
14440 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14441 exit(1);
14442#endif
Brett Cannon18367812003-09-19 00:59:16 +000014443
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014444 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014445 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014446 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014447 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014448#if HAVE_TZNAME
14449 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14450 exit(1);
14451#endif
Brett Cannon18367812003-09-19 00:59:16 +000014452
14453 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14454 tzset();
14455 if (localtime(&groundhogday)->tm_hour != 11)
14456 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014457#if HAVE_TZNAME
14458 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14459 exit(1);
14460#endif
14461
14462#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014463 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14464 exit(1);
14465 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14466 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014467#endif
Brett Cannon18367812003-09-19 00:59:16 +000014468
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014469 exit(0);
14470}
14471
14472_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014474 ac_cv_working_tzset=yes
14475else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014480fi
14481
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482fi
14483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14485$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014486if test "$ac_cv_working_tzset" = yes
14487then
14488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014490
14491fi
14492
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014493# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14495$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014496if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014501#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014502int
14503main ()
14504{
14505
14506struct stat st;
14507st.st_mtim.tv_nsec = 1;
14508
14509 ;
14510 return 0;
14511}
14512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014514 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519fi
14520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14522$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014523if test "$ac_cv_stat_tv_nsec" = yes
14524then
14525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014527
14528fi
14529
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014530# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14532$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014533if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014537/* end confdefs.h. */
14538#include <sys/stat.h>
14539int
14540main ()
14541{
14542
14543struct stat st;
14544st.st_mtimespec.tv_nsec = 1;
14545
14546 ;
14547 return 0;
14548}
14549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014551 ac_cv_stat_tv_nsec2=yes
14552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014553 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14556fi
14557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14559$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014560if test "$ac_cv_stat_tv_nsec2" = yes
14561then
14562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014564
14565fi
14566
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014567# first curses configure check
14568ac_save_cppflags="$CPPFLAGS"
14569CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14570
14571for ac_header in curses.h ncurses.h
14572do :
14573 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14574ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14576 cat >>confdefs.h <<_ACEOF
14577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14578_ACEOF
14579
14580fi
14581
14582done
14583
14584
14585# On Solaris, term.h requires curses.h
14586for ac_header in term.h
14587do :
14588 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14589#ifdef HAVE_CURSES_H
14590#include <curses.h>
14591#endif
14592
14593"
14594if test "x$ac_cv_header_term_h" = xyes; then :
14595 cat >>confdefs.h <<_ACEOF
14596#define HAVE_TERM_H 1
14597_ACEOF
14598
14599fi
14600
14601done
14602
14603
Jack Jansen666b1e72001-10-31 12:11:48 +000014604# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14606$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014607if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014611/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014612#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014613int
14614main ()
14615{
Jack Jansen666b1e72001-10-31 12:11:48 +000014616
14617 int rtn;
14618 rtn = mvwdelch(0,0,0);
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 ;
14621 return 0;
14622}
14623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014625 ac_cv_mvwdelch_is_expression=yes
14626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014627 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14630fi
14631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14633$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014634
14635if test "$ac_cv_mvwdelch_is_expression" = yes
14636then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014639
14640fi
14641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14643$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014644if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014645 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014648/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014649#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014650int
14651main ()
14652{
Jack Jansen666b1e72001-10-31 12:11:48 +000014653
14654 WINDOW *w;
14655 w->_flags = 0;
14656
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 ;
14658 return 0;
14659}
14660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014661if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014662 ac_cv_window_has_flags=yes
14663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014664 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14667fi
14668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14670$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014671
Jack Jansen666b1e72001-10-31 12:11:48 +000014672
14673if test "$ac_cv_window_has_flags" = yes
14674then
Martin v. Löwis11437992002-04-12 09:54:03 +000014675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014676$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014677
14678fi
14679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14681$as_echo_n "checking for is_term_resized... " >&6; }
14682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014683/* end confdefs.h. */
14684#include <curses.h>
14685int
14686main ()
14687{
14688void *x=is_term_resized
14689 ;
14690 return 0;
14691}
14692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014695$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014696
Matthias Klosec511b472010-05-08 11:01:39 +000014697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014698$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14701$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014702
14703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14707$as_echo_n "checking for resize_term... " >&6; }
14708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014709/* end confdefs.h. */
14710#include <curses.h>
14711int
14712main ()
14713{
14714void *x=resize_term
14715 ;
14716 return 0;
14717}
14718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014721$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014722
Matthias Klosec511b472010-05-08 11:01:39 +000014723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014724$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14727$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014728
14729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14733$as_echo_n "checking for resizeterm... " >&6; }
14734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014735/* end confdefs.h. */
14736#include <curses.h>
14737int
14738main ()
14739{
14740void *x=resizeterm
14741 ;
14742 return 0;
14743}
14744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014747$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014748
Matthias Klosec511b472010-05-08 11:01:39 +000014749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014750$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14753$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014754
14755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014757# last curses configure check
14758CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014759
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14761$as_echo "$as_me: checking for device files" >&6;}
14762
14763if test "x$cross_compiling" = xyes; then
14764 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14766$as_echo_n "checking for /dev/ptmx... " >&6; }
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14768$as_echo "not set" >&6; }
14769 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14770 fi
14771 if test "${ac_cv_file__dev_ptc+set}" != set; then
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14773$as_echo_n "checking for /dev/ptc... " >&6; }
14774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14775$as_echo "not set" >&6; }
14776 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14777 fi
14778fi
14779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14781$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014782if ${ac_cv_file__dev_ptmx+:} false; then :
14783 $as_echo_n "(cached) " >&6
14784else
14785 test "$cross_compiling" = yes &&
14786 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14787if test -r "/dev/ptmx"; then
14788 ac_cv_file__dev_ptmx=yes
14789else
14790 ac_cv_file__dev_ptmx=no
14791fi
14792fi
14793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14794$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14795if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014796
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014797fi
14798
14799if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014801$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014802
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14805$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014806if ${ac_cv_file__dev_ptc+:} false; then :
14807 $as_echo_n "(cached) " >&6
14808else
14809 test "$cross_compiling" = yes &&
14810 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14811if test -r "/dev/ptc"; then
14812 ac_cv_file__dev_ptc=yes
14813else
14814 ac_cv_file__dev_ptc=no
14815fi
14816fi
14817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14818$as_echo "$ac_cv_file__dev_ptc" >&6; }
14819if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014820
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014821fi
14822
14823if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014825$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014826
Neal Norwitz865400f2003-03-21 01:42:58 +000014827fi
14828
Mark Dickinson82864d12009-11-15 16:18:58 +000014829if test "$have_long_long" = yes
14830then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14832$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014833 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014834 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014836 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014837 ac_cv_have_long_long_format="cross -- assuming no"
14838 if test x$GCC = xyes; then
14839 save_CFLAGS=$CFLAGS
14840 CFLAGS="$CFLAGS -Werror -Wformat"
14841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14842/* end confdefs.h. */
14843
14844 #include <stdio.h>
14845 #include <stddef.h>
14846
14847int
14848main ()
14849{
14850
14851 char *buffer;
14852 sprintf(buffer, "%lld", (long long)123);
14853 sprintf(buffer, "%lld", (long long)-123);
14854 sprintf(buffer, "%llu", (unsigned long long)123);
14855
14856 ;
14857 return 0;
14858}
14859_ACEOF
14860if ac_fn_c_try_compile "$LINENO"; then :
14861 ac_cv_have_long_long_format=yes
14862
14863fi
14864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14865 CFLAGS=$save_CFLAGS
14866 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014869/* end confdefs.h. */
14870
14871 #include <stdio.h>
14872 #include <stddef.h>
14873 #include <string.h>
14874
14875 #ifdef HAVE_SYS_TYPES_H
14876 #include <sys/types.h>
14877 #endif
14878
14879 int main()
14880 {
14881 char buffer[256];
14882
14883 if (sprintf(buffer, "%lld", (long long)123) < 0)
14884 return 1;
14885 if (strcmp(buffer, "123"))
14886 return 1;
14887
14888 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14889 return 1;
14890 if (strcmp(buffer, "-123"))
14891 return 1;
14892
14893 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14894 return 1;
14895 if (strcmp(buffer, "123"))
14896 return 1;
14897
14898 return 0;
14899 }
14900
14901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014902if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014903 ac_cv_have_long_long_format=yes
14904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014905 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014909fi
14910
14911
Mark Dickinson82864d12009-11-15 16:18:58 +000014912fi
14913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14915$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014916fi
14917
Mark Dickinson5ce84742009-12-31 20:48:04 +000014918if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014919then
14920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014921$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014922
14923fi
14924
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014925if test $ac_sys_system = Darwin
14926then
14927 LIBS="$LIBS -framework CoreFoundation"
14928fi
14929
Mark Dickinson82864d12009-11-15 16:18:58 +000014930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14932$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014933if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014936 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014937 ac_cv_have_size_t_format="cross -- assuming yes"
14938
Brett Cannon09d12362006-05-11 05:11:33 +000014939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014941/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014942
Brett Cannon09d12362006-05-11 05:11:33 +000014943#include <stdio.h>
14944#include <stddef.h>
14945#include <string.h>
14946
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014947#ifdef HAVE_SYS_TYPES_H
14948#include <sys/types.h>
14949#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014950
14951#ifdef HAVE_SSIZE_T
14952typedef ssize_t Py_ssize_t;
14953#elif SIZEOF_VOID_P == SIZEOF_LONG
14954typedef long Py_ssize_t;
14955#else
14956typedef int Py_ssize_t;
14957#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014958
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014959int main()
14960{
14961 char buffer[256];
14962
Brett Cannon09d12362006-05-11 05:11:33 +000014963 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14964 return 1;
14965
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014966 if (strcmp(buffer, "123"))
14967 return 1;
14968
14969 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14970 return 1;
14971
14972 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014973 return 1;
14974
14975 return 0;
14976}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014977
Brett Cannon09d12362006-05-11 05:11:33 +000014978_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014979if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014980 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014982 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014986fi
14987
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14990$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014991if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014993$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014994
14995fi
14996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014998#ifdef HAVE_SYS_TYPES_H
14999#include <sys/types.h>
15000#endif
15001#ifdef HAVE_SYS_SOCKET_H
15002#include <sys/socket.h>
15003#endif
15004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015005"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015006if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015007
Martin v. Löwis11437992002-04-12 09:54:03 +000015008else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015010$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015011
15012fi
15013
Michael W. Hudson54241132001-12-07 15:38:26 +000015014
Benjamin Peterson7497e912010-10-16 00:53:39 +000015015case $ac_sys_system in
15016AIX*)
15017
15018$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15019 ;;
15020esac
15021
15022
Michael W. Hudson54241132001-12-07 15:38:26 +000015023
15024
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015025for h in `(cd $srcdir;echo Python/thread_*.h)`
15026do
15027 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15028done
15029
Michael W. Hudson54241132001-12-07 15:38:26 +000015030
Victor Stinner5f4056a2017-04-28 03:41:40 +020015031SRCDIRS="Parser Objects Python Modules"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15033$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015034for dir in $SRCDIRS; do
15035 if test ! -d $dir; then
15036 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015037 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015038done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015039
15040# BEGIN_COMPUTED_GOTO
15041# Check for --with-computed-gotos
15042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15043$as_echo_n "checking for --with-computed-gotos... " >&6; }
15044
15045# Check whether --with-computed-gotos was given.
15046if test "${with_computed_gotos+set}" = set; then :
15047 withval=$with_computed_gotos;
15048if test "$withval" = yes
15049then
15050
15051$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15052
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15054$as_echo "yes" >&6; }
15055fi
15056if test "$withval" = no
15057then
15058
15059$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15060
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15062$as_echo "no" >&6; }
15063fi
15064
15065else
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15067$as_echo "no value specified" >&6; }
15068fi
15069
15070
15071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15072$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15073if ${ac_cv_computed_gotos+:} false; then :
15074 $as_echo_n "(cached) " >&6
15075else
15076 if test "$cross_compiling" = yes; then :
15077 if test "${with_computed_gotos+set}" = set; then
15078 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15079 else
15080 ac_cv_computed_gotos=no
15081 fi
15082else
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084/* end confdefs.h. */
15085
15086int main(int argc, char **argv)
15087{
15088 static void *targets[1] = { &&LABEL1 };
15089 goto LABEL2;
15090LABEL1:
15091 return 0;
15092LABEL2:
15093 goto *targets[0];
15094 return 1;
15095}
15096
15097_ACEOF
15098if ac_fn_c_try_run "$LINENO"; then :
15099 ac_cv_computed_gotos=yes
15100else
15101 ac_cv_computed_gotos=no
15102fi
15103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15104 conftest.$ac_objext conftest.beam conftest.$ac_ext
15105fi
15106
15107fi
15108
15109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15110$as_echo "$ac_cv_computed_gotos" >&6; }
15111case "$ac_cv_computed_gotos" in yes*)
15112
15113$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15114
15115esac
15116# END_COMPUTED_GOTO
15117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15119$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015120
Ned Deily3f1d0b32014-11-20 02:11:03 -080015121# ensurepip option
15122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15123$as_echo_n "checking for ensurepip... " >&6; }
15124
15125# Check whether --with-ensurepip was given.
15126if test "${with_ensurepip+set}" = set; then :
15127 withval=$with_ensurepip;
15128else
15129 with_ensurepip=no
15130fi
15131
15132case $with_ensurepip in #(
15133 yes|upgrade) :
15134 ENSUREPIP=upgrade ;; #(
15135 install) :
15136 ENSUREPIP=install ;; #(
15137 no) :
15138 ENSUREPIP=no ;; #(
15139 *) :
15140 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15141esac
15142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15143$as_echo "$ENSUREPIP" >&6; }
15144
15145
Guido van Rossum627b2d71993-12-24 10:39:16 +000015146# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015147ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015148
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015149ac_config_files="$ac_config_files Modules/ld_so_aix"
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152# This file is a shell script that caches the results of configure
15153# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015154# scripts and configure runs, see configure's option --config-cache.
15155# It is not useful on other systems. If it contains results you don't
15156# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015157#
Martin v. Löwis11437992002-04-12 09:54:03 +000015158# config.status only pays attention to the cache file if you give it
15159# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015160#
Skip Montanaro6dead952003-09-25 14:50:04 +000015161# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015162# loading this file, other *unset* `ac_cv_foo' will be assigned the
15163# following values.
15164
15165_ACEOF
15166
Guido van Rossumf78abae1997-01-21 22:02:36 +000015167# The following way of writing the cache mishandles newlines in values,
15168# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015170# Ultrix sh set writes to stderr and can't be redirected directly,
15171# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172(
15173 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15174 eval ac_val=\$$ac_var
15175 case $ac_val in #(
15176 *${as_nl}*)
15177 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015178 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15179$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180 esac
15181 case $ac_var in #(
15182 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015183 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15184 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185 esac ;;
15186 esac
15187 done
15188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15191 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015192 # `set' does not quote correctly, so add quotes: double-quote
15193 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195 "s/'/'\\\\''/g;
15196 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 *)
15199 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202 esac |
15203 sort
15204) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15210 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15212 :end' >>confcache
15213if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15214 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015215 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015216 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15217$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015218 if test ! -f "$cache_file" || test -h "$cache_file"; then
15219 cat confcache >"$cache_file"
15220 else
15221 case $cache_file in #(
15222 */* | ?:*)
15223 mv -f confcache "$cache_file"$$ &&
15224 mv -f "$cache_file"$$ "$cache_file" ;; #(
15225 *)
15226 mv -f confcache "$cache_file" ;;
15227 esac
15228 fi
15229 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015230 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15232$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015233 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015235rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015237test "x$prefix" = xNONE && prefix=$ac_default_prefix
15238# Let make expand exec_prefix.
15239test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015241DEFS=-DHAVE_CONFIG_H
15242
Skip Montanaro6dead952003-09-25 14:50:04 +000015243ac_libobjs=
15244ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015245U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015246for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15247 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015249 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15251 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015252 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15253 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015254done
15255LIBOBJS=$ac_libobjs
15256
15257LTLIBOBJS=$ac_ltlibobjs
15258
15259
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261
Matthias Klose3cef2a92012-03-14 23:39:33 +010015262: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015263ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015264ac_clean_files_save=$ac_clean_files
15265ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015266{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15267$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15268as_write_fail=0
15269cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270#! $SHELL
15271# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015272# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015274# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015277ac_cs_recheck=false
15278ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015280SHELL=\${CONFIG_SHELL-$SHELL}
15281export SHELL
15282_ASEOF
15283cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15284## -------------------- ##
15285## M4sh Initialization. ##
15286## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015287
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288# Be more Bourne compatible
15289DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015290if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 emulate sh
15292 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015294 # is contrary to our usage. Disable this feature.
15295 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015298 case `(set -o) 2>/dev/null` in #(
15299 *posix*) :
15300 set -o posix ;; #(
15301 *) :
15302 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015304fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015305
Skip Montanaro6dead952003-09-25 14:50:04 +000015306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015307as_nl='
15308'
15309export as_nl
15310# Printing a long string crashes Solaris 7 /usr/bin/printf.
15311as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15312as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15313as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15314# Prefer a ksh shell builtin over an external printf program on Solaris,
15315# but without wasting forks for bash or zsh.
15316if test -z "$BASH_VERSION$ZSH_VERSION" \
15317 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15318 as_echo='print -r --'
15319 as_echo_n='print -rn --'
15320elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15321 as_echo='printf %s\n'
15322 as_echo_n='printf %s'
15323else
15324 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15325 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15326 as_echo_n='/usr/ucb/echo -n'
15327 else
15328 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15329 as_echo_n_body='eval
15330 arg=$1;
15331 case $arg in #(
15332 *"$as_nl"*)
15333 expr "X$arg" : "X\\(.*\\)$as_nl";
15334 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15335 esac;
15336 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15337 '
15338 export as_echo_n_body
15339 as_echo_n='sh -c $as_echo_n_body as_echo'
15340 fi
15341 export as_echo_body
15342 as_echo='sh -c $as_echo_body as_echo'
15343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
15345# The user is always right.
15346if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015347 PATH_SEPARATOR=:
15348 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15349 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15350 PATH_SEPARATOR=';'
15351 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015353
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354
15355# IFS
15356# We need space, tab and new line, in precisely that order. Quoting is
15357# there to prevent editors from complaining about space-tab.
15358# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15359# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360IFS=" "" $as_nl"
15361
15362# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015363as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015364case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365 *[\\/]* ) as_myself=$0 ;;
15366 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015367for as_dir in $PATH
15368do
15369 IFS=$as_save_IFS
15370 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015371 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15372 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375 ;;
15376esac
15377# We did not find ourselves, most probably we were run as `sh COMMAND'
15378# in which case we are not to be found in the path.
15379if test "x$as_myself" = x; then
15380 as_myself=$0
15381fi
15382if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015383 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15384 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385fi
15386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015387# Unset variables that we do not need and which cause bugs (e.g. in
15388# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15389# suppresses any "Segmentation fault" message there. '((' could
15390# trigger a bug in pdksh 5.2.14.
15391for as_var in BASH_ENV ENV MAIL MAILPATH
15392do eval test x\${$as_var+set} = xset \
15393 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394done
15395PS1='$ '
15396PS2='> '
15397PS4='+ '
15398
15399# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400LC_ALL=C
15401export LC_ALL
15402LANGUAGE=C
15403export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015405# CDPATH.
15406(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15407
15408
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015409# as_fn_error STATUS ERROR [LINENO LOG_FD]
15410# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015411# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15412# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015413# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015414as_fn_error ()
15415{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015416 as_status=$1; test $as_status -eq 0 && as_status=1
15417 if test "$4"; then
15418 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15419 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015420 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015421 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015422 as_fn_exit $as_status
15423} # as_fn_error
15424
15425
15426# as_fn_set_status STATUS
15427# -----------------------
15428# Set $? to STATUS, without forking.
15429as_fn_set_status ()
15430{
15431 return $1
15432} # as_fn_set_status
15433
15434# as_fn_exit STATUS
15435# -----------------
15436# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15437as_fn_exit ()
15438{
15439 set +e
15440 as_fn_set_status $1
15441 exit $1
15442} # as_fn_exit
15443
15444# as_fn_unset VAR
15445# ---------------
15446# Portably unset VAR.
15447as_fn_unset ()
15448{
15449 { eval $1=; unset $1;}
15450}
15451as_unset=as_fn_unset
15452# as_fn_append VAR VALUE
15453# ----------------------
15454# Append the text in VALUE to the end of the definition contained in VAR. Take
15455# advantage of any shell optimizations that allow amortized linear growth over
15456# repeated appends, instead of the typical quadratic growth present in naive
15457# implementations.
15458if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15459 eval 'as_fn_append ()
15460 {
15461 eval $1+=\$2
15462 }'
15463else
15464 as_fn_append ()
15465 {
15466 eval $1=\$$1\$2
15467 }
15468fi # as_fn_append
15469
15470# as_fn_arith ARG...
15471# ------------------
15472# Perform arithmetic evaluation on the ARGs, and store the result in the
15473# global $as_val. Take advantage of shells that can avoid forks. The arguments
15474# must be portable across $(()) and expr.
15475if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15476 eval 'as_fn_arith ()
15477 {
15478 as_val=$(( $* ))
15479 }'
15480else
15481 as_fn_arith ()
15482 {
15483 as_val=`expr "$@" || test $? -eq 1`
15484 }
15485fi # as_fn_arith
15486
15487
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488if expr a : '\(a\)' >/dev/null 2>&1 &&
15489 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15490 as_expr=expr
15491else
15492 as_expr=false
15493fi
15494
15495if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15496 as_basename=basename
15497else
15498 as_basename=false
15499fi
15500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015501if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15502 as_dirname=dirname
15503else
15504 as_dirname=false
15505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507as_me=`$as_basename -- "$0" ||
15508$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15509 X"$0" : 'X\(//\)$' \| \
15510 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015511$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512 sed '/^.*\/\([^/][^/]*\)\/*$/{
15513 s//\1/
15514 q
15515 }
15516 /^X\/\(\/\/\)$/{
15517 s//\1/
15518 q
15519 }
15520 /^X\/\(\/\).*/{
15521 s//\1/
15522 q
15523 }
15524 s/.*/./; q'`
15525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015526# Avoid depending upon Character Ranges.
15527as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15528as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15529as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15530as_cr_digits='0123456789'
15531as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532
15533ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015534case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015536 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015538 xy) ECHO_C='\c';;
15539 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15540 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541 esac;;
15542*)
15543 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015544esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547if test -d conf$$.dir; then
15548 rm -f conf$$.dir/conf$$.file
15549else
15550 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015551 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015553if (echo >conf$$.file) 2>/dev/null; then
15554 if ln -s conf$$.file conf$$ 2>/dev/null; then
15555 as_ln_s='ln -s'
15556 # ... but there are two gotchas:
15557 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15558 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015559 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015560 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015561 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015562 elif ln conf$$.file conf$$ 2>/dev/null; then
15563 as_ln_s=ln
15564 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015565 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015568 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15571rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573
15574# as_fn_mkdir_p
15575# -------------
15576# Create "$as_dir" as a directory, including parents if necessary.
15577as_fn_mkdir_p ()
15578{
15579
15580 case $as_dir in #(
15581 -*) as_dir=./$as_dir;;
15582 esac
15583 test -d "$as_dir" || eval $as_mkdir_p || {
15584 as_dirs=
15585 while :; do
15586 case $as_dir in #(
15587 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15588 *) as_qdir=$as_dir;;
15589 esac
15590 as_dirs="'$as_qdir' $as_dirs"
15591 as_dir=`$as_dirname -- "$as_dir" ||
15592$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15593 X"$as_dir" : 'X\(//\)[^/]' \| \
15594 X"$as_dir" : 'X\(//\)$' \| \
15595 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15596$as_echo X"$as_dir" |
15597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15598 s//\1/
15599 q
15600 }
15601 /^X\(\/\/\)[^/].*/{
15602 s//\1/
15603 q
15604 }
15605 /^X\(\/\/\)$/{
15606 s//\1/
15607 q
15608 }
15609 /^X\(\/\).*/{
15610 s//\1/
15611 q
15612 }
15613 s/.*/./; q'`
15614 test -d "$as_dir" && break
15615 done
15616 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015617 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015618
15619
15620} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015621if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015622 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015623else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015624 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015625 as_mkdir_p=false
15626fi
15627
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015628
15629# as_fn_executable_p FILE
15630# -----------------------
15631# Test if FILE is an executable regular file.
15632as_fn_executable_p ()
15633{
15634 test -f "$1" && test -x "$1"
15635} # as_fn_executable_p
15636as_test_x='test -x'
15637as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015640as_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 +000015641
15642# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015643as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
15645
Martin v. Löwis11437992002-04-12 09:54:03 +000015646exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015647## ----------------------------------- ##
15648## Main body of $CONFIG_STATUS script. ##
15649## ----------------------------------- ##
15650_ASEOF
15651test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015653cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15654# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015655# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656# values after options handling.
15657ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015658This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015659generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661 CONFIG_FILES = $CONFIG_FILES
15662 CONFIG_HEADERS = $CONFIG_HEADERS
15663 CONFIG_LINKS = $CONFIG_LINKS
15664 CONFIG_COMMANDS = $CONFIG_COMMANDS
15665 $ $0 $@
15666
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667on `(hostname || uname -n) 2>/dev/null | sed 1q`
15668"
15669
Martin v. Löwis11437992002-04-12 09:54:03 +000015670_ACEOF
15671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015672case $ac_config_files in *"
15673"*) set x $ac_config_files; shift; ac_config_files=$*;;
15674esac
15675
15676case $ac_config_headers in *"
15677"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15678esac
15679
15680
15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015682# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015683config_files="$ac_config_files"
15684config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015689ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015690\`$as_me' instantiates files and other configuration actions
15691from templates according to the current configuration. Unless the files
15692and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015694Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015695
15696 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015698 --config print configuration, then exit
15699 -q, --quiet, --silent
15700 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 -d, --debug don't remove temporary files
15702 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015703 --file=FILE[:TEMPLATE]
15704 instantiate the configuration file FILE
15705 --header=FILE[:TEMPLATE]
15706 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
15708Configuration files:
15709$config_files
15710
15711Configuration headers:
15712$config_headers
15713
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015714Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015715
Martin v. Löwiseba40652007-08-30 20:10:57 +000015716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15718ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015719ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015720python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015721configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015722 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015724Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015725This config.status script is free software; the Free Software Foundation
15726gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015727
15728ac_pwd='$ac_pwd'
15729srcdir='$srcdir'
15730INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015731MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015732test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015733_ACEOF
15734
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15736# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015737ac_need_defaults=:
15738while test $# != 0
15739do
15740 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015741 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15743 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015744 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015746 --*=)
15747 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15748 ac_optarg=
15749 ac_shift=:
15750 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 ac_option=$1
15753 ac_optarg=$2
15754 ac_shift=shift
15755 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 esac
15757
Skip Montanaro6dead952003-09-25 14:50:04 +000015758 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015760 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15761 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015763 $as_echo "$ac_cs_version"; exit ;;
15764 --config | --confi | --conf | --con | --co | --c )
15765 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 debug=: ;;
15768 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015769 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015770 case $ac_optarg in
15771 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015772 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015773 esac
15774 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_need_defaults=false;;
15776 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015777 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778 case $ac_optarg in
15779 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15780 esac
15781 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783 --he | --h)
15784 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015785 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015788 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015789 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15790 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15791 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015792
15793 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015794 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015795Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015797 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015798 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015799
15800 esac
15801 shift
15802done
15803
Skip Montanaro6dead952003-09-25 14:50:04 +000015804ac_configure_extra_args=
15805
15806if $ac_cs_silent; then
15807 exec 6>/dev/null
15808 ac_configure_extra_args="$ac_configure_extra_args --silent"
15809fi
15810
15811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015813if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015814 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015815 shift
15816 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15817 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015819 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015820fi
15821
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824exec 5>>config.log
15825{
15826 echo
15827 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15828## Running $as_me. ##
15829_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Martin v. Löwiseba40652007-08-30 20:10:57 +000015833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838
15839# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015840for ac_config_target in $ac_config_targets
15841do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842 case $ac_config_target in
15843 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15844 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15845 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15846 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015847 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15848 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15850 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015851 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015852 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853
Matthias Klose3cef2a92012-03-14 23:39:33 +010015854 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 esac
15856done
15857
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859# If the user did not use the arguments to specify the items to instantiate,
15860# then the envvar interface is used. Set only those that are not.
15861# We use the long form for the default assignment because of an extremely
15862# bizarre bug on SunOS 4.1.3.
15863if $ac_need_defaults; then
15864 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15865 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15866fi
15867
Skip Montanaro6dead952003-09-25 14:50:04 +000015868# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015870# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871# Hook for its removal unless debugging.
15872# Note that there is a small window in which the directory will not be cleaned:
15873# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015874$debug ||
15875{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015876 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015878 : "${ac_tmp:=$tmp}"
15879 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015880' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015881 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015882}
Martin v. Löwis11437992002-04-12 09:54:03 +000015883# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015886 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015887 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015888} ||
15889{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015890 tmp=./conf$$-$RANDOM
15891 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015892} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015893ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015895# Set up the scripts for CONFIG_FILES section.
15896# No need to generate them if there are no CONFIG_FILES.
15897# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015900
15901ac_cr=`echo X | tr X '\015'`
15902# On cygwin, bash can eat \r inside `` if the user requested igncr.
15903# But we know of no other shell where ac_cr would be empty at this
15904# point, so we can use a bashism as a fallback.
15905if test "x$ac_cr" = x; then
15906 eval ac_cr=\$\'\\r\'
15907fi
15908ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15909if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015910 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015911else
15912 ac_cs_awk_cr=$ac_cr
15913fi
15914
Matthias Klose3cef2a92012-03-14 23:39:33 +010015915echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015916_ACEOF
15917
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015919{
15920 echo "cat >conf$$subs.awk <<_ACEOF" &&
15921 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15922 echo "_ACEOF"
15923} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015924 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15925ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926ac_delim='%!_!# '
15927for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015928 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015929 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015931 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15932 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933 break
15934 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015935 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936 else
15937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015940rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015943cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015945sed -n '
15946h
15947s/^/S["/; s/!.*/"]=/
15948p
15949g
15950s/^[^!]*!//
15951:repl
15952t repl
15953s/'"$ac_delim"'$//
15954t delim
15955:nl
15956h
15957s/\(.\{148\}\)..*/\1/
15958t more1
15959s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15960p
15961n
15962b repl
15963:more1
15964s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15965p
15966g
15967s/.\{148\}//
15968t nl
15969:delim
15970h
15971s/\(.\{148\}\)..*/\1/
15972t more2
15973s/["\\]/\\&/g; s/^/"/; s/$/"/
15974p
15975b
15976:more2
15977s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15978p
15979g
15980s/.\{148\}//
15981t delim
15982' <conf$$subs.awk | sed '
15983/^[^""]/{
15984 N
15985 s/\n//
15986}
15987' >>$CONFIG_STATUS || ac_write_fail=1
15988rm -f conf$$subs.awk
15989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15990_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015991cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015992 for (key in S) S_is_set[key] = 1
15993 FS = ""
15994
15995}
15996{
15997 line = $ 0
15998 nfields = split(line, field, "@")
15999 substed = 0
16000 len = length(field[1])
16001 for (i = 2; i < nfields; i++) {
16002 key = field[i]
16003 keylen = length(key)
16004 if (S_is_set[key]) {
16005 value = S[key]
16006 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16007 len += length(value) + length(field[++i])
16008 substed = 1
16009 } else
16010 len += 1 + keylen
16011 }
16012
16013 print line
16014}
16015
16016_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16019if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16020 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16021else
16022 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016023fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016024 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016025_ACEOF
16026
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016027# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16028# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029# trailing colons and then remove the whole line if VPATH becomes empty
16030# (actually we leave an empty line to preserve line numbers).
16031if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016032 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16033h
16034s///
16035s/^/:/
16036s/[ ]*$/:/
16037s/:\$(srcdir):/:/g
16038s/:\${srcdir}:/:/g
16039s/:@srcdir@:/:/g
16040s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016042x
16043s/\(=[ ]*\).*/\1/
16044G
16045s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046s/^[^=]*=[ ]*$//
16047}'
16048fi
16049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016051fi # test -n "$CONFIG_FILES"
16052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016053# Set up the scripts for CONFIG_HEADERS section.
16054# No need to generate them if there are no CONFIG_HEADERS.
16055# This happens for instance with `./config.status Makefile'.
16056if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016057cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016058BEGIN {
16059_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016061# Transform confdefs.h into an awk script `defines.awk', embedded as
16062# here-document in config.status, that substitutes the proper values into
16063# config.h.in to produce config.h.
16064
16065# Create a delimiter string that does not exist in confdefs.h, to ease
16066# handling of long lines.
16067ac_delim='%!_!# '
16068for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016069 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16070 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016071 break
16072 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016073 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016074 else
16075 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16076 fi
16077done
16078
16079# For the awk script, D is an array of macro values keyed by name,
16080# likewise P contains macro parameters if any. Preserve backslash
16081# newline sequences.
16082
16083ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16084sed -n '
16085s/.\{148\}/&'"$ac_delim"'/g
16086t rset
16087:rset
16088s/^[ ]*#[ ]*define[ ][ ]*/ /
16089t def
16090d
16091:def
16092s/\\$//
16093t bsnl
16094s/["\\]/\\&/g
16095s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16096D["\1"]=" \3"/p
16097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16098d
16099:bsnl
16100s/["\\]/\\&/g
16101s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16102D["\1"]=" \3\\\\\\n"\\/p
16103t cont
16104s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16105t cont
16106d
16107:cont
16108n
16109s/.\{148\}/&'"$ac_delim"'/g
16110t clear
16111:clear
16112s/\\$//
16113t bsnlc
16114s/["\\]/\\&/g; s/^/"/; s/$/"/p
16115d
16116:bsnlc
16117s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16118b cont
16119' <confdefs.h | sed '
16120s/'"$ac_delim"'/"\\\
16121"/g' >>$CONFIG_STATUS || ac_write_fail=1
16122
16123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16124 for (key in D) D_is_set[key] = 1
16125 FS = ""
16126}
16127/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16128 line = \$ 0
16129 split(line, arg, " ")
16130 if (arg[1] == "#") {
16131 defundef = arg[2]
16132 mac1 = arg[3]
16133 } else {
16134 defundef = substr(arg[1], 2)
16135 mac1 = arg[2]
16136 }
16137 split(mac1, mac2, "(") #)
16138 macro = mac2[1]
16139 prefix = substr(line, 1, index(line, defundef) - 1)
16140 if (D_is_set[macro]) {
16141 # Preserve the white space surrounding the "#".
16142 print prefix "define", macro P[macro] D[macro]
16143 next
16144 } else {
16145 # Replace #undef with comments. This is necessary, for example,
16146 # in the case of _POSIX_SOURCE, which is predefined and required
16147 # on some systems where configure will not decide to define it.
16148 if (defundef == "undef") {
16149 print "/*", prefix defundef, macro, "*/"
16150 next
16151 }
16152 }
16153}
16154{ print }
16155_ACAWK
16156_ACEOF
16157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016158 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016159fi # test -n "$CONFIG_HEADERS"
16160
16161
16162eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16163shift
16164for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165do
16166 case $ac_tag in
16167 :[FHLC]) ac_mode=$ac_tag; continue;;
16168 esac
16169 case $ac_mode$ac_tag in
16170 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016171 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 :[FH]-) ac_tag=-:-;;
16173 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16174 esac
16175 ac_save_IFS=$IFS
16176 IFS=:
16177 set x $ac_tag
16178 IFS=$ac_save_IFS
16179 shift
16180 ac_file=$1
16181 shift
16182
16183 case $ac_mode in
16184 :L) ac_source=$1;;
16185 :[FH])
16186 ac_file_inputs=
16187 for ac_f
16188 do
16189 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016190 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016191 *) # Look for the file first in the build tree, then in the source tree
16192 # (if the path is not absolute). The absolute path cannot be DOS-style,
16193 # because $ac_f cannot contain `:'.
16194 test -f "$ac_f" ||
16195 case $ac_f in
16196 [\\/$]*) false;;
16197 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16198 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016199 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016200 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016201 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16202 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016203 done
16204
16205 # Let's still pretend it is `configure' which instantiates (i.e., don't
16206 # use $as_me), people would be surprised to read:
16207 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016208 configure_input='Generated from '`
16209 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16210 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211 if test x"$ac_file" != x-; then
16212 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016213 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16214$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016216 # Neutralize special characters interpreted by sed in replacement strings.
16217 case $configure_input in #(
16218 *\&* | *\|* | *\\* )
16219 ac_sed_conf_input=`$as_echo "$configure_input" |
16220 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16221 *) ac_sed_conf_input=$configure_input;;
16222 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223
16224 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016225 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16226 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 esac
16228 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 esac
16230
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016232$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016233 X"$ac_file" : 'X\(//\)[^/]' \| \
16234 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016236$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16238 s//\1/
16239 q
16240 }
16241 /^X\(\/\/\)[^/].*/{
16242 s//\1/
16243 q
16244 }
16245 /^X\(\/\/\)$/{
16246 s//\1/
16247 q
16248 }
16249 /^X\(\/\).*/{
16250 s//\1/
16251 q
16252 }
16253 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016254 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 ac_builddir=.
16256
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257case "$ac_dir" in
16258.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16259*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016260 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016262 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 case $ac_top_builddir_sub in
16264 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16265 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16266 esac ;;
16267esac
16268ac_abs_top_builddir=$ac_pwd
16269ac_abs_builddir=$ac_pwd$ac_dir_suffix
16270# for backward compatibility:
16271ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016272
16273case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016274 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276 ac_top_srcdir=$ac_top_builddir_sub
16277 ac_abs_top_srcdir=$ac_pwd ;;
16278 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016280 ac_top_srcdir=$srcdir
16281 ac_abs_top_srcdir=$srcdir ;;
16282 *) # Relative name.
16283 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16284 ac_top_srcdir=$ac_top_build_prefix$srcdir
16285 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016286esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016288
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
Martin v. Löwiseba40652007-08-30 20:10:57 +000016290 case $ac_mode in
16291 :F)
16292 #
16293 # CONFIG_FILE
16294 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
16296 case $INSTALL in
16297 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016298 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016300 ac_MKDIR_P=$MKDIR_P
16301 case $MKDIR_P in
16302 [\\/$]* | ?:[\\/]* ) ;;
16303 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16304 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016305_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308# If the template does not know about datarootdir, expand it.
16309# FIXME: This hack should be removed a few years after 2.60.
16310ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016311ac_sed_dataroot='
16312/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016313 p
16314 q
16315}
16316/@datadir@/p
16317/@docdir@/p
16318/@infodir@/p
16319/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016320/@mandir@/p'
16321case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016322*datarootdir*) ac_datarootdir_seen=yes;;
16323*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16325$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016328 ac_datarootdir_hack='
16329 s&@datadir@&$datadir&g
16330 s&@docdir@&$docdir&g
16331 s&@infodir@&$infodir&g
16332 s&@localedir@&$localedir&g
16333 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016334 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016335esac
16336_ACEOF
16337
16338# Neutralize VPATH when `$srcdir' = `.'.
16339# Shell code in configure.ac might set extrasub.
16340# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16342ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016343$extrasub
16344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016346:t
16347/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016348s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016349s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016350s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351s&@srcdir@&$ac_srcdir&;t t
16352s&@abs_srcdir@&$ac_abs_srcdir&;t t
16353s&@top_srcdir@&$ac_top_srcdir&;t t
16354s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16355s&@builddir@&$ac_builddir&;t t
16356s&@abs_builddir@&$ac_abs_builddir&;t t
16357s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16358s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016359s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016360$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016361"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016362eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16363 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016364
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016366 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16367 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16368 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016370which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016371$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016372which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016373
Matthias Klose3cef2a92012-03-14 23:39:33 +010016374 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016375 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016376 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16377 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016378 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016379 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 ;;
16381 :H)
16382 #
16383 # CONFIG_HEADER
16384 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016386 {
16387 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016388 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16389 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016391 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016392 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16393$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016395 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016396 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016397 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 fi
16399 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016400 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016401 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016402 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016405
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406
16407 esac
16408
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016409
16410 case $ac_file$ac_mode in
16411 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16412
16413 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414done # for ac_tag
16415
Guido van Rossum627b2d71993-12-24 10:39:16 +000016416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016417as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016418_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016419ac_clean_files=$ac_clean_files_save
16420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016421test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016422 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424
16425# configure is writing to config.log, and then calls config.status.
16426# config.status does its own redirection, appending to config.log.
16427# Unfortunately, on DOS this fails, as config.log is still kept open
16428# by configure, so config.status won't be able to write to it; its
16429# output is simply discarded. So we exec the FD to /dev/null,
16430# effectively closing config.log, so it can be properly (re)opened and
16431# appended to by config.status. When coming back to configure, we
16432# need to make the FD available again.
16433if test "$no_create" != yes; then
16434 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016435 ac_config_status_args=
16436 test "$silent" = yes &&
16437 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016439 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 exec 5>>config.log
16441 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16442 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016443 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016444fi
16445if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16447$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016448fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016449
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016450
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016451echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016452if test ! -f Modules/Setup
16453then
16454 cp $srcdir/Modules/Setup.dist Modules/Setup
16455fi
16456
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016457echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016458if test ! -f Modules/Setup.local
16459then
16460 echo "# Edit this file for local setup changes" >Modules/Setup.local
16461fi
16462
16463echo "creating Makefile"
16464$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16465 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016466 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016467
16468case $ac_sys_system in
16469BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016471
16472 Support for BeOS is deprecated as of Python 2.6.
16473 See PEP 11 for the gory details.
16474 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016475$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016476
16477 Support for BeOS is deprecated as of Python 2.6.
16478 See PEP 11 for the gory details.
16479 " >&2;}
16480 ;;
16481*) ;;
16482esac
16483
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016484mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016485
16486if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16487 echo "" >&6
16488 echo "" >&6
16489 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 +000016490 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016491 echo "" >&6
16492 echo "" >&6
16493fi