blob: 505f8bbc045d9d5377e3659b7cf888ea4d869793 [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
Benjamin Peterson69e96912018-09-12 16:31:17 -0700772runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000773localstatedir
774sharedstatedir
775sysconfdir
776datadir
777datarootdir
778libexecdir
779sbindir
780bindir
781program_transform_name
782prefix
783exec_prefix
784PACKAGE_URL
785PACKAGE_BUGREPORT
786PACKAGE_STRING
787PACKAGE_VERSION
788PACKAGE_TARNAME
789PACKAGE_NAME
790PATH_SEPARATOR
791SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000792ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000793ac_user_opts='
794enable_option_checking
795enable_universalsdk
796with_universal_archs
797with_framework_name
798enable_framework
799with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600800with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000801with_cxx_main
802with_suffix
803enable_shared
804enable_profiling
805with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +0000806enable_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000807with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000808enable_toolbox_glue
809with_libs
810with_system_expat
811with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700812with_tcltk_includes
813with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000814with_dbmliborder
815with_signal_module
816with_dec_threads
817with_threads
818with_thread
819with_pth
820enable_ipv6
821with_doc_strings
822with_tsc
823with_pymalloc
824with_valgrind
825with_wctype_functions
826with_fpectl
827with_libm
828with_libc
829enable_big_digits
830enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500831with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800832with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000833'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000834 ac_precious_vars='build_alias
835host_alias
836target_alias
837CC
838CFLAGS
839LDFLAGS
840LIBS
841CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500842CPP
843PKG_CONFIG
844PKG_CONFIG_PATH
845PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846
Guido van Rossum627b2d71993-12-24 10:39:16 +0000847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000849ac_init_help=
850ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000851ac_unrecognized_opts=
852ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# The variables have the same names as the options, with
854# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000855cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858no_recursion=
859prefix=NONE
860program_prefix=NONE
861program_suffix=NONE
862program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867x_includes=NONE
868x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000869
870# Installation directory options.
871# These are left unexpanded so users can "make install exec_prefix=/foo"
872# and all the variables that are supposed to be based on exec_prefix
873# by default will actually change.
874# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876bindir='${exec_prefix}/bin'
877sbindir='${exec_prefix}/sbin'
878libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879datarootdir='${prefix}/share'
880datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881sysconfdir='${prefix}/etc'
882sharedstatedir='${prefix}/com'
883localstatedir='${prefix}/var'
Benjamin Peterson69e96912018-09-12 16:31:17 -0700884runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885includedir='${prefix}/include'
886oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000887docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
888infodir='${datarootdir}/info'
889htmldir='${docdir}'
890dvidir='${docdir}'
891pdfdir='${docdir}'
892psdir='${docdir}'
893libdir='${exec_prefix}/lib'
894localedir='${datarootdir}/locale'
895mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000896
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000898ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 # If the previous option needs an argument, assign it.
902 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 ac_prev=
905 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Martin v. Löwiseba40652007-08-30 20:10:57 +0000908 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000909 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
910 *=) ac_optarg= ;;
911 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000912 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000914 # Accept the important Cygnus configure options, so we can diagnose typos.
915
Martin v. Löwiseba40652007-08-30 20:10:57 +0000916 case $ac_dashdash$ac_option in
917 --)
918 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920 -bindir | --bindir | --bindi | --bind | --bin | --bi)
921 ac_prev=bindir ;;
922 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
925 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 -cache-file | --cache-file | --cache-fil | --cache-fi \
931 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
932 ac_prev=cache_file ;;
933 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
934 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 cache_file=$ac_optarg ;;
936
937 --config-cache | -C)
938 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
Martin v. Löwiseba40652007-08-30 20:10:57 +0000945 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
946 | --dataroo | --dataro | --datar)
947 ac_prev=datarootdir ;;
948 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
949 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
950 datarootdir=$ac_optarg ;;
951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000953 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000956 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000967
968 -docdir | --docdir | --docdi | --doc | --do)
969 ac_prev=docdir ;;
970 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
971 docdir=$ac_optarg ;;
972
973 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
974 ac_prev=dvidir ;;
975 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
976 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000979 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000980 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000981 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000982 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000983 ac_useropt_orig=$ac_useropt
984 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
985 case $ac_user_opts in
986 *"
987"enable_$ac_useropt"
988"*) ;;
989 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
990 ac_unrecognized_sep=', ';;
991 esac
992 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
995 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
996 | --exec | --exe | --ex)
997 ac_prev=exec_prefix ;;
998 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
999 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1000 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001001 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
1003 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001004 # Obsolete; use --with-gas.
1005 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 -help | --help | --hel | --he | -h)
1008 ac_init_help=long ;;
1009 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1010 ac_init_help=recursive ;;
1011 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1012 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwiseba40652007-08-30 20:10:57 +00001019 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1020 ac_prev=htmldir ;;
1021 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1022 | --ht=*)
1023 htmldir=$ac_optarg ;;
1024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001025 -includedir | --includedir | --includedi | --included | --include \
1026 | --includ | --inclu | --incl | --inc)
1027 ac_prev=includedir ;;
1028 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1029 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -infodir | --infodir | --infodi | --infod | --info | --inf)
1033 ac_prev=infodir ;;
1034 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -libdir | --libdir | --libdi | --libd)
1038 ac_prev=libdir ;;
1039 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1043 | --libexe | --libex | --libe)
1044 ac_prev=libexecdir ;;
1045 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1046 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
Martin v. Löwiseba40652007-08-30 20:10:57 +00001049 -localedir | --localedir | --localedi | --localed | --locale)
1050 ac_prev=localedir ;;
1051 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1052 localedir=$ac_optarg ;;
1053
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001055 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 ac_prev=localstatedir ;;
1057 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001058 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
1061 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1062 ac_prev=mandir ;;
1063 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 # Obsolete; use --without-fp.
1068 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 no_create=yes ;;
1073
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1075 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1076 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1079 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1080 | --oldin | --oldi | --old | --ol | --o)
1081 ac_prev=oldincludedir ;;
1082 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1083 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1084 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1088 ac_prev=prefix ;;
1089 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1093 | --program-pre | --program-pr | --program-p)
1094 ac_prev=program_prefix ;;
1095 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1096 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
1099 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1100 | --program-suf | --program-su | --program-s)
1101 ac_prev=program_suffix ;;
1102 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1103 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-transform-name | --program-transform-name \
1107 | --program-transform-nam | --program-transform-na \
1108 | --program-transform-n | --program-transform- \
1109 | --program-transform | --program-transfor \
1110 | --program-transfo | --program-transf \
1111 | --program-trans | --program-tran \
1112 | --progr-tra | --program-tr | --program-t)
1113 ac_prev=program_transform_name ;;
1114 -program-transform-name=* | --program-transform-name=* \
1115 | --program-transform-nam=* | --program-transform-na=* \
1116 | --program-transform-n=* | --program-transform-=* \
1117 | --program-transform=* | --program-transfor=* \
1118 | --program-transfo=* | --program-transf=* \
1119 | --program-trans=* | --program-tran=* \
1120 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122
Martin v. Löwiseba40652007-08-30 20:10:57 +00001123 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1124 ac_prev=pdfdir ;;
1125 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1126 pdfdir=$ac_optarg ;;
1127
1128 -psdir | --psdir | --psdi | --psd | --ps)
1129 ac_prev=psdir ;;
1130 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1131 psdir=$ac_optarg ;;
1132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1134 | -silent | --silent | --silen | --sile | --sil)
1135 silent=yes ;;
1136
Benjamin Peterson69e96912018-09-12 16:31:17 -07001137 -runstatedir | --runstatedir | --runstatedi | --runstated \
1138 | --runstate | --runstat | --runsta | --runst | --runs \
1139 | --run | --ru | --r)
1140 ac_prev=runstatedir ;;
1141 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1142 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1143 | --run=* | --ru=* | --r=*)
1144 runstatedir=$ac_optarg ;;
1145
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1147 ac_prev=sbindir ;;
1148 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1149 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
1152 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1153 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1154 | --sharedst | --shareds | --shared | --share | --shar \
1155 | --sha | --sh)
1156 ac_prev=sharedstatedir ;;
1157 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1158 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1159 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1160 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001163 -site | --site | --sit)
1164 ac_prev=site ;;
1165 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167
Guido van Rossum7f43da71994-08-01 12:15:30 +00001168 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1169 ac_prev=srcdir ;;
1170 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1174 | --syscon | --sysco | --sysc | --sys | --sy)
1175 ac_prev=sysconfdir ;;
1176 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1177 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1186 verbose=yes ;;
1187
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 -version | --version | --versio | --versi | --vers | -V)
1189 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001192 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001193 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001194 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001195 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196 ac_useropt_orig=$ac_useropt
1197 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1198 case $ac_user_opts in
1199 *"
1200"with_$ac_useropt"
1201"*) ;;
1202 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1203 ac_unrecognized_sep=', ';;
1204 esac
1205 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206
1207 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001208 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001209 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001210 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001211 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 ac_useropt_orig=$ac_useropt
1213 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1214 case $ac_user_opts in
1215 *"
1216"with_$ac_useropt"
1217"*) ;;
1218 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1219 ac_unrecognized_sep=', ';;
1220 esac
1221 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 --x)
1224 # Obsolete; use --with-x.
1225 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
1227 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1228 | --x-incl | --x-inc | --x-in | --x-i)
1229 ac_prev=x_includes ;;
1230 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1231 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
1234 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1235 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1236 ac_prev=x_libraries ;;
1237 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1238 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001241 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1242Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243 ;;
1244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 *=*)
1246 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1247 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 case $ac_envvar in #(
1249 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001250 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001251 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001252 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 export $ac_envvar ;;
1254
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001255 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001257 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001259 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001260 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 ;;
1262
1263 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264done
1265
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001268 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269fi
1270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001271if test -n "$ac_unrecognized_opts"; then
1272 case $enable_option_checking in
1273 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001274 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001275 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1276 esac
1277fi
1278
1279# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001280for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1281 datadir sysconfdir sharedstatedir localstatedir includedir \
1282 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson69e96912018-09-12 16:31:17 -07001283 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001284do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001285 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001286 # Remove trailing slashes.
1287 case $ac_val in
1288 */ )
1289 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1290 eval $ac_var=\$ac_val;;
1291 esac
1292 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001293 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001294 [\\/$]* | ?:[\\/]* ) continue;;
1295 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001296 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001297 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001298done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300# There might be people who depend on the old broken behavior: `$host'
1301# used to hold the argument of --host etc.
1302# FIXME: To remove some day.
1303build=$build_alias
1304host=$host_alias
1305target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307# FIXME: To remove some day.
1308if test "x$host_alias" != x; then
1309 if test "x$build_alias" = x; then
1310 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 elif test "x$build_alias" != "x$host_alias"; then
1312 cross_compiling=yes
1313 fi
1314fi
1315
1316ac_tool_prefix=
1317test -n "$host_alias" && ac_tool_prefix=$host_alias-
1318
1319test "$silent" = yes && exec 6>/dev/null
1320
Guido van Rossum627b2d71993-12-24 10:39:16 +00001321
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322ac_pwd=`pwd` && test -n "$ac_pwd" &&
1323ac_ls_di=`ls -di .` &&
1324ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001325 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001326test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001327 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330# Find the source files, if location was not specified.
1331if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001332 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001333 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001334 ac_confdir=`$as_dirname -- "$as_myself" ||
1335$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1336 X"$as_myself" : 'X\(//\)[^/]' \| \
1337 X"$as_myself" : 'X\(//\)$' \| \
1338 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1339$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1341 s//\1/
1342 q
1343 }
1344 /^X\(\/\/\)[^/].*/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\).*/{
1353 s//\1/
1354 q
1355 }
1356 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001357 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359 srcdir=..
1360 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001361else
1362 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001364if test ! -r "$srcdir/$ac_unique_file"; then
1365 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001366 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1369ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001370 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001371 pwd)`
1372# When building in place, set srcdir=.
1373if test "$ac_abs_confdir" = "$ac_pwd"; then
1374 srcdir=.
1375fi
1376# Remove unnecessary trailing slashes from srcdir.
1377# Double slashes in file names in object file debugging info
1378# mess up M-x gdb in Emacs.
1379case $srcdir in
1380*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1381esac
1382for ac_var in $ac_precious_vars; do
1383 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1384 eval ac_env_${ac_var}_value=\$${ac_var}
1385 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1387done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001388
Martin v. Löwis11437992002-04-12 09:54:03 +00001389#
1390# Report the --help message.
1391#
1392if test "$ac_init_help" = "long"; then
1393 # Omit some internal or obsolete options to make the list less imposing.
1394 # This message is too long to be a string in the A/UX 3.1 sh.
1395 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001396\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001397
1398Usage: $0 [OPTION]... [VAR=VALUE]...
1399
1400To assign environment variables (e.g., CC, CFLAGS...), specify them as
1401VAR=VALUE. See below for descriptions of some of the useful variables.
1402
1403Defaults for the options are specified in brackets.
1404
1405Configuration:
1406 -h, --help display this help and exit
1407 --help=short display options specific to this package
1408 --help=recursive display the short help of all the included packages
1409 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001410 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001411 --cache-file=FILE cache test results in FILE [disabled]
1412 -C, --config-cache alias for \`--cache-file=config.cache'
1413 -n, --no-create do not create output files
1414 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1415
Martin v. Löwis11437992002-04-12 09:54:03 +00001416Installation directories:
1417 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001418 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001420 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421
1422By default, \`make install' will install all the files in
1423\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1424an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1425for instance \`--prefix=\$HOME'.
1426
1427For better control, use the options below.
1428
1429Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001430 --bindir=DIR user executables [EPREFIX/bin]
1431 --sbindir=DIR system admin executables [EPREFIX/sbin]
1432 --libexecdir=DIR program executables [EPREFIX/libexec]
1433 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1434 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1435 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson69e96912018-09-12 16:31:17 -07001436 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001437 --libdir=DIR object code libraries [EPREFIX/lib]
1438 --includedir=DIR C header files [PREFIX/include]
1439 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1440 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1441 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1442 --infodir=DIR info documentation [DATAROOTDIR/info]
1443 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1444 --mandir=DIR man documentation [DATAROOTDIR/man]
1445 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1446 --htmldir=DIR html documentation [DOCDIR]
1447 --dvidir=DIR dvi documentation [DOCDIR]
1448 --pdfdir=DIR pdf documentation [DOCDIR]
1449 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451
1452 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001453
1454System types:
1455 --build=BUILD configure for building on BUILD [guessed]
1456 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001457 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459fi
1460
1461if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001462 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001463 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 cat <<\_ACEOF
1466
1467Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001468 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1470 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001471 --enable-universalsdk[=SDKDIR]
Ned Deilyee8e4b62018-04-14 10:37:28 -04001472 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --enable-framework[=INSTALLDIR]
1474 Build (MacOSX|Darwin) framework
1475 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001476 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00001477 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1478 etc). Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1480 --enable-ipv6 Enable ipv6 (with ipv4) support
1481 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001482 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001483 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001485 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Optional Packages:
1488 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1489 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ned Deilyee8e4b62018-04-14 10:37:28 -04001492 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1493 or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001498 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001507 --with-system-expat build pyexpat module using an installed expat
1508 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001509 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001510 --with-tcltk-includes='-I...'
1511 override search for Tcl and Tk include files
1512 --with-tcltk-libs='-L...'
1513 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001514 --with-dbmliborder=db1:db2:...
1515 order to check db backends for dbm. Valid value is a
1516 colon separated string with the backend names
1517 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-signal-module disable/enable signal module
1519 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1520 --with(out)-threads[=DIRECTORY]
1521 disable/enable thread support
1522 --with(out)-thread[=DIRECTORY]
1523 deprecated; use --with(out)-threads
1524 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001526 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001528 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-fpectl enable SIGFPE catching
1531 --with-libm=STRING math library
1532 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001533 --with(out)-computed-gotos
1534 Use computed gotos in evaluation loop (enabled by
1535 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001536 --with(out)-ensurepip=[=OPTION]
1537 "install" or "upgrade" using bundled pip, default is
1538 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001539
1540Some influential environment variables:
1541 CC C compiler command
1542 CFLAGS C compiler flags
1543 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1544 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001546 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001547 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001549 PKG_CONFIG path to pkg-config utility
1550 PKG_CONFIG_PATH
1551 directories to add to pkg-config's search path
1552 PKG_CONFIG_LIBDIR
1553 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555Use these variables to override the choices made by `configure' or to help
1556it to find libraries and programs with nonstandard names/locations.
1557
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001558Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001560ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001561fi
1562
1563if test "$ac_init_help" = "recursive"; then
1564 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001566 test -d "$ac_dir" ||
1567 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1568 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 ac_builddir=.
1570
Martin v. Löwiseba40652007-08-30 20:10:57 +00001571case "$ac_dir" in
1572.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1573*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001574 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001576 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 case $ac_top_builddir_sub in
1578 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1580 esac ;;
1581esac
1582ac_abs_top_builddir=$ac_pwd
1583ac_abs_builddir=$ac_pwd$ac_dir_suffix
1584# for backward compatibility:
1585ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
1587case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 ac_top_srcdir=$ac_top_builddir_sub
1591 ac_abs_top_srcdir=$ac_pwd ;;
1592 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001594 ac_top_srcdir=$srcdir
1595 ac_abs_top_srcdir=$srcdir ;;
1596 *) # Relative name.
1597 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1598 ac_top_srcdir=$ac_top_build_prefix$srcdir
1599 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001600esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001602
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 cd "$ac_dir" || { ac_status=$?; continue; }
1604 # Check for guested configure.
1605 if test -f "$ac_srcdir/configure.gnu"; then
1606 echo &&
1607 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1608 elif test -f "$ac_srcdir/configure"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001612 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001613 fi || ac_status=$?
1614 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 done
1616fi
1617
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001619if $ac_init_version; then
1620 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001621python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001622generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001623
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001624Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001625This configure script is free software; the Free Software Foundation
1626gives unlimited permission to copy, distribute and modify it.
1627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001628 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001630
1631## ------------------------ ##
1632## Autoconf initialization. ##
1633## ------------------------ ##
1634
1635# ac_fn_c_try_compile LINENO
1636# --------------------------
1637# Try to compile conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_compile ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext
1642 if { { ac_try="$ac_compile"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_compile") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest.$ac_objext; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
1665
1666 ac_retval=1
1667fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_compile
1672
1673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001694 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001718 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001721if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
1744
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001757rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
1760
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001780( $as_echo "## --------------------------------------- ##
1781## Report this to https://bugs.python.org/ ##
1782## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001783 ) | sed "s/^/$as_me: WARNING: /" >&2
1784 ;;
1785esac
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001788if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001789 $as_echo_n "(cached) " >&6
1790else
1791 eval "$3=\$ac_header_compiler"
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001798
1799} # ac_fn_c_check_header_mongrel
1800
1801# ac_fn_c_try_run LINENO
1802# ----------------------
1803# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1804# that executables *can* be run.
1805ac_fn_c_try_run ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_link"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_link") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1819 { { case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_try") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; }; }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: program exited with status $ac_status" >&5
1832 $as_echo "$as_me: failed program was:" >&5
1833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
1843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001852if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858#include <$2>
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 eval "$3=yes"
1862else
1863 eval "$3=no"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001871
1872} # ac_fn_c_check_header_compile
1873
1874# ac_fn_c_try_link LINENO
1875# -----------------------
1876# Try to link conftest.$ac_ext, and return whether this succeeded.
1877ac_fn_c_try_link ()
1878{
1879 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880 rm -f conftest.$ac_objext conftest$ac_exeext
1881 if { { ac_try="$ac_link"
1882case "(($ac_try" in
1883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888 (eval "$ac_link") 2>conftest.err
1889 ac_status=$?
1890 if test -s conftest.err; then
1891 grep -v '^ *+' conftest.err >conftest.er1
1892 cat conftest.er1 >&5
1893 mv -f conftest.er1 conftest.err
1894 fi
1895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 test $ac_status = 0; } && {
1897 test -z "$ac_c_werror_flag" ||
1898 test ! -s conftest.err
1899 } && test -s conftest$ac_exeext && {
1900 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001901 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001902 }; then :
1903 ac_retval=0
1904else
1905 $as_echo "$as_me: failed program was:" >&5
1906sed 's/^/| /' conftest.$ac_ext >&5
1907
1908 ac_retval=1
1909fi
1910 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1911 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1912 # interfere with the next link command; also delete a directory that is
1913 # left behind by Apple's compiler. We do this before executing the actions.
1914 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916 as_fn_set_status $ac_retval
1917
1918} # ac_fn_c_try_link
1919
1920# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1921# -------------------------------------------
1922# Tests whether TYPE exists after having included INCLUDES, setting cache
1923# variable VAR accordingly.
1924ac_fn_c_check_type ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1928$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001929if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939if (sizeof ($2))
1940 return 0;
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof (($2)))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 eval "$3=yes"
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971
1972} # ac_fn_c_check_type
1973
1974# ac_fn_c_find_uintX_t LINENO BITS VAR
1975# ------------------------------------
1976# Finds an unsigned integer type with width BITS, setting cache variable VAR
1977# accordingly.
1978ac_fn_c_find_uintX_t ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1982$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001983if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=no"
1987 # Order is important - never check a type that is potentially smaller
1988 # than half of the expected target width.
1989 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1990 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$ac_includes_default
1994int
1995main ()
1996{
1997static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001998test_array [0] = 0;
1999return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 case $ac_type in #(
2007 uint$2_t) :
2008 eval "$3=yes" ;; #(
2009 *) :
2010 eval "$3=\$ac_type" ;;
2011esac
2012fi
2013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002014 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015
2016else
2017 break
2018fi
2019 done
2020fi
2021eval ac_res=\$$3
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2023$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002024 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025
2026} # ac_fn_c_find_uintX_t
2027
2028# ac_fn_c_find_intX_t LINENO BITS VAR
2029# -----------------------------------
2030# Finds a signed integer type with width BITS, setting cache variable VAR
2031# accordingly.
2032ac_fn_c_find_intX_t ()
2033{
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2036$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002037if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002038 $as_echo_n "(cached) " >&6
2039else
2040 eval "$3=no"
2041 # Order is important - never check a type that is potentially smaller
2042 # than half of the expected target width.
2043 for ac_type in int$2_t 'int' 'long int' \
2044 'long long int' 'short int' 'signed char'; do
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002048 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002049int
2050main ()
2051{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002052static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002053test_array [0] = 0;
2054return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002055
2056 ;
2057 return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_compile "$LINENO"; then :
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002064 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002065int
2066main ()
2067{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002068static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002069 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002070test_array [0] = 0;
2071return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002072
2073 ;
2074 return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078
2079else
2080 case $ac_type in #(
2081 int$2_t) :
2082 eval "$3=yes" ;; #(
2083 *) :
2084 eval "$3=\$ac_type" ;;
2085esac
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002090 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002091
2092else
2093 break
2094fi
2095 done
2096fi
2097eval ac_res=\$$3
2098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2099$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002100 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002101
2102} # ac_fn_c_find_intX_t
2103
2104# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2105# --------------------------------------------
2106# Tries to find the compile-time value of EXPR in a program that includes
2107# INCLUDES, setting VAR accordingly. Returns whether the value could be
2108# computed
2109ac_fn_c_compute_int ()
2110{
2111 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2112 if test "$cross_compiling" = yes; then
2113 # Depending upon the size, compute the lo and hi bounds.
2114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002121test_array [0] = 0;
2122return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129 ac_lo=0 ac_mid=0
2130 while :; do
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002138test_array [0] = 0;
2139return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_compile "$LINENO"; then :
2146 ac_hi=$ac_mid; break
2147else
2148 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2149 if test $ac_lo -le $ac_mid; then
2150 ac_lo= ac_hi=
2151 break
2152 fi
2153 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156 done
2157else
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$4
2161int
2162main ()
2163{
2164static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002165test_array [0] = 0;
2166return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002167
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 ac_hi=-1 ac_mid=-1
2174 while :; do
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177$4
2178int
2179main ()
2180{
2181static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002182test_array [0] = 0;
2183return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002184
2185 ;
2186 return 0;
2187}
2188_ACEOF
2189if ac_fn_c_try_compile "$LINENO"; then :
2190 ac_lo=$ac_mid; break
2191else
2192 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2193 if test $ac_mid -le $ac_hi; then
2194 ac_lo= ac_hi=
2195 break
2196 fi
2197 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 done
2201else
2202 ac_lo= ac_hi=
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207# Binary search between lo and hi bounds.
2208while test "x$ac_lo" != "x$ac_hi"; do
2209 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213int
2214main ()
2215{
2216static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002217test_array [0] = 0;
2218return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002219
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_compile "$LINENO"; then :
2225 ac_hi=$ac_mid
2226else
2227 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2228fi
2229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230done
2231case $ac_lo in #((
2232?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2233'') ac_retval=1 ;;
2234esac
2235 else
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237/* end confdefs.h. */
2238$4
2239static long int longval () { return $2; }
2240static unsigned long int ulongval () { return $2; }
2241#include <stdio.h>
2242#include <stdlib.h>
2243int
2244main ()
2245{
2246
2247 FILE *f = fopen ("conftest.val", "w");
2248 if (! f)
2249 return 1;
2250 if (($2) < 0)
2251 {
2252 long int i = longval ();
2253 if (i != ($2))
2254 return 1;
2255 fprintf (f, "%ld", i);
2256 }
2257 else
2258 {
2259 unsigned long int i = ulongval ();
2260 if (i != ($2))
2261 return 1;
2262 fprintf (f, "%lu", i);
2263 }
2264 /* Do not output a trailing newline, as this causes \r\n confusion
2265 on some platforms. */
2266 return ferror (f) || fclose (f) != 0;
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_run "$LINENO"; then :
2273 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2274else
2275 ac_retval=1
2276fi
2277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2278 conftest.$ac_objext conftest.beam conftest.$ac_ext
2279rm -f conftest.val
2280
2281 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002282 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002283 as_fn_set_status $ac_retval
2284
2285} # ac_fn_c_compute_int
2286
2287# ac_fn_c_check_func LINENO FUNC VAR
2288# ----------------------------------
2289# Tests whether FUNC exists, setting the cache variable VAR accordingly
2290ac_fn_c_check_func ()
2291{
2292 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2294$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002295if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296 $as_echo_n "(cached) " >&6
2297else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h. */
2300/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2301 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2302#define $2 innocuous_$2
2303
2304/* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $2 (); below.
2306 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2307 <limits.h> exists even on freestanding compilers. */
2308
2309#ifdef __STDC__
2310# include <limits.h>
2311#else
2312# include <assert.h>
2313#endif
2314
2315#undef $2
2316
2317/* Override any GCC internal prototype to avoid an error.
2318 Use char because int might match the return type of a GCC
2319 builtin and then its argument prototype would still apply. */
2320#ifdef __cplusplus
2321extern "C"
2322#endif
2323char $2 ();
2324/* The GNU C library defines this for functions which it implements
2325 to always fail with ENOSYS. Some functions are actually named
2326 something starting with __ and the normal name is an alias. */
2327#if defined __stub_$2 || defined __stub___$2
2328choke me
2329#endif
2330
2331int
2332main ()
2333{
2334return $2 ();
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_link "$LINENO"; then :
2340 eval "$3=yes"
2341else
2342 eval "$3=no"
2343fi
2344rm -f core conftest.err conftest.$ac_objext \
2345 conftest$ac_exeext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002351
2352} # ac_fn_c_check_func
2353
2354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002363if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002364 $as_echo_n "(cached) " >&6
2365else
2366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
2370main ()
2371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 eval "$4=yes"
2381else
2382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
2386main ()
2387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 eval "$4=yes"
2397else
2398 eval "$4=no"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$4
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002408
2409} # ac_fn_c_check_member
2410
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002411# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412# ---------------------------------------------
2413# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002415ac_fn_c_check_decl ()
2416{
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002418 as_decl_name=`echo $2|sed 's/ *(.*//'`
2419 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002422if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002423 $as_echo_n "(cached) " >&6
2424else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h. */
2427$4
2428int
2429main ()
2430{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002431#ifndef $as_decl_name
2432#ifdef __cplusplus
2433 (void) $as_decl_use;
2434#else
2435 (void) $as_decl_name;
2436#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002437#endif
2438
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$3=yes"
2445else
2446 eval "$3=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450eval ac_res=\$$3
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002454
2455} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002457This file contains any messages produced by compilers while
2458running configure, to aid debugging if configure makes a mistake.
2459
Martin v. Löwis174440b2008-10-03 08:59:41 +00002460It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002461generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463 $ $0 $@
2464
2465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002467{
2468cat <<_ASUNAME
2469## --------- ##
2470## Platform. ##
2471## --------- ##
2472
2473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2474uname -m = `(uname -m) 2>/dev/null || echo unknown`
2475uname -r = `(uname -r) 2>/dev/null || echo unknown`
2476uname -s = `(uname -s) 2>/dev/null || echo unknown`
2477uname -v = `(uname -v) 2>/dev/null || echo unknown`
2478
2479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2481
2482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2489
2490_ASUNAME
2491
2492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493for as_dir in $PATH
2494do
2495 IFS=$as_save_IFS
2496 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 $as_echo "PATH: $as_dir"
2498 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501} >&5
2502
2503cat >&5 <<_ACEOF
2504
2505
2506## ----------- ##
2507## Core tests. ##
2508## ----------- ##
2509
2510_ACEOF
2511
2512
2513# Keep a trace of the command line.
2514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002519ac_configure_args0=
2520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002521ac_must_keep_next=false
2522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002523do
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 for ac_arg
2525 do
2526 case $ac_arg in
2527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2529 | -silent | --silent | --silen | --sile | --sil)
2530 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 esac
2534 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002535 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002537 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002541 case $ac_arg in
2542 *=* | --config-cache | -C | -disable-* | --disable-* \
2543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2545 | -with-* | --with-* | -without-* | --without-* | --x)
2546 case "$ac_configure_args0 " in
2547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2548 esac
2549 ;;
2550 -* ) ac_must_keep_next=true ;;
2551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002552 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 ;;
2555 esac
2556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002557done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002558{ ac_configure_args0=; unset ac_configure_args0;}
2559{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002560
2561# When interrupted or exit'd, cleanup temporary files, and complete
2562# config.log. We remove comments because anyway the quotes in there
2563# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564# WARNING: Use '\'' to represent an apostrophe within the trap.
2565# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002566trap 'exit_status=$?
2567 # Save into config.log some information that might help in debugging.
2568 {
2569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002570
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002571 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002572## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002573## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo
2575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576(
2577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2578 eval ac_val=\$$ac_var
2579 case $ac_val in #(
2580 *${as_nl}*)
2581 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2583$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 esac
2585 case $ac_var in #(
2586 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002587 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2588 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac ;;
2590 esac
2591 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2594 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 "s/'\''/'\''\\\\'\'''\''/g;
2597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2598 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002599 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002601 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 esac |
2603 sort
2604)
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002606
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002607 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002608## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 echo
2611 for ac_var in $ac_subst_vars
2612 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613 eval ac_val=\$$ac_var
2614 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002618 done | sort
2619 echo
2620
2621 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002622 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002624## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002625 echo
2626 for ac_var in $ac_subst_files
2627 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 eval ac_val=\$$ac_var
2629 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002632 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002633 done | sort
2634 echo
2635 fi
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002638 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002639## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002640## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002642 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 echo
2644 fi
2645 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002646 $as_echo "$as_me: caught signal $ac_signal"
2647 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649 rm -f core *.core core.conftest.* &&
2650 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002653for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002654 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002655done
2656ac_signal=0
2657
2658# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002659rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002661$as_echo "/* confdefs.h */" > confdefs.h
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663# Predefined preprocessor variables.
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_NAME "$PACKAGE_NAME"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_VERSION "$PACKAGE_VERSION"
2675_ACEOF
2676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_STRING "$PACKAGE_STRING"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683_ACEOF
2684
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_URL "$PACKAGE_URL"
2687_ACEOF
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002691# Prefer an explicitly selected file to automatically selected ones.
2692ac_site_file1=NONE
2693ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002694if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002695 # We do not want a PATH search for config.site.
2696 case $CONFIG_SITE in #((
2697 -*) ac_site_file1=./$CONFIG_SITE;;
2698 */*) ac_site_file1=$CONFIG_SITE;;
2699 *) ac_site_file1=./$CONFIG_SITE;;
2700 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002702 ac_site_file1=$prefix/share/config.site
2703 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 ac_site_file1=$ac_default_prefix/share/config.site
2706 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002708for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002709do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710 test "x$ac_site_file" = xNONE && continue
2711 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2713$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002715 . "$ac_site_file" \
2716 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002719See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720 fi
2721done
2722
2723if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002724 # Some versions of bash will fail to source /dev/null (special files
2725 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2726 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2728$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2731 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002735 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2736$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 >$cache_file
2738fi
2739
2740# Check that the precious variables saved in the cache have kept the same
2741# value.
2742ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002743for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2745 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2747 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 case $ac_old_set,$ac_new_set in
2749 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2751$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 ac_cache_corrupted=: ;;
2753 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2755$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 ac_cache_corrupted=: ;;
2757 ,);;
2758 *)
2759 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002760 # differences in whitespace do not lead to failure.
2761 ac_old_val_w=`echo x $ac_old_val`
2762 ac_new_val_w=`echo x $ac_new_val`
2763 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2765$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2766 ac_cache_corrupted=:
2767 else
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2769$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2770 eval $ac_var=\$ac_old_val
2771 fi
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2773$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2775$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 fi;;
2777 esac
2778 # Pass precious variables to config.status.
2779 if test "$ac_new_set" = set; then
2780 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002781 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 *) ac_arg=$ac_var=$ac_new_val ;;
2783 esac
2784 case " $ac_configure_args " in
2785 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002786 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 esac
2788 fi
2789done
2790if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2794$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002795 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002797## -------------------- ##
2798## Main body of script. ##
2799## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800
Guido van Rossum7f43da71994-08-01 12:15:30 +00002801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807
Michael W. Hudson54241132001-12-07 15:38:26 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002810
2811
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002812ac_aux_dir=
2813for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2814 if test -f "$ac_dir/install-sh"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/install-sh -c"
2817 break
2818 elif test -f "$ac_dir/install.sh"; then
2819 ac_aux_dir=$ac_dir
2820 ac_install_sh="$ac_aux_dir/install.sh -c"
2821 break
2822 elif test -f "$ac_dir/shtool"; then
2823 ac_aux_dir=$ac_dir
2824 ac_install_sh="$ac_aux_dir/shtool install -c"
2825 break
2826 fi
2827done
2828if test -z "$ac_aux_dir"; then
2829 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2830fi
2831
2832# These three variables are undocumented and unsupported,
2833# and are intended to be withdrawn in a future Autoconf release.
2834# They can cause serious problems if a builder's source tree is in a directory
2835# whose full name contains unusual characters.
2836ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2837ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2838ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2839
2840
2841# Make sure we can run config.sub.
2842$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2843 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2844
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2846$as_echo_n "checking build system type... " >&6; }
2847if ${ac_cv_build+:} false; then :
2848 $as_echo_n "(cached) " >&6
2849else
2850 ac_build_alias=$build_alias
2851test "x$ac_build_alias" = x &&
2852 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2853test "x$ac_build_alias" = x &&
2854 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2855ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2857
2858fi
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2860$as_echo "$ac_cv_build" >&6; }
2861case $ac_cv_build in
2862*-*-*) ;;
2863*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2864esac
2865build=$ac_cv_build
2866ac_save_IFS=$IFS; IFS='-'
2867set x $ac_cv_build
2868shift
2869build_cpu=$1
2870build_vendor=$2
2871shift; shift
2872# Remember, the first character of IFS is used to create $*,
2873# except with old shells:
2874build_os=$*
2875IFS=$ac_save_IFS
2876case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2877
2878
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2880$as_echo_n "checking host system type... " >&6; }
2881if ${ac_cv_host+:} false; then :
2882 $as_echo_n "(cached) " >&6
2883else
2884 if test "x$host_alias" = x; then
2885 ac_cv_host=$ac_cv_build
2886else
2887 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2888 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2889fi
2890
2891fi
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2893$as_echo "$ac_cv_host" >&6; }
2894case $ac_cv_host in
2895*-*-*) ;;
2896*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2897esac
2898host=$ac_cv_host
2899ac_save_IFS=$IFS; IFS='-'
2900set x $ac_cv_host
2901shift
2902host_cpu=$1
2903host_vendor=$2
2904shift; shift
2905# Remember, the first character of IFS is used to create $*,
2906# except with old shells:
2907host_os=$*
2908IFS=$ac_save_IFS
2909case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2910
2911
2912
2913
2914
Ned Deily983df862014-08-22 13:30:59 -07002915# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2916rm -f pybuilddir.txt
2917
Victor Stinner8a19eb22017-05-05 03:14:23 +02002918for ac_prog in python$PACKAGE_VERSION python3 python
2919do
2920 # Extract the first word of "$ac_prog", so it can be a program name with args.
2921set dummy $ac_prog; ac_word=$2
2922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2923$as_echo_n "checking for $ac_word... " >&6; }
2924if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2925 $as_echo_n "(cached) " >&6
2926else
2927 if test -n "$PYTHON_FOR_REGEN"; then
2928 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
2929else
2930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2931for as_dir in $PATH
2932do
2933 IFS=$as_save_IFS
2934 test -z "$as_dir" && as_dir=.
2935 for ac_exec_ext in '' $ac_executable_extensions; do
2936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2937 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
2938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2939 break 2
2940 fi
2941done
2942 done
2943IFS=$as_save_IFS
2944
2945fi
2946fi
2947PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2948if test -n "$PYTHON_FOR_REGEN"; then
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2950$as_echo "$PYTHON_FOR_REGEN" >&6; }
2951else
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2953$as_echo "no" >&6; }
2954fi
2955
2956
2957 test -n "$PYTHON_FOR_REGEN" && break
2958done
2959test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
2960
2961
2962
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002963if test "$cross_compiling" = yes; then
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2965$as_echo_n "checking for python interpreter for cross build... " >&6; }
2966 if test -z "$PYTHON_FOR_BUILD"; then
2967 for interp in python$PACKAGE_VERSION python2 python; do
2968 which $interp >/dev/null 2>&1 || continue
2969 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2970 break
2971 fi
2972 interp=
2973 done
2974 if test x$interp = x; then
2975 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2976 fi
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2978$as_echo "$interp" >&6; }
Christian Heimesffa70112017-09-05 17:08:45 +02002979 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002980 fi
2981elif test "$cross_compiling" = maybe; then
2982 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2983else
2984 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2985fi
2986
2987
Martin v. Löwis11437992002-04-12 09:54:03 +00002988
Georg Brandlbcd64a32009-03-31 21:45:18 +00002989if test "$prefix" != "/"; then
2990 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2991fi
2992
2993
Martin v. Löwis11437992002-04-12 09:54:03 +00002994
2995
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002996# We don't use PACKAGE_ variables, and they cause conflicts
2997# with other autoconf-based packages that include Python.h
2998grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2999rm confdefs.h
3000mv confdefs.h.new confdefs.h
3001
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003002
Martin v. Löwis174440b2008-10-03 08:59:41 +00003003VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003004
Martin v. Löwis1142de32002-03-29 16:28:31 +00003005
3006SOVERSION=1.0
3007
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003008# The later defininition of _XOPEN_SOURCE disables certain features
3009# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3010
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003011$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
3013
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003014# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3015# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3016# them.
3017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003019
3020
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003021# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3022# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3023# them.
3024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003025$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003026
3027
Martin v. Löwisd6320502004-08-12 13:45:08 +00003028# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3029# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003031$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003032
3033
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003034# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3035# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3036# them.
3037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003038$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003039
3040
3041
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003042define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003043
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003044# Arguments passed to configure.
3045
3046CONFIG_ARGS="$ac_configure_args"
3047
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3049$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003050# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003051if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003052 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003053 case $enableval in
3054 yes)
Ned Deilyee8e4b62018-04-14 10:37:28 -04003055 # Locate the best usable SDK, see Mac/README.txt for more
3056 # information
3057 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3058 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003059 then
Ned Deilyee8e4b62018-04-14 10:37:28 -04003060 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3061 if test ! -d "${enableval}"
3062 then
3063 enableval=/
3064 fi
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003065 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003066 ;;
3067 esac
3068 case $enableval in
3069 no)
3070 UNIVERSALSDK=
3071 enable_universalsdk=
3072 ;;
3073 *)
3074 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003075 if test ! -d "${UNIVERSALSDK}"
3076 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003077 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003078 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003079 ;;
3080 esac
3081
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003082
Ronald Oussoren988117f2006-04-29 11:31:35 +00003083else
3084
3085 UNIVERSALSDK=
3086 enable_universalsdk=
3087
Martin v. Löwiseba40652007-08-30 20:10:57 +00003088fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003089
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003090if test -n "${UNIVERSALSDK}"
3091then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3093$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3096$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003097fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003098
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003100
Ned Deily8e60f6e2013-05-30 00:14:29 -07003101ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003102
Ned Deilyee8e4b62018-04-14 10:37:28 -04003103# For backward compatibility reasons we prefer to select '32-bit' if available,
3104# otherwise use 'intel'
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003105UNIVERSAL_ARCHS="32-bit"
Ned Deilyee8e4b62018-04-14 10:37:28 -04003106if test "`uname -s`" = "Darwin"
3107then
3108 if test -n "${UNIVERSALSDK}"
3109 then
3110 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3111 then
3112 UNIVERSAL_ARCHS="intel"
3113 fi
3114 fi
3115fi
3116
Ronald Oussoren92919a62009-12-24 13:30:58 +00003117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3119$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003120
3121# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003122if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003123 withval=$with_universal_archs;
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003124 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003125
3126fi
3127
Ned Deilyee8e4b62018-04-14 10:37:28 -04003128if test -n "${UNIVERSALSDK}"
3129then
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3131$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3132else
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3134$as_echo "no" >&6; }
3135fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003136
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003137
3138# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003139if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003140 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003141 if test "${enable_framework}"; then
3142 :
3143 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003144 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003145 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003146 PYTHONFRAMEWORK=${withval}
3147 PYTHONFRAMEWORKDIR=${withval}.framework
3148 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3149
3150else
3151
3152 PYTHONFRAMEWORK=Python
3153 PYTHONFRAMEWORKDIR=Python.framework
3154 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3155
3156fi
3157
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003159if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003160 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003161 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003162 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003163 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003164 esac
3165 case $enableval in
3166 no)
3167 PYTHONFRAMEWORK=
3168 PYTHONFRAMEWORKDIR=no-framework
3169 PYTHONFRAMEWORKPREFIX=
3170 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003171 FRAMEWORKINSTALLFIRST=
3172 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003173 FRAMEWORKALTINSTALLFIRST=
3174 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003175 if test "x${prefix}" = "xNONE"; then
3176 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3177 else
3178 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3179 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003181 ;;
3182 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003183 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003185 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003186 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003187 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3188 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003189 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003190
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003191 if test "x${prefix}" = "xNONE" ; then
3192 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003193
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003194 else
3195 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3196 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003197
3198 case "${enableval}" in
3199 /System*)
3200 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3201 if test "${prefix}" = "NONE" ; then
3202 # See below
3203 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3204 fi
3205 ;;
3206
3207 /Library*)
3208 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3209 ;;
3210
3211 */Library/Frameworks)
3212 MDIR="`dirname "${enableval}"`"
3213 MDIR="`dirname "${MDIR}"`"
3214 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3215
3216 if test "${prefix}" = "NONE"; then
3217 # User hasn't specified the
3218 # --prefix option, but wants to install
3219 # the framework in a non-default location,
3220 # ensure that the compatibility links get
3221 # installed relative to that prefix as well
3222 # instead of in /usr/local.
3223 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3224 fi
3225 ;;
3226
3227 *)
3228 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3229 ;;
3230 esac
3231
Jack Jansen127e56e2001-09-11 14:41:54 +00003232 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003233
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003234 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003235 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003237
Martin v. Löwiseba40652007-08-30 20:10:57 +00003238 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003239
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003241
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003242 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3243
3244 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003247
Guido van Rossum563e7081996-09-10 18:20:48 +00003248else
Martin v. Löwis11437992002-04-12 09:54:03 +00003249
Jack Jansene578a632001-08-15 01:27:14 +00003250 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003251 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003252 PYTHONFRAMEWORKPREFIX=
3253 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003254 FRAMEWORKINSTALLFIRST=
3255 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003256 FRAMEWORKALTINSTALLFIRST=
3257 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003258 if test "x${prefix}" = "xNONE" ; then
3259 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3260 else
3261 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3262 fi
Jack Jansene578a632001-08-15 01:27:14 +00003263 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003264
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003265
Martin v. Löwiseba40652007-08-30 20:10:57 +00003266fi
3267
Michael W. Hudson54241132001-12-07 15:38:26 +00003268
3269
3270
3271
Jack Jansene578a632001-08-15 01:27:14 +00003272
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003273
3274
Ronald Oussoren5b787322006-06-06 19:50:24 +00003275
3276
3277
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003278
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003279
Jack Jansene578a632001-08-15 01:27:14 +00003280##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003281## AS_HELP_STRING([--with-dyld],
3282## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003283##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284# Set name for machine-dependent library files
3285
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3287$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288if test -z "$MACHDEP"
3289then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003290 # avoid using uname for cross builds
3291 if test "$cross_compiling" = yes; then
3292 # ac_sys_system and ac_sys_release are only used for setting
3293 # `define_xopen_source' in the case statement below. For the
3294 # current supported cross builds, this macro is not adjusted.
3295 case "$host" in
3296 *-*-linux*)
3297 ac_sys_system=Linux
3298 ;;
3299 *-*-cygwin*)
3300 ac_sys_system=Cygwin
3301 ;;
3302 *)
3303 # for now, limit cross builds to known configurations
3304 MACHDEP="unknown"
3305 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3306 esac
3307 ac_sys_release=
3308 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003309 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003310 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003311 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003312 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003313 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003314 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003315 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003316 fi
3317 ac_md_system=`echo $ac_sys_system |
3318 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3319 ac_md_release=`echo $ac_sys_release |
3320 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3321 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003322
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003323 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003324 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003325 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003326 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003327 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003328 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003329 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003330 esac
3331fi
3332
3333
3334if test "$cross_compiling" = yes; then
3335 case "$host" in
3336 *-*-linux*)
3337 case "$host_cpu" in
3338 arm*)
3339 _host_cpu=arm
3340 ;;
3341 *)
3342 _host_cpu=$host_cpu
3343 esac
3344 ;;
3345 *-*-cygwin*)
3346 _host_cpu=
3347 ;;
3348 *)
3349 # for now, limit cross builds to known configurations
3350 MACHDEP="unknown"
3351 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003352 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003353 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003354fi
Guido van Rossum91922671997-10-09 20:24:13 +00003355
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003356# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3357# disable features if it is defined, without any means to access these
3358# features as extensions. For these systems, we skip the definition of
3359# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3360# some feature, make sure there is no alternative way to access this
3361# feature. Also, when using wildcards, make sure you have verified the
3362# need for not defining _XOPEN_SOURCE on all systems matching the
3363# wildcard, and that the wildcard does not include future systems
3364# (which may remove their limitations).
3365case $ac_sys_system/$ac_sys_release in
3366 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3367 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003368 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003369 # In addition, Stefan Krah confirms that issue #1244610 exists through
3370 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003371 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003372 define_xopen_source=no
3373 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3374 # also defined. This can be overridden by defining _BSD_SOURCE
3375 # As this has a different meaning on Linux, only define it on OpenBSD
3376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003377$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003378
3379 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003380 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003381 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3382 # also defined. This can be overridden by defining _BSD_SOURCE
3383 # As this has a different meaning on Linux, only define it on OpenBSD
3384
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003385$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003386
3387 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003388 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3389 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3390 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003391 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 +00003392 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003393 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3394 # request to enable features supported by the standard as a request
3395 # to disable features not supported by the standard. The best way
3396 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3397 # entirely and define __EXTENSIONS__ instead.
3398 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003399 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003400 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3401 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003402 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003403 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003404 define_xopen_source=no;;
3405 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003406 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003407 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003408 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003409 # On FreeBSD 4, the math functions C89 does not cover are never defined
3410 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3411 FreeBSD/4.*)
3412 define_xopen_source=no;;
3413 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3414 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3415 # identifies itself as Darwin/7.*
3416 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3417 # disables platform specific features beyond repair.
3418 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3419 # has no effect, don't bother defining them
3420 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003421 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003422 Darwin/1[0-9].*)
3423 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003424 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3425 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3426 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003427 AIX/4)
3428 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003429 AIX/5)
3430 if test `uname -r` -eq 1; then
3431 define_xopen_source=no
3432 fi
3433 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003434 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3435 # defining NI_NUMERICHOST.
3436 QNX/6.3.2)
3437 define_xopen_source=no
3438 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440esac
3441
3442if test $define_xopen_source = yes
3443then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003445$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003446
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003447
3448 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3449 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3450 # several APIs are not declared. Since this is also needed in some
3451 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003453$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003454
3455
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003457$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003458
3459
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003460fi
3461
Guido van Rossum91922671997-10-09 20:24:13 +00003462#
3463# SGI compilers allow the specification of the both the ABI and the
3464# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003465# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003466#
3467# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3468# thus supply support for various ABI/ISA combinations. The MACHDEP
3469# variable is also adjusted.
3470#
3471
3472if test ! -z "$SGI_ABI"
3473then
3474 CC="cc $SGI_ABI"
3475 LDFLAGS="$SGI_ABI $LDFLAGS"
3476 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3479$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003480
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003481
3482PLATDIR=plat-$MACHDEP
3483
Jack Jansen83f898c2002-12-30 22:23:40 +00003484# And add extra plat-mac for darwin
3485
Jack Jansen7b59b422003-03-17 15:44:10 +00003486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3488$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003489if test -z "$EXTRAPLATDIR"
3490then
3491 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003492 darwin)
3493 EXTRAPLATDIR="\$(PLATMACDIRS)"
3494 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3495 ;;
3496 *)
3497 EXTRAPLATDIR=""
3498 EXTRAMACHDEPPATH=""
3499 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003500 esac
3501fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3503$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003504
Jack Jansen6b08a402004-06-03 12:41:45 +00003505# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3506# it may influence the way we can build extensions, so distutils
3507# needs to check it
3508
Ronald Oussoren988117f2006-04-29 11:31:35 +00003509
Jack Jansen6b08a402004-06-03 12:41:45 +00003510CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003511EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003512
Guido van Rossum627b2d71993-12-24 10:39:16 +00003513# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003514
3515# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3516# for debug/optimization stuff. BASECFLAGS is for flags that are required
3517# just to get things to compile and link. Users are free to override OPT
3518# when running configure or make. The build should not break if they do.
3519# BASECFLAGS should generally not be messed with, however.
3520
3521# XXX shouldn't some/most/all of this code be merged with the stuff later
3522# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3524$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003525
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003527if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003529 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003530 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003531 without_gcc=yes;;
3532 yes) CC=gcc
3533 without_gcc=no;;
3534 *) CC=$withval
3535 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003536 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003537else
Martin v. Löwis11437992002-04-12 09:54:03 +00003538
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003539 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003540 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003541 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003542 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003543 case $BE_HOST_CPU in
3544 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003545 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003546 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003547 BASECFLAGS="$BASECFLAGS -export pragma"
3548 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003549 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003550 ;;
3551 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003552 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003553 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003554 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003555 ;;
3556 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003557 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003558 ;;
3559 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003560 AR="\$(srcdir)/Modules/ar_beos"
3561 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003562 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003563 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003564 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003565fi
3566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3568$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003569
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3571$as_echo_n "checking for --with-icc... " >&6; }
3572
3573# Check whether --with-icc was given.
3574if test "${with_icc+set}" = set; then :
3575 withval=$with_icc;
3576 case $withval in
3577 no) CC=${CC:-cc}
3578 with_icc=no;;
3579 yes) CC=icc
3580 CXX=icpc
3581 with_icc=yes;;
3582 *) CC=$withval
3583 with_icc=$withval;;
3584 esac
3585else
3586
3587 with_icc=no
3588fi
3589
3590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3591$as_echo "$with_icc" >&6; }
3592
Guido van Rossum8b131c51995-03-09 14:10:13 +00003593# If the user switches compilers, we can't believe the cache
3594if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3595then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003596 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003597(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003598fi
3599
Trent Nelson15daa352012-12-13 06:46:39 +00003600if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3601 # Normally, MIPSpro CC treats #error directives as warnings, which means
3602 # a successful exit code is returned (0). This is a problem because IRIX
3603 # has a bunch of system headers with this guard at the top:
3604 #
3605 # #ifndef __c99
3606 # #error This header file is to be used only for c99 mode compilations
3607 # #else
3608 #
3609 # When autoconf tests for such a header, like stdint.h, this happens:
3610 #
3611 # configure:4619: cc -c conftest.c >&5
3612 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3613 # #error directive: This header file is to be used only for c99 mode
3614 # compilations
3615 #
3616 # #error This header file is to be used only for c99 mode compilations
3617 # ^
3618 #
3619 # configure:4619: $? = 0
3620 # configure:4619: result: yes
3621 #
3622 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3623 # warning as an error, which causes cc to return a non-zero result,
3624 # which autoconf can interpret correctly.
3625 CFLAGS="$CFLAGS -diag_error 1035"
3626 # Whilst we're here, we might as well make sure CXX defaults to something
3627 # sensible if we're not using gcc.
3628 if test -z "$CXX"; then
3629 CXX="CC"
3630 fi
3631fi
3632
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003633# If the user set CFLAGS, use this instead of the automatically
3634# determined setting
3635preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003636ac_ext=c
3637ac_cpp='$CPP $CPPFLAGS'
3638ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3639ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3640ac_compiler_gnu=$ac_cv_c_compiler_gnu
3641if test -n "$ac_tool_prefix"; then
3642 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3643set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3645$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003646if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003648else
3649 if test -n "$CC"; then
3650 ac_cv_prog_CC="$CC" # Let the user override the test.
3651else
Martin v. Löwis11437992002-04-12 09:54:03 +00003652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3653for as_dir in $PATH
3654do
3655 IFS=$as_save_IFS
3656 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 $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 +00003661 break 2
3662 fi
3663done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003666
Jack Jansendd19cf82001-12-06 22:36:17 +00003667fi
3668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003670if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3672$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3675$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003676fi
3677
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678
Martin v. Löwis11437992002-04-12 09:54:03 +00003679fi
3680if test -z "$ac_cv_prog_CC"; then
3681 ac_ct_CC=$CC
3682 # Extract the first word of "gcc", so it can be a program name with args.
3683set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003686if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003688else
3689 if test -n "$ac_ct_CC"; then
3690 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3691else
3692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 break 2
3702 fi
3703done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003705IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707fi
3708fi
3709ac_ct_CC=$ac_cv_prog_ac_ct_CC
3710if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3712$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718 if test "x$ac_ct_CC" = x; then
3719 CC=""
3720 else
3721 case $cross_compiling:$ac_tool_warned in
3722yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003723{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3724$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003725ac_tool_warned=yes ;;
3726esac
3727 CC=$ac_ct_CC
3728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003729else
3730 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003731fi
3732
Jack Jansendd19cf82001-12-06 22:36:17 +00003733if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734 if test -n "$ac_tool_prefix"; then
3735 # 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 +00003736set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003739if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003740 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003741else
3742 if test -n "$CC"; then
3743 ac_cv_prog_CC="$CC" # Let the user override the test.
3744else
Martin v. Löwis11437992002-04-12 09:54:03 +00003745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746for as_dir in $PATH
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003753 $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 +00003754 break 2
3755 fi
3756done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003758IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003759
3760fi
3761fi
3762CC=$ac_cv_prog_CC
3763if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3765$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3768$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003769fi
3770
Martin v. Löwiseba40652007-08-30 20:10:57 +00003771
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003773fi
3774if test -z "$CC"; then
3775 # Extract the first word of "cc", so it can be a program name with args.
3776set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003779if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
3782 if test -n "$CC"; then
3783 ac_cv_prog_CC="$CC" # Let the user override the test.
3784else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003786as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3787for as_dir in $PATH
3788do
3789 IFS=$as_save_IFS
3790 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003791 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003793 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3794 ac_prog_rejected=yes
3795 continue
3796 fi
3797 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 break 2
3800 fi
3801done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003802 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003805if test $ac_prog_rejected = yes; then
3806 # We found a bogon in the path, so make sure we never use it.
3807 set dummy $ac_cv_prog_CC
3808 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003810 # We chose a different compiler from the bogus one.
3811 # However, it has the same basename, so the bogon will be chosen
3812 # first if we set CC to just the basename; use the full file name.
3813 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003814 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003815 fi
3816fi
3817fi
3818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003819CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003820if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3822$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3825$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003826fi
3827
Martin v. Löwiseba40652007-08-30 20:10:57 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829fi
3830if test -z "$CC"; then
3831 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003832 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 do
3834 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3835set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3837$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003838if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003840else
3841 if test -n "$CC"; then
3842 ac_cv_prog_CC="$CC" # Let the user override the test.
3843else
Martin v. Löwis11437992002-04-12 09:54:03 +00003844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845for as_dir in $PATH
3846do
3847 IFS=$as_save_IFS
3848 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003849 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003852 $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 +00003853 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003854 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
3859fi
3860fi
3861CC=$ac_cv_prog_CC
3862if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3864$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3867$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003868fi
3869
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 test -n "$CC" && break
3872 done
3873fi
3874if test -z "$CC"; then
3875 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003877do
3878 # Extract the first word of "$ac_prog", so it can be a program name with args.
3879set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3881$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003882if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003883 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003884else
3885 if test -n "$ac_ct_CC"; then
3886 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3887else
3888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3889for as_dir in $PATH
3890do
3891 IFS=$as_save_IFS
3892 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003893 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003895 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896 $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 +00003897 break 2
3898 fi
3899done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003901IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903fi
3904fi
3905ac_ct_CC=$ac_cv_prog_ac_ct_CC
3906if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3908$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3911$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003912fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003913
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914
Martin v. Löwis11437992002-04-12 09:54:03 +00003915 test -n "$ac_ct_CC" && break
3916done
Michael W. Hudson54241132001-12-07 15:38:26 +00003917
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918 if test "x$ac_ct_CC" = x; then
3919 CC=""
3920 else
3921 case $cross_compiling:$ac_tool_warned in
3922yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3924$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925ac_tool_warned=yes ;;
3926esac
3927 CC=$ac_ct_CC
3928 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003929fi
3930
3931fi
3932
3933
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003936as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003937See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003938
3939# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003940$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3941set X $ac_compile
3942ac_compiler=$2
3943for ac_option in --version -v -V -qversion; do
3944 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
3951 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953 if test -s conftest.err; then
3954 sed '10a\
3955... rest of stderr output deleted ...
3956 10q' conftest.err >conftest.er1
3957 cat conftest.er1 >&5
3958 fi
3959 rm -f conftest.er1 conftest.err
3960 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3961 test $ac_status = 0; }
3962done
Martin v. Löwis11437992002-04-12 09:54:03 +00003963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003965/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003966
Martin v. Löwis11437992002-04-12 09:54:03 +00003967int
3968main ()
3969{
3970
3971 ;
3972 return 0;
3973}
3974_ACEOF
3975ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003976ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003977# Try to create an executable without -o first, disregard a.out.
3978# It will help us diagnose broken compilers, and finding out an intuition
3979# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3981$as_echo_n "checking whether the C compiler works... " >&6; }
3982ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3983
3984# The possible output files:
3985ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3986
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987ac_rmfiles=
3988for ac_file in $ac_files
3989do
3990 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 ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003992 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3993 esac
3994done
3995rm -f $ac_rmfiles
3996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003997if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003998case "(($ac_try" in
3999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4000 *) ac_try_echo=$ac_try;;
4001esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4003$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004005 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004006 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4007 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4009# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4010# in a Makefile. We should not override ac_cv_exeext if it was cached,
4011# so that the user can short-circuit this test for compilers unknown to
4012# Autoconf.
4013for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004014do
4015 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004016 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004018 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004019 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004020 # We found the default executable, but exeext='' is most
4021 # certainly right.
4022 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004023 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004024 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004025 then :; else
4026 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4027 fi
4028 # We set ac_cv_exeext here because the later test for it is not
4029 # safe: cross compilers may not add the suffix if given an `-o'
4030 # argument, so we may need to know it at that point already.
4031 # Even if this section looks crufty: it has the advantage of
4032 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00004033 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004034 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004035 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 esac
4037done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004038test "$ac_cv_exeext" = no && ac_cv_exeext=
4039
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004040else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004041 ac_file=''
4042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043if test -z "$ac_file"; then :
4044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4045$as_echo "no" >&6; }
4046$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004047sed 's/^/| /' conftest.$ac_ext >&5
4048
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004049{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4050$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004051as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01004052See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004053else
4054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4055$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4058$as_echo_n "checking for C compiler default output file name... " >&6; }
4059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4060$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004061ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004062
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004063rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004064ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4066$as_echo_n "checking for suffix of executables... " >&6; }
4067if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004068case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004074 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004078 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4079# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4080# work properly (i.e., refer to `conftest.exe'), while it won't with
4081# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004082for ac_file in conftest.exe conftest conftest.*; do
4083 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004085 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004087 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 * ) break;;
4089 esac
4090done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004094as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004095See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004097rm -f conftest conftest$ac_cv_exeext
4098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4099$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004100
4101rm -f conftest.$ac_ext
4102EXEEXT=$ac_cv_exeext
4103ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4105/* end confdefs.h. */
4106#include <stdio.h>
4107int
4108main ()
4109{
4110FILE *f = fopen ("conftest.out", "w");
4111 return ferror (f) || fclose (f) != 0;
4112
4113 ;
4114 return 0;
4115}
Skip Montanaro6dead952003-09-25 14:50:04 +00004116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004117ac_clean_files="$ac_clean_files conftest.out"
4118# Check that the compiler produces executables we can run. If not, either
4119# the compiler is broken, or we cross compile.
4120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4121$as_echo_n "checking whether we are cross compiling... " >&6; }
4122if test "$cross_compiling" != yes; then
4123 { { ac_try="$ac_link"
4124case "(($ac_try" in
4125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4126 *) ac_try_echo=$ac_try;;
4127esac
4128eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4129$as_echo "$ac_try_echo"; } >&5
4130 (eval "$ac_link") 2>&5
4131 ac_status=$?
4132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4133 test $ac_status = 0; }
4134 if { ac_try='./conftest$ac_cv_exeext'
4135 { { case "(($ac_try" in
4136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4137 *) ac_try_echo=$ac_try;;
4138esac
4139eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4140$as_echo "$ac_try_echo"; } >&5
4141 (eval "$ac_try") 2>&5
4142 ac_status=$?
4143 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4144 test $ac_status = 0; }; }; then
4145 cross_compiling=no
4146 else
4147 if test "$cross_compiling" = maybe; then
4148 cross_compiling=yes
4149 else
4150 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004152as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004153If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004154See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004155 fi
4156 fi
4157fi
4158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4159$as_echo "$cross_compiling" >&6; }
4160
4161rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4162ac_clean_files=$ac_clean_files_save
4163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4164$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004165if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166 $as_echo_n "(cached) " >&6
4167else
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004170
Martin v. Löwis11437992002-04-12 09:54:03 +00004171int
4172main ()
4173{
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
4179rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004180if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004181case "(($ac_try" in
4182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4183 *) ac_try_echo=$ac_try;;
4184esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4186$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004187 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004188 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004189 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4190 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004191 for ac_file in conftest.o conftest.obj conftest.*; do
4192 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4196 break;;
4197 esac
4198done
4199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004200 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004201sed 's/^/| /' conftest.$ac_ext >&5
4202
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004203{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004205as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004206See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208rm -f conftest.$ac_cv_objext conftest.$ac_ext
4209fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4211$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004212OBJEXT=$ac_cv_objext
4213ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4215$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004216if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004217 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004218else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
Martin v. Löwis11437992002-04-12 09:54:03 +00004222int
4223main ()
4224{
4225#ifndef __GNUC__
4226 choke me
4227#endif
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004234 ac_compiler_gnu=yes
4235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004236 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004239ac_cv_c_compiler_gnu=$ac_compiler_gnu
4240
4241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4243$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4244if test $ac_compiler_gnu = yes; then
4245 GCC=yes
4246else
4247 GCC=
4248fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004249ac_test_CFLAGS=${CFLAGS+set}
4250ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4252$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004253if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004254 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004255else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256 ac_save_c_werror_flag=$ac_c_werror_flag
4257 ac_c_werror_flag=yes
4258 ac_cv_prog_cc_g=no
4259 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004262
Martin v. Löwis11437992002-04-12 09:54:03 +00004263int
4264main ()
4265{
4266
4267 ;
4268 return 0;
4269}
4270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004271if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004272 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004274 CFLAGS=""
4275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004276/* end confdefs.h. */
4277
4278int
4279main ()
4280{
4281
4282 ;
4283 return 0;
4284}
4285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004288else
4289 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004290 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004292/* end confdefs.h. */
4293
4294int
4295main ()
4296{
4297
4298 ;
4299 return 0;
4300}
4301_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004302if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004304fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4310 ac_c_werror_flag=$ac_save_c_werror_flag
4311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4313$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004314if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004315 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004316elif test $ac_cv_prog_cc_g = yes; then
4317 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004318 CFLAGS="-g -O2"
4319 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004320 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321 fi
4322else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004323 if test "$GCC" = yes; then
4324 CFLAGS="-O2"
4325 else
4326 CFLAGS=
4327 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4330$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004331if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004332 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004333else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004335ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004337/* end confdefs.h. */
4338#include <stdarg.h>
4339#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004340struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004341/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4342struct buf { int x; };
4343FILE * (*rcsopen) (struct buf *, struct stat *, int);
4344static char *e (p, i)
4345 char **p;
4346 int i;
4347{
4348 return p[i];
4349}
4350static char *f (char * (*g) (char **, int), char **p, ...)
4351{
4352 char *s;
4353 va_list v;
4354 va_start (v,p);
4355 s = g (p, va_arg (v,int));
4356 va_end (v);
4357 return s;
4358}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004359
4360/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4361 function prototypes and stuff, but not '\xHH' hex character constants.
4362 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004363 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004364 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4365 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004366 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004367int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4368
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4370 inside strings and character constants. */
4371#define FOO(x) 'x'
4372int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4373
Skip Montanaro6dead952003-09-25 14:50:04 +00004374int test (int i, double x);
4375struct s1 {int (*f) (int a);};
4376struct s2 {int (*f) (double a);};
4377int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4378int argc;
4379char **argv;
4380int
4381main ()
4382{
4383return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4384 ;
4385 return 0;
4386}
4387_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004388for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4389 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004390do
4391 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004392 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004393 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004395rm -f core conftest.err conftest.$ac_objext
4396 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004397done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004398rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004399CC=$ac_save_CC
4400
4401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402# AC_CACHE_VAL
4403case "x$ac_cv_prog_cc_c89" in
4404 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4406$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004407 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4409$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004410 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004411 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4413$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004414esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004415if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004417fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004418
Martin v. Löwis11437992002-04-12 09:54:03 +00004419ac_ext=c
4420ac_cpp='$CPP $CPPFLAGS'
4421ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4422ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4423ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004424
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004425if test ! -z "$preset_cflags"
4426then
4427 CFLAGS=$preset_cflags
4428fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004429
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004430
4431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4433$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004434
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004436if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004437 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004438
4439 case $withval in
4440 no) with_cxx_main=no
4441 MAINCC='$(CC)';;
4442 yes) with_cxx_main=yes
4443 MAINCC='$(CXX)';;
4444 *) with_cxx_main=yes
4445 MAINCC=$withval
4446 if test -z "$CXX"
4447 then
4448 CXX=$withval
4449 fi;;
4450 esac
4451else
4452
4453 with_cxx_main=no
4454 MAINCC='$(CC)'
4455
Martin v. Löwiseba40652007-08-30 20:10:57 +00004456fi
4457
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4459$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004460
4461preset_cxx="$CXX"
4462if test -z "$CXX"
4463then
4464 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004465 gcc) if test -n "$ac_tool_prefix"; then
4466 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4467set dummy ${ac_tool_prefix}g++; ac_word=$2
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4469$as_echo_n "checking for $ac_word... " >&6; }
4470if ${ac_cv_path_CXX+:} false; then :
4471 $as_echo_n "(cached) " >&6
4472else
4473 case $CXX in
4474 [\\/]* | ?:[\\/]*)
4475 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4476 ;;
4477 *)
4478 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4479for as_dir in notfound
4480do
4481 IFS=$as_save_IFS
4482 test -z "$as_dir" && as_dir=.
4483 for ac_exec_ext in '' $ac_executable_extensions; do
4484 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4485 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4486 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4487 break 2
4488 fi
4489done
4490 done
4491IFS=$as_save_IFS
4492
4493 ;;
4494esac
4495fi
4496CXX=$ac_cv_path_CXX
4497if test -n "$CXX"; then
4498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4499$as_echo "$CXX" >&6; }
4500else
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4502$as_echo "no" >&6; }
4503fi
4504
4505
4506fi
4507if test -z "$ac_cv_path_CXX"; then
4508 ac_pt_CXX=$CXX
4509 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004510set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4512$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004513if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004514 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004515else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004516 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004517 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004518 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 +00004519 ;;
4520 *)
4521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4522for as_dir in notfound
4523do
4524 IFS=$as_save_IFS
4525 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004526 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004527 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004528 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529 $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 +00004530 break 2
4531 fi
4532done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004533 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004534IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004535
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536 ;;
4537esac
4538fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004539ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4540if test -n "$ac_pt_CXX"; then
4541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4542$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4545$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004547
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004548 if test "x$ac_pt_CXX" = x; then
4549 CXX="g++"
4550 else
4551 case $cross_compiling:$ac_tool_warned in
4552yes:)
4553{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4554$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4555ac_tool_warned=yes ;;
4556esac
4557 CXX=$ac_pt_CXX
4558 fi
4559else
4560 CXX="$ac_cv_path_CXX"
4561fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004562 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004563 cc) if test -n "$ac_tool_prefix"; then
4564 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4565set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004568if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004569 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004570else
4571 case $CXX in
4572 [\\/]* | ?:[\\/]*)
4573 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4574 ;;
4575 *)
4576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in notfound
4578do
4579 IFS=$as_save_IFS
4580 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004581 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004583 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004584 $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 +00004585 break 2
4586 fi
4587done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004588 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004589IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004590
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004591 ;;
4592esac
4593fi
4594CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004595if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4597$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004598else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004602
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004603
4604fi
4605if test -z "$ac_cv_path_CXX"; then
4606 ac_pt_CXX=$CXX
4607 # Extract the first word of "c++", so it can be a program name with args.
4608set dummy c++; ac_word=$2
4609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4610$as_echo_n "checking for $ac_word... " >&6; }
4611if ${ac_cv_path_ac_pt_CXX+:} false; then :
4612 $as_echo_n "(cached) " >&6
4613else
4614 case $ac_pt_CXX in
4615 [\\/]* | ?:[\\/]*)
4616 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4617 ;;
4618 *)
4619 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620for as_dir in notfound
4621do
4622 IFS=$as_save_IFS
4623 test -z "$as_dir" && as_dir=.
4624 for ac_exec_ext in '' $ac_executable_extensions; do
4625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4626 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4627 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4628 break 2
4629 fi
4630done
4631 done
4632IFS=$as_save_IFS
4633
4634 ;;
4635esac
4636fi
4637ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4638if test -n "$ac_pt_CXX"; then
4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4640$as_echo "$ac_pt_CXX" >&6; }
4641else
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4643$as_echo "no" >&6; }
4644fi
4645
4646 if test "x$ac_pt_CXX" = x; then
4647 CXX="c++"
4648 else
4649 case $cross_compiling:$ac_tool_warned in
4650yes:)
4651{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4652$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4653ac_tool_warned=yes ;;
4654esac
4655 CXX=$ac_pt_CXX
4656 fi
4657else
4658 CXX="$ac_cv_path_CXX"
4659fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004660 ;;
4661 esac
4662 if test "$CXX" = "notfound"
4663 then
4664 CXX=""
4665 fi
4666fi
4667if test -z "$CXX"
4668then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004669 if test -n "$ac_tool_prefix"; then
4670 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4671 do
4672 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4673set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4675$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004676if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004677 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004678else
4679 if test -n "$CXX"; then
4680 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4681else
4682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4683for as_dir in $PATH
4684do
4685 IFS=$as_save_IFS
4686 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004687 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004689 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004690 $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 +00004691 break 2
4692 fi
4693done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004694 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004695IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004696
4697fi
4698fi
4699CXX=$ac_cv_prog_CXX
4700if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4702$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004706fi
4707
Martin v. Löwiseba40652007-08-30 20:10:57 +00004708
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004709 test -n "$CXX" && break
4710 done
4711fi
4712if test -z "$CXX"; then
4713 ac_ct_CXX=$CXX
4714 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4715do
4716 # Extract the first word of "$ac_prog", so it can be a program name with args.
4717set dummy $ac_prog; ac_word=$2
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
4720if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4721 $as_echo_n "(cached) " >&6
4722else
4723 if test -n "$ac_ct_CXX"; then
4724 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4725else
4726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in $PATH
4728do
4729 IFS=$as_save_IFS
4730 test -z "$as_dir" && as_dir=.
4731 for ac_exec_ext in '' $ac_executable_extensions; do
4732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4733 ac_cv_prog_ac_ct_CXX="$ac_prog"
4734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4735 break 2
4736 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004737done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004738 done
4739IFS=$as_save_IFS
4740
4741fi
4742fi
4743ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4744if test -n "$ac_ct_CXX"; then
4745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4746$as_echo "$ac_ct_CXX" >&6; }
4747else
4748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4749$as_echo "no" >&6; }
4750fi
4751
4752
4753 test -n "$ac_ct_CXX" && break
4754done
4755
4756 if test "x$ac_ct_CXX" = x; then
4757 CXX="notfound"
4758 else
4759 case $cross_compiling:$ac_tool_warned in
4760yes:)
4761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4763ac_tool_warned=yes ;;
4764esac
4765 CXX=$ac_ct_CXX
4766 fi
4767fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004768
4769 if test "$CXX" = "notfound"
4770 then
4771 CXX=""
4772 fi
4773fi
4774if test "$preset_cxx" != "$CXX"
4775then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004777
4778 By default, distutils will build C++ extension modules with \"$CXX\".
4779 If this is not intended, then set CXX on the configure command line.
4780 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004782
4783 By default, distutils will build C++ extension modules with \"$CXX\".
4784 If this is not intended, then set CXX on the configure command line.
4785 " >&2;}
4786fi
4787
doko@python.org4e63fbe2013-01-25 13:08:27 +01004788MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4789
4790
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004791
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004792# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004793
4794ac_ext=c
4795ac_cpp='$CPP $CPPFLAGS'
4796ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4797ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4798ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4800$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004801# On Suns, sometimes $CPP names a directory.
4802if test -n "$CPP" && test -d "$CPP"; then
4803 CPP=
4804fi
4805if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004806 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004808else
Martin v. Löwis11437992002-04-12 09:54:03 +00004809 # Double quotes because CPP needs to be expanded
4810 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4811 do
4812 ac_preproc_ok=false
4813for ac_c_preproc_warn_flag in '' yes
4814do
4815 # Use a header file that comes with gcc, so configuring glibc
4816 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004817 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4818 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004819 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004820 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004822/* end confdefs.h. */
4823#ifdef __STDC__
4824# include <limits.h>
4825#else
4826# include <assert.h>
4827#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004828 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004830if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004831
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832else
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 # Broken: fails on valid input.
4834continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004835fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004836rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004837
Martin v. Löwiseba40652007-08-30 20:10:57 +00004838 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004842#include <ac_nonexistent.h>
4843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004844if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # Broken: success on invalid input.
4846continue
4847else
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 # Passes both tests.
4849ac_preproc_ok=:
4850break
4851fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004852rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004853
4854done
4855# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004856rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 break
4859fi
4860
4861 done
4862 ac_cv_prog_CPP=$CPP
4863
4864fi
4865 CPP=$ac_cv_prog_CPP
4866else
4867 ac_cv_prog_CPP=$CPP
4868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4870$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004871ac_preproc_ok=false
4872for ac_c_preproc_warn_flag in '' yes
4873do
4874 # Use a header file that comes with gcc, so configuring glibc
4875 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004876 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4877 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 # On the NeXT, cc -E runs the code through the compiler's parser,
4879 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004881/* end confdefs.h. */
4882#ifdef __STDC__
4883# include <limits.h>
4884#else
4885# include <assert.h>
4886#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004887 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004888_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004889if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004890
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # Broken: fails on valid input.
4893continue
4894fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004895rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004896
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004898 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004901#include <ac_nonexistent.h>
4902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004903if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004904 # Broken: success on invalid input.
4905continue
4906else
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 # Passes both tests.
4908ac_preproc_ok=:
4909break
4910fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004911rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004912
4913done
4914# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004915rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004916if $ac_preproc_ok; then :
4917
Martin v. Löwis11437992002-04-12 09:54:03 +00004918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004921as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004922See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004923fi
4924
4925ac_ext=c
4926ac_cpp='$CPP $CPPFLAGS'
4927ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4928ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4929ac_compiler_gnu=$ac_cv_c_compiler_gnu
4930
4931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4933$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004934if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004935 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 # Loop through the user's path and test for each of PROGNAME-LIST
4940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004941for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4942do
4943 IFS=$as_save_IFS
4944 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945 for ac_prog in grep ggrep; do
4946 for ac_exec_ext in '' $ac_executable_extensions; do
4947 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004948 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004950 # Check for GNU $ac_path_GREP
4951case `"$ac_path_GREP" --version 2>&1` in
4952*GNU*)
4953 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4954*)
4955 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004956 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004957 while :
4958 do
4959 cat "conftest.in" "conftest.in" >"conftest.tmp"
4960 mv "conftest.tmp" "conftest.in"
4961 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4964 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004965 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4967 # Best one so far, save it but keep looking for a better one
4968 ac_cv_path_GREP="$ac_path_GREP"
4969 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004970 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971 # 10*(2^10) chars as input seems more than enough
4972 test $ac_count -gt 10 && break
4973 done
4974 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4975esac
4976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 $ac_path_GREP_found && break 3
4978 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004983 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 +00004984 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004985else
4986 ac_cv_path_GREP=$GREP
4987fi
4988
Martin v. Löwiseba40652007-08-30 20:10:57 +00004989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4991$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 GREP="$ac_cv_path_GREP"
4993
4994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4996$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004997if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004999else
5000 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5001 then ac_cv_path_EGREP="$GREP -E"
5002 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005004 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 # Loop through the user's path and test for each of PROGNAME-LIST
5006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00005007for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5008do
5009 IFS=$as_save_IFS
5010 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005011 for ac_prog in egrep; do
5012 for ac_exec_ext in '' $ac_executable_extensions; do
5013 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005014 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005016 # Check for GNU $ac_path_EGREP
5017case `"$ac_path_EGREP" --version 2>&1` in
5018*GNU*)
5019 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5020*)
5021 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005022 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005023 while :
5024 do
5025 cat "conftest.in" "conftest.in" >"conftest.tmp"
5026 mv "conftest.tmp" "conftest.in"
5027 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005028 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005029 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5030 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00005032 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5033 # Best one so far, save it but keep looking for a better one
5034 ac_cv_path_EGREP="$ac_path_EGREP"
5035 ac_path_EGREP_max=$ac_count
5036 fi
5037 # 10*(2^10) chars as input seems more than enough
5038 test $ac_count -gt 10 && break
5039 done
5040 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5041esac
5042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043 $ac_path_EGREP_found && break 3
5044 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005045 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005046 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005048 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005049 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 +00005050 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005051else
5052 ac_cv_path_EGREP=$EGREP
5053fi
5054
Martin v. Löwiseba40652007-08-30 20:10:57 +00005055 fi
5056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5058$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005059 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005060
5061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5063$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005064if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005065 $as_echo_n "(cached) " >&6
5066else
5067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005068/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005069#include <stdlib.h>
5070#include <stdarg.h>
5071#include <string.h>
5072#include <float.h>
5073
5074int
5075main ()
5076{
5077
5078 ;
5079 return 0;
5080}
5081_ACEOF
5082if ac_fn_c_try_compile "$LINENO"; then :
5083 ac_cv_header_stdc=yes
5084else
5085 ac_cv_header_stdc=no
5086fi
5087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5088
5089if test $ac_cv_header_stdc = yes; then
5090 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5092/* end confdefs.h. */
5093#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005094
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005095_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005097 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005098
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005100 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005101fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005102rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005104fi
5105
5106if test $ac_cv_header_stdc = yes; then
5107 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5109/* end confdefs.h. */
5110#include <stdlib.h>
5111
5112_ACEOF
5113if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5114 $EGREP "free" >/dev/null 2>&1; then :
5115
5116else
5117 ac_cv_header_stdc=no
5118fi
5119rm -f conftest*
5120
5121fi
5122
5123if test $ac_cv_header_stdc = yes; then
5124 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5125 if test "$cross_compiling" = yes; then :
5126 :
5127else
5128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5129/* end confdefs.h. */
5130#include <ctype.h>
5131#include <stdlib.h>
5132#if ((' ' & 0x0FF) == 0x020)
5133# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5134# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5135#else
5136# define ISLOWER(c) \
5137 (('a' <= (c) && (c) <= 'i') \
5138 || ('j' <= (c) && (c) <= 'r') \
5139 || ('s' <= (c) && (c) <= 'z'))
5140# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5141#endif
5142
5143#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5144int
5145main ()
5146{
5147 int i;
5148 for (i = 0; i < 256; i++)
5149 if (XOR (islower (i), ISLOWER (i))
5150 || toupper (i) != TOUPPER (i))
5151 return 2;
5152 return 0;
5153}
5154_ACEOF
5155if ac_fn_c_try_run "$LINENO"; then :
5156
5157else
5158 ac_cv_header_stdc=no
5159fi
5160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5161 conftest.$ac_objext conftest.beam conftest.$ac_ext
5162fi
5163
5164fi
5165fi
5166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5167$as_echo "$ac_cv_header_stdc" >&6; }
5168if test $ac_cv_header_stdc = yes; then
5169
5170$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5171
5172fi
5173
5174# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5175for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5176 inttypes.h stdint.h unistd.h
5177do :
5178 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5179ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5180"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005181if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005182 cat >>confdefs.h <<_ACEOF
5183#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5184_ACEOF
5185
5186fi
5187
5188done
5189
5190
5191
5192 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 +01005193if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005194 MINIX=yes
5195else
5196 MINIX=
5197fi
5198
5199
5200 if test "$MINIX" = yes; then
5201
5202$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5203
5204
5205$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5206
5207
5208$as_echo "#define _MINIX 1" >>confdefs.h
5209
5210 fi
5211
5212
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5214$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005215if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005216 $as_echo_n "(cached) " >&6
5217else
5218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5219/* end confdefs.h. */
5220
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005221# define __EXTENSIONS__ 1
5222 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005223int
5224main ()
5225{
5226
5227 ;
5228 return 0;
5229}
5230_ACEOF
5231if ac_fn_c_try_compile "$LINENO"; then :
5232 ac_cv_safe_to_define___extensions__=yes
5233else
5234 ac_cv_safe_to_define___extensions__=no
5235fi
5236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5237fi
5238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5239$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5240 test $ac_cv_safe_to_define___extensions__ = yes &&
5241 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5242
5243 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5244
5245 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5246
5247 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5248
5249 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5250
5251
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005253# Check for unsupported systems
5254case $ac_sys_system/$ac_sys_release in
5255atheos*|Linux*/1*)
5256 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5257 echo See README for details.
5258 exit 1;;
5259esac
5260
5261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5263$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005264
5265# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005266if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005267 withval=$with_suffix;
5268 case $withval in
5269 no) EXEEXT=;;
5270 yes) EXEEXT=.exe;;
5271 *) EXEEXT=$withval;;
5272 esac
5273fi
5274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5276$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005277
5278# Test whether we're running on a non-case-sensitive system, in which
5279# case we give a warning if no ext is given
5280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5282$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005283if test ! -d CaseSensitiveTestDir; then
5284mkdir CaseSensitiveTestDir
5285fi
5286
5287if test -d casesensitivetestdir
5288then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5290$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005291 BUILDEXEEXT=.exe
5292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5294$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005295 BUILDEXEEXT=$EXEEXT
5296fi
5297rmdir CaseSensitiveTestDir
5298
5299case $MACHDEP in
5300bsdos*)
5301 case $CC in
5302 gcc) CC="$CC -D_HAVE_BSDI";;
5303 esac;;
5304esac
5305
5306case $ac_sys_system in
5307hp*|HP*)
5308 case $CC in
5309 cc|*/cc) CC="$CC -Ae";;
5310 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311SunOS*)
5312 # Some functions have a prototype only with that define, e.g. confstr
5313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005314$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005315
5316 ;;
5317esac
5318
5319
5320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5322$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005323if test -z "$LIBRARY"
5324then
5325 LIBRARY='libpython$(VERSION).a'
5326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5328$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329
5330# LDLIBRARY is the name of the library to link against (as opposed to the
5331# name of the library into which to insert object files). BLDLIBRARY is also
5332# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5333# is blank as the main program is not linked directly against LDLIBRARY.
5334# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5335# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5336# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5337# DLLLIBRARY is the shared (i.e., DLL) library.
5338#
5339# RUNSHARED is used to run shared python without installed libraries
5340#
5341# INSTSONAME is the name of the shared library that will be use to install
5342# on the system - some systems like version suffix, others don't
5343
5344
5345
5346
5347
5348
5349LDLIBRARY="$LIBRARY"
5350BLDLIBRARY='$(LDLIBRARY)'
5351INSTSONAME='$(LDLIBRARY)'
5352DLLLIBRARY=''
5353LDLIBRARYDIR=''
5354RUNSHARED=''
5355
5356# LINKCC is the command that links the python executable -- default is $(CC).
5357# If CXX is set, and if it is needed to link a main function that was
5358# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5359# python might then depend on the C++ runtime
5360# This is altered for AIX in order to build the export list before
5361# linking.
5362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5364$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005365if test -z "$LINKCC"
5366then
5367 LINKCC='$(PURIFY) $(MAINCC)'
5368 case $ac_sys_system in
5369 AIX*)
5370 exp_extra="\"\""
5371 if test $ac_sys_release -ge 5 -o \
5372 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5373 exp_extra="."
5374 fi
5375 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376 QNX*)
5377 # qcc must be used because the other compilers do not
5378 # support -N.
5379 LINKCC=qcc;;
5380 esac
5381fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5383$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384
5385# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5386# make sure we default having it set to "no": this is used by
5387# distutils.unixccompiler to know if it should add --enable-new-dtags
5388# to linker command lines, and failing to detect GNU ld simply results
5389# in the same bahaviour as before.
5390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5392$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005393ac_prog=ld
5394if test "$GCC" = yes; then
5395 ac_prog=`$CC -print-prog-name=ld`
5396fi
5397case `"$ac_prog" -V 2>&1 < /dev/null` in
5398 *GNU*)
5399 GNULD=yes;;
5400 *)
5401 GNULD=no;;
5402esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5404$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5407$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005409if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005410 enableval=$enable_shared;
5411fi
5412
5413
5414if test -z "$enable_shared"
5415then
5416 case $ac_sys_system in
5417 CYGWIN* | atheos*)
5418 enable_shared="yes";;
5419 *)
5420 enable_shared="no";;
5421 esac
5422fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5424$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5427$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005429if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005430 enableval=$enable_profiling;
5431fi
5432
5433if test "x$enable_profiling" = xyes; then
5434 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005435 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437/* end confdefs.h. */
5438int main() { return 0; }
5439_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005440if ac_fn_c_try_link "$LINENO"; then :
5441
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005442else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005443 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005444fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005445rm -f core conftest.err conftest.$ac_objext \
5446 conftest$ac_exeext conftest.$ac_ext
5447 CC="$ac_save_cc"
5448else
5449 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005450fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5452$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005453
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005454if test "x$enable_profiling" = xyes; then
5455 BASECFLAGS="-pg $BASECFLAGS"
5456 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005457fi
5458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5460$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005461
5462# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5463# library that we build, but we do not want to link against it (we
5464# will find it with a -framework option). For this reason there is an
5465# extra variable BLDLIBRARY against which Python and the extension
5466# modules are linked, BLDLIBRARY. This is normally the same as
5467# LDLIBRARY, but empty for MacOSX framework builds.
5468if test "$enable_framework"
5469then
5470 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005471 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472 BLDLIBRARY=''
5473else
5474 BLDLIBRARY='$(LDLIBRARY)'
5475fi
5476
5477# Other platforms follow
5478if test $enable_shared = "yes"; then
5479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005480$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481
5482 case $ac_sys_system in
5483 BeOS*)
5484 LDLIBRARY='libpython$(VERSION).so'
5485 ;;
5486 CYGWIN*)
5487 LDLIBRARY='libpython$(VERSION).dll.a'
5488 DLLLIBRARY='libpython$(VERSION).dll'
5489 ;;
5490 SunOS*)
5491 LDLIBRARY='libpython$(VERSION).so'
5492 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005493 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494 INSTSONAME="$LDLIBRARY".$SOVERSION
5495 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005496 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497 LDLIBRARY='libpython$(VERSION).so'
5498 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005499 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500 case $ac_sys_system in
5501 FreeBSD*)
5502 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5503 ;;
5504 esac
5505 INSTSONAME="$LDLIBRARY".$SOVERSION
5506 ;;
5507 hp*|HP*)
5508 case `uname -m` in
5509 ia64)
5510 LDLIBRARY='libpython$(VERSION).so'
5511 ;;
5512 *)
5513 LDLIBRARY='libpython$(VERSION).sl'
5514 ;;
5515 esac
5516 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005517 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005518 ;;
5519 OSF*)
5520 LDLIBRARY='libpython$(VERSION).so'
5521 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005522 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005523 ;;
5524 atheos*)
5525 LDLIBRARY='libpython$(VERSION).so'
5526 BLDLIBRARY='-L. -lpython$(VERSION)'
5527 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5528 ;;
5529 Darwin*)
5530 LDLIBRARY='libpython$(VERSION).dylib'
5531 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005532 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005533 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005534 AIX*)
5535 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005536 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005537 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005538
5539 esac
5540else # shared is disabled
5541 case $ac_sys_system in
5542 CYGWIN*)
5543 BLDLIBRARY='$(LIBRARY)'
5544 LDLIBRARY='libpython$(VERSION).dll.a'
5545 ;;
5546 esac
5547fi
5548
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005549if test "$cross_compiling" = yes; then
5550 RUNSHARED=
5551fi
5552
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5554$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555
5556if test -n "$ac_tool_prefix"; then
5557 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5558set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5560$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005561if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005562 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005563else
5564 if test -n "$RANLIB"; then
5565 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5566else
5567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5568for as_dir in $PATH
5569do
5570 IFS=$as_save_IFS
5571 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005572 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005574 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576 break 2
5577 fi
5578done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005579 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005580IFS=$as_save_IFS
5581
5582fi
5583fi
5584RANLIB=$ac_cv_prog_RANLIB
5585if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5587$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5590$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591fi
5592
5593
5594fi
5595if test -z "$ac_cv_prog_RANLIB"; then
5596 ac_ct_RANLIB=$RANLIB
5597 # Extract the first word of "ranlib", so it can be a program name with args.
5598set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005601if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005602 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603else
5604 if test -n "$ac_ct_RANLIB"; then
5605 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5606else
5607as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5608for as_dir in $PATH
5609do
5610 IFS=$as_save_IFS
5611 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005612 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005616 break 2
5617 fi
5618done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005619 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005620IFS=$as_save_IFS
5621
5622fi
5623fi
5624ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5625if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5627$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5630$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005631fi
5632
5633 if test "x$ac_ct_RANLIB" = x; then
5634 RANLIB=":"
5635 else
5636 case $cross_compiling:$ac_tool_warned in
5637yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005640ac_tool_warned=yes ;;
5641esac
5642 RANLIB=$ac_ct_RANLIB
5643 fi
5644else
5645 RANLIB="$ac_cv_prog_RANLIB"
5646fi
5647
5648
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005649if test -n "$ac_tool_prefix"; then
5650 for ac_prog in ar aal
5651 do
5652 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5653set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005656if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005657 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005658else
5659 if test -n "$AR"; then
5660 ac_cv_prog_AR="$AR" # Let the user override the test.
5661else
5662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5663for as_dir in $PATH
5664do
5665 IFS=$as_save_IFS
5666 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005667 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005669 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005670 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005671 break 2
5672 fi
5673done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005674 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005675IFS=$as_save_IFS
5676
5677fi
5678fi
5679AR=$ac_cv_prog_AR
5680if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5682$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005686fi
5687
5688
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005689 test -n "$AR" && break
5690 done
5691fi
5692if test -z "$AR"; then
5693 ac_ct_AR=$AR
5694 for ac_prog in ar aal
5695do
5696 # Extract the first word of "$ac_prog", so it can be a program name with args.
5697set dummy $ac_prog; ac_word=$2
5698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5699$as_echo_n "checking for $ac_word... " >&6; }
5700if ${ac_cv_prog_ac_ct_AR+:} false; then :
5701 $as_echo_n "(cached) " >&6
5702else
5703 if test -n "$ac_ct_AR"; then
5704 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5705else
5706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707for as_dir in $PATH
5708do
5709 IFS=$as_save_IFS
5710 test -z "$as_dir" && as_dir=.
5711 for ac_exec_ext in '' $ac_executable_extensions; do
5712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5713 ac_cv_prog_ac_ct_AR="$ac_prog"
5714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5715 break 2
5716 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005717done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005718 done
5719IFS=$as_save_IFS
5720
5721fi
5722fi
5723ac_ct_AR=$ac_cv_prog_ac_ct_AR
5724if test -n "$ac_ct_AR"; then
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5726$as_echo "$ac_ct_AR" >&6; }
5727else
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5729$as_echo "no" >&6; }
5730fi
5731
5732
5733 test -n "$ac_ct_AR" && break
5734done
5735
5736 if test "x$ac_ct_AR" = x; then
5737 AR="ar"
5738 else
5739 case $cross_compiling:$ac_tool_warned in
5740yes:)
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5743ac_tool_warned=yes ;;
5744esac
5745 AR=$ac_ct_AR
5746 fi
5747fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005748
5749
5750# tweak ARFLAGS only if the user didn't set it on the command line
5751
5752if test -z "$ARFLAGS"
5753then
5754 ARFLAGS="rc"
5755fi
5756
5757
Victor Stinner2c7085f2017-05-02 16:55:50 +02005758
5759
5760
Victor Stinnerdf569252017-05-03 00:05:45 +02005761if test -e $srcdir/.git
Victor Stinner2c7085f2017-05-02 16:55:50 +02005762then
5763# Extract the first word of "git", so it can be a program name with args.
5764set dummy git; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5766$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinner2c7085f2017-05-02 16:55:50 +02005767if ${ac_cv_prog_HAS_GIT+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005768 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005770 if test -n "$HAS_GIT"; then
5771 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772else
5773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5774for as_dir in $PATH
5775do
5776 IFS=$as_save_IFS
5777 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005778 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005780 ac_cv_prog_HAS_GIT="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005781 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005782 break 2
5783 fi
5784done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005785 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005786IFS=$as_save_IFS
5787
Victor Stinner2c7085f2017-05-02 16:55:50 +02005788 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789fi
5790fi
Victor Stinner2c7085f2017-05-02 16:55:50 +02005791HAS_GIT=$ac_cv_prog_HAS_GIT
5792if test -n "$HAS_GIT"; then
5793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
5794$as_echo "$HAS_GIT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5797$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005798fi
5799
5800
Victor Stinner2c7085f2017-05-02 16:55:50 +02005801else
5802HAS_GIT=no-repository
5803fi
5804if test $HAS_GIT = found
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805then
Xiang Zhang95f9e142018-08-20 23:15:07 +08005806 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
5807 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
5808 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005810 GITVERSION=""
5811 GITTAG=""
5812 GITBRANCH=""
Georg Brandl3a5508e2011-03-06 10:42:21 +01005813fi
5814
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005815case $MACHDEP in
5816bsdos*|hp*|HP*)
5817 # install -d does not work on BSDI or HP-UX
5818 if test -z "$INSTALL"
5819 then
5820 INSTALL="${srcdir}/install-sh -c"
5821 fi
5822esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005823# Find a good install program. We prefer a C program (faster),
5824# so one script is as good as another. But avoid the broken or
5825# incompatible versions:
5826# SysV /etc/install, /usr/sbin/install
5827# SunOS /usr/etc/install
5828# IRIX /sbin/install
5829# AIX /bin/install
5830# AmigaOS /C/install, which installs bootblocks on floppy discs
5831# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5832# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5833# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5834# OS/2's system install, which has a completely different semantic
5835# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005836# Reject install programs that cannot install multiple files.
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5838$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005839if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005840if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005841 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005842else
5843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844for as_dir in $PATH
5845do
5846 IFS=$as_save_IFS
5847 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005848 # Account for people who put trailing slashes in PATH elements.
5849case $as_dir/ in #((
5850 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005852 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005853 /usr/ucb/* ) ;;
5854 *)
5855 # OSF1 and SCO ODT 3.0 have their own names for install.
5856 # Don't use installbsd from OSF since it installs stuff as root
5857 # by default.
5858 for ac_prog in ginstall scoinst install; do
5859 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005860 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005861 if test $ac_prog = install &&
5862 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5863 # AIX install. It has an incompatible calling convention.
5864 :
5865 elif test $ac_prog = install &&
5866 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5867 # program-specific install script used by HP pwplus--don't use.
5868 :
5869 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005870 rm -rf conftest.one conftest.two conftest.dir
5871 echo one > conftest.one
5872 echo two > conftest.two
5873 mkdir conftest.dir
5874 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5875 test -s conftest.one && test -s conftest.two &&
5876 test -s conftest.dir/conftest.one &&
5877 test -s conftest.dir/conftest.two
5878 then
5879 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5880 break 3
5881 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005882 fi
5883 fi
5884 done
5885 done
5886 ;;
5887esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005888
5889 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005890IFS=$as_save_IFS
5891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005892rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893
5894fi
5895 if test "${ac_cv_path_install+set}" = set; then
5896 INSTALL=$ac_cv_path_install
5897 else
5898 # As a last resort, use the slow shell script. Don't cache a
5899 # value for INSTALL within a source directory, because that will
5900 # break other packages using the cache if that directory is
5901 # removed, or if the value is a relative name.
5902 INSTALL=$ac_install_sh
5903 fi
5904fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5906$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005907
5908# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5909# It thinks the first close brace ends the variable substitution.
5910test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5911
5912test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5913
5914test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5915
Trent Nelsonf6407a12012-08-30 14:56:13 +00005916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5917$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5918if test -z "$MKDIR_P"; then
5919 if ${ac_cv_path_mkdir+:} false; then :
5920 $as_echo_n "(cached) " >&6
5921else
5922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5923for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5924do
5925 IFS=$as_save_IFS
5926 test -z "$as_dir" && as_dir=.
5927 for ac_prog in mkdir gmkdir; do
5928 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005929 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005930 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5931 'mkdir (GNU coreutils) '* | \
5932 'mkdir (coreutils) '* | \
5933 'mkdir (fileutils) '4.1*)
5934 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5935 break 3;;
5936 esac
5937 done
5938 done
5939 done
5940IFS=$as_save_IFS
5941
5942fi
5943
5944 test -d ./--version && rmdir ./--version
5945 if test "${ac_cv_path_mkdir+set}" = set; then
5946 MKDIR_P="$ac_cv_path_mkdir -p"
5947 else
5948 # As a last resort, use the slow shell script. Don't cache a
5949 # value for MKDIR_P within a source directory, because that will
5950 # break other packages using the cache if that directory is
5951 # removed, or if the value is a relative name.
5952 MKDIR_P="$ac_install_sh -d"
5953 fi
5954fi
5955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5956$as_echo "$MKDIR_P" >&6; }
5957
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958
5959# Not every filesystem supports hard links
5960
5961if test -z "$LN" ; then
5962 case $ac_sys_system in
5963 BeOS*) LN="ln -s";;
5964 CYGWIN*) LN="ln -s";;
5965 atheos*) LN="ln -s";;
5966 *) LN=ln;;
5967 esac
5968fi
5969
5970# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5972$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005973
5974# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005976 withval=$with_pydebug;
5977if test "$withval" != no
5978then
5979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5983$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005984 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005985else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5986$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005987fi
5988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5990$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005991fi
5992
5993
5994# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5995# merged with this chunk of code?
5996
5997# Optimizer/debugger flags
5998# ------------------------
5999# (The following bit of code is complicated enough - please keep things
6000# indented properly. Just pretend you're editing Python code. ;-)
6001
6002# There are two parallel sets of case statements below, one that checks to
6003# see if OPT was set and one that does BASECFLAGS setting based upon
6004# compiler and platform. BASECFLAGS tweaks need to be made even if the
6005# user set OPT.
6006
6007# tweak OPT based on compiler and platform, only if the user didn't set
6008# it on the command line
6009
Benjamin Petersond4b721b2010-03-23 20:58:37 +00006010if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006011then
6012 case $GCC in
6013 yes)
6014 if test "$CC" != 'g++' ; then
6015 STRICT_PROTO="-Wstrict-prototypes"
6016 fi
6017 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6018 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6019 WRAP="-fwrapv"
6020 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006021
6022 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006023 case $CC in
6024 *clang*) WRAP="-fwrapv"
6025 ;;
6026 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006027
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006028 case $ac_cv_prog_cc_g in
6029 yes)
6030 if test "$Py_DEBUG" = 'true' ; then
6031 # Optimization messes up debuggers, so turn it off for
6032 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006033 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006034 else
6035 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6036 fi
6037 ;;
6038 *)
6039 OPT="-O3 -Wall $STRICT_PROTO"
6040 ;;
6041 esac
6042 case $ac_sys_system in
6043 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6044 ;;
6045 esac
6046 ;;
6047
6048 *)
6049 OPT="-O"
6050 ;;
6051 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006052fi
6053
6054
6055
6056# The -arch flags for universal builds on OSX
6057UNIVERSAL_ARCH_FLAGS=
6058
6059
6060# tweak BASECFLAGS based on compiler and platform
6061case $GCC in
6062yes)
6063 # Python violates C99 rules, by casting between incompatible
6064 # pointer types. GCC may generate bad code as a result of that,
6065 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6067$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006068 ac_save_cc="$CC"
6069 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006070 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006071 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006075
6076int
6077main ()
6078{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006079
Gregory P. Smith373469a2009-11-01 21:03:38 +00006080 ;
6081 return 0;
6082}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006084if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006085 ac_cv_no_strict_aliasing_ok=yes
6086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006087 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006088fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006090fi
6091
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006092 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6094$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006095 if test $ac_cv_no_strict_aliasing_ok = yes
6096 then
6097 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6098 fi
6099
6100 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6101 # support. Without this, treatment of subnormals doesn't follow
6102 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006103 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006104 alpha*)
6105 BASECFLAGS="$BASECFLAGS -mieee"
6106 ;;
6107 esac
6108
6109 case $ac_sys_system in
6110 SCO_SV*)
6111 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6112 ;;
Ned Deilyee8e4b62018-04-14 10:37:28 -04006113 # is there any other compiler on Darwin besides gcc?
6114 Darwin*)
6115 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6116 # used to be here, but non-Apple gcc doesn't accept them.
6117 if test "${CC}" = gcc
6118 then
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006120$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deilyee8e4b62018-04-14 10:37:28 -04006121 case "${UNIVERSALSDK}" in
6122 */MacOSX10.4u.sdk)
6123 # Build using 10.4 SDK, force usage of gcc when the
6124 # compiler is gcc, otherwise the user will get very
6125 # confusing error messages when building on OSX 10.6
6126 CC=gcc-4.0
6127 CPP=cpp-4.0
6128 ;;
6129 esac
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006131$as_echo "$CC" >&6; }
Ned Deilyee8e4b62018-04-14 10:37:28 -04006132 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006133
Ned Deilyee8e4b62018-04-14 10:37:28 -04006134 if test "${enable_universalsdk}"
6135 then
6136 case "$UNIVERSAL_ARCHS" in
6137 32-bit)
6138 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6139 LIPO_32BIT_FLAGS=""
6140 ARCH_RUN_32BIT=""
6141 ;;
6142 64-bit)
6143 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6144 LIPO_32BIT_FLAGS=""
6145 ARCH_RUN_32BIT=""
6146 ;;
6147 all)
6148 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6149 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6150 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6151 ;;
6152 intel)
6153 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6154 LIPO_32BIT_FLAGS="-extract i386"
6155 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6156 ;;
6157 intel-32)
6158 UNIVERSAL_ARCH_FLAGS="-arch i386"
6159 LIPO_32BIT_FLAGS=""
6160 ARCH_RUN_32BIT=""
6161 ;;
6162 intel-64)
6163 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
6164 LIPO_32BIT_FLAGS=""
6165 ARCH_RUN_32BIT=""
6166 ;;
6167 3-way)
6168 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6169 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6170 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6171 ;;
6172 *)
6173 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6174 ;;
6175 esac
Ronald Oussoren23d92532009-09-07 06:12:00 +00006176
Ned Deilyee8e4b62018-04-14 10:37:28 -04006177 if test "${UNIVERSALSDK}" != "/"
6178 then
6179 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6180 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6181 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6182 else
6183 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6184 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
6185 fi
6186 fi
Ronald Oussoren23d92532009-09-07 06:12:00 +00006187
Ned Deilyee8e4b62018-04-14 10:37:28 -04006188 # Calculate an appropriate deployment target for this build:
6189 # The deployment target value is used explicitly to enable certain
6190 # features are enabled (such as builtin libedit support for readline)
6191 # through the use of Apple's Availability Macros and is used as a
6192 # component of the string returned by distutils.get_platform().
6193 #
6194 # Use the value from:
6195 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6196 # 2. the operating system version of the build machine if >= 10.6
6197 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6198 # below to pick either 10.3, 10.4, or 10.5 as the target.
6199 # 4. If we are running on OS X 10.2 or earlier, good luck!
Ronald Oussoren23d92532009-09-07 06:12:00 +00006200
Ned Deilyee8e4b62018-04-14 10:37:28 -04006201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6202$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6203 cur_target_major=`sw_vers -productVersion | \
6204 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6205 cur_target_minor=`sw_vers -productVersion | \
6206 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6207 cur_target="${cur_target_major}.${cur_target_minor}"
6208 if test ${cur_target_major} -eq 10 && \
6209 test ${cur_target_minor} -ge 3 && \
6210 test ${cur_target_minor} -le 5
6211 then
6212 # OS X 10.3 through 10.5
6213 cur_target=10.3
6214 if test ${enable_universalsdk}
6215 then
6216 case "$UNIVERSAL_ARCHS" in
6217 all|3-way|intel|64-bit)
6218 # These configurations were first supported in 10.5
6219 cur_target='10.5'
6220 ;;
6221 esac
6222 else
6223 if test `/usr/bin/arch` = "i386"
6224 then
6225 # 10.4 was the first release to support Intel archs
6226 cur_target="10.4"
6227 fi
6228 fi
6229 fi
6230 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006231
Ned Deilyee8e4b62018-04-14 10:37:28 -04006232 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6233 # environment with a value that is the same as what we'll use
6234 # in the Makefile to ensure that we'll get the same compiler
6235 # environment during configure and build time.
6236 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6237 export MACOSX_DEPLOYMENT_TARGET
6238 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6240$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006241
Ned Deilyee8e4b62018-04-14 10:37:28 -04006242 # end of Darwin* tests
6243 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006244 OSF*)
6245 BASECFLAGS="$BASECFLAGS -mieee"
6246 ;;
6247 esac
6248 ;;
6249
6250*)
6251 case $ac_sys_system in
6252 OpenUNIX*|UnixWare*)
6253 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6254 ;;
6255 OSF*)
6256 BASECFLAGS="$BASECFLAGS -ieee -std"
6257 ;;
6258 SCO_SV*)
6259 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6260 ;;
6261 esac
6262 ;;
6263esac
6264
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006265# ICC needs -fp-model strict or floats behave badly
6266case "$CC" in
6267*icc*)
6268 BASECFLAGS="$BASECFLAGS -fp-model strict"
6269 ;;
6270esac
6271
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006272if test "$Py_DEBUG" = 'true'; then
6273 :
6274else
6275 OPT="-DNDEBUG $OPT"
6276fi
6277
6278if test "$ac_arch_flags"
6279then
6280 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6281fi
6282
6283# disable check for icc since it seems to pass, but generates a warning
6284if test "$CC" = icc
6285then
6286 ac_cv_opt_olimit_ok=no
6287fi
6288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6290$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006291if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006292 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006293else
6294 ac_save_cc="$CC"
6295CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006297/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006298
6299int
6300main ()
6301{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006302
Gregory P. Smith373469a2009-11-01 21:03:38 +00006303 ;
6304 return 0;
6305}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308 ac_cv_opt_olimit_ok=yes
6309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006311
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006314CC="$ac_save_cc"
6315fi
6316
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6318$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006319if test $ac_cv_opt_olimit_ok = yes; then
6320 case $ac_sys_system in
6321 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6322 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6323 # environment?
6324 Darwin*)
6325 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006326 # XXX thankfully this useless troublemaker of a flag has been
6327 # eradicated in the 3.x line. For now, make sure it isn't picked
6328 # up by any of our other platforms that use CC.
6329 AIX*|SunOS*|HP-UX*|IRIX*)
6330 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006331 *)
6332 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6333 ;;
6334 esac
6335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6337$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006338 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006339 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006340else
6341 ac_save_cc="$CC"
6342 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006344/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006345
6346int
6347main ()
6348{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006349
Gregory P. Smith373469a2009-11-01 21:03:38 +00006350 ;
6351 return 0;
6352}
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 ac_cv_olimit_ok=yes
6356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006358
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006361 CC="$ac_save_cc"
6362fi
6363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6365$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006367 case $ac_sys_system in
6368 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6369 HP-UX*)
6370 ;;
6371 *)
6372 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6373 ;;
6374 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006375 fi
6376fi
6377
6378# Check whether GCC supports PyArg_ParseTuple format
6379if test "$GCC" = "yes"
6380then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6382$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006383 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006384 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006386/* end confdefs.h. */
6387
6388 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006389int
6390main ()
6391{
6392
6393 ;
6394 return 0;
6395}
Matthias Klosec511b472010-05-08 11:01:39 +00006396
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006398if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006399
Matthias Klosec511b472010-05-08 11:01:39 +00006400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006401$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006402
Matthias Klosec511b472010-05-08 11:01:39 +00006403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006404$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006405
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006406else
Matthias Klosec511b472010-05-08 11:01:39 +00006407
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006409$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006410
6411fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6413 CFLAGS=$save_CFLAGS
6414fi
6415
Brett Cannon4ff151a2015-09-18 15:09:42 -07006416
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006417# Enable optimization flags
6418
6419
6420Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6422$as_echo_n "checking for --enable-optimizations... " >&6; }
6423# Check whether --enable-optimizations was given.
6424if test "${enable_optimizations+set}" = set; then :
6425 enableval=$enable_optimizations;
INADA Naoki6a04ef72017-03-29 01:50:48 +09006426if test "$enableval" != no
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006427then
6428 Py_OPT='true'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6430$as_echo "yes" >&6; };
6431else
6432 Py_OPT='false'
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; };
6435fi
6436else
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006442 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6443 # compile working code using it and both test_distutils and test_gdb are
6444 # broken when you do managed to get a toolchain that works with it. People
6445 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006446 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006447 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006448 DEF_MAKE_RULE="build_all"
6449else
6450 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006451 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006452 DEF_MAKE_RULE="all"
6453fi
6454
6455
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006456# Enable LTO flags
6457
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6459$as_echo_n "checking for --with-lto... " >&6; }
6460
6461# Check whether --with-lto was given.
6462if test "${with_lto+set}" = set; then :
6463 withval=$with_lto;
6464if test "$withval" != no
6465then
6466 Py_LTO='true'
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6468$as_echo "yes" >&6; };
6469else
6470 Py_LTO='false'
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; };
6473fi
6474else
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479if test "$Py_LTO" = 'true' ; then
6480 case $CC in
6481 *clang*)
6482 # Any changes made here should be reflected in the GCC+Darwin case below
6483 LTOFLAGS="-flto"
6484 ;;
6485 *gcc*)
6486 case $ac_sys_system in
6487 Darwin*)
6488 LTOFLAGS="-flto"
6489 ;;
6490 *)
6491 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6492 ;;
6493 esac
6494 ;;
6495 esac
Victor Stinner319cfb52018-06-22 09:11:33 +02006496
6497 if test "$ac_cv_prog_cc_g" = "yes"
6498 then
6499 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6500 # to get debug symbols.
6501 LTOFLAGS="$LTOFLAGS -g"
6502 fi
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006503fi
6504
6505
Brett Cannon4ff151a2015-09-18 15:09:42 -07006506# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006507
6508
6509
6510
6511
Gregory P. Smith794b2912016-09-08 00:07:40 -07006512# Make this work on systems where llvm tools are not installed with their
6513# normal names in the default $PATH (ie: Ubuntu). They exist under the
6514# non-suffixed name in their versioned llvm directory.
6515llvm_bin_dir=''
6516llvm_path="${PATH}"
6517if test "${CC}" = "clang"
6518then
6519 clang_bin=`which clang`
6520 # Some systems install clang elsewhere as a symlink to the real path
6521 # which is where the related llvm tools are located.
6522 if test -L "${clang_bin}"
6523 then
6524 clang_dir=`dirname "${clang_bin}"`
6525 clang_bin=`readlink "${clang_bin}"`
6526 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6527 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6528 fi
6529fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006530
Gregory P. Smith794b2912016-09-08 00:07:40 -07006531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6532$as_echo_n "checking target system type... " >&6; }
6533if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006534 $as_echo_n "(cached) " >&6
6535else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006536 if test "x$target_alias" = x; then
6537 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006538else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006539 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6540 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6541fi
6542
6543fi
6544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6545$as_echo "$ac_cv_target" >&6; }
6546case $ac_cv_target in
6547*-*-*) ;;
6548*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6549esac
6550target=$ac_cv_target
6551ac_save_IFS=$IFS; IFS='-'
6552set x $ac_cv_target
6553shift
6554target_cpu=$1
6555target_vendor=$2
6556shift; shift
6557# Remember, the first character of IFS is used to create $*,
6558# except with old shells:
6559target_os=$*
6560IFS=$ac_save_IFS
6561case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6562
6563
6564# The aliases save the names the user supplied, while $host etc.
6565# will get canonicalized.
6566test -n "$target_alias" &&
6567 test "$program_prefix$program_suffix$program_transform_name" = \
6568 NONENONEs,x,x, &&
6569 program_prefix=${target_alias}-
6570# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6571set dummy $target_alias-llvm-profdata; ac_word=$2
6572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6573$as_echo_n "checking for $ac_word... " >&6; }
6574if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6575 $as_echo_n "(cached) " >&6
6576else
6577 case $LLVM_PROFDATA in
6578 [\\/]* | ?:[\\/]*)
6579 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6580 ;;
6581 *)
6582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6583for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006584do
6585 IFS=$as_save_IFS
6586 test -z "$as_dir" && as_dir=.
6587 for ac_exec_ext in '' $ac_executable_extensions; do
6588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006589 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6591 break 2
6592 fi
6593done
6594 done
6595IFS=$as_save_IFS
6596
Gregory P. Smith794b2912016-09-08 00:07:40 -07006597 ;;
6598esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006599fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006600LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6601if test -n "$LLVM_PROFDATA"; then
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6603$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006604else
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6606$as_echo "no" >&6; }
6607fi
6608
6609
Gregory P. Smith794b2912016-09-08 00:07:40 -07006610if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6611 if test "$build" = "$target"; then
6612 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6613 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6614set dummy llvm-profdata; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6618 $as_echo_n "(cached) " >&6
6619else
6620 case $ac_pt_LLVM_PROFDATA in
6621 [\\/]* | ?:[\\/]*)
6622 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6623 ;;
6624 *)
6625 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in ${llvm_path}
6627do
6628 IFS=$as_save_IFS
6629 test -z "$as_dir" && as_dir=.
6630 for ac_exec_ext in '' $ac_executable_extensions; do
6631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634 break 2
6635 fi
6636done
6637 done
6638IFS=$as_save_IFS
6639
6640 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6641 ;;
6642esac
6643fi
6644ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6645if test -n "$ac_pt_LLVM_PROFDATA"; then
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6647$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6648else
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6650$as_echo "no" >&6; }
6651fi
6652
6653 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6654 else
6655 LLVM_PROFDATA="''"
6656 fi
6657else
6658 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6659fi
6660
6661
6662if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6663then
6664 LLVM_PROF_FOUND="found"
6665else
6666 LLVM_PROF_FOUND="not-found"
6667fi
6668if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6669then
6670 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6671 if test -n "${found_llvm_profdata}"
6672 then
6673 # llvm-profdata isn't directly in $PATH in some cases.
6674 # https://apple.stackexchange.com/questions/197053/
6675 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6676 LLVM_PROF_FOUND=found
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6678$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6679 fi
6680fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006681LLVM_PROF_ERR=no
6682case $CC in
6683 *clang*)
6684 # Any changes made here should be reflected in the GCC+Darwin case below
6685 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6686 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006687 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006688 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6689 if test $LLVM_PROF_FOUND = not-found
6690 then
6691 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006692 if test "${REQUIRE_PGO}" = "yes"
6693 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006694 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 -07006695 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006696 fi
6697 ;;
6698 *gcc*)
6699 case $ac_sys_system in
6700 Darwin*)
6701 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6702 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006703 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006704 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006705 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006706 then
6707 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006708 if test "${REQUIRE_PGO}" = "yes"
6709 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006710 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 -07006711 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006712 fi
6713 ;;
6714 *)
6715 PGO_PROF_GEN_FLAG="-fprofile-generate"
6716 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6717 LLVM_PROF_MERGER="true"
6718 LLVM_PROF_FILE=""
6719 ;;
6720 esac
6721 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006722 *icc*)
6723 PGO_PROF_GEN_FLAG="-prof-gen"
6724 PGO_PROF_USE_FLAG="-prof-use"
6725 LLVM_PROF_MERGER="true"
6726 LLVM_PROF_FILE=""
6727 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006728esac
6729
6730
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006731# On some compilers, pthreads are available without further options
6732# (e.g. MacOS X). On some of these systems, the compiler will not
6733# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6734# So we have to see first whether pthreads are available without
6735# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6737$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006738if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006741 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742 ac_cv_pthread_is_default=no
6743else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006745/* end confdefs.h. */
6746
Stefan Krahae66ca62012-11-22 22:36:57 +01006747#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006748#include <pthread.h>
6749
6750void* routine(void* p){return NULL;}
6751
6752int main(){
6753 pthread_t p;
6754 if(pthread_create(&p,NULL,routine,NULL)!=0)
6755 return 1;
6756 (void)pthread_detach(p);
6757 return 0;
6758}
6759
6760_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006761if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006762
6763 ac_cv_pthread_is_default=yes
6764 ac_cv_kthread=no
6765 ac_cv_pthread=no
6766
6767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006768 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006772fi
6773
6774
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006775fi
6776
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6778$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006779
6780
6781if test $ac_cv_pthread_is_default = yes
6782then
6783 ac_cv_kpthread=no
6784else
6785# -Kpthread, 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 -Kpthread,
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 -Kpthread" >&5
6791$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006792if ${ac_cv_kpthread+:} 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 -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798 ac_cv_kpthread=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_kpthread=yes
6819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820 ac_cv_kpthread=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_kpthread" >&5
6830$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831fi
6832
6833if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6834then
6835# -Kthread, 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 -Kthread,
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 -Kthread" >&5
6841$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006842if ${ac_cv_kthread+:} 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 -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006848 ac_cv_kthread=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_kthread=yes
6869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870 ac_cv_kthread=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_kthread" >&5
6880$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881fi
6882
6883if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6884then
6885# -pthread, if available, provides the right #defines
6886# and linker options to make pthread_create available
6887# Some compilers won't report that they do not support -pthread,
6888# so we need to run a program to see whether it really made the
6889# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6891$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006892if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006894else
6895 ac_save_cc="$CC"
6896CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006897if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006898 ac_cv_pthread=no
6899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006901/* end confdefs.h. */
6902
Stefan Krahae66ca62012-11-22 22:36:57 +01006903#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006904#include <pthread.h>
6905
6906void* routine(void* p){return NULL;}
6907
6908int main(){
6909 pthread_t p;
6910 if(pthread_create(&p,NULL,routine,NULL)!=0)
6911 return 1;
6912 (void)pthread_detach(p);
6913 return 0;
6914}
6915
6916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006917if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006918 ac_cv_pthread=yes
6919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006920 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006924fi
6925
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006926CC="$ac_save_cc"
6927fi
6928
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6930$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006931fi
6932
6933# If we have set a CC compiler flag for thread support then
6934# check if it works for CXX, too.
6935ac_cv_cxx_thread=no
6936if test ! -z "$CXX"
6937then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6939$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006940ac_save_cxx="$CXX"
6941
6942if test "$ac_cv_kpthread" = "yes"
6943then
6944 CXX="$CXX -Kpthread"
6945 ac_cv_cxx_thread=yes
6946elif test "$ac_cv_kthread" = "yes"
6947then
6948 CXX="$CXX -Kthread"
6949 ac_cv_cxx_thread=yes
6950elif test "$ac_cv_pthread" = "yes"
6951then
6952 CXX="$CXX -pthread"
6953 ac_cv_cxx_thread=yes
6954fi
6955
6956if test $ac_cv_cxx_thread = yes
6957then
6958 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6959 $CXX -c conftest.$ac_ext 2>&5
6960 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6961 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6962 then
6963 ac_cv_cxx_thread=yes
6964 else
6965 ac_cv_cxx_thread=no
6966 fi
6967 rm -fr conftest*
6968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6970$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006971fi
6972CXX="$ac_save_cxx"
6973
6974
6975# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6977$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006978if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006979 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006982/* end confdefs.h. */
6983#include <stdlib.h>
6984#include <stdarg.h>
6985#include <string.h>
6986#include <float.h>
6987
6988int
6989main ()
6990{
6991
6992 ;
6993 return 0;
6994}
6995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006996if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006997 ac_cv_header_stdc=yes
6998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006999 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007000fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7002
7003if test $ac_cv_header_stdc = yes; then
7004 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007006/* end confdefs.h. */
7007#include <string.h>
7008
7009_ACEOF
7010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007011 $EGREP "memchr" >/dev/null 2>&1; then :
7012
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007013else
7014 ac_cv_header_stdc=no
7015fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007016rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007017
7018fi
7019
7020if test $ac_cv_header_stdc = yes; then
7021 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007023/* end confdefs.h. */
7024#include <stdlib.h>
7025
7026_ACEOF
7027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007028 $EGREP "free" >/dev/null 2>&1; then :
7029
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007030else
7031 ac_cv_header_stdc=no
7032fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007033rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007034
7035fi
7036
7037if test $ac_cv_header_stdc = yes; then
7038 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007039 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007040 :
7041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007043/* end confdefs.h. */
7044#include <ctype.h>
7045#include <stdlib.h>
7046#if ((' ' & 0x0FF) == 0x020)
7047# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7048# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7049#else
7050# define ISLOWER(c) \
7051 (('a' <= (c) && (c) <= 'i') \
7052 || ('j' <= (c) && (c) <= 'r') \
7053 || ('s' <= (c) && (c) <= 'z'))
7054# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7055#endif
7056
7057#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7058int
7059main ()
7060{
7061 int i;
7062 for (i = 0; i < 256; i++)
7063 if (XOR (islower (i), ISLOWER (i))
7064 || toupper (i) != TOUPPER (i))
7065 return 2;
7066 return 0;
7067}
7068_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007069if ac_fn_c_try_run "$LINENO"; then :
7070
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007072 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007076fi
7077
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007078fi
7079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7081$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007082if test $ac_cv_header_stdc = yes; then
7083
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007085
7086fi
7087
Miss Islington (bot)6ccdad72018-01-24 01:51:39 -08007088for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007089fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007090ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007091shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007092unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007093sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7094sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007095sys/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 +00007096sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007097sys/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 +00007098sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesffa70112017-09-05 17:08:45 +02007099bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h sys/sysmacros.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100do :
7101 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7102ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007103if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007104 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007105#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007106_ACEOF
7107
7108fi
7109
Guido van Rossum627b2d71993-12-24 10:39:16 +00007110done
7111
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007112ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007113for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007114 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7116$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007117if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007121/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007122#include <sys/types.h>
7123#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007124
Martin v. Löwis11437992002-04-12 09:54:03 +00007125int
7126main ()
7127{
7128if ((DIR *) 0)
7129return 0;
7130 ;
7131 return 0;
7132}
7133_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007135 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007137 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141eval ac_res=\$$as_ac_Header
7142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7143$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007144if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007147_ACEOF
7148
7149ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007150fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007152done
7153# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7154if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7156$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007157if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007158 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007159else
Martin v. Löwis11437992002-04-12 09:54:03 +00007160 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007163
Martin v. Löwiseba40652007-08-30 20:10:57 +00007164/* Override any GCC internal prototype to avoid an error.
7165 Use char because int might match the return type of a GCC
7166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007167#ifdef __cplusplus
7168extern "C"
7169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007170char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007171int
7172main ()
7173{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007174return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007175 ;
7176 return 0;
7177}
7178_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007179for ac_lib in '' dir; do
7180 if test -z "$ac_lib"; then
7181 ac_res="none required"
7182 else
7183 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007184 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007189rm -f core conftest.err conftest.$ac_objext \
7190 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007191 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007195if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196
Martin v. Löwiseba40652007-08-30 20:10:57 +00007197else
7198 ac_cv_search_opendir=no
7199fi
7200rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007201LIBS=$ac_func_search_save_LIBS
7202fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7204$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007205ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007207 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007209fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007210
Michael W. Hudson54241132001-12-07 15:38:26 +00007211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7213$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007214if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007215 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007216else
7217 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007220
Martin v. Löwiseba40652007-08-30 20:10:57 +00007221/* Override any GCC internal prototype to avoid an error.
7222 Use char because int might match the return type of a GCC
7223 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007224#ifdef __cplusplus
7225extern "C"
7226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007227char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007228int
7229main ()
7230{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007231return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ;
7233 return 0;
7234}
7235_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007236for ac_lib in '' x; do
7237 if test -z "$ac_lib"; then
7238 ac_res="none required"
7239 else
7240 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007241 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007243 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007244 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007246rm -f core conftest.err conftest.$ac_objext \
7247 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007248 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007249 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007251done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007252if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253
Martin v. Löwiseba40652007-08-30 20:10:57 +00007254else
7255 ac_cv_search_opendir=no
7256fi
7257rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007258LIBS=$ac_func_search_save_LIBS
7259fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7261$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007262ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007263if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007265
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007266fi
7267
7268fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007269
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7271$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007272if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007276/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007277#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007278int
7279main ()
7280{
7281return makedev(0, 0);
7282 ;
7283 return 0;
7284}
7285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007287 ac_cv_header_sys_types_h_makedev=yes
7288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007289 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007290fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291rm -f core conftest.err conftest.$ac_objext \
7292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007293
7294fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7296$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007297
7298if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007299ac_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 +01007300if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007301
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007303
7304fi
7305
7306
7307
7308 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007309 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 +01007310if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007311
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007312$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007313
7314fi
7315
7316
7317 fi
7318fi
7319
Michael W. Hudson54241132001-12-07 15:38:26 +00007320
Martin v. Löwis11017b12006-01-14 18:12:57 +00007321# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007322for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323do :
7324 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 +00007325#ifdef HAVE_ASM_TYPES_H
7326#include <asm/types.h>
7327#endif
7328#ifdef HAVE_SYS_SOCKET_H
7329#include <sys/socket.h>
7330#endif
7331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007333if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007334 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007336_ACEOF
7337
7338fi
7339
7340done
7341
7342
Guido van Rossum627b2d71993-12-24 10:39:16 +00007343# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007344was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7346$as_echo_n "checking for clock_t in time.h... " >&6; }
7347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007348/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007349#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007350
7351_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007352if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007353 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007354 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007355else
Martin v. Löwis11437992002-04-12 09:54:03 +00007356
7357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007358$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007359
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007360
Guido van Rossum627b2d71993-12-24 10:39:16 +00007361fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007362rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7365$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007366
Neal Norwitz11690112002-07-30 01:08:28 +00007367# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7369$as_echo_n "checking for makedev... " >&6; }
7370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007371/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007372
7373#if defined(MAJOR_IN_MKDEV)
7374#include <sys/mkdev.h>
7375#elif defined(MAJOR_IN_SYSMACROS)
7376#include <sys/sysmacros.h>
7377#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007378#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007379#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007380int
7381main ()
7382{
7383 makedev(0, 0)
7384 ;
7385 return 0;
7386}
7387_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007388if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007389 ac_cv_has_makedev=yes
7390else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007392fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007393rm -f core conftest.err conftest.$ac_objext \
7394 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007395if test "$ac_cv_has_makedev" = "no"; then
7396 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007398/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007399
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007400#define _OSF_SOURCE 1
7401#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007402
Neal Norwitz11690112002-07-30 01:08:28 +00007403int
7404main ()
7405{
7406 makedev(0, 0)
7407 ;
7408 return 0;
7409}
7410_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007411if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007412 ac_cv_has_makedev=yes
7413else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007414 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007416rm -f core conftest.err conftest.$ac_objext \
7417 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007418 if test "$ac_cv_has_makedev" = "yes"; then
7419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007421
7422 fi
7423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7425$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007426if test "$ac_cv_has_makedev" = "yes"; then
7427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007429
7430fi
7431
Martin v. Löwis399a6892002-10-04 10:22:02 +00007432# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7433# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7434# defined, but the compiler does not support pragma redefine_extname,
7435# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7436# structures (such as rlimit64) without declaring them. As a
7437# work-around, disable LFS on such configurations
7438
7439use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7441$as_echo_n "checking Solaris LFS bug... " >&6; }
7442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007443/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007444
7445#define _LARGEFILE_SOURCE 1
7446#define _FILE_OFFSET_BITS 64
7447#include <sys/resource.h>
7448
Martin v. Löwis399a6892002-10-04 10:22:02 +00007449int
7450main ()
7451{
7452struct rlimit foo;
7453 ;
7454 return 0;
7455}
7456_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007458 sol_lfs_bug=no
7459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007460 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7464$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007465if test "$sol_lfs_bug" = "yes"; then
7466 use_lfs=no
7467fi
7468
7469if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007470# Two defines needed to enable largefile support on various platforms
7471# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007472case $ac_sys_system/$ac_sys_release in
7473AIX*)
7474
7475$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7476
7477 ;;
7478esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007480$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007481
7482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007484
Martin v. Löwis399a6892002-10-04 10:22:02 +00007485fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007486
Guido van Rossum84e7b241996-08-19 21:59:00 +00007487# Add some code to confdefs.h so that the test for off_t works on SCO
7488cat >> confdefs.h <<\EOF
7489#if defined(SCO_DS)
7490#undef _OFF_T
7491#endif
7492EOF
7493
Guido van Rossumef2255b2000-03-10 22:30:29 +00007494# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007495ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007497
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007498else
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
7500cat >>confdefs.h <<_ACEOF
7501#define mode_t int
7502_ACEOF
7503
7504fi
7505
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007506ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007507if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007508
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007509else
Martin v. Löwis11437992002-04-12 09:54:03 +00007510
7511cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007513_ACEOF
7514
7515fi
7516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007518if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007519
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520else
Martin v. Löwis11437992002-04-12 09:54:03 +00007521
7522cat >>confdefs.h <<_ACEOF
7523#define pid_t int
7524_ACEOF
7525
7526fi
7527
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007528
Martin v. Löwis11437992002-04-12 09:54:03 +00007529cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007530#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007534if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007536else
Martin v. Löwis11437992002-04-12 09:54:03 +00007537
7538cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007539#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007540_ACEOF
7541
7542fi
7543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7545$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007546if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007547 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007550/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007551#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007552
7553_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007555 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007556 ac_cv_type_uid_t=yes
7557else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007558 ac_cv_type_uid_t=no
7559fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007560rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007561
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7564$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007565if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007567$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007568
7569
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007571
7572fi
7573
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007574
7575# There are two separate checks for each of the exact-width integer types we
7576# need. First we check whether the type is available using the usual
7577# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7578# and <stdint.h> where available). We then also use the special type checks of
7579# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7580# directly, #define's uint32_t to be a suitable type.
7581
7582ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7583if test "x$ac_cv_type_uint32_t" = xyes; then :
7584
7585$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7586
7587fi
7588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007589ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7590case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007591 no|yes) ;; #(
7592 *)
7593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007594$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007595
7596
7597cat >>confdefs.h <<_ACEOF
7598#define uint32_t $ac_cv_c_uint32_t
7599_ACEOF
7600;;
7601 esac
7602
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007603
7604ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7605if test "x$ac_cv_type_uint64_t" = xyes; then :
7606
7607$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7608
7609fi
7610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007611ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7612case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007613 no|yes) ;; #(
7614 *)
7615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007616$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007617
7618
7619cat >>confdefs.h <<_ACEOF
7620#define uint64_t $ac_cv_c_uint64_t
7621_ACEOF
7622;;
7623 esac
7624
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007625
7626ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7627if test "x$ac_cv_type_int32_t" = xyes; then :
7628
7629$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7630
7631fi
7632
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7634case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007635 no|yes) ;; #(
7636 *)
7637
7638cat >>confdefs.h <<_ACEOF
7639#define int32_t $ac_cv_c_int32_t
7640_ACEOF
7641;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007642esac
7643
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007644
7645ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7646if test "x$ac_cv_type_int64_t" = xyes; then :
7647
7648$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7649
7650fi
7651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7653case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007654 no|yes) ;; #(
7655 *)
7656
7657cat >>confdefs.h <<_ACEOF
7658#define int64_t $ac_cv_c_int64_t
7659_ACEOF
7660;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007661esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007662
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007663
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007665if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007666
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007668
7669fi
7670
Jack Jansendd19cf82001-12-06 22:36:17 +00007671
Michael W. Hudson54241132001-12-07 15:38:26 +00007672# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007673# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674# The cast to long int works around a bug in the HP C Compiler
7675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7677# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7679$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007680if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007681 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683 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 +00007684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007686 if test "$ac_cv_type_int" = yes; then
7687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007689as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007690See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007691 else
7692 ac_cv_sizeof_int=0
7693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7698$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007699
7700
7701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007703#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007704_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007705
7706
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707# The cast to long int works around a bug in the HP C Compiler
7708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7710# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7712$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007713if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007715else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007716 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 +00007717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007719 if test "$ac_cv_type_long" = yes; then
7720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007722as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007723See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007724 else
7725 ac_cv_sizeof_long=0
7726 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007727fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7731$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007732
7733
7734
Martin v. Löwis11437992002-04-12 09:54:03 +00007735cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007736#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007737_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007738
7739
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740# The cast to long int works around a bug in the HP C Compiler
7741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7743# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7745$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007746if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007747 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749 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 +00007750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007752 if test "$ac_cv_type_void_p" = yes; then
7753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007755as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007756See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 else
7758 ac_cv_sizeof_void_p=0
7759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7764$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765
7766
7767
Martin v. Löwis11437992002-04-12 09:54:03 +00007768cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007769#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007770_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007771
7772
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773# The cast to long int works around a bug in the HP C Compiler
7774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7776# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7778$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007779if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007782 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 +00007783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007785 if test "$ac_cv_type_short" = yes; then
7786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007788as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007789See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007790 else
7791 ac_cv_sizeof_short=0
7792 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007793fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7797$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007798
7799
7800
Martin v. Löwis11437992002-04-12 09:54:03 +00007801cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007802#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007803_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007804
7805
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806# The cast to long int works around a bug in the HP C Compiler
7807# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7808# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7809# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7811$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007812if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007813 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007815 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 +00007816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007818 if test "$ac_cv_type_float" = yes; then
7819 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007821as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007822See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823 else
7824 ac_cv_sizeof_float=0
7825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7830$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007831
7832
7833
Martin v. Löwis11437992002-04-12 09:54:03 +00007834cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007835#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007836_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007837
7838
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839# The cast to long int works around a bug in the HP C Compiler
7840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7842# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7844$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007845if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007848 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 +00007849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007851 if test "$ac_cv_type_double" = yes; then
7852 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007854as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007855See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856 else
7857 ac_cv_sizeof_double=0
7858 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7863$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007864
7865
7866
Martin v. Löwis11437992002-04-12 09:54:03 +00007867cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007868#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007869_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870
7871
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872# The cast to long int works around a bug in the HP C Compiler
7873# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7874# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7875# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7877$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007878if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007879 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881 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 +00007882
Martin v. Löwis11437992002-04-12 09:54:03 +00007883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884 if test "$ac_cv_type_fpos_t" = yes; then
7885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007887as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007888See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889 else
7890 ac_cv_sizeof_fpos_t=0
7891 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007892fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007893
Martin v. Löwis11437992002-04-12 09:54:03 +00007894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7896$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897
7898
7899
Martin v. Löwis11437992002-04-12 09:54:03 +00007900cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007901#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007902_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007903
Michael W. Hudson54241132001-12-07 15:38:26 +00007904
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905# The cast to long int works around a bug in the HP C Compiler
7906# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7907# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7908# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7910$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007911if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914 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 +00007915
Martin v. Löwis18e16552006-02-15 17:27:45 +00007916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007917 if test "$ac_cv_type_size_t" = yes; then
7918 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007920as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007921See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007922 else
7923 ac_cv_sizeof_size_t=0
7924 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007926
Martin v. Löwis18e16552006-02-15 17:27:45 +00007927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7929$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007930
7931
7932
Martin v. Löwis18e16552006-02-15 17:27:45 +00007933cat >>confdefs.h <<_ACEOF
7934#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7935_ACEOF
7936
7937
Christian Heimes951cc0f2008-01-31 23:08:23 +00007938# The cast to long int works around a bug in the HP C Compiler
7939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7941# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7943$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007944if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007947 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 +00007948
Christian Heimes951cc0f2008-01-31 23:08:23 +00007949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950 if test "$ac_cv_type_pid_t" = yes; then
7951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007953as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007954See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007955 else
7956 ac_cv_sizeof_pid_t=0
7957 fi
7958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959
Christian Heimes951cc0f2008-01-31 23:08:23 +00007960fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7962$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007963
7964
7965
7966cat >>confdefs.h <<_ACEOF
7967#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7968_ACEOF
7969
7970
Michael W. Hudson54241132001-12-07 15:38:26 +00007971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7973$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007974have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007976/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978int
7979main ()
7980{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
7988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007989$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007990
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007991 have_long_long=yes
7992
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7996$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007997if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007998# The cast to long int works around a bug in the HP C Compiler
7999# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8000# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8001# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8003$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008004if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008005 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008007 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 +00008008
Martin v. Löwis11437992002-04-12 09:54:03 +00008009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008010 if test "$ac_cv_type_long_long" = yes; then
8011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008013as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008014See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015 else
8016 ac_cv_sizeof_long_long=0
8017 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019
Martin v. Löwis11437992002-04-12 09:54:03 +00008020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8022$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023
8024
8025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008027#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008028_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008029
Michael W. Hudson54241132001-12-07 15:38:26 +00008030
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008031fi
8032
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8034$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008035have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008037/* end confdefs.h. */
8038
8039int
8040main ()
8041{
Matthias Klosec511b472010-05-08 11:01:39 +00008042long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008043 ;
8044 return 0;
8045}
8046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008048
8049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008050$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008051
8052 have_long_double=yes
8053
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008054fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8057$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008058if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008059# The cast to long int works around a bug in the HP C Compiler
8060# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8061# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8062# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8064$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008065if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068 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 +00008069
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008071 if test "$ac_cv_type_long_double" = yes; then
8072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008074as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008075See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008076 else
8077 ac_cv_sizeof_long_double=0
8078 fi
8079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008080
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8083$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008084
8085
8086
8087cat >>confdefs.h <<_ACEOF
8088#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8089_ACEOF
8090
8091
8092fi
8093
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8095$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008096have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008098/* end confdefs.h. */
8099
8100int
8101main ()
8102{
8103_Bool x; x = (_Bool)0;
8104 ;
8105 return 0;
8106}
8107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008109
8110
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008112
8113 have_c99_bool=yes
8114
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8118$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008119if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120# The cast to long int works around a bug in the HP C Compiler
8121# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8122# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8123# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8125$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008126if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008127 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008129 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 +00008130
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008131else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008132 if test "$ac_cv_type__Bool" = yes; then
8133 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008135as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008136See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008137 else
8138 ac_cv_sizeof__Bool=0
8139 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8144$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008145
8146
8147
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008148cat >>confdefs.h <<_ACEOF
8149#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8150_ACEOF
8151
8152
8153fi
8154
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155ac_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 +00008156 #include <stdint.h>
8157 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008158 #ifdef HAVE_INTTYPES_H
8159 #include <inttypes.h>
8160 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008162if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008163
8164cat >>confdefs.h <<_ACEOF
8165#define HAVE_UINTPTR_T 1
8166_ACEOF
8167
Martin v. Löwiseba40652007-08-30 20:10:57 +00008168# The cast to long int works around a bug in the HP C Compiler
8169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8171# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8173$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008174if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008175 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008176else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008177 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 +00008178
Martin v. Löwis11437992002-04-12 09:54:03 +00008179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180 if test "$ac_cv_type_uintptr_t" = yes; then
8181 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8182$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008183as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008184See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185 else
8186 ac_cv_sizeof_uintptr_t=0
8187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8192$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008193
8194
8195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008197#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008198_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008199
Michael W. Hudson54241132001-12-07 15:38:26 +00008200
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008201fi
8202
Martin v. Löwisebe26702006-10-02 14:55:51 +00008203
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008204# The cast to long int works around a bug in the HP C Compiler
8205# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8206# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8207# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8209$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008210if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008211 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008213 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008214#ifdef HAVE_SYS_TYPES_H
8215#include <sys/types.h>
8216#endif
8217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008218"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008219
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008221 if test "$ac_cv_type_off_t" = yes; then
8222 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008224as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008225See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008226 else
8227 ac_cv_sizeof_off_t=0
8228 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008231fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8233$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008235
8236
Martin v. Löwis11437992002-04-12 09:54:03 +00008237cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008238#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008239_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008240
Michael W. Hudson54241132001-12-07 15:38:26 +00008241
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8244$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008245if test "$have_long_long" = yes
8246then
8247if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008248 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8253$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8256$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008257fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008258else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008261fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008262
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008263# The cast to long int works around a bug in the HP C Compiler
8264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8266# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8268$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008269if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008270 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008273#ifdef HAVE_SYS_TYPES_H
8274#include <sys/types.h>
8275#endif
8276#ifdef HAVE_TIME_H
8277#include <time.h>
8278#endif
8279
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008281
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008283 if test "$ac_cv_type_time_t" = yes; then
8284 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008286as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008287See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008288 else
8289 ac_cv_sizeof_time_t=0
8290 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008291fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008292
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008293fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8295$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008297
8298
Martin v. Löwis11437992002-04-12 09:54:03 +00008299cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008300#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008301_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008302
Michael W. Hudson54241132001-12-07 15:38:26 +00008303
8304
Trent Mick635f6fb2000-08-23 21:33:05 +00008305# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008306ac_save_cc="$CC"
8307if test "$ac_cv_kpthread" = "yes"
8308then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008309elif test "$ac_cv_kthread" = "yes"
8310then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008311elif test "$ac_cv_pthread" = "yes"
8312then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008313fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8315$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008316have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008318/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008319
8320 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008321int
8322main ()
8323{
Guido van Rossum12580492000-09-24 16:47:19 +00008324pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008325 ;
8326 return 0;
8327}
Matthias Klosec511b472010-05-08 11:01:39 +00008328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008331 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8335$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008336if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008337 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008338# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8339# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8340# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8342$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008343if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008344 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008346 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008347#ifdef HAVE_PTHREAD_H
8348#include <pthread.h>
8349#endif
8350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008351"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008352
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008354 if test "$ac_cv_type_pthread_t" = yes; then
8355 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008357as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008358See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008359 else
8360 ac_cv_sizeof_pthread_t=0
8361 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363
Trent Mick635f6fb2000-08-23 21:33:05 +00008364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8366$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008367
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008368
8369
Martin v. Löwis11437992002-04-12 09:54:03 +00008370cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008371#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008372_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008373
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008374
Trent Mick635f6fb2000-08-23 21:33:05 +00008375fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008376CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8379$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008380# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008381if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008382 enableval=$enable_toolbox_glue;
8383fi
Jack Jansene578a632001-08-15 01:27:14 +00008384
8385
8386if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008387then
Jack Jansene578a632001-08-15 01:27:14 +00008388 case $ac_sys_system/$ac_sys_release in
8389 Darwin/*)
8390 enable_toolbox_glue="yes";;
8391 *)
8392 enable_toolbox_glue="no";;
8393 esac
8394fi
8395case "$enable_toolbox_glue" in
8396yes)
Jack Jansene578a632001-08-15 01:27:14 +00008397 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008398 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008400$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008401
8402 ;;
8403*)
Jack Jansene578a632001-08-15 01:27:14 +00008404 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008405 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008406 ;;
8407esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8409$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008410
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008411
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008412
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008413case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008414 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008415 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8416 ;;
8417 Darwin/*)
8418 OTHER_LIBTOOL_OPT=""
8419 ;;
8420esac
8421
8422
Ronald Oussoren25967582009-09-06 10:00:26 +00008423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008424case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008425 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008426 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8427 if test "${enable_universalsdk}"; then
8428 :
8429 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008430 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008431 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008432 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008433 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008434 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008435 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008436 if test ${gcc_version} '<' 4.0
8437 then
8438 LIBTOOL_CRUFT="-lcc_dynamic"
8439 else
8440 LIBTOOL_CRUFT=""
8441 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008443 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008446/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008447
Ronald Oussoren25967582009-09-06 10:00:26 +00008448 #include <unistd.h>
8449 int main(int argc, char*argv[])
8450 {
8451 if (sizeof(long) == 4) {
8452 return 0;
8453 } else {
8454 return 1;
8455 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008456 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008457
Ronald Oussoren25967582009-09-06 10:00:26 +00008458_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008460 ac_osx_32bit=yes
8461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008463fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8465 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008466fi
8467
8468
Ronald Oussoren25967582009-09-06 10:00:26 +00008469 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008470 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008471 i386)
8472 MACOSX_DEFAULT_ARCH="i386"
8473 ;;
8474 ppc)
8475 MACOSX_DEFAULT_ARCH="ppc"
8476 ;;
8477 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008478 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008479 ;;
8480 esac
8481 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008482 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008483 i386)
8484 MACOSX_DEFAULT_ARCH="x86_64"
8485 ;;
8486 ppc)
8487 MACOSX_DEFAULT_ARCH="ppc64"
8488 ;;
8489 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008490 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008491 ;;
8492 esac
8493
Ronald Oussoren25967582009-09-06 10:00:26 +00008494 fi
8495
8496 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008499esac
8500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8502$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008503if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008504then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008505 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008507 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008508
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008509$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8512$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008513 if test $enable_shared = "yes"
8514 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008515 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 +00008516 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008520fi
8521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8523$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008524case $ac_sys_system/$ac_sys_release in
8525 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008528
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8530$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008531 ;;
8532 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8534$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008535 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008536esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008537
Guido van Rossum0a516c91994-09-12 10:58:40 +00008538# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008539
Michael W. Hudson54241132001-12-07 15:38:26 +00008540
8541
8542
8543
Ronald Oussoren75912852010-04-08 08:13:31 +00008544
Guido van Rossum0a516c91994-09-12 10:58:40 +00008545# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008546# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8548$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008549if test -z "$SO"
8550then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008551 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008552 hp*|HP*)
8553 case `uname -m` in
8554 ia64) SO=.so;;
8555 *) SO=.sl;;
8556 esac
8557 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008558 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008559 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008561else
8562 # this might also be a termcap variable, see #610332
8563 echo
8564 echo '====================================================================='
8565 echo '+ +'
8566 echo '+ WARNING: You have set SO in your environment. +'
8567 echo '+ Do you really mean to change the extension for shared libraries? +'
8568 echo '+ Continuing in 10 seconds to let you to ponder. +'
8569 echo '+ +'
8570 echo '====================================================================='
8571 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008572fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8574$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008575
Ronald Oussoren79f90492009-01-02 10:44:46 +00008576
Neal Norwitz58e28882006-05-19 07:00:58 +00008577cat >>confdefs.h <<_ACEOF
8578#define SHLIB_EXT "$SO"
8579_ACEOF
8580
Guido van Rossum0a516c91994-09-12 10:58:40 +00008581# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008582# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008583# (Shared libraries in this instance are shared modules to be loaded into
8584# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8586$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008587if test -z "$LDSHARED"
8588then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008589 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008590 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008591 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008592 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008593 ;;
8594 BeOS*)
8595 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008596 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008597 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008598 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008599 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008600 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008601 if test "$GCC" = "yes" ; then
8602 LDSHARED='$(CC) -shared'
8603 LDCXXSHARED='$(CXX) -shared'
8604 else
8605 LDSHARED='$(CC) -G'
8606 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008607 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008608 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008609 if test "$GCC" = "yes" ; then
8610 LDSHARED='$(CC) -shared'
8611 LDCXXSHARED='$(CXX) -shared'
8612 else
8613 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008614 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008615 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008616 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008617 LDSHARED='$(CC) -bundle'
8618 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008619 if test "$enable_framework" ; then
8620 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008621 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8622 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008623 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008624 else
8625 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008626 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008627 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008628 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008629 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008630 LDSHARED='$(CC) -bundle'
8631 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008632 if test "$enable_framework" ; then
8633 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008634 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8635 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008636 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008637 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008638 # No framework, use the Python app as bundle-loader
8639 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008640 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008641 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008642 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008643 Darwin/*)
8644 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8645 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008646
Ned Deilyc40b9032014-06-25 13:48:46 -07008647 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8648 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8649 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8650 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8651 if test ${dep_target_major} -eq 10 && \
8652 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008653 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008654 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008655 LDSHARED='$(CC) -bundle'
8656 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008657 if test "$enable_framework" ; then
8658 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008659 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8660 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008661 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008662 else
8663 # No framework, use the Python app as bundle-loader
8664 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8665 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008666 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008667 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008668 else
8669 # building for OS X 10.3 and later
Ned Deilyc40b9032014-06-25 13:48:46 -07008670 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8671 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8672 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008673 fi
8674 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008675 Linux*|GNU*|QNX*)
8676 LDSHARED='$(CC) -shared'
8677 LDCXXSHARED='$(CXX) -shared';;
8678 BSD/OS*/4*)
8679 LDSHARED="gcc -shared"
8680 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008681 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008682 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008683 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008684 LDSHARED='$(CC) -shared'
8685 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008686 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008687 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008688 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008689 OpenBSD*)
8690 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8691 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008692 LDSHARED='$(CC) -shared $(CCSHARED)'
8693 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008694 else
8695 case `uname -r` in
8696 [01].* | 2.[0-7] | 2.[0-7].*)
8697 LDSHARED="ld -Bshareable ${LDFLAGS}"
8698 ;;
8699 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008700 LDSHARED='$(CC) -shared $(CCSHARED)'
8701 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008702 ;;
8703 esac
8704 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008705 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008706 LDSHARED='$(CC) -shared'
8707 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008708 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008709 if test "$GCC" = "yes" ; then
8710 LDSHARED='$(CC) -shared'
8711 LDCXXSHARED='$(CXX) -shared'
8712 else
8713 LDSHARED='$(CC) -G'
8714 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008715 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008716 SCO_SV*)
8717 LDSHARED='$(CC) -Wl,-G,-Bexport'
8718 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8719 CYGWIN*)
8720 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8721 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8722 atheos*)
8723 LDSHARED="gcc -shared"
8724 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725 *) LDSHARED="ld";;
8726 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008727fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8729$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008730LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008731BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008732# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008733# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8735$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008736if test -z "$CCSHARED"
8737then
Guido van Rossum07397971997-04-29 21:49:50 +00008738 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008739 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008740 then CCSHARED="-fPIC";
8741 elif test `uname -p` = sparc;
8742 then CCSHARED="-xcode=pic32";
8743 else CCSHARED="-Kpic";
8744 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008745 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008746 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008747 else CCSHARED="+z";
8748 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008749 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008750 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008751 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008752 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008753 if test "$GCC" = "yes"
8754 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008755 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008756 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008757 SCO_SV*)
8758 if test "$GCC" = "yes"
8759 then CCSHARED="-fPIC"
8760 else CCSHARED="-Kpic -belf"
8761 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008762 IRIX*/6*) case $CC in
8763 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008764 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008765 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008766 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008767 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008768fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8770$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008771# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008772# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8774$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008775if test -z "$LINKFORSHARED"
8776then
Guido van Rossum07397971997-04-29 21:49:50 +00008777 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008778 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008779 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008780 LINKFORSHARED="-Wl,-E -Wl,+s";;
8781# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008782 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008783 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008784 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008785 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008786 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8787 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008788 # not used by the core itself but which needs to be in the core so
8789 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008790 # -prebind is no longer used, because it actually seems to give a
8791 # slowdown in stead of a speedup, maybe due to the large number of
8792 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008793
8794 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008795 if test "$enable_framework"
8796 then
Jack Jansenda49e192005-01-07 13:08:22 +00008797 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008798 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008799 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008800 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008801 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008802 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008803 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008804 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8805 then
8806 LINKFORSHARED="-Wl,--export-dynamic"
8807 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008808 SunOS/5*) case $CC in
8809 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008810 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008811 then
8812 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008813 fi;;
8814 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008815 CYGWIN*)
8816 if test $enable_shared = "no"
8817 then
8818 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8819 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008820 QNX*)
8821 # -Wl,-E causes the symbols to be added to the dynamic
8822 # symbol table so that they can be found when a module
8823 # is loaded. -N 2048K causes the stack size to be set
8824 # to 2048 kilobytes so that the stack doesn't overflow
8825 # when running test_compile.py.
8826 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008827 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8830$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008831
Michael W. Hudson54241132001-12-07 15:38:26 +00008832
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008833
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8835$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008836if test ! "$LIBRARY" = "$LDLIBRARY"
8837then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008838 case $ac_sys_system in
8839 CYGWIN*)
8840 # Cygwin needs CCSHARED when building extension DLLs
8841 # but not when building the interpreter DLL.
8842 CFLAGSFORSHARED='';;
8843 *)
8844 CFLAGSFORSHARED='$(CCSHARED)'
8845 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8848$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008849
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008850# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8851# library (with --enable-shared).
8852# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008853# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8854# if it is not required, since it creates a dependency of the shared library
8855# to LIBS. This, in turn, means that applications linking the shared libpython
8856# don't need to link LIBS explicitly. The default should be only changed
8857# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008858
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8860$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008861case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008862 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008863 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008864esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8866$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008867
8868
Guido van Rossum627b2d71993-12-24 10:39:16 +00008869# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8871$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008872if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008873 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008874else
Martin v. Löwis11437992002-04-12 09:54:03 +00008875 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008876LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008878/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008879
Martin v. Löwiseba40652007-08-30 20:10:57 +00008880/* Override any GCC internal prototype to avoid an error.
8881 Use char because int might match the return type of a GCC
8882 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008883#ifdef __cplusplus
8884extern "C"
8885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008886char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008887int
8888main ()
8889{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008891 ;
8892 return 0;
8893}
8894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008895if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008899fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900rm -f core conftest.err conftest.$ac_objext \
8901 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008902LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8905$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008906if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 cat >>confdefs.h <<_ACEOF
8908#define HAVE_LIBDL 1
8909_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008910
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008911 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008912
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008913fi
8914 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8916$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008917if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008918 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008919else
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008921LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925/* Override any GCC internal prototype to avoid an error.
8926 Use char because int might match the return type of a GCC
8927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928#ifdef __cplusplus
8929extern "C"
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 ;
8937 return 0;
8938}
8939_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945rm -f core conftest.err conftest.$ac_objext \
8946 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008947LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8950$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008951if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 cat >>confdefs.h <<_ACEOF
8953#define HAVE_LIBDLD 1
8954_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008956 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008957
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008958fi
8959 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008960
Ronald Oussoren79f90492009-01-02 10:44:46 +00008961# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008962if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8964$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008965if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008966 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008967else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008968 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008971
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972/* Override any GCC internal prototype to avoid an error.
8973 Use char because int might match the return type of a GCC
8974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008975#ifdef __cplusplus
8976extern "C"
8977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008978char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008979int
8980main ()
8981{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ;
8984 return 0;
8985}
8986_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987for ac_lib in '' pthread rt posix4; do
8988 if test -z "$ac_lib"; then
8989 ac_res="none required"
8990 else
8991 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008992 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008997rm -f core conftest.err conftest.$ac_objext \
8998 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008999 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00009001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002done
Matthias Klose3cef2a92012-03-14 23:39:33 +01009003if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009004
Martin v. Löwiseba40652007-08-30 20:10:57 +00009005else
9006 ac_cv_search_sem_init=no
9007fi
9008rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009009LIBS=$ac_func_search_save_LIBS
9010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9012$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009013ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009014if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009016
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009017fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009018 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009019 # posix4 on Solaris 2.6
9020 # pthread (first!) on Linux
9021fi
9022
Martin v. Löwis19d17342003-06-14 21:03:05 +00009023# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9025$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009026if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009027 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009028else
9029 ac_check_lib_save_LIBS=$LIBS
9030LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009032/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009033
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034/* Override any GCC internal prototype to avoid an error.
9035 Use char because int might match the return type of a GCC
9036 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009037#ifdef __cplusplus
9038extern "C"
9039#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009040char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009041int
9042main ()
9043{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009045 ;
9046 return 0;
9047}
9048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009050 ac_cv_lib_intl_textdomain=yes
9051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009053fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009054rm -f core conftest.err conftest.$ac_objext \
9055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009056LIBS=$ac_check_lib_save_LIBS
9057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9059$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009060if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009063
9064fi
9065
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009066
9067# checks for system dependent C++ extensions support
9068case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9070$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009072/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009073
Georg Brandl94800df2011-02-25 11:09:02 +00009074 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
9077{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009078loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ;
9080 return 0;
9081}
Matthias Klosec511b472010-05-08 11:01:39 +00009082
Martin v. Löwis11437992002-04-12 09:54:03 +00009083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009084if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009085
Matthias Klosec511b472010-05-08 11:01:39 +00009086
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009088
Matthias Klosec511b472010-05-08 11:01:39 +00009089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009091
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009092else
Matthias Klosec511b472010-05-08 11:01:39 +00009093
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009095$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009096
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009098rm -f core conftest.err conftest.$ac_objext \
9099 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009100 *) ;;
9101esac
9102
Guido van Rossum70c7f481998-03-26 18:44:10 +00009103# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009104# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9106$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009107if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009109else
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009111LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009114
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115/* Override any GCC internal prototype to avoid an error.
9116 Use char because int might match the return type of a GCC
9117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009118#ifdef __cplusplus
9119extern "C"
9120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009121char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009122int
9123main ()
9124{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009125return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 ;
9127 return 0;
9128}
9129_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009132else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009133 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009135rm -f core conftest.err conftest.$ac_objext \
9136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009137LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9140$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009141if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009142 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009143fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009144 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9146$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009147if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009148 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009149else
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009151LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009154
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155/* Override any GCC internal prototype to avoid an error.
9156 Use char because int might match the return type of a GCC
9157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009158#ifdef __cplusplus
9159extern "C"
9160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009161char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009162int
9163main ()
9164{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009166 ;
9167 return 0;
9168}
9169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009175rm -f core conftest.err conftest.$ac_objext \
9176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009177LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9180$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009181if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009182 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009183fi
9184 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009185
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009186case "$ac_sys_system" in
9187BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9189$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009190if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009192else
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009194LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009197
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198/* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009201#ifdef __cplusplus
9202extern "C"
9203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009204char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009205int
9206main ()
9207{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009208return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ;
9210 return 0;
9211}
9212_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009216 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009220LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009221fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9223$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009224if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009225 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009226fi
9227 # BeOS
9228;;
9229esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9232$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009233
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009235if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009236 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9238$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009239LIBS="$withval $LIBS"
9240
9241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244fi
9245
Guido van Rossum7f43da71994-08-01 12:15:30 +00009246
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009247
9248
9249
9250
9251
9252
9253
9254if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9255 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009256 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9257set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9259$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009260if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009261 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009262else
9263 case $PKG_CONFIG in
9264 [\\/]* | ?:[\\/]*)
9265 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9266 ;;
9267 *)
9268 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9269for as_dir in $PATH
9270do
9271 IFS=$as_save_IFS
9272 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009274 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009275 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009277 break 2
9278 fi
9279done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009280 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009281IFS=$as_save_IFS
9282
9283 ;;
9284esac
9285fi
9286PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9287if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9289$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9292$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009293fi
9294
9295
9296fi
9297if test -z "$ac_cv_path_PKG_CONFIG"; then
9298 ac_pt_PKG_CONFIG=$PKG_CONFIG
9299 # Extract the first word of "pkg-config", so it can be a program name with args.
9300set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9302$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009303if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009305else
9306 case $ac_pt_PKG_CONFIG in
9307 [\\/]* | ?:[\\/]*)
9308 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9309 ;;
9310 *)
9311 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312for as_dir in $PATH
9313do
9314 IFS=$as_save_IFS
9315 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009317 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009318 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009320 break 2
9321 fi
9322done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009324IFS=$as_save_IFS
9325
9326 ;;
9327esac
9328fi
9329ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9330if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9332$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009336fi
9337
9338 if test "x$ac_pt_PKG_CONFIG" = x; then
9339 PKG_CONFIG=""
9340 else
9341 case $cross_compiling:$ac_tool_warned in
9342yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9344$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009345ac_tool_warned=yes ;;
9346esac
9347 PKG_CONFIG=$ac_pt_PKG_CONFIG
9348 fi
9349else
9350 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9351fi
9352
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009353fi
9354if test -n "$PKG_CONFIG"; then
9355 _pkg_min_version=0.9.0
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9357$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9358 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9360$as_echo "yes" >&6; }
9361 else
9362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363$as_echo "no" >&6; }
9364 PKG_CONFIG=""
9365 fi
9366fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009367
9368# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9370$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009371
9372# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009374 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009375else
9376 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009377fi
9378
9379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9381$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009382
9383# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9385$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009386
9387# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009388if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009389 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009390else
9391 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009392fi
9393
9394
9395if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009396 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9397else
9398 LIBFFI_INCLUDEDIR=""
9399fi
9400
9401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9403$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009404
Ned Deilya2a9f572013-10-25 00:30:10 -07009405# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9406
9407
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9409$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9410
9411# Check whether --with-tcltk-includes was given.
9412if test "${with_tcltk_includes+set}" = set; then :
9413 withval=$with_tcltk_includes;
9414else
9415 with_tcltk_includes="default"
9416fi
9417
9418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9419$as_echo "$with_tcltk_includes" >&6; }
9420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9421$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9422
9423# Check whether --with-tcltk-libs was given.
9424if test "${with_tcltk_libs+set}" = set; then :
9425 withval=$with_tcltk_libs;
9426else
9427 with_tcltk_libs="default"
9428fi
9429
9430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9431$as_echo "$with_tcltk_libs" >&6; }
9432if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9433then
9434 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9435 then
9436 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9437 fi
9438 TCLTK_INCLUDES=""
9439 TCLTK_LIBS=""
9440else
9441 TCLTK_INCLUDES="$with_tcltk_includes"
9442 TCLTK_LIBS="$with_tcltk_libs"
9443fi
9444
Benjamin Peterson867475c2009-04-29 20:36:25 +00009445# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9447$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009448
9449# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009451 withval=$with_dbmliborder;
9452if test x$with_dbmliborder = xyes
9453then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009454as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009455else
9456 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9457 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9458 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009459 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009460 fi
9461 done
9462fi
9463fi
9464
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9466$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009467
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009468# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009469
9470
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9472$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009473
Martin v. Löwiseba40652007-08-30 20:10:57 +00009474# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009475if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476 withval=$with_signal_module;
9477fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009478
9479
9480if test -z "$with_signal_module"
9481then with_signal_module="yes"
9482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9484$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009485
9486if test "${with_signal_module}" = "yes"; then
9487 USE_SIGNAL_MODULE=""
9488 SIGNAL_OBJS=""
9489else
9490 USE_SIGNAL_MODULE="#"
9491 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9492fi
9493
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009494# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009495
Barry Warsawc0d24d82000-06-29 16:12:00 +00009496USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9499$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
Guido van Rossumec2f0731997-01-22 20:54:01 +00009501
Martin v. Löwiseba40652007-08-30 20:10:57 +00009502# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009504 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9506$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009507LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009508if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009509 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009510fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009514fi
9515
Martin v. Löwis11437992002-04-12 09:54:03 +00009516
9517# Templates for things AC_DEFINEd more than once.
9518# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009519
9520
Martin v. Löwis11437992002-04-12 09:54:03 +00009521
9522
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9524$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Martin v. Löwiseba40652007-08-30 20:10:57 +00009526# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009527if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009528 withval=$with_threads;
9529fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009530
9531
Barry Warsawc0d24d82000-06-29 16:12:00 +00009532# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009533
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009535if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009536 withval=$with_thread; with_threads=$with_thread
9537fi
9538
Barry Warsawc0d24d82000-06-29 16:12:00 +00009539
9540if test -z "$with_threads"
9541then with_threads="yes"
9542fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9544$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009545
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009546
Barry Warsawc0d24d82000-06-29 16:12:00 +00009547if test "$with_threads" = "no"
9548then
9549 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009550elif test "$ac_cv_pthread_is_default" = yes
9551then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009553
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009554 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009555 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009556
9557 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009559elif test "$ac_cv_kpthread" = "yes"
9560then
9561 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009562 if test "$ac_cv_cxx_thread" = "yes"; then
9563 CXX="$CXX -Kpthread"
9564 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009567 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009568 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009569elif test "$ac_cv_kthread" = "yes"
9570then
9571 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009572 if test "$ac_cv_cxx_thread" = "yes"; then
9573 CXX="$CXX -Kthread"
9574 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009576
9577 posix_threads=yes
9578 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009579elif test "$ac_cv_pthread" = "yes"
9580then
9581 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009582 if test "$ac_cv_cxx_thread" = "yes"; then
9583 CXX="$CXX -pthread"
9584 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009586
9587 posix_threads=yes
9588 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009589else
9590 if test ! -z "$with_threads" -a -d "$with_threads"
9591 then LDFLAGS="$LDFLAGS -L$with_threads"
9592 fi
9593 if test ! -z "$withval" -a -d "$withval"
9594 then LDFLAGS="$LDFLAGS -L$withval"
9595 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009596
9597 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009598 # define _POSIX_THREADS in unistd.h. Some apparently don't
9599 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9601$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009603/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009604
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009605#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009606#ifdef _POSIX_THREADS
9607yes
9608#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009609
9610_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009613 unistd_defines_pthreads=yes
9614else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009615 unistd_defines_pthreads=no
9616fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009617rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009618
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9620$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009621
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009623
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009624 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009625if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009627
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009628 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009629
Martin v. Löwis11437992002-04-12 09:54:03 +00009630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009632
9633 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009634 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009635else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009636
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637 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 +01009638if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009642
Martin v. Löwis11437992002-04-12 09:54:03 +00009643
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009645
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009646 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009647else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009648
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9650$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653if test "${with_pth+set}" = set; then :
9654 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9655$as_echo "$withval" >&6; }
9656 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009657
9658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009660
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009661 LIBS="-lpth $LIBS"
9662 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009666
9667 # Just looking for pthread_create in libpthread is not enough:
9668 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9669 # So we really have to include pthread.h, and then link.
9670 _libs=$LIBS
9671 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9673$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009675/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009676
9677#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009678#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009679
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009680void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
9683{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009684
9685pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ;
9687 return 0;
9688}
9689_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9693$as_echo "yes" >&6; }
9694 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009695
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009696 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009697 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009700 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009701 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009702if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009704
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009705 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009706 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009707else
Guido van Rossumad678af1998-10-02 14:42:15 +00009708
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709 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 +01009710if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009712
9713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009715
9716 THREADOBJ="Python/thread.o"
9717else
9718
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009719 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 +01009720if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009721 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
9723
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009725
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009726 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009727else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009728
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9730$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009731if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009732 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009733else
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009735LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009738
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739/* Override any GCC internal prototype to avoid an error.
9740 Use char because int might match the return type of a GCC
9741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009742#ifdef __cplusplus
9743extern "C"
9744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009745char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009746int
9747main ()
9748{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009749return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ;
9751 return 0;
9752}
9753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009759rm -f core conftest.err conftest.$ac_objext \
9760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009761LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009762fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9764$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009765if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009766 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009767
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009768 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009769 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009770 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009771else
Greg Steinadf63d62000-07-05 10:38:09 +00009772
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9774$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009775if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009777else
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009779LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783/* Override any GCC internal prototype to avoid an error.
9784 Use char because int might match the return type of a GCC
9785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786#ifdef __cplusplus
9787extern "C"
9788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009789char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009790int
9791main ()
9792{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803rm -f core conftest.err conftest.$ac_objext \
9804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9808$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009809if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009810 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009811
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009812 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009813 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009814 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009815else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009816
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9818$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009819if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009820 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009821else
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009823LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009826
Martin v. Löwiseba40652007-08-30 20:10:57 +00009827/* Override any GCC internal prototype to avoid an error.
9828 Use char because int might match the return type of a GCC
9829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830#ifdef __cplusplus
9831extern "C"
9832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009833char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009834int
9835main ()
9836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009838 ;
9839 return 0;
9840}
9841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009842if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009843 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009847rm -f core conftest.err conftest.$ac_objext \
9848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009849LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9852$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009853if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009854 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009855
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009856 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009857 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009858 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009859else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009860
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9862$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009863if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009864 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009865else
Martin v. Löwis11437992002-04-12 09:54:03 +00009866 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009867LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009870
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871/* Override any GCC internal prototype to avoid an error.
9872 Use char because int might match the return type of a GCC
9873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874#ifdef __cplusplus
9875extern "C"
9876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009877char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009878int
9879main ()
9880{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ;
9883 return 0;
9884}
9885_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009888else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891rm -f core conftest.err conftest.$ac_objext \
9892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009893LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9896$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009897if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009898 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009899
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009900 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009901 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009902 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009903else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009904
Martin v. Löwis130fb172001-07-19 11:00:41 +00009905 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009906fi
9907
Guido van Rossum627b2d71993-12-24 10:39:16 +00009908
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009909fi
9910
Guido van Rossum0be3e491997-05-22 20:33:33 +00009911fi
9912
Guido van Rossum49545951997-12-02 19:28:29 +00009913fi
9914
Guido van Rossumb93a8621998-05-07 13:27:32 +00009915fi
9916
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009917
Michael W. Hudson54241132001-12-07 15:38:26 +00009918fi
9919
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009920
9921fi
9922
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924rm -f core conftest.err conftest.$ac_objext \
9925 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009926fi
9927
Martin v. Löwis11437992002-04-12 09:54:03 +00009928fi
9929
9930
9931fi
9932
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009933
Michael W. Hudson54241132001-12-07 15:38:26 +00009934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9936$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009937if ${ac_cv_lib_mpc_usconfig+:} 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="-lmpc $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 usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009952int
9953main ()
9954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955return usconfig ();
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_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 ac_cv_lib_mpc_usconfig=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_mpc_usconfig" >&5
9970$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009971if test "x$ac_cv_lib_mpc_usconfig" = 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öwis130fb172001-07-19 11:00:41 +00009974 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009975 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009976 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009977fi
9978
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009979
Neal Norwitza978ab02002-11-02 16:58:05 +00009980 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9982$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009983if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009985else
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009987LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990
Martin v. Löwiseba40652007-08-30 20:10:57 +00009991/* Override any GCC internal prototype to avoid an error.
9992 Use char because int might match the return type of a GCC
9993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009994#ifdef __cplusplus
9995extern "C"
9996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009997char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009998int
9999main ()
10000{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 ;
10003 return 0;
10004}
10005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011rm -f core conftest.err conftest.$ac_objext \
10012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010013LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10016$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010017if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010019
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010020 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010021 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010022 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010023fi
10024
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010025 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010026
Martin v. Löwis130fb172001-07-19 11:00:41 +000010027 if test "$USE_THREAD_MODULE" != "#"
10028 then
10029 # If the above checks didn't disable threads, (at least) OSF1
10030 # needs this '-threads' argument during linking.
10031 case $ac_sys_system in
10032 OSF1) LDLAST=-threads;;
10033 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010034 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010035fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010036
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010037if test "$posix_threads" = "yes"; then
10038 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010041
10042 fi
10043
10044 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10045 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010046 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010048
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010049 ;;
10050 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010052
10053 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010054 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010056
10057 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010058 esac
10059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10061$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010062 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010063 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010065 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010066 ac_cv_pthread_system_supported=no
10067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010069/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010070
10071 #include <stdio.h>
10072 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010073 void *foo(void *parm) {
10074 return NULL;
10075 }
10076 main() {
10077 pthread_attr_t attr;
10078 pthread_t id;
10079 if (pthread_attr_init(&attr)) exit(-1);
10080 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10081 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10082 exit(0);
10083 }
10084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086 ac_cv_pthread_system_supported=yes
10087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010088 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010092fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010093
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094
Guido van Rossum627b2d71993-12-24 10:39:16 +000010095fi
10096
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10098$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010099 if test "$ac_cv_pthread_system_supported" = "yes"; then
10100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010102
10103 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010104 for ac_func in pthread_sigmask
10105do :
10106 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010107if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010108 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010109#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010110_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010111 case $ac_sys_system in
10112 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010114$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010115
10116 ;;
10117 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010118fi
10119done
10120
Christian Heimes0d604cf2013-08-21 13:26:05 +020010121 for ac_func in pthread_atfork
10122do :
10123 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10124if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10125 cat >>confdefs.h <<_ACEOF
10126#define HAVE_PTHREAD_ATFORK 1
10127_ACEOF
10128
10129fi
10130done
10131
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010132fi
10133
10134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10138$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010139# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010140if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010141 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010142 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10144$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010145 ipv6=no
10146 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010147 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10148$as_echo "yes" >&6; }
10149 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010150
10151 ipv6=yes
10152 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010153 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010154else
Martin v. Löwis11437992002-04-12 09:54:03 +000010155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010157/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158 /* AF_INET6 available check */
10159#include <sys/types.h>
10160#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010161int
10162main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010164int domain = AF_INET6;
10165 ;
10166 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010167}
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010169if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10172$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010173 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010174
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010175else
Matthias Klosec511b472010-05-08 11:01:39 +000010176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10178$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010181fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010184if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10186$as_echo_n "checking if RFC2553 API is available... " >&6; }
10187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010188/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010189
10190 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010191#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010192int
10193main ()
10194{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010195struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010196 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 ;
10198 return 0;
10199}
Matthias Klosec511b472010-05-08 11:01:39 +000010200
Martin v. Löwis11437992002-04-12 09:54:03 +000010201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010203
10204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010206 ipv6=yes
10207
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010208else
Matthias Klosec511b472010-05-08 11:01:39 +000010209
10210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010211$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010212 ipv6=no
10213
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010216fi
10217
10218if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010220
10221fi
10222
Martin v. Löwiseba40652007-08-30 20:10:57 +000010223fi
10224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010225
10226ipv6type=unknown
10227ipv6lib=none
10228ipv6trylibc=no
10229
10230if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10232$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010233 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10234 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235 case $i in
10236 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010238/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010239
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010240#include <netinet/in.h>
10241#ifdef IPV6_INRIA_VERSION
10242yes
10243#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010244_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010246 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010247 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010249rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010250
10251 ;;
10252 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010255
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010256#include <netinet/in.h>
10257#ifdef __KAME__
10258yes
10259#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010260_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010262 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010263 ipv6type=$i;
10264 ipv6lib=inet6
10265 ipv6libdir=/usr/local/v6/lib
10266 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010268rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269
10270 ;;
10271 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010273/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010274
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010275#include <features.h>
10276#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10277yes
10278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010281 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282 ipv6type=$i;
10283 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010285rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286
10287 ;;
10288 linux-inet6)
10289 if test -d /usr/inet6; then
10290 ipv6type=$i
10291 ipv6lib=inet6
10292 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010293 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010294 fi
10295 ;;
10296 solaris)
10297 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010298 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299 ipv6type=$i
10300 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010301 fi
10302 fi
10303 ;;
10304 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010306/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010307
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010308#include <sys/param.h>
10309#ifdef _TOSHIBA_INET6
10310yes
10311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010315 ipv6type=$i;
10316 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010317 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010318fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010319rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010320
10321 ;;
10322 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010324/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010325
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010326#include </usr/local/v6/include/sys/v6config.h>
10327#ifdef __V6D__
10328yes
10329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010330_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010331if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010333 ipv6type=$i;
10334 ipv6lib=v6;
10335 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010336 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010337fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010338rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010339
10340 ;;
10341 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010343/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010344
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010345#include <sys/param.h>
10346#ifdef _ZETA_MINAMI_INET6
10347yes
10348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010349_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010352 ipv6type=$i;
10353 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010354 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010355fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010356rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010357
10358 ;;
10359 esac
10360 if test "$ipv6type" != "unknown"; then
10361 break
10362 fi
10363 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10365$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010366fi
10367
10368if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10369 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10370 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10371 echo "using lib$ipv6lib"
10372 else
10373 if test $ipv6trylibc = "yes"; then
10374 echo "using libc"
10375 else
10376 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10377 echo "You need to fetch lib$ipv6lib.a from appropriate"
10378 echo 'ipv6 kit and compile beforehand.'
10379 exit 1
10380 fi
10381 fi
10382fi
10383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10385$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010387/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010388
10389 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010390int
10391main ()
10392{
10393FSIORefNum fRef = 0
10394 ;
10395 return 0;
10396}
Mark Dickinson0712b562010-05-08 19:13:21 +000010397
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010399if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010400
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10405$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010406
Mark Dickinson0712b562010-05-08 19:13:21 +000010407else
10408
10409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
10411
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010412fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10414
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010415# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10417$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010418
Martin v. Löwiseba40652007-08-30 20:10:57 +000010419# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010421 withval=$with_doc_strings;
10422fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010423
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010424
10425if test -z "$with_doc_strings"
10426then with_doc_strings="yes"
10427fi
10428if test "$with_doc_strings" != "no"
10429then
10430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010431$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010432
10433fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10435$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010436
Neil Schemenauera35c6882001-02-27 04:45:05 +000010437# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10439$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010440
Martin v. Löwiseba40652007-08-30 20:10:57 +000010441# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010443 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010444if test "$withval" != no
10445then
10446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10450$as_echo "yes" >&6; }
10451else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010453fi
10454else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10456$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010457fi
10458
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010459
10460# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10462$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010463
Martin v. Löwiseba40652007-08-30 20:10:57 +000010464# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010465if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010466 withval=$with_pymalloc;
10467fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010468
Neil Schemenauera35c6882001-02-27 04:45:05 +000010469
Neil Schemenauer16c22972002-03-22 15:34:49 +000010470if test -z "$with_pymalloc"
10471then with_pymalloc="yes"
10472fi
10473if test "$with_pymalloc" != "no"
10474then
Martin v. Löwis11437992002-04-12 09:54:03 +000010475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010477
10478fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10480$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010481
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010482# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10484$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010485
10486# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010487if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010488 withval=$with_valgrind;
10489else
10490 with_valgrind=no
10491fi
10492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10494$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010495if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496 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 +010010497if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010499$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010500
10501else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010502 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010503
10504fi
10505
10506
10507fi
10508
Barry Warsawef82cd72000-06-30 16:21:01 +000010509# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10511$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010512
Martin v. Löwiseba40652007-08-30 20:10:57 +000010513# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010514if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010515 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010516if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010517then
10518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10522$as_echo "yes" >&6; }
10523else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10524$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010525fi
10526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10528$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010529fi
10530
Barry Warsawef82cd72000-06-30 16:21:01 +000010531
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010532# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010533
Guido van Rossum98935bf2001-09-05 19:13:16 +000010534DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010535
Guido van Rossume97ee181999-12-20 21:27:22 +000010536# the dlopen() function means we might want to use dynload_shlib.o. some
10537# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010538for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539do :
10540 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010541if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010542 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010543#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010544_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010545
Guido van Rossume97ee181999-12-20 21:27:22 +000010546fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010547done
Guido van Rossume97ee181999-12-20 21:27:22 +000010548
Michael W. Hudson54241132001-12-07 15:38:26 +000010549
Guido van Rossume97ee181999-12-20 21:27:22 +000010550# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10551# loading of modules.
10552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10554$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010555if test -z "$DYNLOADFILE"
10556then
10557 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010558 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10559 if test "$ac_cv_func_dlopen" = yes
10560 then DYNLOADFILE="dynload_shlib.o"
10561 else DYNLOADFILE="dynload_aix.o"
10562 fi
10563 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010564 BeOS*) DYNLOADFILE="dynload_beos.o";;
10565 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010566 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10567 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010568 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010569 *)
10570 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10571 # out any dynamic loading
10572 if test "$ac_cv_func_dlopen" = yes
10573 then DYNLOADFILE="dynload_shlib.o"
10574 else DYNLOADFILE="dynload_stub.o"
10575 fi
10576 ;;
10577 esac
10578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10580$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010581if test "$DYNLOADFILE" != "dynload_stub.o"
10582then
Martin v. Löwis11437992002-04-12 09:54:03 +000010583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010584$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010585
10586fi
10587
Neil Schemenauer4e425612001-06-19 15:44:15 +000010588# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10589
Michael W. Hudson54241132001-12-07 15:38:26 +000010590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10592$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010593if test -z "$MACHDEP_OBJS"
10594then
Jack Jansene578a632001-08-15 01:27:14 +000010595 MACHDEP_OBJS=$extra_machdep_objs
10596else
10597 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010598fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10600$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010601
Guido van Rossum627b2d71993-12-24 10:39:16 +000010602# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010603for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10604 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010605 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10606 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010607 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Peterson69e96912018-09-12 16:31:17 -070010608 initgroups kill killpg lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010609 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010610 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010611 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10612 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010613 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010614 setlocale setregid setreuid setresuid setresgid \
10615 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010616 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010617 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010618 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619do :
10620 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10621ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010622if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010625_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010627fi
10628done
10629
Michael W. Hudson54241132001-12-07 15:38:26 +000010630
Benjamin Peterson69e96912018-09-12 16:31:17 -070010631# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
10632# links. Some libc implementations have a stub lchmod implementation that always
10633# returns an error.
10634if test "$MACHDEP" != linux; then
10635 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
10636if test "x$ac_cv_func_lchmod" = xyes; then :
10637
10638fi
10639
10640fi
10641
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010642# For some functions, having a definition is not sufficient, since
10643# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10645$as_echo_n "checking for chroot... " >&6; }
10646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010648#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010649int
10650main ()
10651{
10652void *x=chroot
10653 ;
10654 return 0;
10655}
10656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010659$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010660
Matthias Klosec511b472010-05-08 11:01:39 +000010661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10665$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010666
10667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10670$as_echo_n "checking for link... " >&6; }
10671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010673#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010674int
10675main ()
10676{
10677void *x=link
10678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010684$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010685
Matthias Klosec511b472010-05-08 11:01:39 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10690$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010691
10692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10695$as_echo_n "checking for symlink... " >&6; }
10696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010698#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010699int
10700main ()
10701{
10702void *x=symlink
10703 ;
10704 return 0;
10705}
10706_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010709$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010710
Matthias Klosec511b472010-05-08 11:01:39 +000010711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010716
10717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10720$as_echo_n "checking for fchdir... " >&6; }
10721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010722/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010723#include <unistd.h>
10724int
10725main ()
10726{
10727void *x=fchdir
10728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010734$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010735
Matthias Klosec511b472010-05-08 11:01:39 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010741
10742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10745$as_echo_n "checking for fsync... " >&6; }
10746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010748#include <unistd.h>
10749int
10750main ()
10751{
10752void *x=fsync
10753 ;
10754 return 0;
10755}
10756_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010759$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010760
Matthias Klosec511b472010-05-08 11:01:39 +000010761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10765$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010766
10767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10770$as_echo_n "checking for fdatasync... " >&6; }
10771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010772/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010773#include <unistd.h>
10774int
10775main ()
10776{
10777void *x=fdatasync
10778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010782if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010784$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010785
Matthias Klosec511b472010-05-08 11:01:39 +000010786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010787$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10790$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010791
10792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10795$as_echo_n "checking for epoll... " >&6; }
10796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010797/* end confdefs.h. */
10798#include <sys/epoll.h>
10799int
10800main ()
10801{
10802void *x=epoll_create
10803 ;
10804 return 0;
10805}
10806_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010810
Matthias Klosec511b472010-05-08 11:01:39 +000010811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10815$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010816
10817fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10820$as_echo_n "checking for kqueue... " >&6; }
10821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010822/* end confdefs.h. */
10823
10824#include <sys/types.h>
10825#include <sys/event.h>
10826
10827int
10828main ()
10829{
10830int x=kqueue()
10831 ;
10832 return 0;
10833}
10834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010835if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010838
Matthias Klosec511b472010-05-08 11:01:39 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010844
10845fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010847# On some systems (eg. FreeBSD 5), we would find a definition of the
10848# functions ctermid_r, setgroups in the library, but no prototype
10849# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10850# address to avoid compiler warnings and potential miscompilations
10851# because of the missing prototypes.
10852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10854$as_echo_n "checking for ctermid_r... " >&6; }
10855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010856/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010857
Martin v. Löwisd5843682002-11-21 20:41:28 +000010858#include <stdio.h>
10859
Martin v. Löwisd5843682002-11-21 20:41:28 +000010860int
10861main ()
10862{
10863void* p = ctermid_r
10864 ;
10865 return 0;
10866}
10867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010868if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010869
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010870$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010871
Matthias Klosec511b472010-05-08 11:01:39 +000010872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010873$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10876$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010877
10878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10880
Antoine Pitroub170f172010-09-10 18:47:36 +000010881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10882$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010883if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010884 $as_echo_n "(cached) " >&6
10885else
10886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010887/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010888#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010889int
10890main ()
10891{
10892void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010893
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010894 ;
10895 return 0;
10896}
10897_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010899 ac_cv_flock_decl=yes
10900else
10901 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010902
10903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010905
Antoine Pitroub170f172010-09-10 18:47:36 +000010906fi
10907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10908$as_echo "$ac_cv_flock_decl" >&6; }
10909if test "x${ac_cv_flock_decl}" = xyes; then
10910 for ac_func in flock
10911do :
10912 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010913if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010914 cat >>confdefs.h <<_ACEOF
10915#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010916_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010917
Antoine Pitrou85729812010-09-07 14:55:24 +000010918else
Antoine Pitroub170f172010-09-10 18:47:36 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010920$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010921if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010922 $as_echo_n "(cached) " >&6
10923else
10924 ac_check_lib_save_LIBS=$LIBS
10925LIBS="-lbsd $LIBS"
10926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10927/* end confdefs.h. */
10928
10929/* Override any GCC internal prototype to avoid an error.
10930 Use char because int might match the return type of a GCC
10931 builtin and then its argument prototype would still apply. */
10932#ifdef __cplusplus
10933extern "C"
10934#endif
10935char flock ();
10936int
10937main ()
10938{
10939return flock ();
10940 ;
10941 return 0;
10942}
10943_ACEOF
10944if ac_fn_c_try_link "$LINENO"; then :
10945 ac_cv_lib_bsd_flock=yes
10946else
10947 ac_cv_lib_bsd_flock=no
10948fi
10949rm -f core conftest.err conftest.$ac_objext \
10950 conftest$ac_exeext conftest.$ac_ext
10951LIBS=$ac_check_lib_save_LIBS
10952fi
10953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10954$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010955if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010956 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010957
10958
10959$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10960
10961
10962fi
10963
10964
10965fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010966done
10967
Antoine Pitrou85729812010-09-07 14:55:24 +000010968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10971$as_echo_n "checking for getpagesize... " >&6; }
10972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010973/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010974
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010975#include <unistd.h>
10976
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010977int
10978main ()
10979{
10980void* p = getpagesize
10981 ;
10982 return 0;
10983}
10984_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010988
Matthias Klosec511b472010-05-08 11:01:39 +000010989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10993$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010994
10995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010997
Charles-François Natali93a11752011-11-27 13:01:35 +010010998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10999$as_echo_n "checking for broken unsetenv... " >&6; }
11000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11001/* end confdefs.h. */
11002
11003#include <stdlib.h>
11004
11005int
11006main ()
11007{
11008int res = unsetenv("DUMMY")
11009 ;
11010 return 0;
11011}
11012_ACEOF
11013if ac_fn_c_try_compile "$LINENO"; then :
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015$as_echo "no" >&6; }
11016else
11017
11018$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11019
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11021$as_echo "yes" >&6; }
11022
11023fi
11024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11025
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011026for ac_prog in true
11027do
11028 # Extract the first word of "$ac_prog", so it can be a program name with args.
11029set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11031$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011032if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011033 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011034else
11035 if test -n "$TRUE"; then
11036 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11037else
11038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11039for as_dir in $PATH
11040do
11041 IFS=$as_save_IFS
11042 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011045 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011046 $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 +000011047 break 2
11048 fi
11049done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011050 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011051IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011052
11053fi
11054fi
11055TRUE=$ac_cv_prog_TRUE
11056if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11058$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11061$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011062fi
11063
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011065 test -n "$TRUE" && break
11066done
11067test -n "$TRUE" || TRUE="/bin/true"
11068
11069
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11071$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011072if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011074else
11075 ac_check_lib_save_LIBS=$LIBS
11076LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011078/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011079
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080/* Override any GCC internal prototype to avoid an error.
11081 Use char because int might match the return type of a GCC
11082 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011083#ifdef __cplusplus
11084extern "C"
11085#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011086char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011087int
11088main ()
11089{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011090return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011091 ;
11092 return 0;
11093}
11094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011095if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011096 ac_cv_lib_c_inet_aton=yes
11097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011100rm -f core conftest.err conftest.$ac_objext \
11101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011102LIBS=$ac_check_lib_save_LIBS
11103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11105$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011106if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011107 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11110$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011111if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011112 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011113else
11114 ac_check_lib_save_LIBS=$LIBS
11115LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011118
Martin v. Löwiseba40652007-08-30 20:10:57 +000011119/* Override any GCC internal prototype to avoid an error.
11120 Use char because int might match the return type of a GCC
11121 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011122#ifdef __cplusplus
11123extern "C"
11124#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011125char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011126int
11127main ()
11128{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011129return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011130 ;
11131 return 0;
11132}
11133_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011135 ac_cv_lib_resolv_inet_aton=yes
11136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139rm -f core conftest.err conftest.$ac_objext \
11140 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011141LIBS=$ac_check_lib_save_LIBS
11142fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11144$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011145if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011146 cat >>confdefs.h <<_ACEOF
11147#define HAVE_LIBRESOLV 1
11148_ACEOF
11149
11150 LIBS="-lresolv $LIBS"
11151
11152fi
11153
11154
11155fi
11156
11157
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011158# On Tru64, chflags seems to be present, but calling it will
11159# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11161$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011162if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011166 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011167else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011169/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011170
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011171#include <sys/stat.h>
11172#include <unistd.h>
11173int main(int argc, char*argv[])
11174{
11175 if(chflags(argv[0], 0) != 0)
11176 return 1;
11177 return 0;
11178}
Ned Deily43e10542011-06-27 23:41:53 -070011179
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011180_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011181if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011182 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011184 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011185fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011188fi
11189
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011190
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011191fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11193$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011194if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011196if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011197 ac_cv_have_chflags="yes"
11198else
11199 ac_cv_have_chflags="no"
11200fi
11201
11202fi
11203if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011205$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011206
11207fi
11208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11210$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011211if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011213else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011215 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011218/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011219
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011220#include <sys/stat.h>
11221#include <unistd.h>
11222int main(int argc, char*argv[])
11223{
11224 if(lchflags(argv[0], 0) != 0)
11225 return 1;
11226 return 0;
11227}
Ned Deily43e10542011-06-27 23:41:53 -070011228
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011231 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011233 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011234fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11236 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011237fi
11238
11239
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11242$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011243if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011245if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011246 ac_cv_have_lchflags="yes"
11247else
11248 ac_cv_have_lchflags="no"
11249fi
11250
11251fi
11252if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011254$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011255
11256fi
11257
Ronald Oussorenf8752642006-07-06 10:13:35 +000011258case $ac_sys_system/$ac_sys_release in
11259Darwin/*)
11260 _CUR_CFLAGS="${CFLAGS}"
11261 _CUR_LDFLAGS="${LDFLAGS}"
11262 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11263 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11264 ;;
11265esac
11266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11268$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011269if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011271else
11272 ac_check_lib_save_LIBS=$LIBS
11273LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011275/* end confdefs.h. */
11276
Martin v. Löwiseba40652007-08-30 20:10:57 +000011277/* Override any GCC internal prototype to avoid an error.
11278 Use char because int might match the return type of a GCC
11279 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011280#ifdef __cplusplus
11281extern "C"
11282#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011283char inflateCopy ();
11284int
11285main ()
11286{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011292if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011293 ac_cv_lib_z_inflateCopy=yes
11294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011296fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011297rm -f core conftest.err conftest.$ac_objext \
11298 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011299LIBS=$ac_check_lib_save_LIBS
11300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11302$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011303if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011306
11307fi
11308
11309
Ronald Oussorenf8752642006-07-06 10:13:35 +000011310case $ac_sys_system/$ac_sys_release in
11311Darwin/*)
11312 CFLAGS="${_CUR_CFLAGS}"
11313 LDFLAGS="${_CUR_LDFLAGS}"
11314 ;;
11315esac
11316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11318$as_echo_n "checking for hstrerror... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011321
Martin v. Löwise9416172003-05-03 10:12:45 +000011322#include <netdb.h>
11323
Martin v. Löwise9416172003-05-03 10:12:45 +000011324int
11325main ()
11326{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011327void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011328 ;
11329 return 0;
11330}
11331_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011332if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011335
Matthias Klosec511b472010-05-08 11:01:39 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011338else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11340$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011341
11342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343rm -f core conftest.err conftest.$ac_objext \
11344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11347$as_echo_n "checking for inet_aton... " >&6; }
11348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011349/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011350
Martin v. Löwis86d66262006-02-17 08:40:11 +000011351#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011352#include <sys/socket.h>
11353#include <netinet/in.h>
11354#include <arpa/inet.h>
11355
Martin v. Löwise9416172003-05-03 10:12:45 +000011356int
11357main ()
11358{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011359void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011360 ;
11361 return 0;
11362}
11363_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011367
Matthias Klosec511b472010-05-08 11:01:39 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011373
11374fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375rm -f core conftest.err conftest.$ac_objext \
11376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11379$as_echo_n "checking for inet_pton... " >&6; }
11380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011381/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011382
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011383#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011384#include <sys/socket.h>
11385#include <netinet/in.h>
11386#include <arpa/inet.h>
11387
Martin v. Löwise9416172003-05-03 10:12:45 +000011388int
11389main ()
11390{
11391void* p = inet_pton
11392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011397
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011399
Matthias Klosec511b472010-05-08 11:01:39 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011405
11406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011408
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011409# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11411$as_echo_n "checking for setgroups... " >&6; }
11412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011414
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011415#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011416#ifdef HAVE_GRP_H
11417#include <grp.h>
11418#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011419
Martin v. Löwisd5843682002-11-21 20:41:28 +000011420int
11421main ()
11422{
11423void* p = setgroups
11424 ;
11425 return 0;
11426}
11427_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011428if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011431
Matthias Klosec511b472010-05-08 11:01:39 +000011432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011433$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11436$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437
11438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011440
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011441# check for openpty and forkpty
11442
11443for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444do :
11445 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011446if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011448#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011449_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011450
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011451else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11453$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011454if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011456else
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011458LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462/* Override any GCC internal prototype to avoid an error.
11463 Use char because int might match the return type of a GCC
11464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011465#ifdef __cplusplus
11466extern "C"
11467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011468char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011469int
11470main ()
11471{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011472return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011473 ;
11474 return 0;
11475}
11476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011477if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011478 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011480 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482rm -f core conftest.err conftest.$ac_objext \
11483 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011484LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11487$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011488if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011489 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11493$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011494if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011496else
11497 ac_check_lib_save_LIBS=$LIBS
11498LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011500/* end confdefs.h. */
11501
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öwisfd9a72a2006-01-08 10:07:33 +000011505#ifdef __cplusplus
11506extern "C"
11507#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011508char openpty ();
11509int
11510main ()
11511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +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öwisfd9a72a2006-01-08 10:07:33 +000011518 ac_cv_lib_bsd_openpty=yes
11519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011520 ac_cv_lib_bsd_openpty=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öwisfd9a72a2006-01-08 10:07:33 +000011524LIBS=$ac_check_lib_save_LIBS
11525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11527$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011528if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011530 LIBS="$LIBS -lbsd"
11531fi
11532
11533
11534fi
11535
Fred Drake8cef4cf2000-06-28 16:40:38 +000011536
11537fi
11538done
11539
11540for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011541do :
11542 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011543if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011544 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011546_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011547
Fred Drake8cef4cf2000-06-28 16:40:38 +000011548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11550$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011551if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011553else
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011555LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011558
Martin v. Löwiseba40652007-08-30 20:10:57 +000011559/* Override any GCC internal prototype to avoid an error.
11560 Use char because int might match the return type of a GCC
11561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011562#ifdef __cplusplus
11563extern "C"
11564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011565char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011566int
11567main ()
11568{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011570 ;
11571 return 0;
11572}
11573_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011574if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011576else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011577 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579rm -f core conftest.err conftest.$ac_objext \
11580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011581LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11584$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011585if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011587 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11590$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011591if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011592 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011593else
11594 ac_check_lib_save_LIBS=$LIBS
11595LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011597/* end confdefs.h. */
11598
Martin v. Löwiseba40652007-08-30 20:10:57 +000011599/* Override any GCC internal prototype to avoid an error.
11600 Use char because int might match the return type of a GCC
11601 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011602#ifdef __cplusplus
11603extern "C"
11604#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011605char forkpty ();
11606int
11607main ()
11608{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011609return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011615 ac_cv_lib_bsd_forkpty=yes
11616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011618fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011619rm -f core conftest.err conftest.$ac_objext \
11620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011621LIBS=$ac_check_lib_save_LIBS
11622fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11624$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011625if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011626 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011627 LIBS="$LIBS -lbsd"
11628fi
11629
11630
11631fi
11632
Fred Drake8cef4cf2000-06-28 16:40:38 +000011633
11634fi
11635done
11636
Jack Jansendd19cf82001-12-06 22:36:17 +000011637
Brett Cannonaa5778d2008-03-18 04:09:00 +000011638# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011639for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011640do :
11641 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011642if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011643 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011644#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011645_ACEOF
11646
11647fi
11648done
11649
11650
Michael W. Hudson54241132001-12-07 15:38:26 +000011651# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011652for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653do :
11654 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11655ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011656if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011657 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011658#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011659_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011660
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011662done
11663
Michael W. Hudson54241132001-12-07 15:38:26 +000011664
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011665ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011666if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011667 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011668
Martin v. Löwis1142de32002-03-29 16:28:31 +000011669else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011670 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011671 *" dup2.$ac_objext "* ) ;;
11672 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011673 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011674esac
11675
Martin v. Löwis1142de32002-03-29 16:28:31 +000011676fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011677
11678ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011679if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011680 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11681
11682else
11683 case " $LIBOBJS " in
11684 *" getcwd.$ac_objext "* ) ;;
11685 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11686 ;;
11687esac
11688
11689fi
11690
11691ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011692if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011693 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11694
11695else
11696 case " $LIBOBJS " in
11697 *" strdup.$ac_objext "* ) ;;
11698 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11699 ;;
11700esac
11701
11702fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011703
11704
11705for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011706do :
11707 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011708if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011713/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011714#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011715int
11716main ()
11717{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011718getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011719 ;
11720 return 0;
11721}
11722_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011723if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011726
Guido van Rossum627b2d71993-12-24 10:39:16 +000011727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011729
Guido van Rossum627b2d71993-12-24 10:39:16 +000011730fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011731done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011732
Jack Jansen150753c2003-03-29 22:07:47 +000011733for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011734do :
11735 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011736if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011737 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011738#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011739_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011741/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011742#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011743int
11744main ()
11745{
11746setpgrp(0,0);
11747 ;
11748 return 0;
11749}
11750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011754
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011757
11758fi
11759done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011760
Thomas Wouters3a584202000-08-05 23:28:51 +000011761for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011762do :
11763 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011764if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011766#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011767_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011770#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011771int
11772main ()
11773{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011774gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ;
11776 return 0;
11777}
11778_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011779if ac_fn_c_try_compile "$LINENO"; then :
11780
Guido van Rossum627b2d71993-12-24 10:39:16 +000011781else
Skip Montanaro6dead952003-09-25 14:50:04 +000011782
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011783$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011784
Martin v. Löwis11437992002-04-12 09:54:03 +000011785
Guido van Rossum627b2d71993-12-24 10:39:16 +000011786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011789fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011790done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011791
Michael W. Hudson54241132001-12-07 15:38:26 +000011792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11794$as_echo_n "checking for major... " >&6; }
11795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011796/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011797
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011798#if defined(MAJOR_IN_MKDEV)
11799#include <sys/mkdev.h>
11800#elif defined(MAJOR_IN_SYSMACROS)
11801#include <sys/sysmacros.h>
11802#else
11803#include <sys/types.h>
11804#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011805
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011806int
11807main ()
11808{
11809
11810 makedev(major(0),minor(0));
11811
11812 ;
11813 return 0;
11814}
11815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011817
11818
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011820
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11822$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011823
11824else
Skip Montanaro6dead952003-09-25 14:50:04 +000011825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11827$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011828
11829fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011830rm -f core conftest.err conftest.$ac_objext \
11831 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011832
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011833# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011834# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11836$as_echo_n "checking for getaddrinfo... " >&6; }
11837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011838/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011839
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011840#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011841#include <sys/socket.h>
11842#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011843#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011844
Martin v. Löwis11437992002-04-12 09:54:03 +000011845int
11846main ()
11847{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011848getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011849 ;
11850 return 0;
11851}
11852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011853if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011854 have_getaddrinfo=yes
11855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011858rm -f core conftest.err conftest.$ac_objext \
11859 conftest$ac_exeext conftest.$ac_ext
11860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11861$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011862if test $have_getaddrinfo = yes
11863then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11865$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011866 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011867 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011869 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011870
11871if test "${enable_ipv6+set}" = set; then
11872 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11873else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011874 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011875fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011878/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011879
Stefan Krah0afe4e42012-11-22 23:56:51 +010011880#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011881#include <sys/types.h>
11882#include <netdb.h>
11883#include <string.h>
11884#include <sys/socket.h>
11885#include <netinet/in.h>
11886
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011887int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011888{
11889 int passive, gaierr, inet4 = 0, inet6 = 0;
11890 struct addrinfo hints, *ai, *aitop;
11891 char straddr[INET6_ADDRSTRLEN], strport[16];
11892
11893 for (passive = 0; passive <= 1; passive++) {
11894 memset(&hints, 0, sizeof(hints));
11895 hints.ai_family = AF_UNSPEC;
11896 hints.ai_flags = passive ? AI_PASSIVE : 0;
11897 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011898 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011899 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11900 (void)gai_strerror(gaierr);
11901 goto bad;
11902 }
11903 for (ai = aitop; ai; ai = ai->ai_next) {
11904 if (ai->ai_addr == NULL ||
11905 ai->ai_addrlen == 0 ||
11906 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11907 straddr, sizeof(straddr), strport, sizeof(strport),
11908 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11909 goto bad;
11910 }
11911 switch (ai->ai_family) {
11912 case AF_INET:
11913 if (strcmp(strport, "54321") != 0) {
11914 goto bad;
11915 }
11916 if (passive) {
11917 if (strcmp(straddr, "0.0.0.0") != 0) {
11918 goto bad;
11919 }
11920 } else {
11921 if (strcmp(straddr, "127.0.0.1") != 0) {
11922 goto bad;
11923 }
11924 }
11925 inet4++;
11926 break;
11927 case AF_INET6:
11928 if (strcmp(strport, "54321") != 0) {
11929 goto bad;
11930 }
11931 if (passive) {
11932 if (strcmp(straddr, "::") != 0) {
11933 goto bad;
11934 }
11935 } else {
11936 if (strcmp(straddr, "::1") != 0) {
11937 goto bad;
11938 }
11939 }
11940 inet6++;
11941 break;
11942 case AF_UNSPEC:
11943 goto bad;
11944 break;
11945 default:
11946 /* another family support? */
11947 break;
11948 }
11949 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011950 freeaddrinfo(aitop);
11951 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011952 }
11953
11954 if (!(inet4 == 0 || inet4 == 2))
11955 goto bad;
11956 if (!(inet6 == 0 || inet6 == 2))
11957 goto bad;
11958
11959 if (aitop)
11960 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011961 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011962
11963 bad:
11964 if (aitop)
11965 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011966 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011967}
11968
Martin v. Löwis11437992002-04-12 09:54:03 +000011969_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011971 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011973 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11976 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011978
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011979fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011980
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011982
Benjamin Peterson75fed812010-11-01 01:47:19 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11984$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11985
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011986if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011987then
11988 if test $ipv6 = yes
11989 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011990 echo 'Fatal: You must get working getaddrinfo() function.'
11991 echo ' or you can specify "--disable-ipv6"'.
11992 exit 1
11993 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011994else
Martin v. Löwis11437992002-04-12 09:54:03 +000011995
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011997
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011998fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011999
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012000for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012001do :
12002 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012003if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012005#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012006_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012007
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012008fi
12009done
12010
Michael W. Hudson54241132001-12-07 15:38:26 +000012011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12014$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012015if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012016 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012019/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020#include <sys/types.h>
12021#include <sys/time.h>
12022#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012023
Martin v. Löwis11437992002-04-12 09:54:03 +000012024int
12025main ()
12026{
12027if ((struct tm *) 0)
12028return 0;
12029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12041$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012042if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045
12046fi
12047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12049$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012050if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012051 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012054/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055#include <sys/types.h>
12056#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012057
Martin v. Löwis11437992002-04-12 09:54:03 +000012058int
12059main ()
12060{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012061struct tm tm;
12062 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012063 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ;
12065 return 0;
12066}
12067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012069 ac_cv_struct_tm=time.h
12070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012074fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12076$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012077if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012080
12081fi
12082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083ac_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 +000012084#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012087if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012088
12089cat >>confdefs.h <<_ACEOF
12090#define HAVE_STRUCT_TM_TM_ZONE 1
12091_ACEOF
12092
12093
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012095
Martin v. Löwis11437992002-04-12 09:54:03 +000012096if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012098$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012099
12100else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12102"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012103if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012107fi
12108
Martin v. Löwiseba40652007-08-30 20:10:57 +000012109cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012110#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012111_ACEOF
12112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12114$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012115if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012119/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012120#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012121#if !HAVE_DECL_TZNAME
12122extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012124
Martin v. Löwis11437992002-04-12 09:54:03 +000012125int
12126main ()
12127{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012128return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012129 ;
12130 return 0;
12131}
12132_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012134 ac_cv_var_tzname=yes
12135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012136 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012138rm -f core conftest.err conftest.$ac_objext \
12139 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12142$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012143 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012146
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012147 fi
12148fi
12149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150ac_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 +010012151if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012152
12153cat >>confdefs.h <<_ACEOF
12154#define HAVE_STRUCT_STAT_ST_RDEV 1
12155_ACEOF
12156
12157
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012158fi
12159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160ac_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 +010012161if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012162
Martin v. Löwis11437992002-04-12 09:54:03 +000012163cat >>confdefs.h <<_ACEOF
12164#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12165_ACEOF
12166
12167
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012168fi
12169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170ac_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 +010012171if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012172
12173cat >>confdefs.h <<_ACEOF
12174#define HAVE_STRUCT_STAT_ST_FLAGS 1
12175_ACEOF
12176
12177
12178fi
12179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180ac_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 +010012181if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012182
12183cat >>confdefs.h <<_ACEOF
12184#define HAVE_STRUCT_STAT_ST_GEN 1
12185_ACEOF
12186
12187
12188fi
12189
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012190ac_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 +010012191if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012192
12193cat >>confdefs.h <<_ACEOF
12194#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12195_ACEOF
12196
12197
12198fi
12199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200ac_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 +010012201if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012202
Martin v. Löwis11437992002-04-12 09:54:03 +000012203cat >>confdefs.h <<_ACEOF
12204#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12205_ACEOF
12206
12207
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012208fi
12209
Michael W. Hudson54241132001-12-07 15:38:26 +000012210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12212$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012213if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012215else
Matthias Klosec511b472010-05-08 11:01:39 +000012216
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012218/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012219#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012220int
12221main ()
12222{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 ;
12225 return 0;
12226}
12227_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229 ac_cv_header_time_altzone=yes
12230else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012234
Martin v. Löwiseba40652007-08-30 20:10:57 +000012235fi
12236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12238$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012241$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242
12243fi
12244
Guido van Rossumda88dad1995-01-26 00:46:29 +000012245was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12247$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012250
12251#include <sys/types.h>
12252#include <sys/select.h>
12253#include <sys/time.h>
12254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255int
12256main ()
12257{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012258;
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 ;
12260 return 0;
12261}
12262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012263if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
12265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012268 was_it_defined=yes
12269
Martin v. Löwiseba40652007-08-30 20:10:57 +000012270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12273$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12276$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012277if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012282#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012283int
12284main ()
12285{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012286struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 ;
12288 return 0;
12289}
12290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012292 ac_cv_struct_addrinfo=yes
12293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012294 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12297fi
12298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12300$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012301if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012304
12305fi
12306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12308$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012309if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012310 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012313/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314
12315# include <sys/types.h>
12316# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012320struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 ;
12322 return 0;
12323}
12324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012326 ac_cv_struct_sockaddr_storage=yes
12327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012328 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12331fi
12332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12334$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012335if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012338
12339fi
12340
Guido van Rossum627b2d71993-12-24 10:39:16 +000012341# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12344$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012345if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012346 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012347else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012349/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012350$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012351int
12352main ()
12353{
12354static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012355test_array [0] = 0;
12356return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012357
12358 ;
12359 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012360}
Martin v. Löwis11437992002-04-12 09:54:03 +000012361_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012362if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012363 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012365 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12370$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012371if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012373
12374fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12377$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012378if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012382/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383
Martin v. Löwis11437992002-04-12 09:54:03 +000012384int
12385main ()
12386{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012387
Martin v. Löwis11437992002-04-12 09:54:03 +000012388#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012389 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012391 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393 char const *const *pcpcc;
12394 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 /* NEC SVR4.0.2 mips cc rejects this. */
12396 struct point {int x, y;};
12397 static struct point const zero = {0,0};
12398 /* AIX XL C 1.02.0.0 rejects this.
12399 It does not let you subtract one const X* pointer from another in
12400 an arm of an if-expression whose if-part is not a constant
12401 expression */
12402 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 ++pcpcc;
12406 ppc = (char**) pcpcc;
12407 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012408 { /* SCO 3.2v4 cc rejects this sort of thing. */
12409 char tx;
12410 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012412
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012414 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 }
12416 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12417 int x[] = {25, 17};
12418 const int *foo = &x[0];
12419 ++foo;
12420 }
12421 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12422 typedef const int *iptr;
12423 iptr p = 0;
12424 ++p;
12425 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012426 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012427 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012428 struct s { int j; const int *ap[3]; } bx;
12429 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012430 }
12431 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12432 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012433 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012434 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012435 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012436#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ;
12439 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012440}
Martin v. Löwis11437992002-04-12 09:54:03 +000012441_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012442if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443 ac_cv_c_const=yes
12444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12450$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012451if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454
12455fi
12456
Michael W. Hudson54241132001-12-07 15:38:26 +000012457
Guido van Rossumda88dad1995-01-26 00:46:29 +000012458works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12460$as_echo_n "checking for working volatile... " >&6; }
12461cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012462/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
12466{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ;
12469 return 0;
12470}
12471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012472if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012473 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012474else
Skip Montanaro6dead952003-09-25 14:50:04 +000012475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012477
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012478
Guido van Rossum627b2d71993-12-24 10:39:16 +000012479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12482$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012483
Guido van Rossumda88dad1995-01-26 00:46:29 +000012484works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12486$as_echo_n "checking for working signed char... " >&6; }
12487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012489
Martin v. Löwis11437992002-04-12 09:54:03 +000012490int
12491main ()
12492{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 ;
12495 return 0;
12496}
12497_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012499 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012500else
Skip Montanaro6dead952003-09-25 14:50:04 +000012501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012503
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012504
Guido van Rossum7f43da71994-08-01 12:15:30 +000012505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12508$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012509
Guido van Rossumda88dad1995-01-26 00:46:29 +000012510have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12512$as_echo_n "checking for prototypes... " >&6; }
12513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012514/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012515int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012516int
12517main ()
12518{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012519return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 ;
12521 return 0;
12522}
12523_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012526$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Matthias Klosec511b472010-05-08 11:01:39 +000012528 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12532$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533
Guido van Rossumda88dad1995-01-26 00:46:29 +000012534works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12536$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012538/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012539
12540#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012541int foo(int x, ...) {
12542 va_list va;
12543 va_start(va, x);
12544 va_arg(va, int);
12545 va_arg(va, char *);
12546 va_arg(va, double);
12547 return 0;
12548}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012549
Martin v. Löwis11437992002-04-12 09:54:03 +000012550int
12551main ()
12552{
Guido van Rossum90eea071996-08-30 20:58:57 +000012553return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 ;
12555 return 0;
12556}
12557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012559
12560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012561$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012563 works=yes
12564
Guido van Rossum627b2d71993-12-24 10:39:16 +000012565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12568$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569
Martin v. Löwisd6320502004-08-12 13:45:08 +000012570# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12572$as_echo_n "checking for socketpair... " >&6; }
12573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012574/* end confdefs.h. */
12575
12576#include <sys/types.h>
12577#include <sys/socket.h>
12578
12579int
12580main ()
12581{
12582void *x=socketpair
12583 ;
12584 return 0;
12585}
12586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012587if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012588
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012589$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012590
Matthias Klosec511b472010-05-08 11:01:39 +000012591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012592$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12595$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012596
12597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012599
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012600# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12602$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012605#include <sys/types.h>
12606#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012607int
12608main ()
12609{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012610struct sockaddr x;
12611x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 ;
12613 return 0;
12614}
12615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012616if ac_fn_c_try_compile "$LINENO"; then :
12617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12618$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012621
12622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12624$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012625
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012628
Guido van Rossumda88dad1995-01-26 00:46:29 +000012629va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12631$as_echo_n "checking whether va_list is an array... " >&6; }
12632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012633/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634
12635#ifdef HAVE_STDARG_PROTOTYPES
12636#include <stdarg.h>
12637#else
12638#include <varargs.h>
12639#endif
12640
Martin v. Löwis11437992002-04-12 09:54:03 +000012641int
12642main ()
12643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012645 ;
12646 return 0;
12647}
12648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012649if ac_fn_c_try_compile "$LINENO"; then :
12650
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651else
Skip Montanaro6dead952003-09-25 14:50:04 +000012652
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Guido van Rossumda88dad1995-01-26 00:46:29 +000012656 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012657
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12661$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012663# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
12665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012666ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012667if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12672$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012673 OLD_CFLAGS=$CFLAGS
12674 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012676/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012677
12678# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Martin v. Löwis11437992002-04-12 09:54:03 +000012680int
12681main ()
12682{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012683
12684 char *name;
12685 struct hostent *he, *res;
12686 char buffer[2048];
12687 int buflen = 2048;
12688 int h_errnop;
12689
12690 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012691
12692 ;
12693 return 0;
12694}
12695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012696if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012697
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012698 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012699
Martin v. Löwis11437992002-04-12 09:54:03 +000012700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012701$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012702
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12704$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012706else
Skip Montanaro6dead952003-09-25 14:50:04 +000012707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12709$as_echo "no" >&6; }
12710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12711$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012713/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012714
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012715# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012716
Martin v. Löwis11437992002-04-12 09:54:03 +000012717int
12718main ()
12719{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012720
12721 char *name;
12722 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012723 char buffer[2048];
12724 int buflen = 2048;
12725 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012726
Matthias Klosec511b472010-05-08 11:01:39 +000012727 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
12729 ;
12730 return 0;
12731}
12732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012735 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012736
Martin v. Löwis11437992002-04-12 09:54:03 +000012737
Matthias Klosec511b472010-05-08 11:01:39 +000012738$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12741$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012742
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012743else
Skip Montanaro6dead952003-09-25 14:50:04 +000012744
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12748$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12750/* end confdefs.h. */
12751
12752# include <netdb.h>
12753
12754int
12755main ()
12756{
12757
12758 char *name;
12759 struct hostent *he;
12760 struct hostent_data data;
12761
12762 (void) gethostbyname_r(name, he, &data);
12763
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768if ac_fn_c_try_compile "$LINENO"; then :
12769
12770 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12771
12772
12773$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12774
12775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12776$as_echo "yes" >&6; }
12777
12778else
12779
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12781$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012782
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012785
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012791 CFLAGS=$OLD_CFLAGS
12792
12793else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795 for ac_func in gethostbyname
12796do :
12797 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012798if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012803fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012804done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012805
Michael W. Hudson54241132001-12-07 15:38:26 +000012806
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012807fi
12808
Michael W. Hudson54241132001-12-07 15:38:26 +000012809
12810
12811
12812
12813
12814
Guido van Rossum627b2d71993-12-24 10:39:16 +000012815# checks for system services
12816# (none yet)
12817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012820if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12824$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012825if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012827else
Martin v. Löwis11437992002-04-12 09:54:03 +000012828 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012829LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012832
Martin v. Löwiseba40652007-08-30 20:10:57 +000012833/* Override any GCC internal prototype to avoid an error.
12834 Use char because int might match the return type of a GCC
12835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012836#ifdef __cplusplus
12837extern "C"
12838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012839char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012840int
12841main ()
12842{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012843return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ;
12845 return 0;
12846}
12847_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012849 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012851 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853rm -f core conftest.err conftest.$ac_objext \
12854 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012855LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12858$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012859if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 cat >>confdefs.h <<_ACEOF
12861#define HAVE_LIBIEEE 1
12862_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012863
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012864 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012865
Guido van Rossum627b2d71993-12-24 10:39:16 +000012866fi
12867
Michael W. Hudson54241132001-12-07 15:38:26 +000012868
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012869fi
12870
Michael W. Hudson54241132001-12-07 15:38:26 +000012871
Guido van Rossum7f253911997-05-09 02:42:48 +000012872# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12874$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012879if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012880then
12881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012883
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12885$as_echo "yes" >&6; }
12886else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12887$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012888fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12891$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012892fi
12893
Guido van Rossum7f253911997-05-09 02:42:48 +000012894
Guido van Rossum7f43da71994-08-01 12:15:30 +000012895# check for --with-libm=...
12896
Guido van Rossum563e7081996-09-10 18:20:48 +000012897case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012898Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012899BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012900*) LIBM=-lm
12901esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12903$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012904
Martin v. Löwiseba40652007-08-30 20:10:57 +000012905# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012906if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012907 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012908if test "$withval" = no
12909then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12911$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012912elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012913then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12915$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012916else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012917fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12920$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012921fi
12922
Guido van Rossum7f43da71994-08-01 12:15:30 +000012923
12924# check for --with-libc=...
12925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12927$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012928
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012930if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012931 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012932if test "$withval" = no
12933then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12935$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012936elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012937then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12939$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012940else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012941fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012942else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12944$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012945fi
12946
Guido van Rossum7f43da71994-08-01 12:15:30 +000012947
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012948# **************************************************
12949# * Check for various properties of floating point *
12950# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12953$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012954if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012955 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012956else
12957
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012958if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012959 ac_cv_little_endian_double=no
12960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012962/* end confdefs.h. */
12963
12964#include <string.h>
12965int main() {
12966 double x = 9006104071832581.0;
12967 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12968 return 0;
12969 else
12970 return 1;
12971}
12972
12973_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012975 ac_cv_little_endian_double=yes
12976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012978fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12980 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012981fi
12982
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012983fi
12984
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12986$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012987if test "$ac_cv_little_endian_double" = yes
12988then
12989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012991
12992fi
12993
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12995$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012996if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012998else
12999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013000if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013001 ac_cv_big_endian_double=no
13002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013004/* end confdefs.h. */
13005
13006#include <string.h>
13007int main() {
13008 double x = 9006104071832581.0;
13009 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13010 return 0;
13011 else
13012 return 1;
13013}
13014
13015_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013017 ac_cv_big_endian_double=yes
13018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13022 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013023fi
13024
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013025fi
13026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13028$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013029if test "$ac_cv_big_endian_double" = yes
13030then
13031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013033
13034fi
13035
13036# Some ARM platforms use a mixed-endian representation for doubles.
13037# While Python doesn't currently have full support for these platforms
13038# (see e.g., issue 1762561), we can at least make sure that float <-> string
13039# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13041$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013042if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013044else
13045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013047 ac_cv_mixed_endian_double=no
13048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013050/* end confdefs.h. */
13051
13052#include <string.h>
13053int main() {
13054 double x = 9006104071832581.0;
13055 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13056 return 0;
13057 else
13058 return 1;
13059}
13060
13061_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013063 ac_cv_mixed_endian_double=yes
13064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013066fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13068 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013069fi
13070
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013071fi
13072
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13074$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013075if test "$ac_cv_mixed_endian_double" = yes
13076then
13077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013079
13080fi
13081
13082# The short float repr introduced in Python 3.1 requires the
13083# correctly-rounded string <-> double conversion functions from
13084# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13085# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013086# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013087# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013088
13089# This inline assembler syntax may also work for suncc and icc,
13090# so we try it on all platforms.
13091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13093$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013095/* end confdefs.h. */
13096
13097int
13098main ()
13099{
13100
Mark Dickinsona548dee2009-11-15 13:12:43 +000013101 unsigned short cw;
13102 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13103 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013104
13105 ;
13106 return 0;
13107}
13108_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013109if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013110 have_gcc_asm_for_x87=yes
13111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013113fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013114rm -f core conftest.err conftest.$ac_objext \
13115 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13117$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013118if test "$have_gcc_asm_for_x87" = yes
13119then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013122
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013123fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013124
Mark Dickinson04b27232009-01-04 12:29:36 +000013125# Detect whether system arithmetic is subject to x87-style double
13126# rounding issues. The result of this test has little meaning on non
13127# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13128# mode is round-to-nearest and double rounding issues are present, and
13129# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13131$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013132# $BASECFLAGS may affect the result
13133ac_save_cc="$CC"
13134CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013136 ac_cv_x87_double_rounding=no
13137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013139/* end confdefs.h. */
13140
13141#include <stdlib.h>
13142#include <math.h>
13143int main() {
13144 volatile double x, y, z;
13145 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13146 x = 0.99999999999999989; /* 1-2**-53 */
13147 y = 1./x;
13148 if (y != 1.)
13149 exit(0);
13150 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13151 x = 1e16;
13152 y = 2.99999;
13153 z = x + y;
13154 if (z != 1e16+4.)
13155 exit(0);
13156 /* both tests show evidence of double rounding */
13157 exit(1);
13158}
13159
13160_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013162 ac_cv_x87_double_rounding=no
13163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013168fi
13169
Mark Dickinson99abd142009-10-24 13:44:16 +000013170CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13172$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013173if test "$ac_cv_x87_double_rounding" = yes
13174then
13175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013177
13178fi
13179
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013180# ************************************
13181# * Check for mathematical functions *
13182# ************************************
13183
13184LIBS_SAVE=$LIBS
13185LIBS="$LIBS $LIBM"
13186
Mark Dickinson265d7382008-04-21 22:32:24 +000013187# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13188# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13190$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013191if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013193else
13194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013196 ac_cv_tanh_preserves_zero_sign=no
13197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013199/* end confdefs.h. */
13200
13201#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013202#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013203int main() {
13204 /* return 0 if either negative zeros don't exist
13205 on this platform or if negative zeros exist
13206 and tanh(-0.) == -0. */
13207 if (atan2(0., -1.) == atan2(-0., -1.) ||
13208 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13209 else exit(1);
13210}
13211
13212_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013214 ac_cv_tanh_preserves_zero_sign=yes
13215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013217fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13219 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013220fi
13221
Mark Dickinson265d7382008-04-21 22:32:24 +000013222fi
13223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13225$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013226if test "$ac_cv_tanh_preserves_zero_sign" = yes
13227then
13228
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013229$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013230
13231fi
13232
Mark Dickinson65898e02009-09-05 10:27:00 +000013233for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234do :
13235 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13236ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013237if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013238 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013240_ACEOF
13241
13242fi
13243done
13244
Mark Dickinson65898e02009-09-05 10:27:00 +000013245for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246do :
13247 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13248ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013249if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013250 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013251#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013252_ACEOF
13253
13254fi
13255done
13256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13258"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013259if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013262 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013263fi
13264
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013265cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013266#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13269"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013270if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013274fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013275
13276cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013277#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013279ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13280"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013281if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013285fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013286
13287cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013289_ACEOF
13290
13291
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013292LIBS=$LIBS_SAVE
13293
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013294# For multiprocessing module, check that sem_open
13295# actually works. For FreeBSD versions <= 7.2,
13296# the kernel module that provides POSIX semaphores
13297# isn't loaded by default, so an attempt to call
13298# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13300$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013301if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013305 ac_cv_posix_semaphores_enabled=yes
13306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013308/* end confdefs.h. */
13309
13310#include <unistd.h>
13311#include <fcntl.h>
13312#include <stdio.h>
13313#include <semaphore.h>
13314#include <sys/stat.h>
13315
13316int main(void) {
13317 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13318 if (a == SEM_FAILED) {
13319 perror("sem_open");
13320 return 1;
13321 }
13322 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013323 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013324 return 0;
13325}
13326
13327_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013329 ac_cv_posix_semaphores_enabled=yes
13330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013332fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13334 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013335fi
13336
13337
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013338fi
13339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13341$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013342if test $ac_cv_posix_semaphores_enabled = no
13343then
13344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013345$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013346
13347fi
13348
13349# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13351$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013352if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013353 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013354else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013355 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013356 ac_cv_broken_sem_getvalue=yes
13357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013359/* end confdefs.h. */
13360
13361#include <unistd.h>
13362#include <fcntl.h>
13363#include <stdio.h>
13364#include <semaphore.h>
13365#include <sys/stat.h>
13366
13367int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013368 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013369 int count;
13370 int res;
13371 if(a==SEM_FAILED){
13372 perror("sem_open");
13373 return 1;
13374
13375 }
13376 res = sem_getvalue(a, &count);
13377 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013378 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013379 return res==-1 ? 1 : 0;
13380}
13381
13382_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013384 ac_cv_broken_sem_getvalue=no
13385else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013386 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013388rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13389 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013390fi
13391
13392
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013393fi
13394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13396$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013397if test $ac_cv_broken_sem_getvalue = yes
13398then
13399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013401
13402fi
13403
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013404# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13406$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013407# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013409 enableval=$enable_big_digits; case $enable_big_digits in
13410yes)
13411 enable_big_digits=30 ;;
13412no)
13413 enable_big_digits=15 ;;
1341415|30)
13415 ;;
13416*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013417 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 +000013418esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13420$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013421
13422cat >>confdefs.h <<_ACEOF
13423#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13424_ACEOF
13425
13426
13427else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13429$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013430fi
13431
13432
Guido van Rossumef2255b2000-03-10 22:30:29 +000013433# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013435if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013436
13437
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013438$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013440 wchar_h="yes"
13441
Guido van Rossumef2255b2000-03-10 22:30:29 +000013442else
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013444
13445fi
13446
Michael W. Hudson54241132001-12-07 15:38:26 +000013447
Martin v. Löwis11437992002-04-12 09:54:03 +000013448
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013449# determine wchar_t size
13450if test "$wchar_h" = yes
13451then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013453# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13454# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13455# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13457$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013458if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013460else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13462"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013463
Martin v. Löwis11437992002-04-12 09:54:03 +000013464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465 if test "$ac_cv_type_wchar_t" = yes; then
13466 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13467$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013468as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013469See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470 else
13471 ac_cv_sizeof_wchar_t=0
13472 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013473fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474
Martin v. Löwis11437992002-04-12 09:54:03 +000013475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13477$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013478
13479
13480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013482#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013483_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013484
Michael W. Hudson54241132001-12-07 15:38:26 +000013485
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013486fi
13487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13489$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013490have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013492/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013493
13494#include <tcl.h>
13495#if TCL_UTF_MAX != 6
13496# error "NOT UCS4_TCL"
13497#endif
13498int
13499main ()
13500{
13501
13502 ;
13503 return 0;
13504}
13505_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013507
13508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013509$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013510
13511 have_ucs4_tcl=yes
13512
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13516$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013517
Skip Montanaro6dead952003-09-25 14:50:04 +000013518# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013519if test "$wchar_h" = yes
13520then
13521 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13523$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013524 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013525 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013526else
13527
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013529 ac_cv_wchar_t_signed=yes
13530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013532/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013533
13534 #include <wchar.h>
13535 int main()
13536 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013537 /* Success: exit code 0 */
13538 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013539 }
13540
13541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013543 ac_cv_wchar_t_signed=yes
13544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013546fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013549fi
13550
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013551fi
13552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13554$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013555fi
13556
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13558$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013559# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013560if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013561 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013562else
13563 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013564fi
13565
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013566
13567if test $enable_unicode = yes
13568then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013569 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013570 case "$have_ucs4_tcl" in
13571 yes) enable_unicode="ucs4"
13572 ;;
13573 *) enable_unicode="ucs2"
13574 ;;
13575 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013576fi
13577
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013578
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013579case "$enable_unicode" in
13580ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013582
13583 ;;
13584ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013586
13587 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013588no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013589*) 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 +000013590esac
13591
Michael W. Hudson54241132001-12-07 15:38:26 +000013592
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
13594
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013595if test "$enable_unicode" = "no"
13596then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013597 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13599$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013600else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013601 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013603$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013604
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013605
13606 # wchar_t is only usable if it maps to an unsigned type
13607 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013608 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013609 then
13610 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013615
13616 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13617 then
13618 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013620
13621 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13622 then
13623 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013624 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013625
13626 else
13627 PY_UNICODE_TYPE="no type found"
13628 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13630$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013631fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013632
13633# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13635$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013636if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639 ac_cv_c_bigendian=unknown
13640 # See if we're dealing with a universal compiler.
13641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13642/* end confdefs.h. */
13643#ifndef __APPLE_CC__
13644 not a universal capable compiler
13645 #endif
13646 typedef int dummy;
13647
Skip Montanaro6dead952003-09-25 14:50:04 +000013648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013649if ac_fn_c_try_compile "$LINENO"; then :
13650
13651 # Check for potential -arch flags. It is not universal unless
13652 # there are at least two -arch flags with different values.
13653 ac_arch=
13654 ac_prev=
13655 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13656 if test -n "$ac_prev"; then
13657 case $ac_word in
13658 i?86 | x86_64 | ppc | ppc64)
13659 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13660 ac_arch=$ac_word
13661 else
13662 ac_cv_c_bigendian=universal
13663 break
13664 fi
13665 ;;
13666 esac
13667 ac_prev=
13668 elif test "x$ac_word" = "x-arch"; then
13669 ac_prev=arch
13670 fi
13671 done
13672fi
13673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13674 if test $ac_cv_c_bigendian = unknown; then
13675 # See if sys/param.h defines the BYTE_ORDER macro.
13676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013677/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013678#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013679 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013680
Martin v. Löwis11437992002-04-12 09:54:03 +000013681int
13682main ()
13683{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013684#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13685 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13686 && LITTLE_ENDIAN)
13687 bogus endian macros
13688 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013689
13690 ;
13691 return 0;
13692}
13693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013695 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013697/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013698#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013699 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013700
Martin v. Löwis11437992002-04-12 09:54:03 +000013701int
13702main ()
13703{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013704#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705 not big endian
13706 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013707
13708 ;
13709 return 0;
13710}
13711_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013713 ac_cv_c_bigendian=yes
13714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013718fi
13719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13720 fi
13721 if test $ac_cv_c_bigendian = unknown; then
13722 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013724/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013725#include <limits.h>
13726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727int
13728main ()
13729{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13731 bogus endian macros
13732 #endif
13733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ;
13735 return 0;
13736}
13737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738if ac_fn_c_try_compile "$LINENO"; then :
13739 # It does; now see whether it defined to _BIG_ENDIAN or not.
13740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13741/* end confdefs.h. */
13742#include <limits.h>
13743
13744int
13745main ()
13746{
13747#ifndef _BIG_ENDIAN
13748 not big endian
13749 #endif
13750
13751 ;
13752 return 0;
13753}
13754_ACEOF
13755if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13761fi
13762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13763 fi
13764 if test $ac_cv_c_bigendian = unknown; then
13765 # Compile a test program.
13766 if test "$cross_compiling" = yes; then :
13767 # Try to guess by grepping values from an object file.
13768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13769/* end confdefs.h. */
13770short int ascii_mm[] =
13771 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13772 short int ascii_ii[] =
13773 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13774 int use_ascii (int i) {
13775 return ascii_mm[i] + ascii_ii[i];
13776 }
13777 short int ebcdic_ii[] =
13778 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13779 short int ebcdic_mm[] =
13780 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13781 int use_ebcdic (int i) {
13782 return ebcdic_mm[i] + ebcdic_ii[i];
13783 }
13784 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013785
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786int
13787main ()
13788{
13789return use_ascii (foo) == use_ebcdic (foo);
13790 ;
13791 return 0;
13792}
13793_ACEOF
13794if ac_fn_c_try_compile "$LINENO"; then :
13795 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13796 ac_cv_c_bigendian=yes
13797 fi
13798 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13799 if test "$ac_cv_c_bigendian" = unknown; then
13800 ac_cv_c_bigendian=no
13801 else
13802 # finding both strings is unlikely to happen, but who knows?
13803 ac_cv_c_bigendian=unknown
13804 fi
13805 fi
13806fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013808else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013810/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013811$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013812int
13813main ()
13814{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816 /* Are we little or big endian? From Harbison&Steele. */
13817 union
13818 {
13819 long int l;
13820 char c[sizeof (long int)];
13821 } u;
13822 u.l = 1;
13823 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013824
13825 ;
13826 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013827}
Martin v. Löwis11437992002-04-12 09:54:03 +000013828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013829if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013830 ac_cv_c_bigendian=no
13831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013833fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13841$as_echo "$ac_cv_c_bigendian" >&6; }
13842 case $ac_cv_c_bigendian in #(
13843 yes)
13844 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13845;; #(
13846 no)
13847 ;; #(
13848 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013852 ;; #(
13853 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013854 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013855 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013856 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013857
Michael W. Hudson54241132001-12-07 15:38:26 +000013858
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013859# Check whether right shifting a negative integer extends the sign bit
13860# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13862$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013863if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013864 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013865else
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013868 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013871/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013872
13873int main()
13874{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013875 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013876}
13877
Martin v. Löwis11437992002-04-12 09:54:03 +000013878_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013880 ac_cv_rshift_extends_sign=yes
13881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013882 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013883fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013886fi
13887
Martin v. Löwiseba40652007-08-30 20:10:57 +000013888fi
13889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13891$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013892if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013893then
Martin v. Löwis11437992002-04-12 09:54:03 +000013894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013896
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013897fi
13898
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013899# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13901$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013902if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013904else
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013907/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013908#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013909int
13910main ()
13911{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013912
13913 FILE *f = fopen("/dev/null", "r");
13914 flockfile(f);
13915 getc_unlocked(f);
13916 funlockfile(f);
13917
Martin v. Löwis11437992002-04-12 09:54:03 +000013918 ;
13919 return 0;
13920}
13921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013922if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013923 ac_cv_have_getc_unlocked=yes
13924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013925 ac_cv_have_getc_unlocked=no
13926fi
13927rm -f core conftest.err conftest.$ac_objext \
13928 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13932$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013933if test "$ac_cv_have_getc_unlocked" = yes
13934then
Martin v. Löwis11437992002-04-12 09:54:03 +000013935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013937
13938fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013939
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013940# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013941# save the value of LIBS so we don't actually link Python with readline
13942LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013943
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013944# On some systems we need to link readline to a termcap compatible
13945# library. NOTE: Keep the precedence of listed libraries synchronised
13946# with setup.py.
13947py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13949$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013950for py_libtermcap in "" ncursesw ncurses curses termcap; do
13951 if test -z "$py_libtermcap"; then
13952 READLINE_LIBS="-lreadline"
13953 else
13954 READLINE_LIBS="-lreadline -l$py_libtermcap"
13955 fi
13956 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013958/* end confdefs.h. */
13959
Martin v. Löwiseba40652007-08-30 20:10:57 +000013960/* Override any GCC internal prototype to avoid an error.
13961 Use char because int might match the return type of a GCC
13962 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013963#ifdef __cplusplus
13964extern "C"
13965#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013966char readline ();
13967int
13968main ()
13969{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013971 ;
13972 return 0;
13973}
13974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013975if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013976 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978rm -f core conftest.err conftest.$ac_objext \
13979 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013980 if test $py_cv_lib_readline = yes; then
13981 break
13982 fi
13983done
13984# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13985#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013986if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13988$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13991$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013994
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013995fi
13996
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013997# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13999$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014000if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014001 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014002else
14003 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014004LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014006/* end confdefs.h. */
14007
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008/* Override any GCC internal prototype to avoid an error.
14009 Use char because int might match the return type of a GCC
14010 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014011#ifdef __cplusplus
14012extern "C"
14013#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014014char rl_callback_handler_install ();
14015int
14016main ()
14017{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014018return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014019 ;
14020 return 0;
14021}
14022_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014023if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014024 ac_cv_lib_readline_rl_callback_handler_install=yes
14025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014027fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014028rm -f core conftest.err conftest.$ac_objext \
14029 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014030LIBS=$ac_check_lib_save_LIBS
14031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14033$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014034if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014036$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014037
14038fi
14039
14040
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014041# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014043/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014044#include <readline/readline.h>
14045_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014047 have_readline=yes
14048else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014049 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014050
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014051fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014052rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014053if test $have_readline = yes
14054then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014056/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014057#include <readline/readline.h>
14058
14059_ACEOF
14060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014063$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014064
14065fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014066rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014069/* end confdefs.h. */
14070#include <readline/readline.h>
14071
14072_ACEOF
14073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014074 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014076$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014077
14078fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014079rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014080
14081fi
14082
Martin v. Löwis0daad592001-09-30 21:09:59 +000014083# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14085$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014086if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014088else
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014090LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014093
Martin v. Löwiseba40652007-08-30 20:10:57 +000014094/* Override any GCC internal prototype to avoid an error.
14095 Use char because int might match the return type of a GCC
14096 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014097#ifdef __cplusplus
14098extern "C"
14099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014100char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014101int
14102main ()
14103{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014104return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 ;
14106 return 0;
14107}
14108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014114rm -f core conftest.err conftest.$ac_objext \
14115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014116LIBS=$ac_check_lib_save_LIBS
14117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14119$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014120if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014123
Martin v. Löwis0daad592001-09-30 21:09:59 +000014124fi
14125
Michael W. Hudson54241132001-12-07 15:38:26 +000014126
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014127# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14129$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014130if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014131 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014132else
14133 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014134LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014136/* end confdefs.h. */
14137
14138/* Override any GCC internal prototype to avoid an error.
14139 Use char because int might match the return type of a GCC
14140 builtin and then its argument prototype would still apply. */
14141#ifdef __cplusplus
14142extern "C"
14143#endif
14144char rl_completion_display_matches_hook ();
14145int
14146main ()
14147{
14148return rl_completion_display_matches_hook ();
14149 ;
14150 return 0;
14151}
14152_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014153if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014154 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014156 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014157fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158rm -f core conftest.err conftest.$ac_objext \
14159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014160LIBS=$ac_check_lib_save_LIBS
14161fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14163$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014164if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014167
14168fi
14169
14170
Martin Pantera70c3232016-04-03 02:54:58 +000014171# also in 4.0, but not in editline
14172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14173$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14174if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14175 $as_echo_n "(cached) " >&6
14176else
14177 ac_check_lib_save_LIBS=$LIBS
14178LIBS="-lreadline $READLINE_LIBS $LIBS"
14179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14180/* end confdefs.h. */
14181
14182/* Override any GCC internal prototype to avoid an error.
14183 Use char because int might match the return type of a GCC
14184 builtin and then its argument prototype would still apply. */
14185#ifdef __cplusplus
14186extern "C"
14187#endif
14188char rl_resize_terminal ();
14189int
14190main ()
14191{
14192return rl_resize_terminal ();
14193 ;
14194 return 0;
14195}
14196_ACEOF
14197if ac_fn_c_try_link "$LINENO"; then :
14198 ac_cv_lib_readline_rl_resize_terminal=yes
14199else
14200 ac_cv_lib_readline_rl_resize_terminal=no
14201fi
14202rm -f core conftest.err conftest.$ac_objext \
14203 conftest$ac_exeext conftest.$ac_ext
14204LIBS=$ac_check_lib_save_LIBS
14205fi
14206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14207$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14208if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14209
14210$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14211
14212fi
14213
14214
Martin v. Löwis0daad592001-09-30 21:09:59 +000014215# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14217$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014218if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014220else
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014222LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014224/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014225
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226/* Override any GCC internal prototype to avoid an error.
14227 Use char because int might match the return type of a GCC
14228 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014229#ifdef __cplusplus
14230extern "C"
14231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014232char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014233int
14234main ()
14235{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014237 ;
14238 return 0;
14239}
14240_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014246rm -f core conftest.err conftest.$ac_objext \
14247 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014248LIBS=$ac_check_lib_save_LIBS
14249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14251$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014252if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014255
Guido van Rossum353ae582001-07-10 16:45:32 +000014256fi
14257
Jack Jansendd19cf82001-12-06 22:36:17 +000014258
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014259# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014261/* end confdefs.h. */
14262#include <readline/readline.h>
14263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014264if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014265 have_readline=yes
14266else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014267 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014268
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014269fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014270rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014271if test $have_readline = yes
14272then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014274/* end confdefs.h. */
14275#include <readline/readline.h>
14276
14277_ACEOF
14278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014279 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014280
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014282
14283fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014284rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014285
14286fi
14287
Martin v. Löwis82bca632006-02-10 20:49:30 +000014288# End of readline checks: restore LIBS
14289LIBS=$LIBS_no_readline
14290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14292$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014293if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014295else
Martin v. Löwis11437992002-04-12 09:54:03 +000014296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014297if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014298 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014301/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014302
14303int main()
14304{
14305 int val1 = nice(1);
14306 if (val1 != -1 && val1 == nice(2))
14307 exit(0);
14308 exit(1);
14309}
14310
Martin v. Löwis11437992002-04-12 09:54:03 +000014311_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014313 ac_cv_broken_nice=yes
14314else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14318 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014319fi
14320
Martin v. Löwiseba40652007-08-30 20:10:57 +000014321fi
14322
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14324$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014325if test "$ac_cv_broken_nice" = yes
14326then
Martin v. Löwis11437992002-04-12 09:54:03 +000014327
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014329
14330fi
14331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14333$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014334if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014337 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014338 ac_cv_broken_poll=no
14339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014341/* end confdefs.h. */
14342
14343#include <poll.h>
14344
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014345int main()
14346{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014347 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014348 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014349
14350 close (42);
14351
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014352 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014353 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014354 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014355 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014356 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014357 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014358 return 1;
14359}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014360
14361_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014363 ac_cv_broken_poll=yes
14364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014366fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14368 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014371fi
14372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14374$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014375if test "$ac_cv_broken_poll" = yes
14376then
14377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014379
14380fi
14381
Brett Cannon43802422005-02-10 20:48:03 +000014382# 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 +000014383# (which is not required by ISO C or UNIX spec) and/or if we support
14384# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385ac_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 +000014386#include <$ac_cv_struct_tm>
14387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014389if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014390
14391cat >>confdefs.h <<_ACEOF
14392#define HAVE_STRUCT_TM_TM_ZONE 1
14393_ACEOF
14394
14395
14396fi
14397
14398if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014401
14402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14404"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014405if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014408 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014409fi
14410
Martin v. Löwiseba40652007-08-30 20:10:57 +000014411cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014412#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014413_ACEOF
14414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14416$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014417if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014421/* end confdefs.h. */
14422#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014423#if !HAVE_DECL_TZNAME
14424extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014425#endif
14426
14427int
14428main ()
14429{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014430return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014431 ;
14432 return 0;
14433}
14434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014435if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014436 ac_cv_var_tzname=yes
14437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014438 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014439fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014440rm -f core conftest.err conftest.$ac_objext \
14441 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14444$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014445 if test $ac_cv_var_tzname = yes; then
14446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014448
14449 fi
14450fi
14451
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014452
Martin v. Löwis1d459062005-03-14 21:23:33 +000014453# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14455$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014456if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014457 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014458else
14459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014461 ac_cv_working_tzset=no
14462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014464/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014465
14466#include <stdlib.h>
14467#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014468#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014469
14470#if HAVE_TZNAME
14471extern char *tzname[];
14472#endif
14473
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014474int main()
14475{
Brett Cannon18367812003-09-19 00:59:16 +000014476 /* Note that we need to ensure that not only does tzset(3)
14477 do 'something' with localtime, but it works as documented
14478 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014479 This includes making sure that tzname is set properly if
14480 tm->tm_zone does not exist since it is the alternative way
14481 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014482
14483 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014484 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014485 */
14486
Martin v. Löwis1d459062005-03-14 21:23:33 +000014487 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014488 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14489
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014490 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014491 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014492 if (localtime(&groundhogday)->tm_hour != 0)
14493 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014494#if HAVE_TZNAME
14495 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14496 if (strcmp(tzname[0], "UTC") ||
14497 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14498 exit(1);
14499#endif
Brett Cannon18367812003-09-19 00:59:16 +000014500
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014501 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014502 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014503 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014504 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014505#if HAVE_TZNAME
14506 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14507 exit(1);
14508#endif
Brett Cannon18367812003-09-19 00:59:16 +000014509
14510 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14511 tzset();
14512 if (localtime(&groundhogday)->tm_hour != 11)
14513 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014514#if HAVE_TZNAME
14515 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14516 exit(1);
14517#endif
14518
14519#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014520 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14521 exit(1);
14522 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14523 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014524#endif
Brett Cannon18367812003-09-19 00:59:16 +000014525
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014526 exit(0);
14527}
14528
14529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014530if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014531 ac_cv_working_tzset=yes
14532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014537fi
14538
Martin v. Löwiseba40652007-08-30 20:10:57 +000014539fi
14540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14542$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014543if test "$ac_cv_working_tzset" = yes
14544then
14545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014546$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014547
14548fi
14549
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014550# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14552$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014553if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014557/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014558#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014559int
14560main ()
14561{
14562
14563struct stat st;
14564st.st_mtim.tv_nsec = 1;
14565
14566 ;
14567 return 0;
14568}
14569_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014571 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014573 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14576fi
14577
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14579$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014580if test "$ac_cv_stat_tv_nsec" = yes
14581then
14582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014584
14585fi
14586
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014587# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14589$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014590if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014591 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014594/* end confdefs.h. */
14595#include <sys/stat.h>
14596int
14597main ()
14598{
14599
14600struct stat st;
14601st.st_mtimespec.tv_nsec = 1;
14602
14603 ;
14604 return 0;
14605}
14606_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014607if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014608 ac_cv_stat_tv_nsec2=yes
14609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014610 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014611fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14613fi
14614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14616$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014617if test "$ac_cv_stat_tv_nsec2" = yes
14618then
14619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014620$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014621
14622fi
14623
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014624# first curses configure check
14625ac_save_cppflags="$CPPFLAGS"
14626CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14627
14628for ac_header in curses.h ncurses.h
14629do :
14630 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14631ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14632if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14633 cat >>confdefs.h <<_ACEOF
14634#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14635_ACEOF
14636
14637fi
14638
14639done
14640
14641
14642# On Solaris, term.h requires curses.h
14643for ac_header in term.h
14644do :
14645 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14646#ifdef HAVE_CURSES_H
14647#include <curses.h>
14648#endif
14649
14650"
14651if test "x$ac_cv_header_term_h" = xyes; then :
14652 cat >>confdefs.h <<_ACEOF
14653#define HAVE_TERM_H 1
14654_ACEOF
14655
14656fi
14657
14658done
14659
14660
Jack Jansen666b1e72001-10-31 12:11:48 +000014661# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14663$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014664if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014665 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014666else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014668/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014669#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014670int
14671main ()
14672{
Jack Jansen666b1e72001-10-31 12:11:48 +000014673
14674 int rtn;
14675 rtn = mvwdelch(0,0,0);
14676
Martin v. Löwis11437992002-04-12 09:54:03 +000014677 ;
14678 return 0;
14679}
14680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014681if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014682 ac_cv_mvwdelch_is_expression=yes
14683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014684 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687fi
14688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14690$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014691
14692if test "$ac_cv_mvwdelch_is_expression" = yes
14693then
Martin v. Löwis11437992002-04-12 09:54:03 +000014694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014695$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014696
14697fi
14698
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014699# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
14700# structs since version 5.7. If the macro is defined as zero before including
14701# [n]curses.h, ncurses will expose fields of the structs regardless of the
14702# configuration.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14704$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014705if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014709/* end confdefs.h. */
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014710
14711 #define NCURSES_OPAQUE 0
14712 #include <curses.h>
14713
Martin v. Löwis11437992002-04-12 09:54:03 +000014714int
14715main ()
14716{
Jack Jansen666b1e72001-10-31 12:11:48 +000014717
14718 WINDOW *w;
14719 w->_flags = 0;
14720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ;
14722 return 0;
14723}
14724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014726 ac_cv_window_has_flags=yes
14727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014728 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731fi
14732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14734$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014735
Jack Jansen666b1e72001-10-31 12:11:48 +000014736
14737if test "$ac_cv_window_has_flags" = yes
14738then
Martin v. Löwis11437992002-04-12 09:54:03 +000014739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014740$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014741
14742fi
14743
Miss Islington (bot)6ba0b582017-11-01 05:36:48 -070014744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
14745$as_echo_n "checking for is_pad... " >&6; }
14746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747/* end confdefs.h. */
14748#include <curses.h>
14749int
14750main ()
14751{
14752
14753#ifndef is_pad
14754void *x=is_pad
14755#endif
14756
14757 ;
14758 return 0;
14759}
14760_ACEOF
14761if ac_fn_c_try_compile "$LINENO"; then :
14762
14763$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
14764
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14766$as_echo "yes" >&6; }
14767else
14768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14769$as_echo "no" >&6; }
14770
14771fi
14772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14775$as_echo_n "checking for is_term_resized... " >&6; }
14776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014777/* end confdefs.h. */
14778#include <curses.h>
14779int
14780main ()
14781{
14782void *x=is_term_resized
14783 ;
14784 return 0;
14785}
14786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014787if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014788
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014789$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014790
Matthias Klosec511b472010-05-08 11:01:39 +000014791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014792$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014796
14797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14801$as_echo_n "checking for resize_term... " >&6; }
14802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014803/* end confdefs.h. */
14804#include <curses.h>
14805int
14806main ()
14807{
14808void *x=resize_term
14809 ;
14810 return 0;
14811}
14812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014813if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014815$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014816
Matthias Klosec511b472010-05-08 11:01:39 +000014817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014818$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14821$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014822
14823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14827$as_echo_n "checking for resizeterm... " >&6; }
14828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014829/* end confdefs.h. */
14830#include <curses.h>
14831int
14832main ()
14833{
14834void *x=resizeterm
14835 ;
14836 return 0;
14837}
14838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014839if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014841$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014842
Matthias Klosec511b472010-05-08 11:01:39 +000014843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014844$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14847$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014848
14849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakae0fc1af2017-10-31 16:12:35 +020014851
14852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
14853$as_echo_n "checking for immedok... " >&6; }
14854cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855/* end confdefs.h. */
14856#include <curses.h>
14857int
14858main ()
14859{
14860
14861#ifndef immedok
14862void *x=immedok
14863#endif
14864
14865 ;
14866 return 0;
14867}
14868_ACEOF
14869if ac_fn_c_try_compile "$LINENO"; then :
14870
14871$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
14872
14873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14874$as_echo "yes" >&6; }
14875else
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14877$as_echo "no" >&6; }
14878
14879fi
14880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14881
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
14883$as_echo_n "checking for syncok... " >&6; }
14884cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14885/* end confdefs.h. */
14886#include <curses.h>
14887int
14888main ()
14889{
14890
14891#ifndef syncok
14892void *x=syncok
14893#endif
14894
14895 ;
14896 return 0;
14897}
14898_ACEOF
14899if ac_fn_c_try_compile "$LINENO"; then :
14900
14901$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
14902
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14904$as_echo "yes" >&6; }
14905else
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14907$as_echo "no" >&6; }
14908
14909fi
14910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911
Miss Islington (bot)87c66e42017-11-01 06:11:18 -070014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
14913$as_echo_n "checking for wchgat... " >&6; }
14914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14915/* end confdefs.h. */
14916#include <curses.h>
14917int
14918main ()
14919{
14920
14921#ifndef wchgat
14922void *x=wchgat
14923#endif
14924
14925 ;
14926 return 0;
14927}
14928_ACEOF
14929if ac_fn_c_try_compile "$LINENO"; then :
14930
14931$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
14932
14933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14934$as_echo "yes" >&6; }
14935else
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14937$as_echo "no" >&6; }
14938
14939fi
14940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14941
Serhiy Storchakae0fc1af2017-10-31 16:12:35 +020014942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
14943$as_echo_n "checking for filter... " >&6; }
14944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14945/* end confdefs.h. */
14946#include <curses.h>
14947int
14948main ()
14949{
14950
14951#ifndef filter
14952void *x=filter
14953#endif
14954
14955 ;
14956 return 0;
14957}
14958_ACEOF
14959if ac_fn_c_try_compile "$LINENO"; then :
14960
14961$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
14962
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14964$as_echo "yes" >&6; }
14965else
14966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14967$as_echo "no" >&6; }
14968
14969fi
14970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14971
14972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
14973$as_echo_n "checking for has_key... " >&6; }
14974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14975/* end confdefs.h. */
14976#include <curses.h>
14977int
14978main ()
14979{
14980
14981#ifndef has_key
14982void *x=has_key
14983#endif
14984
14985 ;
14986 return 0;
14987}
14988_ACEOF
14989if ac_fn_c_try_compile "$LINENO"; then :
14990
14991$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
14992
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14994$as_echo "yes" >&6; }
14995else
14996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14997$as_echo "no" >&6; }
14998
14999fi
15000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15001
15002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15003$as_echo_n "checking for typeahead... " >&6; }
15004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
15006#include <curses.h>
15007int
15008main ()
15009{
15010
15011#ifndef typeahead
15012void *x=typeahead
15013#endif
15014
15015 ;
15016 return 0;
15017}
15018_ACEOF
15019if ac_fn_c_try_compile "$LINENO"; then :
15020
15021$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15022
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15024$as_echo "yes" >&6; }
15025else
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15027$as_echo "no" >&6; }
15028
15029fi
15030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15031
15032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15033$as_echo_n "checking for use_env... " >&6; }
15034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15035/* end confdefs.h. */
15036#include <curses.h>
15037int
15038main ()
15039{
15040
15041#ifndef use_env
15042void *x=use_env
15043#endif
15044
15045 ;
15046 return 0;
15047}
15048_ACEOF
15049if ac_fn_c_try_compile "$LINENO"; then :
15050
15051$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15052
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15054$as_echo "yes" >&6; }
15055else
15056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15057$as_echo "no" >&6; }
15058
15059fi
15060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020015061# last curses configure check
15062CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15065$as_echo "$as_me: checking for device files" >&6;}
15066
15067if test "x$cross_compiling" = xyes; then
15068 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15070$as_echo_n "checking for /dev/ptmx... " >&6; }
15071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15072$as_echo "not set" >&6; }
15073 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15074 fi
15075 if test "${ac_cv_file__dev_ptc+set}" != set; then
15076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15077$as_echo_n "checking for /dev/ptc... " >&6; }
15078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15079$as_echo "not set" >&6; }
15080 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15081 fi
15082fi
15083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15085$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015086if ${ac_cv_file__dev_ptmx+:} false; then :
15087 $as_echo_n "(cached) " >&6
15088else
15089 test "$cross_compiling" = yes &&
15090 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15091if test -r "/dev/ptmx"; then
15092 ac_cv_file__dev_ptmx=yes
15093else
15094 ac_cv_file__dev_ptmx=no
15095fi
15096fi
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15098$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15099if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000015100
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015101fi
15102
15103if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015104
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015106
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15109$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015110if ${ac_cv_file__dev_ptc+:} false; then :
15111 $as_echo_n "(cached) " >&6
15112else
15113 test "$cross_compiling" = yes &&
15114 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15115if test -r "/dev/ptc"; then
15116 ac_cv_file__dev_ptc=yes
15117else
15118 ac_cv_file__dev_ptc=no
15119fi
15120fi
15121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15122$as_echo "$ac_cv_file__dev_ptc" >&6; }
15123if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000015124
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015125fi
15126
15127if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015128
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015129$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015130
Neal Norwitz865400f2003-03-21 01:42:58 +000015131fi
15132
Mark Dickinson82864d12009-11-15 16:18:58 +000015133if test "$have_long_long" = yes
15134then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15136$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010015137 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015138 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000015139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015140 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010015141 ac_cv_have_long_long_format="cross -- assuming no"
15142 if test x$GCC = xyes; then
15143 save_CFLAGS=$CFLAGS
15144 CFLAGS="$CFLAGS -Werror -Wformat"
15145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15146/* end confdefs.h. */
15147
15148 #include <stdio.h>
15149 #include <stddef.h>
15150
15151int
15152main ()
15153{
15154
15155 char *buffer;
15156 sprintf(buffer, "%lld", (long long)123);
15157 sprintf(buffer, "%lld", (long long)-123);
15158 sprintf(buffer, "%llu", (unsigned long long)123);
15159
15160 ;
15161 return 0;
15162}
15163_ACEOF
15164if ac_fn_c_try_compile "$LINENO"; then :
15165 ac_cv_have_long_long_format=yes
15166
15167fi
15168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15169 CFLAGS=$save_CFLAGS
15170 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000015171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000015173/* end confdefs.h. */
15174
15175 #include <stdio.h>
15176 #include <stddef.h>
15177 #include <string.h>
15178
15179 #ifdef HAVE_SYS_TYPES_H
15180 #include <sys/types.h>
15181 #endif
15182
15183 int main()
15184 {
15185 char buffer[256];
15186
15187 if (sprintf(buffer, "%lld", (long long)123) < 0)
15188 return 1;
15189 if (strcmp(buffer, "123"))
15190 return 1;
15191
15192 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15193 return 1;
15194 if (strcmp(buffer, "-123"))
15195 return 1;
15196
15197 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15198 return 1;
15199 if (strcmp(buffer, "123"))
15200 return 1;
15201
15202 return 0;
15203 }
15204
15205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015206if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000015207 ac_cv_have_long_long_format=yes
15208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015209 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000015210fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15212 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000015213fi
15214
15215
Mark Dickinson82864d12009-11-15 16:18:58 +000015216fi
15217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15219$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000015220fi
15221
Mark Dickinson5ce84742009-12-31 20:48:04 +000015222if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000015223then
15224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015225$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000015226
15227fi
15228
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000015229if test $ac_sys_system = Darwin
15230then
15231 LIBS="$LIBS -framework CoreFoundation"
15232fi
15233
Mark Dickinson82864d12009-11-15 16:18:58 +000015234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15236$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010015237if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015240 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015241 ac_cv_have_size_t_format="cross -- assuming yes"
15242
Brett Cannon09d12362006-05-11 05:11:33 +000015243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000015245/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015246
Brett Cannon09d12362006-05-11 05:11:33 +000015247#include <stdio.h>
15248#include <stddef.h>
15249#include <string.h>
15250
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000015251#ifdef HAVE_SYS_TYPES_H
15252#include <sys/types.h>
15253#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000015254
15255#ifdef HAVE_SSIZE_T
15256typedef ssize_t Py_ssize_t;
15257#elif SIZEOF_VOID_P == SIZEOF_LONG
15258typedef long Py_ssize_t;
15259#else
15260typedef int Py_ssize_t;
15261#endif
Brett Cannon09d12362006-05-11 05:11:33 +000015262
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000015263int main()
15264{
15265 char buffer[256];
15266
Brett Cannon09d12362006-05-11 05:11:33 +000015267 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15268 return 1;
15269
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000015270 if (strcmp(buffer, "123"))
15271 return 1;
15272
15273 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15274 return 1;
15275
15276 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000015277 return 1;
15278
15279 return 0;
15280}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015281
Brett Cannon09d12362006-05-11 05:11:33 +000015282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015283if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015284 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015286 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000015290fi
15291
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15294$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015295if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015296
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015297$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015298
15299fi
15300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015301ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015302#ifdef HAVE_SYS_TYPES_H
15303#include <sys/types.h>
15304#endif
15305#ifdef HAVE_SYS_SOCKET_H
15306#include <sys/socket.h>
15307#endif
15308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015309"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015310if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015311
Martin v. Löwis11437992002-04-12 09:54:03 +000015312else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015314$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015315
15316fi
15317
Michael W. Hudson54241132001-12-07 15:38:26 +000015318
Benjamin Peterson7497e912010-10-16 00:53:39 +000015319case $ac_sys_system in
15320AIX*)
15321
15322$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15323 ;;
15324esac
15325
15326
Michael W. Hudson54241132001-12-07 15:38:26 +000015327
15328
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015329for h in `(cd $srcdir;echo Python/thread_*.h)`
15330do
15331 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15332done
15333
Michael W. Hudson54241132001-12-07 15:38:26 +000015334
Victor Stinner5f4056a2017-04-28 03:41:40 +020015335SRCDIRS="Parser Objects Python Modules"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15337$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015338for dir in $SRCDIRS; do
15339 if test ! -d $dir; then
15340 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015341 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015342done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015343
15344# BEGIN_COMPUTED_GOTO
15345# Check for --with-computed-gotos
15346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15347$as_echo_n "checking for --with-computed-gotos... " >&6; }
15348
15349# Check whether --with-computed-gotos was given.
15350if test "${with_computed_gotos+set}" = set; then :
15351 withval=$with_computed_gotos;
15352if test "$withval" = yes
15353then
15354
15355$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15356
15357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15358$as_echo "yes" >&6; }
15359fi
15360if test "$withval" = no
15361then
15362
15363$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15364
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15366$as_echo "no" >&6; }
15367fi
15368
15369else
15370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15371$as_echo "no value specified" >&6; }
15372fi
15373
15374
15375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15376$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15377if ${ac_cv_computed_gotos+:} false; then :
15378 $as_echo_n "(cached) " >&6
15379else
15380 if test "$cross_compiling" = yes; then :
15381 if test "${with_computed_gotos+set}" = set; then
15382 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15383 else
15384 ac_cv_computed_gotos=no
15385 fi
15386else
15387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15388/* end confdefs.h. */
15389
15390int main(int argc, char **argv)
15391{
15392 static void *targets[1] = { &&LABEL1 };
15393 goto LABEL2;
15394LABEL1:
15395 return 0;
15396LABEL2:
15397 goto *targets[0];
15398 return 1;
15399}
15400
15401_ACEOF
15402if ac_fn_c_try_run "$LINENO"; then :
15403 ac_cv_computed_gotos=yes
15404else
15405 ac_cv_computed_gotos=no
15406fi
15407rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15408 conftest.$ac_objext conftest.beam conftest.$ac_ext
15409fi
15410
15411fi
15412
15413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15414$as_echo "$ac_cv_computed_gotos" >&6; }
15415case "$ac_cv_computed_gotos" in yes*)
15416
15417$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15418
15419esac
15420# END_COMPUTED_GOTO
15421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15423$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015424
Ned Deily3f1d0b32014-11-20 02:11:03 -080015425# ensurepip option
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15427$as_echo_n "checking for ensurepip... " >&6; }
15428
15429# Check whether --with-ensurepip was given.
15430if test "${with_ensurepip+set}" = set; then :
15431 withval=$with_ensurepip;
15432else
15433 with_ensurepip=no
15434fi
15435
15436case $with_ensurepip in #(
15437 yes|upgrade) :
15438 ENSUREPIP=upgrade ;; #(
15439 install) :
15440 ENSUREPIP=install ;; #(
15441 no) :
15442 ENSUREPIP=no ;; #(
15443 *) :
15444 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15445esac
15446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15447$as_echo "$ENSUREPIP" >&6; }
15448
15449
Guido van Rossum627b2d71993-12-24 10:39:16 +000015450# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015451ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015452
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015453ac_config_files="$ac_config_files Modules/ld_so_aix"
15454
Martin v. Löwis11437992002-04-12 09:54:03 +000015455cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015456# This file is a shell script that caches the results of configure
15457# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015458# scripts and configure runs, see configure's option --config-cache.
15459# It is not useful on other systems. If it contains results you don't
15460# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015461#
Martin v. Löwis11437992002-04-12 09:54:03 +000015462# config.status only pays attention to the cache file if you give it
15463# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015464#
Skip Montanaro6dead952003-09-25 14:50:04 +000015465# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015466# loading this file, other *unset* `ac_cv_foo' will be assigned the
15467# following values.
15468
15469_ACEOF
15470
Guido van Rossumf78abae1997-01-21 22:02:36 +000015471# The following way of writing the cache mishandles newlines in values,
15472# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015474# Ultrix sh set writes to stderr and can't be redirected directly,
15475# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015476(
15477 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15478 eval ac_val=\$$ac_var
15479 case $ac_val in #(
15480 *${as_nl}*)
15481 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015482 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15483$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484 esac
15485 case $ac_var in #(
15486 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015487 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15488 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489 esac ;;
15490 esac
15491 done
15492
Martin v. Löwis11437992002-04-12 09:54:03 +000015493 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015494 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15495 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015496 # `set' does not quote correctly, so add quotes: double-quote
15497 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015499 "s/'/'\\\\''/g;
15500 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 *)
15503 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015504 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015505 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506 esac |
15507 sort
15508) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015510 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15514 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015515 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15516 :end' >>confcache
15517if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15518 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015519 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015520 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15521$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015522 if test ! -f "$cache_file" || test -h "$cache_file"; then
15523 cat confcache >"$cache_file"
15524 else
15525 case $cache_file in #(
15526 */* | ?:*)
15527 mv -f confcache "$cache_file"$$ &&
15528 mv -f "$cache_file"$$ "$cache_file" ;; #(
15529 *)
15530 mv -f confcache "$cache_file" ;;
15531 esac
15532 fi
15533 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015534 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015535 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15536$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015537 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015538fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015539rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015540
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015541test "x$prefix" = xNONE && prefix=$ac_default_prefix
15542# Let make expand exec_prefix.
15543test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015544
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015545DEFS=-DHAVE_CONFIG_H
15546
Skip Montanaro6dead952003-09-25 14:50:04 +000015547ac_libobjs=
15548ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015549U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015550for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15551 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015552 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015553 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15555 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015556 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15557 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015558done
15559LIBOBJS=$ac_libobjs
15560
15561LTLIBOBJS=$ac_ltlibobjs
15562
15563
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565
Matthias Klose3cef2a92012-03-14 23:39:33 +010015566: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015567ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015568ac_clean_files_save=$ac_clean_files
15569ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015570{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15571$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15572as_write_fail=0
15573cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015574#! $SHELL
15575# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015576# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015577# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015578# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015579
Martin v. Löwis11437992002-04-12 09:54:03 +000015580debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015581ac_cs_recheck=false
15582ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015584SHELL=\${CONFIG_SHELL-$SHELL}
15585export SHELL
15586_ASEOF
15587cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15588## -------------------- ##
15589## M4sh Initialization. ##
15590## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015591
Martin v. Löwiseba40652007-08-30 20:10:57 +000015592# Be more Bourne compatible
15593DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015594if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 emulate sh
15596 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015597 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015598 # is contrary to our usage. Disable this feature.
15599 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015602 case `(set -o) 2>/dev/null` in #(
15603 *posix*) :
15604 set -o posix ;; #(
15605 *) :
15606 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015608fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015609
Skip Montanaro6dead952003-09-25 14:50:04 +000015610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015611as_nl='
15612'
15613export as_nl
15614# Printing a long string crashes Solaris 7 /usr/bin/printf.
15615as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15616as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15617as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15618# Prefer a ksh shell builtin over an external printf program on Solaris,
15619# but without wasting forks for bash or zsh.
15620if test -z "$BASH_VERSION$ZSH_VERSION" \
15621 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15622 as_echo='print -r --'
15623 as_echo_n='print -rn --'
15624elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15625 as_echo='printf %s\n'
15626 as_echo_n='printf %s'
15627else
15628 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15629 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15630 as_echo_n='/usr/ucb/echo -n'
15631 else
15632 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15633 as_echo_n_body='eval
15634 arg=$1;
15635 case $arg in #(
15636 *"$as_nl"*)
15637 expr "X$arg" : "X\\(.*\\)$as_nl";
15638 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15639 esac;
15640 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15641 '
15642 export as_echo_n_body
15643 as_echo_n='sh -c $as_echo_n_body as_echo'
15644 fi
15645 export as_echo_body
15646 as_echo='sh -c $as_echo_body as_echo'
15647fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015648
15649# The user is always right.
15650if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015651 PATH_SEPARATOR=:
15652 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15653 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15654 PATH_SEPARATOR=';'
15655 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015657
Martin v. Löwiseba40652007-08-30 20:10:57 +000015658
15659# IFS
15660# We need space, tab and new line, in precisely that order. Quoting is
15661# there to prevent editors from complaining about space-tab.
15662# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15663# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664IFS=" "" $as_nl"
15665
15666# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015667as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015668case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669 *[\\/]* ) as_myself=$0 ;;
15670 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015671for as_dir in $PATH
15672do
15673 IFS=$as_save_IFS
15674 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015675 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15676 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015677IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679 ;;
15680esac
15681# We did not find ourselves, most probably we were run as `sh COMMAND'
15682# in which case we are not to be found in the path.
15683if test "x$as_myself" = x; then
15684 as_myself=$0
15685fi
15686if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015687 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15688 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689fi
15690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015691# Unset variables that we do not need and which cause bugs (e.g. in
15692# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15693# suppresses any "Segmentation fault" message there. '((' could
15694# trigger a bug in pdksh 5.2.14.
15695for as_var in BASH_ENV ENV MAIL MAILPATH
15696do eval test x\${$as_var+set} = xset \
15697 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015698done
15699PS1='$ '
15700PS2='> '
15701PS4='+ '
15702
15703# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015704LC_ALL=C
15705export LC_ALL
15706LANGUAGE=C
15707export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015709# CDPATH.
15710(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15711
15712
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015713# as_fn_error STATUS ERROR [LINENO LOG_FD]
15714# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015715# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15716# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015717# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718as_fn_error ()
15719{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015720 as_status=$1; test $as_status -eq 0 && as_status=1
15721 if test "$4"; then
15722 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15723 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015724 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015725 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015726 as_fn_exit $as_status
15727} # as_fn_error
15728
15729
15730# as_fn_set_status STATUS
15731# -----------------------
15732# Set $? to STATUS, without forking.
15733as_fn_set_status ()
15734{
15735 return $1
15736} # as_fn_set_status
15737
15738# as_fn_exit STATUS
15739# -----------------
15740# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15741as_fn_exit ()
15742{
15743 set +e
15744 as_fn_set_status $1
15745 exit $1
15746} # as_fn_exit
15747
15748# as_fn_unset VAR
15749# ---------------
15750# Portably unset VAR.
15751as_fn_unset ()
15752{
15753 { eval $1=; unset $1;}
15754}
15755as_unset=as_fn_unset
15756# as_fn_append VAR VALUE
15757# ----------------------
15758# Append the text in VALUE to the end of the definition contained in VAR. Take
15759# advantage of any shell optimizations that allow amortized linear growth over
15760# repeated appends, instead of the typical quadratic growth present in naive
15761# implementations.
15762if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15763 eval 'as_fn_append ()
15764 {
15765 eval $1+=\$2
15766 }'
15767else
15768 as_fn_append ()
15769 {
15770 eval $1=\$$1\$2
15771 }
15772fi # as_fn_append
15773
15774# as_fn_arith ARG...
15775# ------------------
15776# Perform arithmetic evaluation on the ARGs, and store the result in the
15777# global $as_val. Take advantage of shells that can avoid forks. The arguments
15778# must be portable across $(()) and expr.
15779if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15780 eval 'as_fn_arith ()
15781 {
15782 as_val=$(( $* ))
15783 }'
15784else
15785 as_fn_arith ()
15786 {
15787 as_val=`expr "$@" || test $? -eq 1`
15788 }
15789fi # as_fn_arith
15790
15791
Martin v. Löwiseba40652007-08-30 20:10:57 +000015792if expr a : '\(a\)' >/dev/null 2>&1 &&
15793 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15794 as_expr=expr
15795else
15796 as_expr=false
15797fi
15798
15799if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15800 as_basename=basename
15801else
15802 as_basename=false
15803fi
15804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015805if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15806 as_dirname=dirname
15807else
15808 as_dirname=false
15809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811as_me=`$as_basename -- "$0" ||
15812$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15813 X"$0" : 'X\(//\)$' \| \
15814 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015815$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015816 sed '/^.*\/\([^/][^/]*\)\/*$/{
15817 s//\1/
15818 q
15819 }
15820 /^X\/\(\/\/\)$/{
15821 s//\1/
15822 q
15823 }
15824 /^X\/\(\/\).*/{
15825 s//\1/
15826 q
15827 }
15828 s/.*/./; q'`
15829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830# Avoid depending upon Character Ranges.
15831as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15832as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15833as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15834as_cr_digits='0123456789'
15835as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015836
15837ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015838case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015840 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015842 xy) ECHO_C='\c';;
15843 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15844 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 esac;;
15846*)
15847 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015848esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851if test -d conf$$.dir; then
15852 rm -f conf$$.dir/conf$$.file
15853else
15854 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015855 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015857if (echo >conf$$.file) 2>/dev/null; then
15858 if ln -s conf$$.file conf$$ 2>/dev/null; then
15859 as_ln_s='ln -s'
15860 # ... but there are two gotchas:
15861 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15862 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015863 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015864 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015865 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015866 elif ln conf$$.file conf$$ 2>/dev/null; then
15867 as_ln_s=ln
15868 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015869 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015870 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015871else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015872 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015874rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15875rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015877
15878# as_fn_mkdir_p
15879# -------------
15880# Create "$as_dir" as a directory, including parents if necessary.
15881as_fn_mkdir_p ()
15882{
15883
15884 case $as_dir in #(
15885 -*) as_dir=./$as_dir;;
15886 esac
15887 test -d "$as_dir" || eval $as_mkdir_p || {
15888 as_dirs=
15889 while :; do
15890 case $as_dir in #(
15891 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15892 *) as_qdir=$as_dir;;
15893 esac
15894 as_dirs="'$as_qdir' $as_dirs"
15895 as_dir=`$as_dirname -- "$as_dir" ||
15896$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15897 X"$as_dir" : 'X\(//\)[^/]' \| \
15898 X"$as_dir" : 'X\(//\)$' \| \
15899 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15900$as_echo X"$as_dir" |
15901 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15902 s//\1/
15903 q
15904 }
15905 /^X\(\/\/\)[^/].*/{
15906 s//\1/
15907 q
15908 }
15909 /^X\(\/\/\)$/{
15910 s//\1/
15911 q
15912 }
15913 /^X\(\/\).*/{
15914 s//\1/
15915 q
15916 }
15917 s/.*/./; q'`
15918 test -d "$as_dir" && break
15919 done
15920 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015921 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015922
15923
15924} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015925if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015926 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015927else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015928 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015929 as_mkdir_p=false
15930fi
15931
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015932
15933# as_fn_executable_p FILE
15934# -----------------------
15935# Test if FILE is an executable regular file.
15936as_fn_executable_p ()
15937{
15938 test -f "$1" && test -x "$1"
15939} # as_fn_executable_p
15940as_test_x='test -x'
15941as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015942
15943# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015944as_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 +000015945
15946# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015947as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
15949
Martin v. Löwis11437992002-04-12 09:54:03 +000015950exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015951## ----------------------------------- ##
15952## Main body of $CONFIG_STATUS script. ##
15953## ----------------------------------- ##
15954_ASEOF
15955test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015957cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15958# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015959# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960# values after options handling.
15961ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015962This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015963generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015964
15965 CONFIG_FILES = $CONFIG_FILES
15966 CONFIG_HEADERS = $CONFIG_HEADERS
15967 CONFIG_LINKS = $CONFIG_LINKS
15968 CONFIG_COMMANDS = $CONFIG_COMMANDS
15969 $ $0 $@
15970
Martin v. Löwiseba40652007-08-30 20:10:57 +000015971on `(hostname || uname -n) 2>/dev/null | sed 1q`
15972"
15973
Martin v. Löwis11437992002-04-12 09:54:03 +000015974_ACEOF
15975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015976case $ac_config_files in *"
15977"*) set x $ac_config_files; shift; ac_config_files=$*;;
15978esac
15979
15980case $ac_config_headers in *"
15981"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15982esac
15983
15984
15985cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015986# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015987config_files="$ac_config_files"
15988config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015989
Martin v. Löwiseba40652007-08-30 20:10:57 +000015990_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015993ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015994\`$as_me' instantiates files and other configuration actions
15995from templates according to the current configuration. Unless the files
15996and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015998Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015999
16000 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016002 --config print configuration, then exit
16003 -q, --quiet, --silent
16004 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016005 -d, --debug don't remove temporary files
16006 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016007 --file=FILE[:TEMPLATE]
16008 instantiate the configuration file FILE
16009 --header=FILE[:TEMPLATE]
16010 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016011
16012Configuration files:
16013$config_files
16014
16015Configuration headers:
16016$config_headers
16017
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070016018Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000016019
Martin v. Löwiseba40652007-08-30 20:10:57 +000016020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16022ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016023ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000016024python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016025configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016026 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016027
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016028Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016029This config.status script is free software; the Free Software Foundation
16030gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000016031
16032ac_pwd='$ac_pwd'
16033srcdir='$srcdir'
16034INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000016035MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016036test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016037_ACEOF
16038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16040# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016041ac_need_defaults=:
16042while test $# != 0
16043do
16044 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016045 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16047 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016048 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016050 --*=)
16051 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16052 ac_optarg=
16053 ac_shift=:
16054 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016055 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016056 ac_option=$1
16057 ac_optarg=$2
16058 ac_shift=shift
16059 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016060 esac
16061
Skip Montanaro6dead952003-09-25 14:50:04 +000016062 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016063 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016064 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16065 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016067 $as_echo "$ac_cs_version"; exit ;;
16068 --config | --confi | --conf | --con | --co | --c )
16069 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016070 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 debug=: ;;
16072 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016073 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016074 case $ac_optarg in
16075 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016076 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016077 esac
16078 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ac_need_defaults=false;;
16080 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016081 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016082 case $ac_optarg in
16083 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16084 esac
16085 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016087 --he | --h)
16088 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016089 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016090Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016091 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016092 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016093 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16094 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16095 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
16097 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016098 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016099Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016101 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016102 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016103
16104 esac
16105 shift
16106done
16107
Skip Montanaro6dead952003-09-25 14:50:04 +000016108ac_configure_extra_args=
16109
16110if $ac_cs_silent; then
16111 exec 6>/dev/null
16112 ac_configure_extra_args="$ac_configure_extra_args --silent"
16113fi
16114
16115_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016117if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010016118 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016119 shift
16120 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16121 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016122 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016123 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016124fi
16125
Martin v. Löwis11437992002-04-12 09:54:03 +000016126_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016128exec 5>>config.log
16129{
16130 echo
16131 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16132## Running $as_me. ##
16133_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016134 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016135} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016136
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016139_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016142
16143# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016144for ac_config_target in $ac_config_targets
16145do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146 case $ac_config_target in
16147 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16148 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16149 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
16150 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000016151 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16152 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016153 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16154 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000016155 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016156 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016157
Matthias Klose3cef2a92012-03-14 23:39:33 +010016158 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 esac
16160done
16161
Martin v. Löwiseba40652007-08-30 20:10:57 +000016162
Martin v. Löwis11437992002-04-12 09:54:03 +000016163# If the user did not use the arguments to specify the items to instantiate,
16164# then the envvar interface is used. Set only those that are not.
16165# We use the long form for the default assignment because of an extremely
16166# bizarre bug on SunOS 4.1.3.
16167if $ac_need_defaults; then
16168 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16169 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16170fi
16171
Skip Montanaro6dead952003-09-25 14:50:04 +000016172# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000016173# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000016174# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175# Hook for its removal unless debugging.
16176# Note that there is a small window in which the directory will not be cleaned:
16177# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000016178$debug ||
16179{
Matthias Klose3cef2a92012-03-14 23:39:33 +010016180 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000016181 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010016182 : "${ac_tmp:=$tmp}"
16183 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016185 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000016186}
Martin v. Löwis11437992002-04-12 09:54:03 +000016187# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000016188
Martin v. Löwis11437992002-04-12 09:54:03 +000016189{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016191 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000016192} ||
16193{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016194 tmp=./conf$$-$RANDOM
16195 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016196} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016197ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000016198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016199# Set up the scripts for CONFIG_FILES section.
16200# No need to generate them if there are no CONFIG_FILES.
16201# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016203
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016204
16205ac_cr=`echo X | tr X '\015'`
16206# On cygwin, bash can eat \r inside `` if the user requested igncr.
16207# But we know of no other shell where ac_cr would be empty at this
16208# point, so we can use a bashism as a fallback.
16209if test "x$ac_cr" = x; then
16210 eval ac_cr=\$\'\\r\'
16211fi
16212ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16213if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016214 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016215else
16216 ac_cs_awk_cr=$ac_cr
16217fi
16218
Matthias Klose3cef2a92012-03-14 23:39:33 +010016219echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000016220_ACEOF
16221
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016223{
16224 echo "cat >conf$$subs.awk <<_ACEOF" &&
16225 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16226 echo "_ACEOF"
16227} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016228 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16229ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016230ac_delim='%!_!# '
16231for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016232 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016233 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016235 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
16236 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 break
16238 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016239 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016240 else
16241 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016244rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000016245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016246cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010016247cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016249sed -n '
16250h
16251s/^/S["/; s/!.*/"]=/
16252p
16253g
16254s/^[^!]*!//
16255:repl
16256t repl
16257s/'"$ac_delim"'$//
16258t delim
16259:nl
16260h
16261s/\(.\{148\}\)..*/\1/
16262t more1
16263s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16264p
16265n
16266b repl
16267:more1
16268s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16269p
16270g
16271s/.\{148\}//
16272t nl
16273:delim
16274h
16275s/\(.\{148\}\)..*/\1/
16276t more2
16277s/["\\]/\\&/g; s/^/"/; s/$/"/
16278p
16279b
16280:more2
16281s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16282p
16283g
16284s/.\{148\}//
16285t delim
16286' <conf$$subs.awk | sed '
16287/^[^""]/{
16288 N
16289 s/\n//
16290}
16291' >>$CONFIG_STATUS || ac_write_fail=1
16292rm -f conf$$subs.awk
16293cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16294_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016295cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016296 for (key in S) S_is_set[key] = 1
16297 FS = ""
16298
16299}
16300{
16301 line = $ 0
16302 nfields = split(line, field, "@")
16303 substed = 0
16304 len = length(field[1])
16305 for (i = 2; i < nfields; i++) {
16306 key = field[i]
16307 keylen = length(key)
16308 if (S_is_set[key]) {
16309 value = S[key]
16310 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16311 len += length(value) + length(field[++i])
16312 substed = 1
16313 } else
16314 len += 1 + keylen
16315 }
16316
16317 print line
16318}
16319
16320_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016322cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16323if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16324 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16325else
16326 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016327fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016328 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016329_ACEOF
16330
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016331# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16332# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016333# trailing colons and then remove the whole line if VPATH becomes empty
16334# (actually we leave an empty line to preserve line numbers).
16335if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016336 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16337h
16338s///
16339s/^/:/
16340s/[ ]*$/:/
16341s/:\$(srcdir):/:/g
16342s/:\${srcdir}:/:/g
16343s/:@srcdir@:/:/g
16344s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016345s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016346x
16347s/\(=[ ]*\).*/\1/
16348G
16349s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016350s/^[^=]*=[ ]*$//
16351}'
16352fi
16353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016355fi # test -n "$CONFIG_FILES"
16356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016357# Set up the scripts for CONFIG_HEADERS section.
16358# No need to generate them if there are no CONFIG_HEADERS.
16359# This happens for instance with `./config.status Makefile'.
16360if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016361cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016362BEGIN {
16363_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016365# Transform confdefs.h into an awk script `defines.awk', embedded as
16366# here-document in config.status, that substitutes the proper values into
16367# config.h.in to produce config.h.
16368
16369# Create a delimiter string that does not exist in confdefs.h, to ease
16370# handling of long lines.
16371ac_delim='%!_!# '
16372for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016373 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16374 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016375 break
16376 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016377 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016378 else
16379 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16380 fi
16381done
16382
16383# For the awk script, D is an array of macro values keyed by name,
16384# likewise P contains macro parameters if any. Preserve backslash
16385# newline sequences.
16386
16387ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16388sed -n '
16389s/.\{148\}/&'"$ac_delim"'/g
16390t rset
16391:rset
16392s/^[ ]*#[ ]*define[ ][ ]*/ /
16393t def
16394d
16395:def
16396s/\\$//
16397t bsnl
16398s/["\\]/\\&/g
16399s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16400D["\1"]=" \3"/p
16401s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16402d
16403:bsnl
16404s/["\\]/\\&/g
16405s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16406D["\1"]=" \3\\\\\\n"\\/p
16407t cont
16408s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16409t cont
16410d
16411:cont
16412n
16413s/.\{148\}/&'"$ac_delim"'/g
16414t clear
16415:clear
16416s/\\$//
16417t bsnlc
16418s/["\\]/\\&/g; s/^/"/; s/$/"/p
16419d
16420:bsnlc
16421s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16422b cont
16423' <confdefs.h | sed '
16424s/'"$ac_delim"'/"\\\
16425"/g' >>$CONFIG_STATUS || ac_write_fail=1
16426
16427cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16428 for (key in D) D_is_set[key] = 1
16429 FS = ""
16430}
16431/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16432 line = \$ 0
16433 split(line, arg, " ")
16434 if (arg[1] == "#") {
16435 defundef = arg[2]
16436 mac1 = arg[3]
16437 } else {
16438 defundef = substr(arg[1], 2)
16439 mac1 = arg[2]
16440 }
16441 split(mac1, mac2, "(") #)
16442 macro = mac2[1]
16443 prefix = substr(line, 1, index(line, defundef) - 1)
16444 if (D_is_set[macro]) {
16445 # Preserve the white space surrounding the "#".
16446 print prefix "define", macro P[macro] D[macro]
16447 next
16448 } else {
16449 # Replace #undef with comments. This is necessary, for example,
16450 # in the case of _POSIX_SOURCE, which is predefined and required
16451 # on some systems where configure will not decide to define it.
16452 if (defundef == "undef") {
16453 print "/*", prefix defundef, macro, "*/"
16454 next
16455 }
16456 }
16457}
16458{ print }
16459_ACAWK
16460_ACEOF
16461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016462 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016463fi # test -n "$CONFIG_HEADERS"
16464
16465
16466eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16467shift
16468for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016469do
16470 case $ac_tag in
16471 :[FHLC]) ac_mode=$ac_tag; continue;;
16472 esac
16473 case $ac_mode$ac_tag in
16474 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016475 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476 :[FH]-) ac_tag=-:-;;
16477 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16478 esac
16479 ac_save_IFS=$IFS
16480 IFS=:
16481 set x $ac_tag
16482 IFS=$ac_save_IFS
16483 shift
16484 ac_file=$1
16485 shift
16486
16487 case $ac_mode in
16488 :L) ac_source=$1;;
16489 :[FH])
16490 ac_file_inputs=
16491 for ac_f
16492 do
16493 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016494 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016495 *) # Look for the file first in the build tree, then in the source tree
16496 # (if the path is not absolute). The absolute path cannot be DOS-style,
16497 # because $ac_f cannot contain `:'.
16498 test -f "$ac_f" ||
16499 case $ac_f in
16500 [\\/$]*) false;;
16501 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16502 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016503 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016504 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016505 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16506 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016507 done
16508
16509 # Let's still pretend it is `configure' which instantiates (i.e., don't
16510 # use $as_me), people would be surprised to read:
16511 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016512 configure_input='Generated from '`
16513 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16514 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515 if test x"$ac_file" != x-; then
16516 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016517 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16518$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016520 # Neutralize special characters interpreted by sed in replacement strings.
16521 case $configure_input in #(
16522 *\&* | *\|* | *\\* )
16523 ac_sed_conf_input=`$as_echo "$configure_input" |
16524 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16525 *) ac_sed_conf_input=$configure_input;;
16526 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016527
16528 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016529 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16530 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531 esac
16532 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016533 esac
16534
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016536$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016537 X"$ac_file" : 'X\(//\)[^/]' \| \
16538 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016539 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016540$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016541 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16542 s//\1/
16543 q
16544 }
16545 /^X\(\/\/\)[^/].*/{
16546 s//\1/
16547 q
16548 }
16549 /^X\(\/\/\)$/{
16550 s//\1/
16551 q
16552 }
16553 /^X\(\/\).*/{
16554 s//\1/
16555 q
16556 }
16557 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016558 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016559 ac_builddir=.
16560
Martin v. Löwiseba40652007-08-30 20:10:57 +000016561case "$ac_dir" in
16562.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16563*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016564 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016565 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016566 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016567 case $ac_top_builddir_sub in
16568 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16569 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16570 esac ;;
16571esac
16572ac_abs_top_builddir=$ac_pwd
16573ac_abs_builddir=$ac_pwd$ac_dir_suffix
16574# for backward compatibility:
16575ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016576
16577case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016578 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016579 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580 ac_top_srcdir=$ac_top_builddir_sub
16581 ac_abs_top_srcdir=$ac_pwd ;;
16582 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584 ac_top_srcdir=$srcdir
16585 ac_abs_top_srcdir=$srcdir ;;
16586 *) # Relative name.
16587 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16588 ac_top_srcdir=$ac_top_build_prefix$srcdir
16589 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016590esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016591ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016592
Martin v. Löwis11437992002-04-12 09:54:03 +000016593
Martin v. Löwiseba40652007-08-30 20:10:57 +000016594 case $ac_mode in
16595 :F)
16596 #
16597 # CONFIG_FILE
16598 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016599
16600 case $INSTALL in
16601 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016602 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016604 ac_MKDIR_P=$MKDIR_P
16605 case $MKDIR_P in
16606 [\\/$]* | ?:[\\/]* ) ;;
16607 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16608 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016609_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016611cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016612# If the template does not know about datarootdir, expand it.
16613# FIXME: This hack should be removed a few years after 2.60.
16614ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016615ac_sed_dataroot='
16616/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016617 p
16618 q
16619}
16620/@datadir@/p
16621/@docdir@/p
16622/@infodir@/p
16623/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016624/@mandir@/p'
16625case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626*datarootdir*) ac_datarootdir_seen=yes;;
16627*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016628 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16629$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016630_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016632 ac_datarootdir_hack='
16633 s&@datadir@&$datadir&g
16634 s&@docdir@&$docdir&g
16635 s&@infodir@&$infodir&g
16636 s&@localedir@&$localedir&g
16637 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016638 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639esac
16640_ACEOF
16641
16642# Neutralize VPATH when `$srcdir' = `.'.
16643# Shell code in configure.ac might set extrasub.
16644# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16646ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016647$extrasub
16648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016649cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016650:t
16651/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016652s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016653s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016654s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016655s&@srcdir@&$ac_srcdir&;t t
16656s&@abs_srcdir@&$ac_abs_srcdir&;t t
16657s&@top_srcdir@&$ac_top_srcdir&;t t
16658s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16659s&@builddir@&$ac_builddir&;t t
16660s&@abs_builddir@&$ac_abs_builddir&;t t
16661s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16662s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016663s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016664$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016665"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016666eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16667 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016668
Martin v. Löwiseba40652007-08-30 20:10:57 +000016669test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016670 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16671 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16672 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016674which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016675$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016676which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016677
Matthias Klose3cef2a92012-03-14 23:39:33 +010016678 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016680 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16681 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016682 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016683 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016684 ;;
16685 :H)
16686 #
16687 # CONFIG_HEADER
16688 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016689 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016690 {
16691 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016692 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16693 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016694 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016695 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016696 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16697$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016699 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016700 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016701 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016702 fi
16703 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016704 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016705 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016706 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016709
Martin v. Löwiseba40652007-08-30 20:10:57 +000016710
16711 esac
16712
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016713
16714 case $ac_file$ac_mode in
16715 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16716
16717 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016718done # for ac_tag
16719
Guido van Rossum627b2d71993-12-24 10:39:16 +000016720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016721as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016722_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016723ac_clean_files=$ac_clean_files_save
16724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016725test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016726 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016727
Martin v. Löwis11437992002-04-12 09:54:03 +000016728
16729# configure is writing to config.log, and then calls config.status.
16730# config.status does its own redirection, appending to config.log.
16731# Unfortunately, on DOS this fails, as config.log is still kept open
16732# by configure, so config.status won't be able to write to it; its
16733# output is simply discarded. So we exec the FD to /dev/null,
16734# effectively closing config.log, so it can be properly (re)opened and
16735# appended to by config.status. When coming back to configure, we
16736# need to make the FD available again.
16737if test "$no_create" != yes; then
16738 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016739 ac_config_status_args=
16740 test "$silent" = yes &&
16741 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016742 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016743 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 exec 5>>config.log
16745 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16746 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016747 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016748fi
16749if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16751$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016752fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016753
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016754
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016755echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016756if test ! -f Modules/Setup
16757then
16758 cp $srcdir/Modules/Setup.dist Modules/Setup
16759fi
16760
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016761echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016762if test ! -f Modules/Setup.local
16763then
16764 echo "# Edit this file for local setup changes" >Modules/Setup.local
16765fi
16766
16767echo "creating Makefile"
16768$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16769 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016770 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016771
16772case $ac_sys_system in
16773BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016775
16776 Support for BeOS is deprecated as of Python 2.6.
16777 See PEP 11 for the gory details.
16778 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016779$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016780
16781 Support for BeOS is deprecated as of Python 2.6.
16782 See PEP 11 for the gory details.
16783 " >&2;}
16784 ;;
16785*) ;;
16786esac
16787
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016788mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016789
16790if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16791 echo "" >&6
16792 echo "" >&6
16793 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 +000016794 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016795 echo "" >&6
16796 echo "" >&6
16797fi