blob: f5ff3cea448ba6e31debe4a472eecbbd83d3c0b1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# Generated by GNU Autoconf 2.69 for python 3.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $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 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_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 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200704PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200705PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200706MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200707ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000708MAINCC
709CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200710GREP
711CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719EXPORT_MACOSX_DEPLOYMENT_TARGET
720CONFIGURE_MACOSX_DEPLOYMENT_TARGET
721SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200722_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000723MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000724FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000725FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800726FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000727FRAMEWORKALTINSTALLLAST
728FRAMEWORKALTINSTALLFIRST
729FRAMEWORKINSTALLLAST
730FRAMEWORKINSTALLFIRST
731PYTHONFRAMEWORKINSTALLDIR
732PYTHONFRAMEWORKPREFIX
733PYTHONFRAMEWORKDIR
734PYTHONFRAMEWORKIDENTIFIER
735PYTHONFRAMEWORK
736LIPO_32BIT_FLAGS
737ARCH_RUN_32BIT
738UNIVERSALSDK
739CONFIG_ARGS
740SOVERSION
741VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000742GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200743PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200744PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100745host_os
746host_vendor
747host_cpu
748host
749build_os
750build_vendor
751build_cpu
752build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500753HAS_HG
754HGBRANCH
755HGTAG
756HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400757BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000758target_alias
759host_alias
760build_alias
761LIBS
762ECHO_T
763ECHO_N
764ECHO_C
765DEFS
766mandir
767localedir
768libdir
769psdir
770pdfdir
771dvidir
772htmldir
773infodir
774docdir
775oldincludedir
776includedir
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700777runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000778localstatedir
779sharedstatedir
780sysconfdir
781datadir
782datarootdir
783libexecdir
784sbindir
785bindir
786program_transform_name
787prefix
788exec_prefix
789PACKAGE_URL
790PACKAGE_BUGREPORT
791PACKAGE_STRING
792PACKAGE_VERSION
793PACKAGE_TARNAME
794PACKAGE_NAME
795PATH_SEPARATOR
796SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000797ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000798ac_user_opts='
799enable_option_checking
800enable_universalsdk
801with_universal_archs
802with_framework_name
803enable_framework
804with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600805with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_cxx_main
807with_suffix
808enable_shared
809enable_profiling
810with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700811with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100812with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100813with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_libs
815with_system_expat
816with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100817with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000818enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700819with_tcltk_includes
820with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_dbmliborder
822with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_threads
824with_thread
825enable_ipv6
826with_doc_strings
827with_tsc
828with_pymalloc
829with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_fpectl
831with_libm
832with_libc
833enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800835with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000836'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 ac_precious_vars='build_alias
838host_alias
839target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100840MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841CC
842CFLAGS
843LDFLAGS
844LIBS
845CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100846CPP
847PKG_CONFIG
848PKG_CONFIG_PATH
849PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000853ac_init_help=
854ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000855ac_unrecognized_opts=
856ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# The variables have the same names as the options, with
858# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862no_recursion=
863prefix=NONE
864program_prefix=NONE
865program_suffix=NONE
866program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871x_includes=NONE
872x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000873
874# Installation directory options.
875# These are left unexpanded so users can "make install exec_prefix=/foo"
876# and all the variables that are supposed to be based on exec_prefix
877# by default will actually change.
878# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880bindir='${exec_prefix}/bin'
881sbindir='${exec_prefix}/sbin'
882libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883datarootdir='${prefix}/share'
884datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885sysconfdir='${prefix}/etc'
886sharedstatedir='${prefix}/com'
887localstatedir='${prefix}/var'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700888runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889includedir='${prefix}/include'
890oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892infodir='${datarootdir}/info'
893htmldir='${docdir}'
894dvidir='${docdir}'
895pdfdir='${docdir}'
896psdir='${docdir}'
897libdir='${exec_prefix}/lib'
898localedir='${datarootdir}/locale'
899mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 # If the previous option needs an argument, assign it.
906 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 ac_prev=
909 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200913 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914 *=) ac_optarg= ;;
915 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Accept the important Cygnus configure options, so we can diagnose typos.
919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_dashdash$ac_option in
921 --)
922 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924 -bindir | --bindir | --bindi | --bind | --bin | --bi)
925 ac_prev=bindir ;;
926 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 -cache-file | --cache-file | --cache-fil | --cache-fi \
935 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936 ac_prev=cache_file ;;
937 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 cache_file=$ac_optarg ;;
940
941 --config-cache | -C)
942 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950 | --dataroo | --dataro | --datar)
951 ac_prev=datarootdir ;;
952 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954 datarootdir=$ac_optarg ;;
955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200960 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt_orig=$ac_useropt
962 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963 case $ac_user_opts in
964 *"
965"enable_$ac_useropt"
966"*) ;;
967 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968 ac_unrecognized_sep=', ';;
969 esac
970 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971
972 -docdir | --docdir | --docdi | --doc | --do)
973 ac_prev=docdir ;;
974 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975 docdir=$ac_optarg ;;
976
977 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978 ac_prev=dvidir ;;
979 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200986 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000 | --exec | --exe | --ex)
1001 ac_prev=exec_prefix ;;
1002 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Obsolete; use --with-gas.
1009 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 -help | --help | --hel | --he | -h)
1012 ac_init_help=long ;;
1013 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014 ac_init_help=recursive ;;
1015 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024 ac_prev=htmldir ;;
1025 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026 | --ht=*)
1027 htmldir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -includedir | --includedir | --includedi | --included | --include \
1030 | --includ | --inclu | --incl | --inc)
1031 ac_prev=includedir ;;
1032 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -infodir | --infodir | --infodi | --infod | --info | --inf)
1037 ac_prev=infodir ;;
1038 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -libdir | --libdir | --libdi | --libd)
1042 ac_prev=libdir ;;
1043 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047 | --libexe | --libex | --libe)
1048 ac_prev=libexecdir ;;
1049 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -localedir | --localedir | --localedi | --localed | --locale)
1054 ac_prev=localedir ;;
1055 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056 localedir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 ac_prev=localstatedir ;;
1061 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066 ac_prev=mandir ;;
1067 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Obsolete; use --without-fp.
1072 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 no_create=yes ;;
1077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084 | --oldin | --oldi | --old | --ol | --o)
1085 ac_prev=oldincludedir ;;
1086 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092 ac_prev=prefix ;;
1093 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097 | --program-pre | --program-pr | --program-p)
1098 ac_prev=program_prefix ;;
1099 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104 | --program-suf | --program-su | --program-s)
1105 ac_prev=program_suffix ;;
1106 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-transform-name | --program-transform-name \
1111 | --program-transform-nam | --program-transform-na \
1112 | --program-transform-n | --program-transform- \
1113 | --program-transform | --program-transfor \
1114 | --program-transfo | --program-transf \
1115 | --program-trans | --program-tran \
1116 | --progr-tra | --program-tr | --program-t)
1117 ac_prev=program_transform_name ;;
1118 -program-transform-name=* | --program-transform-name=* \
1119 | --program-transform-nam=* | --program-transform-na=* \
1120 | --program-transform-n=* | --program-transform-=* \
1121 | --program-transform=* | --program-transfor=* \
1122 | --program-transfo=* | --program-transf=* \
1123 | --program-trans=* | --program-tran=* \
1124 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001127 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128 ac_prev=pdfdir ;;
1129 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130 pdfdir=$ac_optarg ;;
1131
1132 -psdir | --psdir | --psdi | --psd | --ps)
1133 ac_prev=psdir ;;
1134 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135 psdir=$ac_optarg ;;
1136
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138 | -silent | --silent | --silen | --sile | --sil)
1139 silent=yes ;;
1140
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001141 -runstatedir | --runstatedir | --runstatedi | --runstated \
1142 | --runstate | --runstat | --runsta | --runst | --runs \
1143 | --run | --ru | --r)
1144 ac_prev=runstatedir ;;
1145 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1146 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1147 | --run=* | --ru=* | --r=*)
1148 runstatedir=$ac_optarg ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001287 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001400\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001440 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 --libdir=DIR object code libraries [EPREFIX/lib]
1442 --includedir=DIR C header files [PREFIX/include]
1443 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1444 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1445 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1446 --infodir=DIR info documentation [DATAROOTDIR/info]
1447 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1448 --mandir=DIR man documentation [DATAROOTDIR/man]
1449 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1450 --htmldir=DIR html documentation [DOCDIR]
1451 --dvidir=DIR dvi documentation [DOCDIR]
1452 --pdfdir=DIR pdf documentation [DOCDIR]
1453 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001454_ACEOF
1455
1456 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001457
1458System types:
1459 --build=BUILD configure for building on BUILD [guessed]
1460 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462fi
1463
1464if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001466 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 cat <<\_ACEOF
1469
1470Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1473 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001474 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001475 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --enable-framework[=INSTALLDIR]
1477 Build (MacOSX|Darwin) framework
1478 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001479 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001480 --enable-loadable-sqlite-extensions
1481 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-ipv6 Enable ipv6 (with ipv4) support
1483 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001484 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001485 use big digits for Python longs [[BITS=30]]
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)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001492 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001493 --with-framework-name=FRAMEWORK
1494 specify an alternate name of the framework built
1495 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001497 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001503 --with-lto Enable Link Time Optimization in PGO builds.
1504 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001505 --with-hash-algorithm=[fnv|siphash24]
1506 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001507 --with-address-sanitizer
1508 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001510 --with-system-expat build pyexpat module using an installed expat
1511 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001512 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001513 --with-system-libmpdec build _decimal module using an installed libmpdec
1514 library
Ned Deilyd819b932013-09-06 01:07:05 -07001515 --with-tcltk-includes='-I...'
1516 override search for Tcl and Tk include files
1517 --with-tcltk-libs='-L...'
1518 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001519 --with-dbmliborder=db1:db2:...
1520 order to check db backends for dbm. Valid value is a
1521 colon separated string with the backend names
1522 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001523 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-threads[=DIRECTORY]
1525 disable/enable thread support
1526 --with(out)-thread[=DIRECTORY]
1527 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001529 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001531 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with-fpectl enable SIGFPE catching
1533 --with-libm=STRING math library
1534 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001535 --with(out)-computed-gotos
1536 Use computed gotos in evaluation loop (enabled by
1537 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001538 --with(out)-ensurepip=[=upgrade]
1539 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001542 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CC C compiler command
1544 CFLAGS C compiler flags
1545 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1546 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001548 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001549 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001551 PKG_CONFIG path to pkg-config utility
1552 PKG_CONFIG_PATH
1553 directories to add to pkg-config's search path
1554 PKG_CONFIG_LIBDIR
1555 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001556
1557Use these variables to override the choices made by `configure' or to help
1558it to find libraries and programs with nonstandard names/locations.
1559
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001560Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001563fi
1564
1565if test "$ac_init_help" = "recursive"; then
1566 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 test -d "$ac_dir" ||
1569 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1570 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001571 ac_builddir=.
1572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573case "$ac_dir" in
1574.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001576 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 case $ac_top_builddir_sub in
1580 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1582 esac ;;
1583esac
1584ac_abs_top_builddir=$ac_pwd
1585ac_abs_builddir=$ac_pwd$ac_dir_suffix
1586# for backward compatibility:
1587ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001588
1589case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 ac_top_srcdir=$ac_top_builddir_sub
1593 ac_abs_top_srcdir=$ac_pwd ;;
1594 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001595 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 ac_top_srcdir=$srcdir
1597 ac_abs_top_srcdir=$srcdir ;;
1598 *) # Relative name.
1599 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1600 ac_top_srcdir=$ac_top_build_prefix$srcdir
1601 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001602esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 cd "$ac_dir" || { ac_status=$?; continue; }
1606 # Check for guested configure.
1607 if test -f "$ac_srcdir/configure.gnu"; then
1608 echo &&
1609 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1610 elif test -f "$ac_srcdir/configure"; then
1611 echo &&
1612 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001613 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001614 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 fi || ac_status=$?
1616 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001617 done
1618fi
1619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001621if $ac_init_version; then
1622 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001623python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001624generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001625
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001626Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001627This configure script is free software; the Free Software Foundation
1628gives unlimited permission to copy, distribute and modify it.
1629_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001632
1633## ------------------------ ##
1634## Autoconf initialization. ##
1635## ------------------------ ##
1636
1637# ac_fn_c_try_compile LINENO
1638# --------------------------
1639# Try to compile conftest.$ac_ext, and return whether this succeeded.
1640ac_fn_c_try_compile ()
1641{
1642 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643 rm -f conftest.$ac_objext
1644 if { { ac_try="$ac_compile"
1645case "(($ac_try" in
1646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1647 *) ac_try_echo=$ac_try;;
1648esac
1649eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1650$as_echo "$ac_try_echo"; } >&5
1651 (eval "$ac_compile") 2>conftest.err
1652 ac_status=$?
1653 if test -s conftest.err; then
1654 grep -v '^ *+' conftest.err >conftest.er1
1655 cat conftest.er1 >&5
1656 mv -f conftest.er1 conftest.err
1657 fi
1658 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1659 test $ac_status = 0; } && {
1660 test -z "$ac_c_werror_flag" ||
1661 test ! -s conftest.err
1662 } && test -s conftest.$ac_objext; then :
1663 ac_retval=0
1664else
1665 $as_echo "$as_me: failed program was:" >&5
1666sed 's/^/| /' conftest.$ac_ext >&5
1667
1668 ac_retval=1
1669fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001670 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001671 as_fn_set_status $ac_retval
1672
1673} # ac_fn_c_try_compile
1674
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001675# ac_fn_c_try_cpp LINENO
1676# ----------------------
1677# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1678ac_fn_c_try_cpp ()
1679{
1680 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681 if { { ac_try="$ac_cpp conftest.$ac_ext"
1682case "(($ac_try" in
1683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1684 *) ac_try_echo=$ac_try;;
1685esac
1686eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1687$as_echo "$ac_try_echo"; } >&5
1688 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1689 ac_status=$?
1690 if test -s conftest.err; then
1691 grep -v '^ *+' conftest.err >conftest.er1
1692 cat conftest.er1 >&5
1693 mv -f conftest.er1 conftest.err
1694 fi
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } > conftest.i && {
1697 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1698 test ! -s conftest.err
1699 }; then :
1700 ac_retval=0
1701else
1702 $as_echo "$as_me: failed program was:" >&5
1703sed 's/^/| /' conftest.$ac_ext >&5
1704
1705 ac_retval=1
1706fi
1707 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1708 as_fn_set_status $ac_retval
1709
1710} # ac_fn_c_try_cpp
1711
Matthias Kloseb9621712010-04-24 17:59:49 +00001712# ac_fn_c_try_link LINENO
1713# -----------------------
1714# Try to link conftest.$ac_ext, and return whether this succeeded.
1715ac_fn_c_try_link ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1718 rm -f conftest.$ac_objext conftest$ac_exeext
1719 if { { ac_try="$ac_link"
1720case "(($ac_try" in
1721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1722 *) ac_try_echo=$ac_try;;
1723esac
1724eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1725$as_echo "$ac_try_echo"; } >&5
1726 (eval "$ac_link") 2>conftest.err
1727 ac_status=$?
1728 if test -s conftest.err; then
1729 grep -v '^ *+' conftest.err >conftest.er1
1730 cat conftest.er1 >&5
1731 mv -f conftest.er1 conftest.err
1732 fi
1733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1734 test $ac_status = 0; } && {
1735 test -z "$ac_c_werror_flag" ||
1736 test ! -s conftest.err
1737 } && test -s conftest$ac_exeext && {
1738 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001739 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001740 }; then :
1741 ac_retval=0
1742else
1743 $as_echo "$as_me: failed program was:" >&5
1744sed 's/^/| /' conftest.$ac_ext >&5
1745
1746 ac_retval=1
1747fi
1748 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1749 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1750 # interfere with the next link command; also delete a directory that is
1751 # left behind by Apple's compiler. We do this before executing the actions.
1752 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001753 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001754 as_fn_set_status $ac_retval
1755
1756} # ac_fn_c_try_link
1757
Matthias Kloseb9621712010-04-24 17:59:49 +00001758# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1759# -------------------------------------------------------
1760# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1761# the include files in INCLUDES and setting the cache variable VAR
1762# accordingly.
1763ac_fn_c_check_header_mongrel ()
1764{
1765 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1768$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001769if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 $as_echo_n "(cached) " >&6
1771fi
1772eval ac_res=\$$3
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1774$as_echo "$ac_res" >&6; }
1775else
1776 # Is the header compilable?
1777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1778$as_echo_n "checking $2 usability... " >&6; }
1779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1780/* end confdefs.h. */
1781$4
1782#include <$2>
1783_ACEOF
1784if ac_fn_c_try_compile "$LINENO"; then :
1785 ac_header_compiler=yes
1786else
1787 ac_header_compiler=no
1788fi
1789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1791$as_echo "$ac_header_compiler" >&6; }
1792
1793# Is the header present?
1794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1795$as_echo_n "checking $2 presence... " >&6; }
1796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797/* end confdefs.h. */
1798#include <$2>
1799_ACEOF
1800if ac_fn_c_try_cpp "$LINENO"; then :
1801 ac_header_preproc=yes
1802else
1803 ac_header_preproc=no
1804fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001805rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1807$as_echo "$ac_header_preproc" >&6; }
1808
1809# So? What about this header?
1810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1811 yes:no: )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1813$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1816 ;;
1817 no:yes:* )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1819$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1821$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1823$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1825$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001828( $as_echo "## --------------------------------------- ##
1829## Report this to https://bugs.python.org/ ##
1830## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 ) | sed "s/^/$as_me: WARNING: /" >&2
1832 ;;
1833esac
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1835$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001836if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 $as_echo_n "(cached) " >&6
1838else
1839 eval "$3=\$ac_header_compiler"
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
1844fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001846
1847} # ac_fn_c_check_header_mongrel
1848
1849# ac_fn_c_try_run LINENO
1850# ----------------------
1851# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1852# that executables *can* be run.
1853ac_fn_c_try_run ()
1854{
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_link"
1857case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_link") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1867 { { case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_try") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; }; }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: program exited with status $ac_status" >&5
1880 $as_echo "$as_me: failed program was:" >&5
1881sed 's/^/| /' conftest.$ac_ext >&5
1882
1883 ac_retval=$ac_status
1884fi
1885 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001886 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001887 as_fn_set_status $ac_retval
1888
1889} # ac_fn_c_try_run
1890
1891# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1892# -------------------------------------------------------
1893# Tests whether HEADER exists and can be compiled using the include files in
1894# INCLUDES, setting the cache variable VAR accordingly.
1895ac_fn_c_check_header_compile ()
1896{
1897 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1899$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001900if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001901 $as_echo_n "(cached) " >&6
1902else
1903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1904/* end confdefs.h. */
1905$4
1906#include <$2>
1907_ACEOF
1908if ac_fn_c_try_compile "$LINENO"; then :
1909 eval "$3=yes"
1910else
1911 eval "$3=no"
1912fi
1913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1914fi
1915eval ac_res=\$$3
1916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1917$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001918 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001919
1920} # ac_fn_c_check_header_compile
1921
Matthias Kloseb9621712010-04-24 17:59:49 +00001922# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1923# -------------------------------------------
1924# Tests whether TYPE exists after having included INCLUDES, setting cache
1925# variable VAR accordingly.
1926ac_fn_c_check_type ()
1927{
1928 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1930$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001932 $as_echo_n "(cached) " >&6
1933else
1934 eval "$3=no"
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$4
1938int
1939main ()
1940{
1941if (sizeof ($2))
1942 return 0;
1943 ;
1944 return 0;
1945}
1946_ACEOF
1947if ac_fn_c_try_compile "$LINENO"; then :
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof (($2)))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961
1962else
1963 eval "$3=yes"
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1968fi
1969eval ac_res=\$$3
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1971$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001972 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001973
1974} # ac_fn_c_check_type
1975
1976# ac_fn_c_find_uintX_t LINENO BITS VAR
1977# ------------------------------------
1978# Finds an unsigned integer type with width BITS, setting cache variable VAR
1979# accordingly.
1980ac_fn_c_find_uintX_t ()
1981{
1982 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1984$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001985if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001986 $as_echo_n "(cached) " >&6
1987else
1988 eval "$3=no"
1989 # Order is important - never check a type that is potentially smaller
1990 # than half of the expected target width.
1991 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1992 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994/* end confdefs.h. */
1995$ac_includes_default
1996int
1997main ()
1998{
1999static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002000test_array [0] = 0;
2001return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 case $ac_type in #(
2009 uint$2_t) :
2010 eval "$3=yes" ;; #(
2011 *) :
2012 eval "$3=\$ac_type" ;;
2013esac
2014fi
2015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002016 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018else
2019 break
2020fi
2021 done
2022fi
2023eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002027
2028} # ac_fn_c_find_uintX_t
2029
2030# ac_fn_c_find_intX_t LINENO BITS VAR
2031# -----------------------------------
2032# Finds a signed integer type with width BITS, setting cache variable VAR
2033# accordingly.
2034ac_fn_c_find_intX_t ()
2035{
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2038$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002039if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002040 $as_echo_n "(cached) " >&6
2041else
2042 eval "$3=no"
2043 # Order is important - never check a type that is potentially smaller
2044 # than half of the expected target width.
2045 for ac_type in int$2_t 'int' 'long int' \
2046 'long long int' 'short int' 'signed char'; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002050 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002051int
2052main ()
2053{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002054static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002055test_array [0] = 0;
2056return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002057
2058 ;
2059 return 0;
2060}
2061_ACEOF
2062if ac_fn_c_try_compile "$LINENO"; then :
2063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064/* end confdefs.h. */
2065$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002066 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002067int
2068main ()
2069{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002070static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002071 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002072test_array [0] = 0;
2073return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002074
2075 ;
2076 return 0;
2077}
2078_ACEOF
2079if ac_fn_c_try_compile "$LINENO"; then :
2080
2081else
2082 case $ac_type in #(
2083 int$2_t) :
2084 eval "$3=yes" ;; #(
2085 *) :
2086 eval "$3=\$ac_type" ;;
2087esac
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002092 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002093
2094else
2095 break
2096fi
2097 done
2098fi
2099eval ac_res=\$$3
2100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2101$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002102 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104} # ac_fn_c_find_intX_t
2105
2106# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2107# --------------------------------------------
2108# Tries to find the compile-time value of EXPR in a program that includes
2109# INCLUDES, setting VAR accordingly. Returns whether the value could be
2110# computed
2111ac_fn_c_compute_int ()
2112{
2113 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2114 if test "$cross_compiling" = yes; then
2115 # Depending upon the size, compute the lo and hi bounds.
2116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002123test_array [0] = 0;
2124return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_lo=0 ac_mid=0
2132 while :; do
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134/* end confdefs.h. */
2135$4
2136int
2137main ()
2138{
2139static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002140test_array [0] = 0;
2141return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002142
2143 ;
2144 return 0;
2145}
2146_ACEOF
2147if ac_fn_c_try_compile "$LINENO"; then :
2148 ac_hi=$ac_mid; break
2149else
2150 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2151 if test $ac_lo -le $ac_mid; then
2152 ac_lo= ac_hi=
2153 break
2154 fi
2155 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2156fi
2157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2158 done
2159else
2160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2161/* end confdefs.h. */
2162$4
2163int
2164main ()
2165{
2166static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002167test_array [0] = 0;
2168return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002169
2170 ;
2171 return 0;
2172}
2173_ACEOF
2174if ac_fn_c_try_compile "$LINENO"; then :
2175 ac_hi=-1 ac_mid=-1
2176 while :; do
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180int
2181main ()
2182{
2183static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002184test_array [0] = 0;
2185return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002186
2187 ;
2188 return 0;
2189}
2190_ACEOF
2191if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_lo=$ac_mid; break
2193else
2194 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2195 if test $ac_mid -le $ac_hi; then
2196 ac_lo= ac_hi=
2197 break
2198 fi
2199 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2200fi
2201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 done
2203else
2204 ac_lo= ac_hi=
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209# Binary search between lo and hi bounds.
2210while test "x$ac_lo" != "x$ac_hi"; do
2211 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2213/* end confdefs.h. */
2214$4
2215int
2216main ()
2217{
2218static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002219test_array [0] = 0;
2220return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002221
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_compile "$LINENO"; then :
2227 ac_hi=$ac_mid
2228else
2229 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2230fi
2231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2232done
2233case $ac_lo in #((
2234?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2235'') ac_retval=1 ;;
2236esac
2237 else
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h. */
2240$4
2241static long int longval () { return $2; }
2242static unsigned long int ulongval () { return $2; }
2243#include <stdio.h>
2244#include <stdlib.h>
2245int
2246main ()
2247{
2248
2249 FILE *f = fopen ("conftest.val", "w");
2250 if (! f)
2251 return 1;
2252 if (($2) < 0)
2253 {
2254 long int i = longval ();
2255 if (i != ($2))
2256 return 1;
2257 fprintf (f, "%ld", i);
2258 }
2259 else
2260 {
2261 unsigned long int i = ulongval ();
2262 if (i != ($2))
2263 return 1;
2264 fprintf (f, "%lu", i);
2265 }
2266 /* Do not output a trailing newline, as this causes \r\n confusion
2267 on some platforms. */
2268 return ferror (f) || fclose (f) != 0;
2269
2270 ;
2271 return 0;
2272}
2273_ACEOF
2274if ac_fn_c_try_run "$LINENO"; then :
2275 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2276else
2277 ac_retval=1
2278fi
2279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2280 conftest.$ac_objext conftest.beam conftest.$ac_ext
2281rm -f conftest.val
2282
2283 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002284 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002285 as_fn_set_status $ac_retval
2286
2287} # ac_fn_c_compute_int
2288
2289# ac_fn_c_check_func LINENO FUNC VAR
2290# ----------------------------------
2291# Tests whether FUNC exists, setting the cache variable VAR accordingly
2292ac_fn_c_check_func ()
2293{
2294 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2296$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002297if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002298 $as_echo_n "(cached) " >&6
2299else
2300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2301/* end confdefs.h. */
2302/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2303 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2304#define $2 innocuous_$2
2305
2306/* System header to define __stub macros and hopefully few prototypes,
2307 which can conflict with char $2 (); below.
2308 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2309 <limits.h> exists even on freestanding compilers. */
2310
2311#ifdef __STDC__
2312# include <limits.h>
2313#else
2314# include <assert.h>
2315#endif
2316
2317#undef $2
2318
2319/* Override any GCC internal prototype to avoid an error.
2320 Use char because int might match the return type of a GCC
2321 builtin and then its argument prototype would still apply. */
2322#ifdef __cplusplus
2323extern "C"
2324#endif
2325char $2 ();
2326/* The GNU C library defines this for functions which it implements
2327 to always fail with ENOSYS. Some functions are actually named
2328 something starting with __ and the normal name is an alias. */
2329#if defined __stub_$2 || defined __stub___$2
2330choke me
2331#endif
2332
2333int
2334main ()
2335{
2336return $2 ();
2337 ;
2338 return 0;
2339}
2340_ACEOF
2341if ac_fn_c_try_link "$LINENO"; then :
2342 eval "$3=yes"
2343else
2344 eval "$3=no"
2345fi
2346rm -f core conftest.err conftest.$ac_objext \
2347 conftest$ac_exeext conftest.$ac_ext
2348fi
2349eval ac_res=\$$3
2350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2351$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002352 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002353
2354} # ac_fn_c_check_func
2355
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002356# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2357# ---------------------------------------------
2358# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2359# accordingly.
2360ac_fn_c_check_decl ()
2361{
2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2363 as_decl_name=`echo $2|sed 's/ *(.*//'`
2364 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2366$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2367if eval \${$3+:} false; then :
2368 $as_echo_n "(cached) " >&6
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$4
2373int
2374main ()
2375{
2376#ifndef $as_decl_name
2377#ifdef __cplusplus
2378 (void) $as_decl_use;
2379#else
2380 (void) $as_decl_name;
2381#endif
2382#endif
2383
2384 ;
2385 return 0;
2386}
2387_ACEOF
2388if ac_fn_c_try_compile "$LINENO"; then :
2389 eval "$3=yes"
2390else
2391 eval "$3=no"
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$3
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
2398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2399
2400} # ac_fn_c_check_decl
2401
Matthias Kloseb9621712010-04-24 17:59:49 +00002402# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2403# ----------------------------------------------------
2404# Tries to find if the field MEMBER exists in type AGGR, after including
2405# INCLUDES, setting cache variable VAR accordingly.
2406ac_fn_c_check_member ()
2407{
2408 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2410$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002411if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002412 $as_echo_n "(cached) " >&6
2413else
2414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415/* end confdefs.h. */
2416$5
2417int
2418main ()
2419{
2420static $2 ac_aggr;
2421if (ac_aggr.$3)
2422return 0;
2423 ;
2424 return 0;
2425}
2426_ACEOF
2427if ac_fn_c_try_compile "$LINENO"; then :
2428 eval "$4=yes"
2429else
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431/* end confdefs.h. */
2432$5
2433int
2434main ()
2435{
2436static $2 ac_aggr;
2437if (sizeof ac_aggr.$3)
2438return 0;
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$4=yes"
2445else
2446 eval "$4=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2451fi
2452eval ac_res=\$$4
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2454$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002455 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002456
2457} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002459This file contains any messages produced by compilers while
2460running configure, to aid debugging if configure makes a mistake.
2461
Yury Selivanov7aa53412015-05-30 10:57:56 -04002462It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002463generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002464
2465 $ $0 $@
2466
2467_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002469{
2470cat <<_ASUNAME
2471## --------- ##
2472## Platform. ##
2473## --------- ##
2474
2475hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2476uname -m = `(uname -m) 2>/dev/null || echo unknown`
2477uname -r = `(uname -r) 2>/dev/null || echo unknown`
2478uname -s = `(uname -s) 2>/dev/null || echo unknown`
2479uname -v = `(uname -v) 2>/dev/null || echo unknown`
2480
2481/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2482/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2483
2484/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2485/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2486/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002488/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2489/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2490/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2491
2492_ASUNAME
2493
2494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2495for as_dir in $PATH
2496do
2497 IFS=$as_save_IFS
2498 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "PATH: $as_dir"
2500 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002502
2503} >&5
2504
2505cat >&5 <<_ACEOF
2506
2507
2508## ----------- ##
2509## Core tests. ##
2510## ----------- ##
2511
2512_ACEOF
2513
2514
2515# Keep a trace of the command line.
2516# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002517# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002518# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002519# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002520ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002521ac_configure_args0=
2522ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002523ac_must_keep_next=false
2524for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002525do
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 for ac_arg
2527 do
2528 case $ac_arg in
2529 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2530 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2531 | -silent | --silent | --silen | --sile | --sil)
2532 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002535 esac
2536 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002541 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002543 case $ac_arg in
2544 *=* | --config-cache | -C | -disable-* | --disable-* \
2545 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2546 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2547 | -with-* | --with-* | -without-* | --without-* | --x)
2548 case "$ac_configure_args0 " in
2549 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2550 esac
2551 ;;
2552 -* ) ac_must_keep_next=true ;;
2553 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002555 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002556 ;;
2557 esac
2558 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002559done
Matthias Kloseb9621712010-04-24 17:59:49 +00002560{ ac_configure_args0=; unset ac_configure_args0;}
2561{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563# When interrupted or exit'd, cleanup temporary files, and complete
2564# config.log. We remove comments because anyway the quotes in there
2565# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566# WARNING: Use '\'' to represent an apostrophe within the trap.
2567# 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 +00002568trap 'exit_status=$?
2569 # Save into config.log some information that might help in debugging.
2570 {
2571 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002572
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002574## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002575## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002576 echo
2577 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578(
2579 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2580 eval ac_val=\$$ac_var
2581 case $ac_val in #(
2582 *${as_nl}*)
2583 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2585$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 esac
2587 case $ac_var in #(
2588 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2590 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 esac ;;
2592 esac
2593 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2596 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 "s/'\''/'\''\\\\'\'''\''/g;
2599 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2600 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002601 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002602 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002603 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 esac |
2605 sort
2606)
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002608
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002609 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002610## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002611## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 echo
2613 for ac_var in $ac_subst_vars
2614 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 eval ac_val=\$$ac_var
2616 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 done | sort
2621 echo
2622
2623 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002624 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002626## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002627 echo
2628 for ac_var in $ac_subst_files
2629 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_val=\$$ac_var
2631 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002635 done | sort
2636 echo
2637 fi
2638
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002640 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002641## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002642## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002645 echo
2646 fi
2647 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002648 $as_echo "$as_me: caught signal $ac_signal"
2649 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002650 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651 rm -f core *.core core.conftest.* &&
2652 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002654' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002655for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002657done
2658ac_signal=0
2659
2660# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002662
Matthias Kloseb9621712010-04-24 17:59:49 +00002663$as_echo "/* confdefs.h */" > confdefs.h
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665# Predefined preprocessor variables.
2666
2667cat >>confdefs.h <<_ACEOF
2668#define PACKAGE_NAME "$PACKAGE_NAME"
2669_ACEOF
2670
Martin v. Löwis11437992002-04-12 09:54:03 +00002671cat >>confdefs.h <<_ACEOF
2672#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2673_ACEOF
2674
Martin v. Löwis11437992002-04-12 09:54:03 +00002675cat >>confdefs.h <<_ACEOF
2676#define PACKAGE_VERSION "$PACKAGE_VERSION"
2677_ACEOF
2678
Martin v. Löwis11437992002-04-12 09:54:03 +00002679cat >>confdefs.h <<_ACEOF
2680#define PACKAGE_STRING "$PACKAGE_STRING"
2681_ACEOF
2682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683cat >>confdefs.h <<_ACEOF
2684#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2685_ACEOF
2686
Matthias Kloseb9621712010-04-24 17:59:49 +00002687cat >>confdefs.h <<_ACEOF
2688#define PACKAGE_URL "$PACKAGE_URL"
2689_ACEOF
2690
Martin v. Löwis11437992002-04-12 09:54:03 +00002691
2692# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002693# Prefer an explicitly selected file to automatically selected ones.
2694ac_site_file1=NONE
2695ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002697 # We do not want a PATH search for config.site.
2698 case $CONFIG_SITE in #((
2699 -*) ac_site_file1=./$CONFIG_SITE;;
2700 */*) ac_site_file1=$CONFIG_SITE;;
2701 *) ac_site_file1=./$CONFIG_SITE;;
2702 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002703elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 ac_site_file1=$prefix/share/config.site
2705 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706else
Matthias Kloseb9621712010-04-24 17:59:49 +00002707 ac_site_file1=$ac_default_prefix/share/config.site
2708 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002710for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002711do
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 test "x$ac_site_file" = xNONE && continue
2713 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2715$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002717 . "$ac_site_file" \
2718 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2720as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002721See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722 fi
2723done
2724
2725if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 # Some versions of bash will fail to source /dev/null (special files
2727 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2728 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2729 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2730$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002732 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2733 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 esac
2735 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002736else
Matthias Kloseb9621712010-04-24 17:59:49 +00002737 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2738$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 >$cache_file
2740fi
2741
2742# Check that the precious variables saved in the cache have kept the same
2743# value.
2744ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002745for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2747 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002748 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2749 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 case $ac_old_set,$ac_new_set in
2751 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2753$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 +00002754 ac_cache_corrupted=: ;;
2755 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2757$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 ac_cache_corrupted=: ;;
2759 ,);;
2760 *)
2761 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002762 # differences in whitespace do not lead to failure.
2763 ac_old_val_w=`echo x $ac_old_val`
2764 ac_new_val_w=`echo x $ac_new_val`
2765 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2767$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2768 ac_cache_corrupted=:
2769 else
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2771$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2772 eval $ac_var=\$ac_old_val
2773 fi
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2775$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2776 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2777$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 fi;;
2779 esac
2780 # Pass precious variables to config.status.
2781 if test "$ac_new_set" = set; then
2782 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002784 *) ac_arg=$ac_var=$ac_new_val ;;
2785 esac
2786 case " $ac_configure_args " in
2787 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002788 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 esac
2790 fi
2791done
2792if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002793 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2795 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2796$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002797 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002799## -------------------- ##
2800## Main body of script. ##
2801## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002802
Guido van Rossum7f43da71994-08-01 12:15:30 +00002803ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002804ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002805ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2806ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2807ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002808
Guido van Rossum627b2d71993-12-24 10:39:16 +00002809
Michael W. Hudson54241132001-12-07 15:38:26 +00002810
Trent Nelson4d4ec652012-10-16 08:51:24 -04002811
Trent Nelson5595ab52012-10-17 04:47:31 -04002812if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002813 # If we're building out-of-tree, we need to make sure the following
2814 # resources get picked up before their $srcdir counterparts.
2815 # Objects/ -> typeslots.inc
2816 # Include/ -> Python-ast.h, graminit.h
2817 # Python/ -> importlib.h
2818 # (A side effect of this is that these resources will automatically be
2819 # regenerated when building out-of-tree, regardless of whether or not
2820 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2821 # off.)
2822 BASECPPFLAGS="-IObjects -IInclude -IPython"
2823else
2824 BASECPPFLAGS=""
2825fi
2826
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827
2828
2829
2830
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002831if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002832then
2833# Extract the first word of "hg", so it can be a program name with args.
2834set dummy hg; ac_word=$2
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2836$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002837if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002838 $as_echo_n "(cached) " >&6
2839else
2840 if test -n "$HAS_HG"; then
2841 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2842else
2843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2844for as_dir in $PATH
2845do
2846 IFS=$as_save_IFS
2847 test -z "$as_dir" && as_dir=.
2848 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002849 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002850 ac_cv_prog_HAS_HG="found"
2851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2852 break 2
2853 fi
2854done
2855 done
2856IFS=$as_save_IFS
2857
2858 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2859fi
2860fi
2861HAS_HG=$ac_cv_prog_HAS_HG
2862if test -n "$HAS_HG"; then
2863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2864$as_echo "$HAS_HG" >&6; }
2865else
2866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2867$as_echo "no" >&6; }
2868fi
2869
2870
2871else
2872HAS_HG=no-repository
2873fi
2874if test $HAS_HG = found
2875then
2876 HGVERSION="hg id -i \$(srcdir)"
2877 HGTAG="hg id -t \$(srcdir)"
2878 HGBRANCH="hg id -b \$(srcdir)"
2879else
2880 HGVERSION=""
2881 HGTAG=""
2882 HGBRANCH=""
2883fi
2884
2885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002886ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002887
2888
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002889ac_aux_dir=
2890for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2891 if test -f "$ac_dir/install-sh"; then
2892 ac_aux_dir=$ac_dir
2893 ac_install_sh="$ac_aux_dir/install-sh -c"
2894 break
2895 elif test -f "$ac_dir/install.sh"; then
2896 ac_aux_dir=$ac_dir
2897 ac_install_sh="$ac_aux_dir/install.sh -c"
2898 break
2899 elif test -f "$ac_dir/shtool"; then
2900 ac_aux_dir=$ac_dir
2901 ac_install_sh="$ac_aux_dir/shtool install -c"
2902 break
2903 fi
2904done
2905if test -z "$ac_aux_dir"; then
2906 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2907fi
2908
2909# These three variables are undocumented and unsupported,
2910# and are intended to be withdrawn in a future Autoconf release.
2911# They can cause serious problems if a builder's source tree is in a directory
2912# whose full name contains unusual characters.
2913ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2914ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2915ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2916
2917
2918# Make sure we can run config.sub.
2919$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2920 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2921
2922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2923$as_echo_n "checking build system type... " >&6; }
2924if ${ac_cv_build+:} false; then :
2925 $as_echo_n "(cached) " >&6
2926else
2927 ac_build_alias=$build_alias
2928test "x$ac_build_alias" = x &&
2929 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2930test "x$ac_build_alias" = x &&
2931 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2932ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2933 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2934
2935fi
2936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2937$as_echo "$ac_cv_build" >&6; }
2938case $ac_cv_build in
2939*-*-*) ;;
2940*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2941esac
2942build=$ac_cv_build
2943ac_save_IFS=$IFS; IFS='-'
2944set x $ac_cv_build
2945shift
2946build_cpu=$1
2947build_vendor=$2
2948shift; shift
2949# Remember, the first character of IFS is used to create $*,
2950# except with old shells:
2951build_os=$*
2952IFS=$ac_save_IFS
2953case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2954
2955
2956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2957$as_echo_n "checking host system type... " >&6; }
2958if ${ac_cv_host+:} false; then :
2959 $as_echo_n "(cached) " >&6
2960else
2961 if test "x$host_alias" = x; then
2962 ac_cv_host=$ac_cv_build
2963else
2964 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2965 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2966fi
2967
2968fi
2969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2970$as_echo "$ac_cv_host" >&6; }
2971case $ac_cv_host in
2972*-*-*) ;;
2973*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2974esac
2975host=$ac_cv_host
2976ac_save_IFS=$IFS; IFS='-'
2977set x $ac_cv_host
2978shift
2979host_cpu=$1
2980host_vendor=$2
2981shift; shift
2982# Remember, the first character of IFS is used to create $*,
2983# except with old shells:
2984host_os=$*
2985IFS=$ac_save_IFS
2986case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2987
2988
2989
doko@python.orga10e4a92013-01-25 18:45:12 +01002990
2991
Ned Deilyfcbc2462014-08-22 13:32:49 -07002992# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2993rm -f pybuilddir.txt
2994
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002995for ac_prog in python$PACKAGE_VERSION python3 python
2996do
2997 # Extract the first word of "$ac_prog", so it can be a program name with args.
2998set dummy $ac_prog; ac_word=$2
2999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3000$as_echo_n "checking for $ac_word... " >&6; }
3001if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
3002 $as_echo_n "(cached) " >&6
3003else
3004 if test -n "$PYTHON_FOR_GEN"; then
3005 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
3006else
3007as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3008for as_dir in $PATH
3009do
3010 IFS=$as_save_IFS
3011 test -z "$as_dir" && as_dir=.
3012 for ac_exec_ext in '' $ac_executable_extensions; do
3013 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3014 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3015 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3016 break 2
3017 fi
3018done
3019 done
3020IFS=$as_save_IFS
3021
3022fi
3023fi
3024PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3025if test -n "$PYTHON_FOR_GEN"; then
3026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3027$as_echo "$PYTHON_FOR_GEN" >&6; }
3028else
3029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3030$as_echo "no" >&6; }
3031fi
3032
3033
3034 test -n "$PYTHON_FOR_GEN" && break
3035done
3036test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3037
3038if test "$PYTHON_FOR_GEN" = not-found; then
3039 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3040 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3041 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3042fi
3043
3044
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003045if test "$cross_compiling" = yes; then
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3047$as_echo_n "checking for python interpreter for cross build... " >&6; }
3048 if test -z "$PYTHON_FOR_BUILD"; then
3049 for interp in python$PACKAGE_VERSION python3 python; do
3050 which $interp >/dev/null 2>&1 || continue
3051 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3052 break
3053 fi
3054 interp=
3055 done
3056 if test x$interp = x; then
3057 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3058 fi
3059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3060$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003061 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@ubuntu.com1abe1c52012-06-30 20:42:45 +02003062 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003063 # Used to comment out stuff for rebuilding generated files
3064 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003065elif test "$cross_compiling" = maybe; then
3066 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003067else
3068 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003069 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003070fi
3071
3072
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
Martin Pantereac67be2016-07-28 01:28:27 +00003074
Benjamin Petersond23f8222009-04-05 19:13:16 +00003075if test "$prefix" != "/"; then
3076 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3077fi
3078
3079
Martin v. Löwis11437992002-04-12 09:54:03 +00003080
3081
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003082# We don't use PACKAGE_ variables, and they cause conflicts
3083# with other autoconf-based packages that include Python.h
3084grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3085rm confdefs.h
3086mv confdefs.h.new confdefs.h
3087
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003088
Yury Selivanov7aa53412015-05-30 10:57:56 -04003089VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003090
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003091# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003092
3093SOVERSION=1.0
3094
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003095# The later defininition of _XOPEN_SOURCE disables certain features
3096# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3097
Matthias Kloseb9621712010-04-24 17:59:49 +00003098$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003099
3100
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003101# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3102# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3103# them.
3104
Matthias Kloseb9621712010-04-24 17:59:49 +00003105$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003106
3107
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003108# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3109# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3110# them.
3111
Matthias Kloseb9621712010-04-24 17:59:49 +00003112$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003113
3114
Martin v. Löwisd6320502004-08-12 13:45:08 +00003115# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3116# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3117
Matthias Kloseb9621712010-04-24 17:59:49 +00003118$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003119
3120
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003121# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3122# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3123# them.
3124
Matthias Kloseb9621712010-04-24 17:59:49 +00003125$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003126
3127
3128
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003129define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003130
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003131# Arguments passed to configure.
3132
3133CONFIG_ARGS="$ac_configure_args"
3134
Matthias Kloseb9621712010-04-24 17:59:49 +00003135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3136$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003138if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003139 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003140 case $enableval in
3141 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003142 # Locate the best usable SDK, see Mac/README.txt for more
3143 # information
3144 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003145 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003146 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003147 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3148 if test ! -d "${enableval}"
3149 then
3150 enableval=/
3151 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003152 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003153 ;;
3154 esac
3155 case $enableval in
3156 no)
3157 UNIVERSALSDK=
3158 enable_universalsdk=
3159 ;;
3160 *)
3161 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003162 if test ! -d "${UNIVERSALSDK}"
3163 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003164 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003165 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166 ;;
3167 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003168
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003169
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170else
3171
3172 UNIVERSALSDK=
3173 enable_universalsdk=
3174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003176
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003177if test -n "${UNIVERSALSDK}"
3178then
Matthias Kloseb9621712010-04-24 17:59:49 +00003179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3180$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003181else
Matthias Kloseb9621712010-04-24 17:59:49 +00003182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3183$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003184fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003187
Ned Deily87adb6e2013-10-18 21:09:56 -07003188ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003189
Ned Deilycbfb9a52012-06-23 16:02:19 -07003190# For backward compatibility reasons we prefer to select '32-bit' if available,
3191# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003192UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003193if test "`uname -s`" = "Darwin"
3194then
3195 if test -n "${UNIVERSALSDK}"
3196 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003197 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003198 then
3199 UNIVERSAL_ARCHS="intel"
3200 fi
3201 fi
3202fi
3203
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003204
Matthias Kloseb9621712010-04-24 17:59:49 +00003205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3206$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003207
3208# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003209if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003210 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211 UNIVERSAL_ARCHS="$withval"
3212
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003213fi
3214
Ned Deily87adb6e2013-10-18 21:09:56 -07003215if test -n "${UNIVERSALSDK}"
3216then
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3218$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3219else
3220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3221$as_echo "no" >&6; }
3222fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003223
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003224
3225# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003226if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227 withval=$with_framework_name;
3228 PYTHONFRAMEWORK=${withval}
3229 PYTHONFRAMEWORKDIR=${withval}.framework
3230 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3231
3232else
3233
3234 PYTHONFRAMEWORK=Python
3235 PYTHONFRAMEWORKDIR=Python.framework
3236 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3237
3238fi
3239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003240# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003241if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003242 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003243 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003244 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003245 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003246 esac
3247 case $enableval in
3248 no)
3249 PYTHONFRAMEWORK=
3250 PYTHONFRAMEWORKDIR=no-framework
3251 PYTHONFRAMEWORKPREFIX=
3252 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253 FRAMEWORKINSTALLFIRST=
3254 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003255 FRAMEWORKALTINSTALLFIRST=
3256 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003257 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003258 if test "x${prefix}" = "xNONE"; then
3259 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3260 else
3261 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3262 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003263 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003264 ;;
3265 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003267 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003268 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003269 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003270 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3271 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003272 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003273 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003274
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003275 if test "x${prefix}" = "xNONE" ; then
3276 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003277
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003278 else
3279 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3280 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003281
3282 case "${enableval}" in
3283 /System*)
3284 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3285 if test "${prefix}" = "NONE" ; then
3286 # See below
3287 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3288 fi
3289 ;;
3290
3291 /Library*)
3292 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3293 ;;
3294
3295 */Library/Frameworks)
3296 MDIR="`dirname "${enableval}"`"
3297 MDIR="`dirname "${MDIR}"`"
3298 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3299
3300 if test "${prefix}" = "NONE"; then
3301 # User hasn't specified the
3302 # --prefix option, but wants to install
3303 # the framework in a non-default location,
3304 # ensure that the compatibility links get
3305 # installed relative to that prefix as well
3306 # instead of in /usr/local.
3307 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3308 fi
3309 ;;
3310
3311 *)
3312 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3313 ;;
3314 esac
3315
Jack Jansen127e56e2001-09-11 14:41:54 +00003316 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003317
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003318 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003319 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003320 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003322 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003323
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003324 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3325
3326 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3327
Jack Jansene578a632001-08-15 01:27:14 +00003328 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003329
Guido van Rossum563e7081996-09-10 18:20:48 +00003330else
Martin v. Löwis11437992002-04-12 09:54:03 +00003331
Jack Jansene578a632001-08-15 01:27:14 +00003332 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003333 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003334 PYTHONFRAMEWORKPREFIX=
3335 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003336 FRAMEWORKINSTALLFIRST=
3337 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003338 FRAMEWORKALTINSTALLFIRST=
3339 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003340 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003341 if test "x${prefix}" = "xNONE" ; then
3342 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3343 else
3344 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3345 fi
Jack Jansene578a632001-08-15 01:27:14 +00003346 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003347
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003349fi
3350
Thomas Wouters477c8d52006-05-27 19:21:47 +00003351
3352
Michael W. Hudson54241132001-12-07 15:38:26 +00003353
3354
3355
3356
Jack Jansene578a632001-08-15 01:27:14 +00003357
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003358
3359
3360
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003361
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003362
Ned Deilyb8f944f2013-11-21 22:42:25 -08003363
Jack Jansene578a632001-08-15 01:27:14 +00003364##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003365## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003366## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003367##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003368# Set name for machine-dependent library files
3369
Matthias Kloseb9621712010-04-24 17:59:49 +00003370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3371$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003372if test -z "$MACHDEP"
3373then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003374 # avoid using uname for cross builds
3375 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003376 # ac_sys_system and ac_sys_release are used for setting
3377 # a lot of different things including 'define_xopen_source'
3378 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003379 case "$host" in
3380 *-*-linux*)
3381 ac_sys_system=Linux
3382 ;;
3383 *-*-cygwin*)
3384 ac_sys_system=Cygwin
3385 ;;
3386 *)
3387 # for now, limit cross builds to known configurations
3388 MACHDEP="unknown"
3389 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3390 esac
3391 ac_sys_release=
3392 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003393 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003394 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003395 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003396 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003397 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003398 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003399 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003400 fi
3401 ac_md_system=`echo $ac_sys_system |
3402 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3403 ac_md_release=`echo $ac_sys_release |
3404 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3405 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003406
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003407 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003408 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003409 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003410 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003411 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003412 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003413 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003414fi
Guido van Rossum91922671997-10-09 20:24:13 +00003415
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003416
3417if test "$cross_compiling" = yes; then
3418 case "$host" in
3419 *-*-linux*)
3420 case "$host_cpu" in
3421 arm*)
3422 _host_cpu=arm
3423 ;;
3424 *)
3425 _host_cpu=$host_cpu
3426 esac
3427 ;;
3428 *-*-cygwin*)
3429 _host_cpu=
3430 ;;
3431 *)
3432 # for now, limit cross builds to known configurations
3433 MACHDEP="unknown"
3434 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3435 esac
3436 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3437fi
3438
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003439# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3440# disable features if it is defined, without any means to access these
3441# features as extensions. For these systems, we skip the definition of
3442# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3443# some feature, make sure there is no alternative way to access this
3444# feature. Also, when using wildcards, make sure you have verified the
3445# need for not defining _XOPEN_SOURCE on all systems matching the
3446# wildcard, and that the wildcard does not include future systems
3447# (which may remove their limitations).
3448case $ac_sys_system/$ac_sys_release in
3449 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3450 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003451 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003452 # In addition, Stefan Krah confirms that issue #1244610 exists through
3453 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003454 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003455 define_xopen_source=no
3456 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3457 # also defined. This can be overridden by defining _BSD_SOURCE
3458 # As this has a different meaning on Linux, only define it on OpenBSD
3459
Matthias Kloseb9621712010-04-24 17:59:49 +00003460$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003461
3462 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003463 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003464 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3465 # also defined. This can be overridden by defining _BSD_SOURCE
3466 # As this has a different meaning on Linux, only define it on OpenBSD
3467
Matthias Kloseb9621712010-04-24 17:59:49 +00003468$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003469
3470 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003471 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3472 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3473 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003474 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003475 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003476 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3477 # request to enable features supported by the standard as a request
3478 # to disable features not supported by the standard. The best way
3479 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3480 # entirely and define __EXTENSIONS__ instead.
3481 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003482 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003483 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3484 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003485 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003486 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003487 define_xopen_source=no;;
3488 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003489 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003490 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003491 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003492 # On FreeBSD 4, the math functions C89 does not cover are never defined
3493 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3494 FreeBSD/4.*)
3495 define_xopen_source=no;;
3496 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3497 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3498 # identifies itself as Darwin/7.*
3499 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3500 # disables platform specific features beyond repair.
3501 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3502 # has no effect, don't bother defining them
3503 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003504 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003505 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003506 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003507 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3508 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3509 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003510 AIX/4)
3511 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003512 AIX/5)
3513 if test `uname -r` -eq 1; then
3514 define_xopen_source=no
3515 fi
3516 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003517 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3518 # defining NI_NUMERICHOST.
3519 QNX/6.3.2)
3520 define_xopen_source=no
3521 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003522
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003523esac
3524
3525if test $define_xopen_source = yes
3526then
Victor Stinner14d098d2011-09-07 22:29:43 +02003527 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003528
Victor Stinner14d098d2011-09-07 22:29:43 +02003529$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003530
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003531
3532 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3533 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3534 # several APIs are not declared. Since this is also needed in some
3535 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003536
Matthias Kloseb9621712010-04-24 17:59:49 +00003537$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003538
3539
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003540
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003541$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003542
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003543fi
3544
Christian Heimes647cd872013-12-07 23:39:33 +01003545# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3546case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003547 hp*|HP*)
3548 define_stdc_a1=yes;;
3549 *)
3550 define_stdc_a1=no;;
3551esac
3552
3553if test $define_stdc_a1 = yes
3554then
Christian Heimes647cd872013-12-07 23:39:33 +01003555
3556$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3557
Christian Heimesb02bcae2013-12-08 15:21:08 +01003558fi
Christian Heimes647cd872013-12-07 23:39:33 +01003559
Guido van Rossum91922671997-10-09 20:24:13 +00003560#
3561# SGI compilers allow the specification of the both the ABI and the
3562# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003563# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003564#
3565# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3566# thus supply support for various ABI/ISA combinations. The MACHDEP
3567# variable is also adjusted.
3568#
3569
3570if test ! -z "$SGI_ABI"
3571then
3572 CC="cc $SGI_ABI"
3573 LDFLAGS="$SGI_ABI $LDFLAGS"
3574 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3577$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003578
Jack Jansen6b08a402004-06-03 12:41:45 +00003579# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3580# it may influence the way we can build extensions, so distutils
3581# needs to check it
3582
Thomas Wouters477c8d52006-05-27 19:21:47 +00003583
Jack Jansen6b08a402004-06-03 12:41:45 +00003584CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003585EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003586
Guido van Rossum627b2d71993-12-24 10:39:16 +00003587# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003588
3589# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3590# for debug/optimization stuff. BASECFLAGS is for flags that are required
3591# just to get things to compile and link. Users are free to override OPT
3592# when running configure or make. The build should not break if they do.
3593# BASECFLAGS should generally not be messed with, however.
3594
3595# XXX shouldn't some/most/all of this code be merged with the stuff later
3596# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3598$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003601if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003603 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003604 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003605 without_gcc=yes;;
3606 yes) CC=gcc
3607 without_gcc=no;;
3608 *) CC=$withval
3609 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003610 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003611else
Martin v. Löwis11437992002-04-12 09:54:03 +00003612
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003613 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003614 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003615 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003616 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003617 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618fi
3619
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3621$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003622
Zachary Ware5af85642015-12-21 12:09:17 -06003623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3624$as_echo_n "checking for --with-icc... " >&6; }
3625
3626# Check whether --with-icc was given.
3627if test "${with_icc+set}" = set; then :
3628 withval=$with_icc;
3629 case $withval in
3630 no) CC=${CC:-cc}
3631 with_icc=no;;
3632 yes) CC=icc
3633 CXX=icpc
3634 with_icc=yes;;
3635 *) CC=$withval
3636 with_icc=$withval;;
3637 esac
3638else
3639
3640 with_icc=no
3641fi
3642
3643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3644$as_echo "$with_icc" >&6; }
3645
Guido van Rossum8b131c51995-03-09 14:10:13 +00003646# If the user switches compilers, we can't believe the cache
3647if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3648then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003649 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003650(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003651fi
3652
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003653# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3654# when the compiler supports them, but we don't always want -O2, and
3655# we set -g later.
3656if test -z "$CFLAGS"; then
3657 CFLAGS=
3658fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003659
3660if test "$ac_sys_system" = "Darwin"
3661then
3662 # Compiler selection on MacOSX is more complicated than
3663 # AC_PROG_CC can handle, see Mac/README.txt for more
3664 # information
3665 if test -z "${CC}"
3666 then
3667 found_gcc=
3668 found_clang=
3669 as_save_IFS=$IFS; IFS=:
3670 for as_dir in $PATH
3671 do
3672 IFS=$as_save_IFS
3673 if test -x $as_dir/gcc; then
3674 if test -z "${found_gcc}"; then
3675 found_gcc=$as_dir/gcc
3676 fi
3677 fi
3678 if test -x $as_dir/clang; then
3679 if test -z "${found_clang}"; then
3680 found_clang=$as_dir/clang
3681 fi
3682 fi
3683 done
3684 IFS=$as_save_IFS
3685
3686 if test -n "$found_gcc" -a -n "$found_clang"
3687 then
3688 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3689 then
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3691$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3692 CC="$found_clang"
3693 CXX="$found_clang++"
3694 fi
3695
3696
3697 elif test -z "$found_gcc" -a -n "$found_clang"
3698 then
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3700$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3701 CC="$found_clang"
3702 CXX="$found_clang++"
3703
3704 elif test -z "$found_gcc" -a -z "$found_clang"
3705 then
3706 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3707 if test -n "${found_clang}"
3708 then
3709 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3710$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3711 CC="${found_clang}"
3712 CXX="`/usr/bin/xcrun -find clang++`"
3713
3714 # else: use default behaviour
3715 fi
3716 fi
3717 fi
3718fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719ac_ext=c
3720ac_cpp='$CPP $CPPFLAGS'
3721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3723ac_compiler_gnu=$ac_cv_c_compiler_gnu
3724if test -n "$ac_tool_prefix"; then
3725 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3726set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003729if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731else
3732 if test -n "$CC"; then
3733 ac_cv_prog_CC="$CC" # Let the user override the test.
3734else
Martin v. Löwis11437992002-04-12 09:54:03 +00003735as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3736for as_dir in $PATH
3737do
3738 IFS=$as_save_IFS
3739 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003742 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 $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 +00003744 break 2
3745 fi
3746done
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003749
Jack Jansendd19cf82001-12-06 22:36:17 +00003750fi
3751fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003753if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3755$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003756else
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3758$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003759fi
3760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762fi
3763if test -z "$ac_cv_prog_CC"; then
3764 ac_ct_CC=$CC
3765 # Extract the first word of "gcc", so it can be a program name with args.
3766set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3768$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003769if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003771else
3772 if test -n "$ac_ct_CC"; then
3773 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3774else
3775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3776for as_dir in $PATH
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $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 +00003784 break 2
3785 fi
3786done
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003789
3790fi
3791fi
3792ac_ct_CC=$ac_cv_prog_ac_ct_CC
3793if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3795$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796else
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799fi
3800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801 if test "x$ac_ct_CC" = x; then
3802 CC=""
3803 else
3804 case $cross_compiling:$ac_tool_warned in
3805yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808ac_tool_warned=yes ;;
3809esac
3810 CC=$ac_ct_CC
3811 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
3813 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003814fi
3815
Jack Jansendd19cf82001-12-06 22:36:17 +00003816if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817 if test -n "$ac_tool_prefix"; then
3818 # 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 +00003819set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003822if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003824else
3825 if test -n "$CC"; then
3826 ac_cv_prog_CC="$CC" # Let the user override the test.
3827else
Martin v. Löwis11437992002-04-12 09:54:03 +00003828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829for as_dir in $PATH
3830do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003835 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 $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 +00003837 break 2
3838 fi
3839done
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003842
3843fi
3844fi
3845CC=$ac_cv_prog_CC
3846if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3848$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849else
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
3853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003856fi
3857if test -z "$CC"; then
3858 # Extract the first word of "cc", so it can be a program name with args.
3859set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3861$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003862if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003864else
3865 if test -n "$CC"; then
3866 ac_cv_prog_CC="$CC" # Let the user override the test.
3867else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003868 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003869as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870for as_dir in $PATH
3871do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3877 ac_prog_rejected=yes
3878 continue
3879 fi
3880 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 $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 +00003882 break 2
3883 fi
3884done
Matthias Kloseb9621712010-04-24 17:59:49 +00003885 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003887
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888if test $ac_prog_rejected = yes; then
3889 # We found a bogon in the path, so make sure we never use it.
3890 set dummy $ac_cv_prog_CC
3891 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003893 # We chose a different compiler from the bogus one.
3894 # However, it has the same basename, so the bogon will be chosen
3895 # first if we set CC to just the basename; use the full file name.
3896 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003897 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003898 fi
3899fi
3900fi
3901fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003902CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003903if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3905$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003906else
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3908$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003909fi
3910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911
Martin v. Löwis11437992002-04-12 09:54:03 +00003912fi
3913if test -z "$CC"; then
3914 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003916 do
3917 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3918set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3920$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003921if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003923else
3924 if test -n "$CC"; then
3925 ac_cv_prog_CC="$CC" # Let the user override the test.
3926else
Martin v. Löwis11437992002-04-12 09:54:03 +00003927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3928for as_dir in $PATH
3929do
3930 IFS=$as_save_IFS
3931 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 $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 +00003936 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003937 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003938done
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003941
3942fi
3943fi
3944CC=$ac_cv_prog_CC
3945if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3947$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003948else
Matthias Kloseb9621712010-04-24 17:59:49 +00003949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3950$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003951fi
3952
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953
Martin v. Löwis11437992002-04-12 09:54:03 +00003954 test -n "$CC" && break
3955 done
3956fi
3957if test -z "$CC"; then
3958 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003960do
3961 # Extract the first word of "$ac_prog", so it can be a program name with args.
3962set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3964$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003965if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003967else
3968 if test -n "$ac_ct_CC"; then
3969 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3970else
3971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3972for as_dir in $PATH
3973do
3974 IFS=$as_save_IFS
3975 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003978 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003979 $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 +00003980 break 2
3981 fi
3982done
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003985
Martin v. Löwis11437992002-04-12 09:54:03 +00003986fi
3987fi
3988ac_ct_CC=$ac_cv_prog_ac_ct_CC
3989if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3991$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003992else
Matthias Kloseb9621712010-04-24 17:59:49 +00003993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3994$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003995fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 test -n "$ac_ct_CC" && break
3999done
Michael W. Hudson54241132001-12-07 15:38:26 +00004000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004001 if test "x$ac_ct_CC" = x; then
4002 CC=""
4003 else
4004 case $cross_compiling:$ac_tool_warned in
4005yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4007$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008ac_tool_warned=yes ;;
4009esac
4010 CC=$ac_ct_CC
4011 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004012fi
4013
4014fi
4015
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004021
4022# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004023$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4024set X $ac_compile
4025ac_compiler=$2
4026for ac_option in --version -v -V -qversion; do
4027 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4033$as_echo "$ac_try_echo"; } >&5
4034 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004036 if test -s conftest.err; then
4037 sed '10a\
4038... rest of stderr output deleted ...
4039 10q' conftest.err >conftest.er1
4040 cat conftest.er1 >&5
4041 fi
4042 rm -f conftest.er1 conftest.err
4043 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4044 test $ac_status = 0; }
4045done
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
Matthias Kloseb9621712010-04-24 17:59:49 +00004047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004048/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004049
Martin v. Löwis11437992002-04-12 09:54:03 +00004050int
4051main ()
4052{
4053
4054 ;
4055 return 0;
4056}
4057_ACEOF
4058ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004059ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004060# Try to create an executable without -o first, disregard a.out.
4061# It will help us diagnose broken compilers, and finding out an intuition
4062# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4064$as_echo_n "checking whether the C compiler works... " >&6; }
4065ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4066
4067# The possible output files:
4068ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004070ac_rmfiles=
4071for ac_file in $ac_files
4072do
4073 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4076 esac
4077done
4078rm -f $ac_rmfiles
4079
Matthias Kloseb9621712010-04-24 17:59:49 +00004080if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4092# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4093# in a Makefile. We should not override ac_cv_exeext if it was cached,
4094# so that the user can short-circuit this test for compilers unknown to
4095# Autoconf.
4096for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004097do
4098 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101 ;;
4102 [ab].out )
4103 # We found the default executable, but exeext='' is most
4104 # certainly right.
4105 break;;
4106 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004107 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004108 then :; else
4109 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4110 fi
4111 # We set ac_cv_exeext here because the later test for it is not
4112 # safe: cross compilers may not add the suffix if given an `-o'
4113 # argument, so we may need to know it at that point already.
4114 # Even if this section looks crufty: it has the advantage of
4115 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004116 break;;
4117 * )
4118 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 esac
4120done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121test "$ac_cv_exeext" = no && ac_cv_exeext=
4122
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004123else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124 ac_file=''
4125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004126if test -z "$ac_file"; then :
4127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4128$as_echo "no" >&6; }
4129$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004130sed 's/^/| /' conftest.$ac_ext >&5
4131
Matthias Kloseb9621712010-04-24 17:59:49 +00004132{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4133$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004134as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004135See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004136else
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4138$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004139fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4141$as_echo_n "checking for C compiler default output file name... " >&6; }
4142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4143$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004144ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145
Matthias Kloseb9621712010-04-24 17:59:49 +00004146rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004147ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4149$as_echo_n "checking for suffix of executables... " >&6; }
4150if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151case "(($ac_try" in
4152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4153 *) ac_try_echo=$ac_try;;
4154esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4156$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004157 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4160 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004161 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4162# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4163# work properly (i.e., refer to `conftest.exe'), while it won't with
4164# `rm'.
4165for ac_file in conftest.exe conftest conftest.*; do
4166 test -f "$ac_file" || continue
4167 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004169 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4170 break;;
4171 * ) break;;
4172 esac
4173done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004174else
Matthias Kloseb9621712010-04-24 17:59:49 +00004175 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004177as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004178See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004180rm -f conftest conftest$ac_cv_exeext
4181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4182$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004183
4184rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004185EXEEXT=$ac_cv_exeext
4186ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4188/* end confdefs.h. */
4189#include <stdio.h>
4190int
4191main ()
4192{
4193FILE *f = fopen ("conftest.out", "w");
4194 return ferror (f) || fclose (f) != 0;
4195
4196 ;
4197 return 0;
4198}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004200ac_clean_files="$ac_clean_files conftest.out"
4201# Check that the compiler produces executables we can run. If not, either
4202# the compiler is broken, or we cross compile.
4203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4204$as_echo_n "checking whether we are cross compiling... " >&6; }
4205if test "$cross_compiling" != yes; then
4206 { { ac_try="$ac_link"
4207case "(($ac_try" in
4208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4209 *) ac_try_echo=$ac_try;;
4210esac
4211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4212$as_echo "$ac_try_echo"; } >&5
4213 (eval "$ac_link") 2>&5
4214 ac_status=$?
4215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4216 test $ac_status = 0; }
4217 if { ac_try='./conftest$ac_cv_exeext'
4218 { { case "(($ac_try" in
4219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4220 *) ac_try_echo=$ac_try;;
4221esac
4222eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4223$as_echo "$ac_try_echo"; } >&5
4224 (eval "$ac_try") 2>&5
4225 ac_status=$?
4226 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4227 test $ac_status = 0; }; }; then
4228 cross_compiling=no
4229 else
4230 if test "$cross_compiling" = maybe; then
4231 cross_compiling=yes
4232 else
4233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004235as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004236If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004237See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 fi
4239 fi
4240fi
4241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4242$as_echo "$cross_compiling" >&6; }
4243
4244rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4245ac_clean_files=$ac_clean_files_save
4246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4247$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004248if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004249 $as_echo_n "(cached) " >&6
4250else
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004252/* end confdefs.h. */
4253
4254int
4255main ()
4256{
4257
4258 ;
4259 return 0;
4260}
4261_ACEOF
4262rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004263if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264case "(($ac_try" in
4265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4266 *) ac_try_echo=$ac_try;;
4267esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004268eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4269$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4273 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 for ac_file in conftest.o conftest.obj conftest.*; do
4275 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004276 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004277 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4279 break;;
4280 esac
4281done
4282else
Matthias Kloseb9621712010-04-24 17:59:49 +00004283 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004284sed 's/^/| /' conftest.$ac_ext >&5
4285
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004288as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004289See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004290fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004291rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4294$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004295OBJEXT=$ac_cv_objext
4296ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4298$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004299if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004301else
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305int
4306main ()
4307{
4308#ifndef __GNUC__
4309 choke me
4310#endif
4311
4312 ;
4313 return 0;
4314}
4315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004317 ac_compiler_gnu=yes
4318else
Matthias Kloseb9621712010-04-24 17:59:49 +00004319 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004322ac_cv_c_compiler_gnu=$ac_compiler_gnu
4323
4324fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4326$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4327if test $ac_compiler_gnu = yes; then
4328 GCC=yes
4329else
4330 GCC=
4331fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004332ac_test_CFLAGS=${CFLAGS+set}
4333ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4335$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004336if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004337 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004338else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004339 ac_save_c_werror_flag=$ac_c_werror_flag
4340 ac_c_werror_flag=yes
4341 ac_cv_prog_cc_g=no
4342 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004345
Martin v. Löwis11437992002-04-12 09:54:03 +00004346int
4347main ()
4348{
4349
4350 ;
4351 return 0;
4352}
4353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004354if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004355 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004356else
Matthias Kloseb9621712010-04-24 17:59:49 +00004357 CFLAGS=""
4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359/* end confdefs.h. */
4360
4361int
4362main ()
4363{
4364
4365 ;
4366 return 0;
4367}
4368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004369if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370
Matthias Kloseb9621712010-04-24 17:59:49 +00004371else
4372 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375/* end confdefs.h. */
4376
4377int
4378main ()
4379{
4380
4381 ;
4382 return 0;
4383}
4384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004385if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4393 ac_c_werror_flag=$ac_save_c_werror_flag
4394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4396$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004397if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004398 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004399elif test $ac_cv_prog_cc_g = yes; then
4400 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004401 CFLAGS="-g -O2"
4402 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004403 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 fi
4405else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004406 if test "$GCC" = yes; then
4407 CFLAGS="-O2"
4408 else
4409 CFLAGS=
4410 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4413$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004414if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004415 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004416else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004417 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004418ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004419cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004420/* end confdefs.h. */
4421#include <stdarg.h>
4422#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004423struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004424/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4425struct buf { int x; };
4426FILE * (*rcsopen) (struct buf *, struct stat *, int);
4427static char *e (p, i)
4428 char **p;
4429 int i;
4430{
4431 return p[i];
4432}
4433static char *f (char * (*g) (char **, int), char **p, ...)
4434{
4435 char *s;
4436 va_list v;
4437 va_start (v,p);
4438 s = g (p, va_arg (v,int));
4439 va_end (v);
4440 return s;
4441}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004442
4443/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4444 function prototypes and stuff, but not '\xHH' hex character constants.
4445 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004446 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004447 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4448 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004449 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004450int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4451
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004452/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4453 inside strings and character constants. */
4454#define FOO(x) 'x'
4455int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4456
Skip Montanaro6dead952003-09-25 14:50:04 +00004457int test (int i, double x);
4458struct s1 {int (*f) (int a);};
4459struct s2 {int (*f) (double a);};
4460int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4461int argc;
4462char **argv;
4463int
4464main ()
4465{
4466return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4467 ;
4468 return 0;
4469}
4470_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4472 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004473do
4474 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004475 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004476 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478rm -f core conftest.err conftest.$ac_objext
4479 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004480done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004481rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004482CC=$ac_save_CC
4483
4484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004485# AC_CACHE_VAL
4486case "x$ac_cv_prog_cc_c89" in
4487 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4489$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004490 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4492$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004493 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004494 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4496$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004497esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004498if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004499
Matthias Kloseb9621712010-04-24 17:59:49 +00004500fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004501
Martin v. Löwis11437992002-04-12 09:54:03 +00004502ac_ext=c
4503ac_cpp='$CPP $CPPFLAGS'
4504ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4505ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4506ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004507
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004508ac_ext=c
4509ac_cpp='$CPP $CPPFLAGS'
4510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4512ac_compiler_gnu=$ac_cv_c_compiler_gnu
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4514$as_echo_n "checking how to run the C preprocessor... " >&6; }
4515# On Suns, sometimes $CPP names a directory.
4516if test -n "$CPP" && test -d "$CPP"; then
4517 CPP=
4518fi
4519if test -z "$CPP"; then
4520 if ${ac_cv_prog_CPP+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 # Double quotes because CPP needs to be expanded
4524 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4525 do
4526 ac_preproc_ok=false
4527for ac_c_preproc_warn_flag in '' yes
4528do
4529 # Use a header file that comes with gcc, so configuring glibc
4530 # with a fresh cross-compiler works.
4531 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4532 # <limits.h> exists even on freestanding compilers.
4533 # On the NeXT, cc -E runs the code through the compiler's parser,
4534 # not just through cpp. "Syntax error" is here to catch this case.
4535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4536/* end confdefs.h. */
4537#ifdef __STDC__
4538# include <limits.h>
4539#else
4540# include <assert.h>
4541#endif
4542 Syntax error
4543_ACEOF
4544if ac_fn_c_try_cpp "$LINENO"; then :
4545
4546else
4547 # Broken: fails on valid input.
4548continue
4549fi
4550rm -f conftest.err conftest.i conftest.$ac_ext
4551
4552 # OK, works on sane cases. Now check whether nonexistent headers
4553 # can be detected and how.
4554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4555/* end confdefs.h. */
4556#include <ac_nonexistent.h>
4557_ACEOF
4558if ac_fn_c_try_cpp "$LINENO"; then :
4559 # Broken: success on invalid input.
4560continue
4561else
4562 # Passes both tests.
4563ac_preproc_ok=:
4564break
4565fi
4566rm -f conftest.err conftest.i conftest.$ac_ext
4567
4568done
4569# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4570rm -f conftest.i conftest.err conftest.$ac_ext
4571if $ac_preproc_ok; then :
4572 break
4573fi
4574
4575 done
4576 ac_cv_prog_CPP=$CPP
4577
4578fi
4579 CPP=$ac_cv_prog_CPP
4580else
4581 ac_cv_prog_CPP=$CPP
4582fi
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4584$as_echo "$CPP" >&6; }
4585ac_preproc_ok=false
4586for ac_c_preproc_warn_flag in '' yes
4587do
4588 # Use a header file that comes with gcc, so configuring glibc
4589 # with a fresh cross-compiler works.
4590 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4591 # <limits.h> exists even on freestanding compilers.
4592 # On the NeXT, cc -E runs the code through the compiler's parser,
4593 # not just through cpp. "Syntax error" is here to catch this case.
4594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4595/* end confdefs.h. */
4596#ifdef __STDC__
4597# include <limits.h>
4598#else
4599# include <assert.h>
4600#endif
4601 Syntax error
4602_ACEOF
4603if ac_fn_c_try_cpp "$LINENO"; then :
4604
4605else
4606 # Broken: fails on valid input.
4607continue
4608fi
4609rm -f conftest.err conftest.i conftest.$ac_ext
4610
4611 # OK, works on sane cases. Now check whether nonexistent headers
4612 # can be detected and how.
4613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4614/* end confdefs.h. */
4615#include <ac_nonexistent.h>
4616_ACEOF
4617if ac_fn_c_try_cpp "$LINENO"; then :
4618 # Broken: success on invalid input.
4619continue
4620else
4621 # Passes both tests.
4622ac_preproc_ok=:
4623break
4624fi
4625rm -f conftest.err conftest.i conftest.$ac_ext
4626
4627done
4628# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4629rm -f conftest.i conftest.err conftest.$ac_ext
4630if $ac_preproc_ok; then :
4631
4632else
4633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4635as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4636See \`config.log' for more details" "$LINENO" 5; }
4637fi
4638
4639ac_ext=c
4640ac_cpp='$CPP $CPPFLAGS'
4641ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4642ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4643ac_compiler_gnu=$ac_cv_c_compiler_gnu
4644
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4646$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4647if ${ac_cv_path_GREP+:} false; then :
4648 $as_echo_n "(cached) " >&6
4649else
4650 if test -z "$GREP"; then
4651 ac_path_GREP_found=false
4652 # Loop through the user's path and test for each of PROGNAME-LIST
4653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4655do
4656 IFS=$as_save_IFS
4657 test -z "$as_dir" && as_dir=.
4658 for ac_prog in grep ggrep; do
4659 for ac_exec_ext in '' $ac_executable_extensions; do
4660 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4661 as_fn_executable_p "$ac_path_GREP" || continue
4662# Check for GNU ac_path_GREP and select it if it is found.
4663 # Check for GNU $ac_path_GREP
4664case `"$ac_path_GREP" --version 2>&1` in
4665*GNU*)
4666 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4667*)
4668 ac_count=0
4669 $as_echo_n 0123456789 >"conftest.in"
4670 while :
4671 do
4672 cat "conftest.in" "conftest.in" >"conftest.tmp"
4673 mv "conftest.tmp" "conftest.in"
4674 cp "conftest.in" "conftest.nl"
4675 $as_echo 'GREP' >> "conftest.nl"
4676 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4677 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4678 as_fn_arith $ac_count + 1 && ac_count=$as_val
4679 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4680 # Best one so far, save it but keep looking for a better one
4681 ac_cv_path_GREP="$ac_path_GREP"
4682 ac_path_GREP_max=$ac_count
4683 fi
4684 # 10*(2^10) chars as input seems more than enough
4685 test $ac_count -gt 10 && break
4686 done
4687 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4688esac
4689
4690 $ac_path_GREP_found && break 3
4691 done
4692 done
4693 done
4694IFS=$as_save_IFS
4695 if test -z "$ac_cv_path_GREP"; then
4696 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4697 fi
4698else
4699 ac_cv_path_GREP=$GREP
4700fi
4701
4702fi
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4704$as_echo "$ac_cv_path_GREP" >&6; }
4705 GREP="$ac_cv_path_GREP"
4706
4707
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004708
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004709
4710
Matthias Kloseb9621712010-04-24 17:59:49 +00004711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4712$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004714# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004715if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004716 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004717
4718 case $withval in
4719 no) with_cxx_main=no
4720 MAINCC='$(CC)';;
4721 yes) with_cxx_main=yes
4722 MAINCC='$(CXX)';;
4723 *) with_cxx_main=yes
4724 MAINCC=$withval
4725 if test -z "$CXX"
4726 then
4727 CXX=$withval
4728 fi;;
4729 esac
4730else
4731
4732 with_cxx_main=no
4733 MAINCC='$(CC)'
4734
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004735fi
4736
Matthias Kloseb9621712010-04-24 17:59:49 +00004737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4738$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739
4740preset_cxx="$CXX"
4741if test -z "$CXX"
4742then
4743 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004744 gcc) if test -n "$ac_tool_prefix"; then
4745 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4746set dummy ${ac_tool_prefix}g++; ac_word=$2
4747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4748$as_echo_n "checking for $ac_word... " >&6; }
4749if ${ac_cv_path_CXX+:} false; then :
4750 $as_echo_n "(cached) " >&6
4751else
4752 case $CXX in
4753 [\\/]* | ?:[\\/]*)
4754 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4755 ;;
4756 *)
4757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4758for as_dir in notfound
4759do
4760 IFS=$as_save_IFS
4761 test -z "$as_dir" && as_dir=.
4762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4766 break 2
4767 fi
4768done
4769 done
4770IFS=$as_save_IFS
4771
4772 ;;
4773esac
4774fi
4775CXX=$ac_cv_path_CXX
4776if test -n "$CXX"; then
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4778$as_echo "$CXX" >&6; }
4779else
4780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4781$as_echo "no" >&6; }
4782fi
4783
4784
4785fi
4786if test -z "$ac_cv_path_CXX"; then
4787 ac_pt_CXX=$CXX
4788 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4791$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792if ${ac_cv_path_ac_pt_CXX+:} false; then :
4793 $as_echo_n "(cached) " >&6
4794else
4795 case $ac_pt_CXX in
4796 [\\/]* | ?:[\\/]*)
4797 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4798 ;;
4799 *)
4800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4801for as_dir in notfound
4802do
4803 IFS=$as_save_IFS
4804 test -z "$as_dir" && as_dir=.
4805 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004806 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004807 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4808 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4809 break 2
4810 fi
4811done
4812 done
4813IFS=$as_save_IFS
4814
4815 ;;
4816esac
4817fi
4818ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4819if test -n "$ac_pt_CXX"; then
4820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4821$as_echo "$ac_pt_CXX" >&6; }
4822else
4823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4824$as_echo "no" >&6; }
4825fi
4826
4827 if test "x$ac_pt_CXX" = x; then
4828 CXX="g++"
4829 else
4830 case $cross_compiling:$ac_tool_warned in
4831yes:)
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4833$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4834ac_tool_warned=yes ;;
4835esac
4836 CXX=$ac_pt_CXX
4837 fi
4838else
4839 CXX="$ac_cv_path_CXX"
4840fi
4841 ;;
4842 cc) if test -n "$ac_tool_prefix"; then
4843 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4844set dummy ${ac_tool_prefix}c++; ac_word=$2
4845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4846$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004847if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849else
4850 case $CXX in
4851 [\\/]* | ?:[\\/]*)
4852 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4853 ;;
4854 *)
4855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4856for as_dir in notfound
4857do
4858 IFS=$as_save_IFS
4859 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004862 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004864 break 2
4865 fi
4866done
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004868IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004869
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870 ;;
4871esac
4872fi
4873CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004874if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4876$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004877else
Matthias Kloseb9621712010-04-24 17:59:49 +00004878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4879$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004881
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882
4883fi
4884if test -z "$ac_cv_path_CXX"; then
4885 ac_pt_CXX=$CXX
4886 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004887set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4889$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004894 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004895 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004896 ;;
4897 *)
4898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in notfound
4900do
4901 IFS=$as_save_IFS
4902 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004903 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004905 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004907 break 2
4908 fi
4909done
Matthias Kloseb9621712010-04-24 17:59:49 +00004910 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004911IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004912
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004913 ;;
4914esac
4915fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004916ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4917if test -n "$ac_pt_CXX"; then
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4919$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004920else
Matthias Kloseb9621712010-04-24 17:59:49 +00004921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004924
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004925 if test "x$ac_pt_CXX" = x; then
4926 CXX="c++"
4927 else
4928 case $cross_compiling:$ac_tool_warned in
4929yes:)
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4931$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4932ac_tool_warned=yes ;;
4933esac
4934 CXX=$ac_pt_CXX
4935 fi
4936else
4937 CXX="$ac_cv_path_CXX"
4938fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004939 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004940 clang|*/clang) if test -n "$ac_tool_prefix"; then
4941 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4942set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4944$as_echo_n "checking for $ac_word... " >&6; }
4945if ${ac_cv_path_CXX+:} false; then :
4946 $as_echo_n "(cached) " >&6
4947else
4948 case $CXX in
4949 [\\/]* | ?:[\\/]*)
4950 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4951 ;;
4952 *)
4953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4954for as_dir in notfound
4955do
4956 IFS=$as_save_IFS
4957 test -z "$as_dir" && as_dir=.
4958 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004960 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4962 break 2
4963 fi
4964done
4965 done
4966IFS=$as_save_IFS
4967
Ned Deilycbfb9a52012-06-23 16:02:19 -07004968 ;;
4969esac
4970fi
4971CXX=$ac_cv_path_CXX
4972if test -n "$CXX"; then
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4974$as_echo "$CXX" >&6; }
4975else
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4977$as_echo "no" >&6; }
4978fi
4979
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004980
4981fi
4982if test -z "$ac_cv_path_CXX"; then
4983 ac_pt_CXX=$CXX
4984 # Extract the first word of "clang++", so it can be a program name with args.
4985set dummy clang++; ac_word=$2
4986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4987$as_echo_n "checking for $ac_word... " >&6; }
4988if ${ac_cv_path_ac_pt_CXX+:} false; then :
4989 $as_echo_n "(cached) " >&6
4990else
4991 case $ac_pt_CXX in
4992 [\\/]* | ?:[\\/]*)
4993 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4994 ;;
4995 *)
4996 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4997for as_dir in notfound
4998do
4999 IFS=$as_save_IFS
5000 test -z "$as_dir" && as_dir=.
5001 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005003 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5005 break 2
5006 fi
5007done
5008 done
5009IFS=$as_save_IFS
5010
5011 ;;
5012esac
5013fi
5014ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5015if test -n "$ac_pt_CXX"; then
5016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5017$as_echo "$ac_pt_CXX" >&6; }
5018else
5019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5020$as_echo "no" >&6; }
5021fi
5022
5023 if test "x$ac_pt_CXX" = x; then
5024 CXX="clang++"
5025 else
5026 case $cross_compiling:$ac_tool_warned in
5027yes:)
5028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5030ac_tool_warned=yes ;;
5031esac
5032 CXX=$ac_pt_CXX
5033 fi
5034else
5035 CXX="$ac_cv_path_CXX"
5036fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005037 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005038 icc|*/icc) if test -n "$ac_tool_prefix"; then
5039 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5040set dummy ${ac_tool_prefix}icpc; ac_word=$2
5041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5042$as_echo_n "checking for $ac_word... " >&6; }
5043if ${ac_cv_path_CXX+:} false; then :
5044 $as_echo_n "(cached) " >&6
5045else
5046 case $CXX in
5047 [\\/]* | ?:[\\/]*)
5048 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5049 ;;
5050 *)
5051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5052for as_dir in notfound
5053do
5054 IFS=$as_save_IFS
5055 test -z "$as_dir" && as_dir=.
5056 for ac_exec_ext in '' $ac_executable_extensions; do
5057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5058 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5060 break 2
5061 fi
5062done
5063 done
5064IFS=$as_save_IFS
5065
5066 ;;
5067esac
5068fi
5069CXX=$ac_cv_path_CXX
5070if test -n "$CXX"; then
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5072$as_echo "$CXX" >&6; }
5073else
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5075$as_echo "no" >&6; }
5076fi
5077
5078
5079fi
5080if test -z "$ac_cv_path_CXX"; then
5081 ac_pt_CXX=$CXX
5082 # Extract the first word of "icpc", so it can be a program name with args.
5083set dummy icpc; ac_word=$2
5084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
5086if ${ac_cv_path_ac_pt_CXX+:} false; then :
5087 $as_echo_n "(cached) " >&6
5088else
5089 case $ac_pt_CXX in
5090 [\\/]* | ?:[\\/]*)
5091 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5092 ;;
5093 *)
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095for as_dir in notfound
5096do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
5099 for ac_exec_ext in '' $ac_executable_extensions; do
5100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103 break 2
5104 fi
5105done
5106 done
5107IFS=$as_save_IFS
5108
5109 ;;
5110esac
5111fi
5112ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5113if test -n "$ac_pt_CXX"; then
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5115$as_echo "$ac_pt_CXX" >&6; }
5116else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118$as_echo "no" >&6; }
5119fi
5120
5121 if test "x$ac_pt_CXX" = x; then
5122 CXX="icpc"
5123 else
5124 case $cross_compiling:$ac_tool_warned in
5125yes:)
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5128ac_tool_warned=yes ;;
5129esac
5130 CXX=$ac_pt_CXX
5131 fi
5132else
5133 CXX="$ac_cv_path_CXX"
5134fi
5135 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136 esac
5137 if test "$CXX" = "notfound"
5138 then
5139 CXX=""
5140 fi
5141fi
5142if test -z "$CXX"
5143then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005144 if test -n "$ac_tool_prefix"; then
5145 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5146 do
5147 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5148set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005151if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005153else
5154 if test -n "$CXX"; then
5155 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5156else
5157as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5158for as_dir in $PATH
5159do
5160 IFS=$as_save_IFS
5161 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005162 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005163 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005164 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166 break 2
5167 fi
5168done
Matthias Kloseb9621712010-04-24 17:59:49 +00005169 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005170IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171
5172fi
5173fi
5174CXX=$ac_cv_prog_CXX
5175if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5177$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178else
Matthias Kloseb9621712010-04-24 17:59:49 +00005179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005181fi
5182
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005183
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005184 test -n "$CXX" && break
5185 done
5186fi
5187if test -z "$CXX"; then
5188 ac_ct_CXX=$CXX
5189 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5190do
5191 # Extract the first word of "$ac_prog", so it can be a program name with args.
5192set dummy $ac_prog; ac_word=$2
5193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5194$as_echo_n "checking for $ac_word... " >&6; }
5195if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5196 $as_echo_n "(cached) " >&6
5197else
5198 if test -n "$ac_ct_CXX"; then
5199 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5200else
5201as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5202for as_dir in $PATH
5203do
5204 IFS=$as_save_IFS
5205 test -z "$as_dir" && as_dir=.
5206 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005207 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005208 ac_cv_prog_ac_ct_CXX="$ac_prog"
5209 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5210 break 2
5211 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005212done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005213 done
5214IFS=$as_save_IFS
5215
5216fi
5217fi
5218ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5219if test -n "$ac_ct_CXX"; then
5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5221$as_echo "$ac_ct_CXX" >&6; }
5222else
5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5224$as_echo "no" >&6; }
5225fi
5226
5227
5228 test -n "$ac_ct_CXX" && break
5229done
5230
5231 if test "x$ac_ct_CXX" = x; then
5232 CXX="notfound"
5233 else
5234 case $cross_compiling:$ac_tool_warned in
5235yes:)
5236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5238ac_tool_warned=yes ;;
5239esac
5240 CXX=$ac_ct_CXX
5241 fi
5242fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005243
5244 if test "$CXX" = "notfound"
5245 then
5246 CXX=""
5247 fi
5248fi
5249if test "$preset_cxx" != "$CXX"
5250then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005251 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005252
5253 By default, distutils will build C++ extension modules with \"$CXX\".
5254 If this is not intended, then set CXX on the configure command line.
5255 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005256$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005257
5258 By default, distutils will build C++ extension modules with \"$CXX\".
5259 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005260 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005261fi
5262
5263
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005264MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5265
5266
5267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5268$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5269cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005270#undef bfin
5271#undef cris
5272#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005273#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005274#undef hppa
5275#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005276#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005277#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005278#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005279#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005280#undef unix
5281#if defined(__linux__)
5282# if defined(__x86_64__) && defined(__LP64__)
5283 x86_64-linux-gnu
5284# elif defined(__x86_64__) && defined(__ILP32__)
5285 x86_64-linux-gnux32
5286# elif defined(__i386__)
5287 i386-linux-gnu
5288# elif defined(__aarch64__) && defined(__AARCH64EL__)
5289# if defined(__ILP32__)
5290 aarch64_ilp32-linux-gnu
5291# else
5292 aarch64-linux-gnu
5293# endif
5294# elif defined(__aarch64__) && defined(__AARCH64EB__)
5295# if defined(__ILP32__)
5296 aarch64_be_ilp32-linux-gnu
5297# else
5298 aarch64_be-linux-gnu
5299# endif
5300# elif defined(__alpha__)
5301 alpha-linux-gnu
5302# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5303# if defined(__ARMEL__)
5304 arm-linux-gnueabihf
5305# else
5306 armeb-linux-gnueabihf
5307# endif
5308# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5309# if defined(__ARMEL__)
5310 arm-linux-gnueabi
5311# else
5312 armeb-linux-gnueabi
5313# endif
5314# elif defined(__hppa__)
5315 hppa-linux-gnu
5316# elif defined(__ia64__)
5317 ia64-linux-gnu
5318# elif defined(__m68k__) && !defined(__mcoldfire__)
5319 m68k-linux-gnu
5320# elif defined(__mips_hard_float) && defined(_MIPSEL)
5321# if _MIPS_SIM == _ABIO32
5322 mipsel-linux-gnu
5323# elif _MIPS_SIM == _ABIN32
5324 mips64el-linux-gnuabin32
5325# elif _MIPS_SIM == _ABI64
5326 mips64el-linux-gnuabi64
5327# else
5328# error unknown platform triplet
5329# endif
5330# elif defined(__mips_hard_float)
5331# if _MIPS_SIM == _ABIO32
5332 mips-linux-gnu
5333# elif _MIPS_SIM == _ABIN32
5334 mips64-linux-gnuabin32
5335# elif _MIPS_SIM == _ABI64
5336 mips64-linux-gnuabi64
5337# else
5338# error unknown platform triplet
5339# endif
5340# elif defined(__or1k__)
5341 or1k-linux-gnu
5342# elif defined(__powerpc__) && defined(__SPE__)
5343 powerpc-linux-gnuspe
5344# elif defined(__powerpc64__)
5345# if defined(__LITTLE_ENDIAN__)
5346 powerpc64le-linux-gnu
5347# else
5348 powerpc64-linux-gnu
5349# endif
5350# elif defined(__powerpc__)
5351 powerpc-linux-gnu
5352# elif defined(__s390x__)
5353 s390x-linux-gnu
5354# elif defined(__s390__)
5355 s390-linux-gnu
5356# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5357 sh4-linux-gnu
5358# elif defined(__sparc__) && defined(__arch64__)
5359 sparc64-linux-gnu
5360# elif defined(__sparc__)
5361 sparc-linux-gnu
5362# else
5363# error unknown platform triplet
5364# endif
5365#elif defined(__FreeBSD_kernel__)
5366# if defined(__LP64__)
5367 x86_64-kfreebsd-gnu
5368# elif defined(__i386__)
5369 i386-kfreebsd-gnu
5370# else
5371# error unknown platform triplet
5372# endif
5373#elif defined(__gnu_hurd__)
5374 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005375#elif defined(__APPLE__)
5376 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005377#else
5378# error unknown platform triplet
5379#endif
5380
5381EOF
5382
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005383if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005384 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5386$as_echo "$PLATFORM_TRIPLET" >&6; }
5387else
5388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5389$as_echo "none" >&6; }
5390fi
5391rm -f conftest.c conftest.out
5392
5393if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5394 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5395 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5396 fi
5397fi
5398PLATDIR=plat-$MACHDEP
5399
5400
5401
5402
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5404$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5405save_LDFLAGS="$LDFLAGS"
5406LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005407
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5409/* end confdefs.h. */
5410
5411int
5412main ()
5413{
5414
5415 ;
5416 return 0;
5417}
5418_ACEOF
5419if ac_fn_c_try_link "$LINENO"; then :
5420 NO_AS_NEEDED="-Wl,--no-as-needed"
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5422$as_echo "yes" >&6; }
5423else
5424 NO_AS_NEEDED=""
5425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5426$as_echo "no" >&6; }
5427fi
5428rm -f core conftest.err conftest.$ac_objext \
5429 conftest$ac_exeext conftest.$ac_ext
5430LDFLAGS="$save_LDFLAGS"
5431
5432
5433
5434# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435
Matthias Kloseb9621712010-04-24 17:59:49 +00005436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5437$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005438if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005439 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005440else
5441 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5442 then ac_cv_path_EGREP="$GREP -E"
5443 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 # Loop through the user's path and test for each of PROGNAME-LIST
5447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5449do
5450 IFS=$as_save_IFS
5451 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 for ac_prog in egrep; do
5453 for ac_exec_ext in '' $ac_executable_extensions; do
5454 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005455 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005456# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005457 # Check for GNU $ac_path_EGREP
5458case `"$ac_path_EGREP" --version 2>&1` in
5459*GNU*)
5460 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5461*)
5462 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005464 while :
5465 do
5466 cat "conftest.in" "conftest.in" >"conftest.tmp"
5467 mv "conftest.tmp" "conftest.in"
5468 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005470 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5471 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005473 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5474 # Best one so far, save it but keep looking for a better one
5475 ac_cv_path_EGREP="$ac_path_EGREP"
5476 ac_path_EGREP_max=$ac_count
5477 fi
5478 # 10*(2^10) chars as input seems more than enough
5479 test $ac_count -gt 10 && break
5480 done
5481 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5482esac
5483
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 $ac_path_EGREP_found && break 3
5485 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005486 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005487 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005488IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005489 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005490 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005492else
5493 ac_cv_path_EGREP=$EGREP
5494fi
5495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005496 fi
5497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5499$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005500 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005501
5502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5504$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005505if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005506 $as_echo_n "(cached) " >&6
5507else
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005509/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005510#include <stdlib.h>
5511#include <stdarg.h>
5512#include <string.h>
5513#include <float.h>
5514
5515int
5516main ()
5517{
5518
5519 ;
5520 return 0;
5521}
5522_ACEOF
5523if ac_fn_c_try_compile "$LINENO"; then :
5524 ac_cv_header_stdc=yes
5525else
5526 ac_cv_header_stdc=no
5527fi
5528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5529
5530if test $ac_cv_header_stdc = yes; then
5531 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533/* end confdefs.h. */
5534#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005535
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005536_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005540else
Matthias Kloseb9621712010-04-24 17:59:49 +00005541 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005543rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544
Matthias Kloseb9621712010-04-24 17:59:49 +00005545fi
5546
5547if test $ac_cv_header_stdc = yes; then
5548 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5550/* end confdefs.h. */
5551#include <stdlib.h>
5552
5553_ACEOF
5554if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5555 $EGREP "free" >/dev/null 2>&1; then :
5556
5557else
5558 ac_cv_header_stdc=no
5559fi
5560rm -f conftest*
5561
5562fi
5563
5564if test $ac_cv_header_stdc = yes; then
5565 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5566 if test "$cross_compiling" = yes; then :
5567 :
5568else
5569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5570/* end confdefs.h. */
5571#include <ctype.h>
5572#include <stdlib.h>
5573#if ((' ' & 0x0FF) == 0x020)
5574# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5575# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5576#else
5577# define ISLOWER(c) \
5578 (('a' <= (c) && (c) <= 'i') \
5579 || ('j' <= (c) && (c) <= 'r') \
5580 || ('s' <= (c) && (c) <= 'z'))
5581# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5582#endif
5583
5584#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5585int
5586main ()
5587{
5588 int i;
5589 for (i = 0; i < 256; i++)
5590 if (XOR (islower (i), ISLOWER (i))
5591 || toupper (i) != TOUPPER (i))
5592 return 2;
5593 return 0;
5594}
5595_ACEOF
5596if ac_fn_c_try_run "$LINENO"; then :
5597
5598else
5599 ac_cv_header_stdc=no
5600fi
5601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5602 conftest.$ac_objext conftest.beam conftest.$ac_ext
5603fi
5604
5605fi
5606fi
5607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5608$as_echo "$ac_cv_header_stdc" >&6; }
5609if test $ac_cv_header_stdc = yes; then
5610
5611$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5612
5613fi
5614
5615# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5616for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5617 inttypes.h stdint.h unistd.h
5618do :
5619 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5620ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5621"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005622if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005623 cat >>confdefs.h <<_ACEOF
5624#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5625_ACEOF
5626
5627fi
5628
5629done
5630
5631
5632
5633 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005634if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005635 MINIX=yes
5636else
5637 MINIX=
5638fi
5639
5640
5641 if test "$MINIX" = yes; then
5642
5643$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5644
5645
5646$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5647
5648
5649$as_echo "#define _MINIX 1" >>confdefs.h
5650
5651 fi
5652
5653
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5655$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005656if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 $as_echo_n "(cached) " >&6
5658else
5659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5660/* end confdefs.h. */
5661
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005662# define __EXTENSIONS__ 1
5663 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005664int
5665main ()
5666{
5667
5668 ;
5669 return 0;
5670}
5671_ACEOF
5672if ac_fn_c_try_compile "$LINENO"; then :
5673 ac_cv_safe_to_define___extensions__=yes
5674else
5675 ac_cv_safe_to_define___extensions__=no
5676fi
5677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5678fi
5679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5680$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5681 test $ac_cv_safe_to_define___extensions__ = yes &&
5682 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5683
5684 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5685
5686 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5687
5688 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5689
5690 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5691
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694# Check for unsupported systems
5695case $ac_sys_system/$ac_sys_release in
5696atheos*|Linux*/1*)
5697 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5698 echo See README for details.
5699 exit 1;;
5700esac
5701
5702
Matthias Kloseb9621712010-04-24 17:59:49 +00005703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5704$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
5706# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 withval=$with_suffix;
5709 case $withval in
5710 no) EXEEXT=;;
5711 yes) EXEEXT=.exe;;
5712 *) EXEEXT=$withval;;
5713 esac
5714fi
5715
Matthias Kloseb9621712010-04-24 17:59:49 +00005716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5717$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
5719# Test whether we're running on a non-case-sensitive system, in which
5720# case we give a warning if no ext is given
5721
Matthias Kloseb9621712010-04-24 17:59:49 +00005722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5723$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724if test ! -d CaseSensitiveTestDir; then
5725mkdir CaseSensitiveTestDir
5726fi
5727
5728if test -d casesensitivetestdir
5729then
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5731$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 BUILDEXEEXT=.exe
5733else
Matthias Kloseb9621712010-04-24 17:59:49 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 BUILDEXEEXT=$EXEEXT
5737fi
5738rmdir CaseSensitiveTestDir
5739
5740case $MACHDEP in
5741bsdos*)
5742 case $CC in
5743 gcc) CC="$CC -D_HAVE_BSDI";;
5744 esac;;
5745esac
5746
5747case $ac_sys_system in
5748hp*|HP*)
5749 case $CC in
5750 cc|*/cc) CC="$CC -Ae";;
5751 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752esac
5753
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754
Matthias Kloseb9621712010-04-24 17:59:49 +00005755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5756$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005757if test -z "$LIBRARY"
5758then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005759 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5762$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
5764# LDLIBRARY is the name of the library to link against (as opposed to the
5765# name of the library into which to insert object files). BLDLIBRARY is also
5766# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5767# is blank as the main program is not linked directly against LDLIBRARY.
5768# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5769# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5770# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5771# DLLLIBRARY is the shared (i.e., DLL) library.
5772#
5773# RUNSHARED is used to run shared python without installed libraries
5774#
5775# INSTSONAME is the name of the shared library that will be use to install
5776# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005777#
5778# LDVERSION is the shared library version number, normally the Python version
5779# with the ABI build flags appended.
5780
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781
5782
5783
5784
5785
5786
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788LDLIBRARY="$LIBRARY"
5789BLDLIBRARY='$(LDLIBRARY)'
5790INSTSONAME='$(LDLIBRARY)'
5791DLLLIBRARY=''
5792LDLIBRARYDIR=''
5793RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005794LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
5796# LINKCC is the command that links the python executable -- default is $(CC).
5797# If CXX is set, and if it is needed to link a main function that was
5798# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5799# python might then depend on the C++ runtime
5800# This is altered for AIX in order to build the export list before
5801# linking.
5802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5804$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805if test -z "$LINKCC"
5806then
5807 LINKCC='$(PURIFY) $(MAINCC)'
5808 case $ac_sys_system in
5809 AIX*)
5810 exp_extra="\"\""
5811 if test $ac_sys_release -ge 5 -o \
5812 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5813 exp_extra="."
5814 fi
5815 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 QNX*)
5817 # qcc must be used because the other compilers do not
5818 # support -N.
5819 LINKCC=qcc;;
5820 esac
5821fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5823$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824
5825# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5826# make sure we default having it set to "no": this is used by
5827# distutils.unixccompiler to know if it should add --enable-new-dtags
5828# to linker command lines, and failing to detect GNU ld simply results
5829# in the same bahaviour as before.
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5832$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833ac_prog=ld
5834if test "$GCC" = yes; then
5835 ac_prog=`$CC -print-prog-name=ld`
5836fi
5837case `"$ac_prog" -V 2>&1 < /dev/null` in
5838 *GNU*)
5839 GNULD=yes;;
5840 *)
5841 GNULD=no;;
5842esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5844$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005845
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5847$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005848if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005849 $as_echo_n "(cached) " >&6
5850else
5851 ac_cv_c_inline=no
5852for ac_kw in inline __inline__ __inline; do
5853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5854/* end confdefs.h. */
5855#ifndef __cplusplus
5856typedef int foo_t;
5857static $ac_kw foo_t static_foo () {return 0; }
5858$ac_kw foo_t foo () {return 0; }
5859#endif
5860
5861_ACEOF
5862if ac_fn_c_try_compile "$LINENO"; then :
5863 ac_cv_c_inline=$ac_kw
5864fi
5865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5866 test "$ac_cv_c_inline" != no && break
5867done
5868
5869fi
5870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5871$as_echo "$ac_cv_c_inline" >&6; }
5872
5873case $ac_cv_c_inline in
5874 inline | yes) ;;
5875 *)
5876 case $ac_cv_c_inline in
5877 no) ac_val=;;
5878 *) ac_val=$ac_cv_c_inline;;
5879 esac
5880 cat >>confdefs.h <<_ACEOF
5881#ifndef __cplusplus
5882#define inline $ac_val
5883#endif
5884_ACEOF
5885 ;;
5886esac
5887
5888if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005889
5890$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005891
5892
5893fi
5894
5895
Matthias Kloseb9621712010-04-24 17:59:49 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5897$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005899if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 enableval=$enable_shared;
5901fi
5902
5903
5904if test -z "$enable_shared"
5905then
5906 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005907 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 enable_shared="yes";;
5909 *)
5910 enable_shared="no";;
5911 esac
5912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5914$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
Matthias Kloseb9621712010-04-24 17:59:49 +00005916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5917$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005919if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005920 enableval=$enable_profiling;
5921fi
5922
5923if test "x$enable_profiling" = xyes; then
5924 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005925 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927/* end confdefs.h. */
5928int main() { return 0; }
5929_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005930if ac_fn_c_try_link "$LINENO"; then :
5931
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005933 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005935rm -f core conftest.err conftest.$ac_objext \
5936 conftest$ac_exeext conftest.$ac_ext
5937 CC="$ac_save_cc"
5938else
5939 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5942$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943
doko@ubuntu.comba015832012-06-30 16:52:05 +02005944if test "x$enable_profiling" = xyes; then
5945 BASECFLAGS="-pg $BASECFLAGS"
5946 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947fi
5948
Matthias Kloseb9621712010-04-24 17:59:49 +00005949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5950$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951
5952# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5953# library that we build, but we do not want to link against it (we
5954# will find it with a -framework option). For this reason there is an
5955# extra variable BLDLIBRARY against which Python and the extension
5956# modules are linked, BLDLIBRARY. This is normally the same as
5957# LDLIBRARY, but empty for MacOSX framework builds.
5958if test "$enable_framework"
5959then
5960 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005961 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 BLDLIBRARY=''
5963else
5964 BLDLIBRARY='$(LDLIBRARY)'
5965fi
5966
5967# Other platforms follow
5968if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005969 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970
Matthias Kloseb9621712010-04-24 17:59:49 +00005971$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972
5973 case $ac_sys_system in
5974 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005975 LDLIBRARY='libpython$(LDVERSION).dll.a'
5976 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977 ;;
5978 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005979 LDLIBRARY='libpython$(LDVERSION).so'
5980 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005981 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005983 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005984 then
5985 PY3LIBRARY=libpython3.so
5986 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005988 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005989 LDLIBRARY='libpython$(LDVERSION).so'
5990 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005991 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005992 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005993 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005994 then
5995 PY3LIBRARY=libpython3.so
5996 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 ;;
5998 hp*|HP*)
5999 case `uname -m` in
6000 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006001 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ;;
6003 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006004 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005 ;;
6006 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006007 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006008 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006011 LDLIBRARY='libpython$(LDVERSION).dylib'
6012 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006013 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006014 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006015 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006016 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006017 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006018 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019
6020 esac
6021else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006022 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006023 case $ac_sys_system in
6024 CYGWIN*)
6025 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006026 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027 ;;
6028 esac
6029fi
6030
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006031if test "$cross_compiling" = yes; then
6032 RUNSHARED=
6033fi
6034
Matthias Kloseb9621712010-04-24 17:59:49 +00006035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6036$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037
6038if test -n "$ac_tool_prefix"; then
6039 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6040set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006043if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006044 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
6046 if test -n "$RANLIB"; then
6047 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6048else
6049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6050for as_dir in $PATH
6051do
6052 IFS=$as_save_IFS
6053 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058 break 2
6059 fi
6060done
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062IFS=$as_save_IFS
6063
6064fi
6065fi
6066RANLIB=$ac_cv_prog_RANLIB
6067if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6069$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070else
Matthias Kloseb9621712010-04-24 17:59:49 +00006071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073fi
6074
6075
6076fi
6077if test -z "$ac_cv_prog_RANLIB"; then
6078 ac_ct_RANLIB=$RANLIB
6079 # Extract the first word of "ranlib", so it can be a program name with args.
6080set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6082$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006083if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085else
6086 if test -n "$ac_ct_RANLIB"; then
6087 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6088else
6089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6090for as_dir in $PATH
6091do
6092 IFS=$as_save_IFS
6093 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098 break 2
6099 fi
6100done
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102IFS=$as_save_IFS
6103
6104fi
6105fi
6106ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6107if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6109$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110else
Matthias Kloseb9621712010-04-24 17:59:49 +00006111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006113fi
6114
6115 if test "x$ac_ct_RANLIB" = x; then
6116 RANLIB=":"
6117 else
6118 case $cross_compiling:$ac_tool_warned in
6119yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122ac_tool_warned=yes ;;
6123esac
6124 RANLIB=$ac_ct_RANLIB
6125 fi
6126else
6127 RANLIB="$ac_cv_prog_RANLIB"
6128fi
6129
6130
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006131if test -n "$ac_tool_prefix"; then
6132 for ac_prog in ar aal
6133 do
6134 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6135set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6137$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006138if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006139 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006140else
6141 if test -n "$AR"; then
6142 ac_cv_prog_AR="$AR" # Let the user override the test.
6143else
6144as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6145for as_dir in $PATH
6146do
6147 IFS=$as_save_IFS
6148 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006149 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006151 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153 break 2
6154 fi
6155done
Matthias Kloseb9621712010-04-24 17:59:49 +00006156 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157IFS=$as_save_IFS
6158
6159fi
6160fi
6161AR=$ac_cv_prog_AR
6162if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6164$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165else
Matthias Kloseb9621712010-04-24 17:59:49 +00006166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6167$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168fi
6169
6170
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006171 test -n "$AR" && break
6172 done
6173fi
6174if test -z "$AR"; then
6175 ac_ct_AR=$AR
6176 for ac_prog in ar aal
6177do
6178 # Extract the first word of "$ac_prog", so it can be a program name with args.
6179set dummy $ac_prog; ac_word=$2
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6181$as_echo_n "checking for $ac_word... " >&6; }
6182if ${ac_cv_prog_ac_ct_AR+:} false; then :
6183 $as_echo_n "(cached) " >&6
6184else
6185 if test -n "$ac_ct_AR"; then
6186 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6187else
6188as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6189for as_dir in $PATH
6190do
6191 IFS=$as_save_IFS
6192 test -z "$as_dir" && as_dir=.
6193 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006195 ac_cv_prog_ac_ct_AR="$ac_prog"
6196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6197 break 2
6198 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006200 done
6201IFS=$as_save_IFS
6202
6203fi
6204fi
6205ac_ct_AR=$ac_cv_prog_ac_ct_AR
6206if test -n "$ac_ct_AR"; then
6207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6208$as_echo "$ac_ct_AR" >&6; }
6209else
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6211$as_echo "no" >&6; }
6212fi
6213
6214
6215 test -n "$ac_ct_AR" && break
6216done
6217
6218 if test "x$ac_ct_AR" = x; then
6219 AR="ar"
6220 else
6221 case $cross_compiling:$ac_tool_warned in
6222yes:)
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6224$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6225ac_tool_warned=yes ;;
6226esac
6227 AR=$ac_ct_AR
6228 fi
6229fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230
6231
6232# tweak ARFLAGS only if the user didn't set it on the command line
6233
6234if test -z "$ARFLAGS"
6235then
6236 ARFLAGS="rc"
6237fi
6238
doko@ubuntu.com58844492012-06-30 18:25:32 +02006239if test -n "$ac_tool_prefix"; then
6240 for ac_prog in readelf
6241 do
6242 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6245$as_echo_n "checking for $ac_word... " >&6; }
6246if ${ac_cv_prog_READELF+:} false; then :
6247 $as_echo_n "(cached) " >&6
6248else
6249 if test -n "$READELF"; then
6250 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6251else
6252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH
6254do
6255 IFS=$as_save_IFS
6256 test -z "$as_dir" && as_dir=.
6257 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006258 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006259 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6260 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6261 break 2
6262 fi
6263done
6264 done
6265IFS=$as_save_IFS
6266
6267fi
6268fi
6269READELF=$ac_cv_prog_READELF
6270if test -n "$READELF"; then
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6272$as_echo "$READELF" >&6; }
6273else
6274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6275$as_echo "no" >&6; }
6276fi
6277
6278
6279 test -n "$READELF" && break
6280 done
6281fi
6282if test -z "$READELF"; then
6283 ac_ct_READELF=$READELF
6284 for ac_prog in readelf
6285do
6286 # Extract the first word of "$ac_prog", so it can be a program name with args.
6287set dummy $ac_prog; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6291 $as_echo_n "(cached) " >&6
6292else
6293 if test -n "$ac_ct_READELF"; then
6294 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6295else
6296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299 IFS=$as_save_IFS
6300 test -z "$as_dir" && as_dir=.
6301 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006303 ac_cv_prog_ac_ct_READELF="$ac_prog"
6304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305 break 2
6306 fi
6307done
6308 done
6309IFS=$as_save_IFS
6310
6311fi
6312fi
6313ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6314if test -n "$ac_ct_READELF"; then
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6316$as_echo "$ac_ct_READELF" >&6; }
6317else
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }
6320fi
6321
6322
6323 test -n "$ac_ct_READELF" && break
6324done
6325
6326 if test "x$ac_ct_READELF" = x; then
6327 READELF=":"
6328 else
6329 case $cross_compiling:$ac_tool_warned in
6330yes:)
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6333ac_tool_warned=yes ;;
6334esac
6335 READELF=$ac_ct_READELF
6336 fi
6337fi
6338
6339if test "$cross_compiling" = yes; then
6340 case "$READELF" in
6341 readelf|:)
6342 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6343 ;;
6344 esac
6345fi
6346
6347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006349case $MACHDEP in
6350bsdos*|hp*|HP*)
6351 # install -d does not work on BSDI or HP-UX
6352 if test -z "$INSTALL"
6353 then
6354 INSTALL="${srcdir}/install-sh -c"
6355 fi
6356esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357# Find a good install program. We prefer a C program (faster),
6358# so one script is as good as another. But avoid the broken or
6359# incompatible versions:
6360# SysV /etc/install, /usr/sbin/install
6361# SunOS /usr/etc/install
6362# IRIX /sbin/install
6363# AIX /bin/install
6364# AmigaOS /C/install, which installs bootblocks on floppy discs
6365# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6366# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6367# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6368# OS/2's system install, which has a completely different semantic
6369# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006370# Reject install programs that cannot install multiple files.
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6372$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006374if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376else
6377 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6378for as_dir in $PATH
6379do
6380 IFS=$as_save_IFS
6381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006382 # Account for people who put trailing slashes in PATH elements.
6383case $as_dir/ in #((
6384 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006386 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387 /usr/ucb/* ) ;;
6388 *)
6389 # OSF1 and SCO ODT 3.0 have their own names for install.
6390 # Don't use installbsd from OSF since it installs stuff as root
6391 # by default.
6392 for ac_prog in ginstall scoinst install; do
6393 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006394 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006395 if test $ac_prog = install &&
6396 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6397 # AIX install. It has an incompatible calling convention.
6398 :
6399 elif test $ac_prog = install &&
6400 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6401 # program-specific install script used by HP pwplus--don't use.
6402 :
6403 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006404 rm -rf conftest.one conftest.two conftest.dir
6405 echo one > conftest.one
6406 echo two > conftest.two
6407 mkdir conftest.dir
6408 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6409 test -s conftest.one && test -s conftest.two &&
6410 test -s conftest.dir/conftest.one &&
6411 test -s conftest.dir/conftest.two
6412 then
6413 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6414 break 3
6415 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416 fi
6417 fi
6418 done
6419 done
6420 ;;
6421esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006422
6423 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006424IFS=$as_save_IFS
6425
Matthias Kloseb9621712010-04-24 17:59:49 +00006426rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428fi
6429 if test "${ac_cv_path_install+set}" = set; then
6430 INSTALL=$ac_cv_path_install
6431 else
6432 # As a last resort, use the slow shell script. Don't cache a
6433 # value for INSTALL within a source directory, because that will
6434 # break other packages using the cache if that directory is
6435 # removed, or if the value is a relative name.
6436 INSTALL=$ac_install_sh
6437 fi
6438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6440$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441
6442# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6443# It thinks the first close brace ends the variable substitution.
6444test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6445
6446test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6447
6448test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6449
Matthias Klose93a0ef12012-03-15 18:08:34 +01006450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6451$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6452if test -z "$MKDIR_P"; then
6453 if ${ac_cv_path_mkdir+:} false; then :
6454 $as_echo_n "(cached) " >&6
6455else
6456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6457for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6458do
6459 IFS=$as_save_IFS
6460 test -z "$as_dir" && as_dir=.
6461 for ac_prog in mkdir gmkdir; do
6462 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006463 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006464 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6465 'mkdir (GNU coreutils) '* | \
6466 'mkdir (coreutils) '* | \
6467 'mkdir (fileutils) '4.1*)
6468 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6469 break 3;;
6470 esac
6471 done
6472 done
6473 done
6474IFS=$as_save_IFS
6475
6476fi
6477
6478 test -d ./--version && rmdir ./--version
6479 if test "${ac_cv_path_mkdir+set}" = set; then
6480 MKDIR_P="$ac_cv_path_mkdir -p"
6481 else
6482 # As a last resort, use the slow shell script. Don't cache a
6483 # value for MKDIR_P within a source directory, because that will
6484 # break other packages using the cache if that directory is
6485 # removed, or if the value is a relative name.
6486 MKDIR_P="$ac_install_sh -d"
6487 fi
6488fi
6489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6490$as_echo "$MKDIR_P" >&6; }
6491
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492
6493# Not every filesystem supports hard links
6494
6495if test -z "$LN" ; then
6496 case $ac_sys_system in
6497 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006498 *) LN=ln;;
6499 esac
6500fi
6501
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006502# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006503
6504ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6508$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509
6510# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006511if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512 withval=$with_pydebug;
6513if test "$withval" != no
6514then
6515
Matthias Kloseb9621712010-04-24 17:59:49 +00006516$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517
Matthias Kloseb9621712010-04-24 17:59:49 +00006518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6519$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006520 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006521 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006522else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524fi
6525else
Matthias Kloseb9621712010-04-24 17:59:49 +00006526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6527$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528fi
6529
6530
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006531# Enable LTO flags
6532
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6534$as_echo_n "checking for --with-lto... " >&6; }
6535
6536# Check whether --with-lto was given.
6537if test "${with_lto+set}" = set; then :
6538 withval=$with_lto;
6539if test "$withval" != no
6540then
6541 Py_LTO='true'
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6543$as_echo "yes" >&6; };
6544else
6545 Py_LTO='false'
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6547$as_echo "no" >&6; };
6548fi
6549else
6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551$as_echo "no" >&6; }
6552fi
6553
6554if test "$Py_LTO" = 'true' ; then
6555 case $CC in
6556 *clang*)
6557 # Any changes made here should be reflected in the GCC+Darwin case below
6558 LTOFLAGS="-flto"
6559 ;;
6560 *gcc*)
6561 case $ac_sys_system in
6562 Darwin*)
6563 LTOFLAGS="-flto"
6564 ;;
6565 *)
6566 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6567 ;;
6568 esac
6569 ;;
6570 esac
6571fi
6572
Brett Cannon7188a3e2015-09-18 15:13:44 -07006573# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006574
6575
6576
6577
6578
6579
Brett Cannon7188a3e2015-09-18 15:13:44 -07006580# Extract the first word of "llvm-profdata", so it can be a program name with args.
6581set dummy llvm-profdata; ac_word=$2
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6583$as_echo_n "checking for $ac_word... " >&6; }
6584if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6585 $as_echo_n "(cached) " >&6
6586else
6587 if test -n "$LLVM_PROF_FOUND"; then
6588 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6589else
6590as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6591for as_dir in $PATH
6592do
6593 IFS=$as_save_IFS
6594 test -z "$as_dir" && as_dir=.
6595 for ac_exec_ext in '' $ac_executable_extensions; do
6596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6597 ac_cv_prog_LLVM_PROF_FOUND="found"
6598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6599 break 2
6600 fi
6601done
6602 done
6603IFS=$as_save_IFS
6604
6605 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6606fi
6607fi
6608LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6609if test -n "$LLVM_PROF_FOUND"; then
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6611$as_echo "$LLVM_PROF_FOUND" >&6; }
6612else
6613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6614$as_echo "no" >&6; }
6615fi
6616
6617
6618LLVM_PROF_ERR=no
6619case $CC in
6620 *clang*)
6621 # Any changes made here should be reflected in the GCC+Darwin case below
6622 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6623 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6624 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6625 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6626 if test $LLVM_PROF_FOUND = not-found
6627 then
6628 LLVM_PROF_ERR=yes
6629 fi
6630 ;;
6631 *gcc*)
6632 case $ac_sys_system in
6633 Darwin*)
6634 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6635 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6636 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6637 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6638 if test $LLVM_PROF_FOUND = not-found
6639 then
6640 LLVM_PROF_ERR=yes
6641 fi
6642 ;;
6643 *)
6644 PGO_PROF_GEN_FLAG="-fprofile-generate"
6645 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6646 LLVM_PROF_MERGER="true"
6647 LLVM_PROF_FILE=""
6648 ;;
6649 esac
6650 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006651 *icc*)
6652 PGO_PROF_GEN_FLAG="-prof-gen"
6653 PGO_PROF_USE_FLAG="-prof-use"
6654 LLVM_PROF_MERGER="true"
6655 LLVM_PROF_FILE=""
6656 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657esac
6658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006659# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6660# merged with this chunk of code?
6661
6662# Optimizer/debugger flags
6663# ------------------------
6664# (The following bit of code is complicated enough - please keep things
6665# indented properly. Just pretend you're editing Python code. ;-)
6666
6667# There are two parallel sets of case statements below, one that checks to
6668# see if OPT was set and one that does BASECFLAGS setting based upon
6669# compiler and platform. BASECFLAGS tweaks need to be made even if the
6670# user set OPT.
6671
6672# tweak OPT based on compiler and platform, only if the user didn't set
6673# it on the command line
6674
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006675if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006676then
6677 case $GCC in
6678 yes)
6679 if test "$CC" != 'g++' ; then
6680 STRICT_PROTO="-Wstrict-prototypes"
6681 fi
6682 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6683 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6684 WRAP="-fwrapv"
6685 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006686
6687 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006688 case $CC in
6689 *clang*) WRAP="-fwrapv"
6690 ;;
6691 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693 case $ac_cv_prog_cc_g in
6694 yes)
6695 if test "$Py_DEBUG" = 'true' ; then
6696 # Optimization messes up debuggers, so turn it off for
6697 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006698 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6699 OPT="-g -Og -Wall $STRICT_PROTO"
6700 else
6701 OPT="-g -O0 -Wall $STRICT_PROTO"
6702 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703 else
6704 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6705 fi
6706 ;;
6707 *)
6708 OPT="-O3 -Wall $STRICT_PROTO"
6709 ;;
6710 esac
6711 case $ac_sys_system in
6712 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6713 ;;
6714 esac
6715 ;;
6716
6717 *)
6718 OPT="-O"
6719 ;;
6720 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721fi
6722
6723
6724
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726# The -arch flags for universal builds on OSX
6727UNIVERSAL_ARCH_FLAGS=
6728
6729
6730# tweak BASECFLAGS based on compiler and platform
6731case $GCC in
6732yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006733 # Python doesn't violate C99 aliasing rules, but older versions of
6734 # GCC produce warnings for legal Python code. Enable
6735 # -fno-strict-aliasing on versions of GCC that support but produce
6736 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6738$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739 ac_save_cc="$CC"
6740 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006741 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006742 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006743 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006744else
Matthias Kloseb9621712010-04-24 17:59:49 +00006745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006747
Matthias Kloseb159a552010-04-25 21:00:44 +00006748
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006749int
6750main ()
6751{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006752
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006753 ;
6754 return 0;
6755}
Matthias Kloseb159a552010-04-25 21:00:44 +00006756
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006758if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006759
6760 CC="$ac_save_cc -fstrict-aliasing"
6761 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006763/* end confdefs.h. */
6764
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006765 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006766int
6767main ()
6768{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006769double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006770 ;
6771 return 0;
6772}
Matthias Kloseb159a552010-04-25 21:00:44 +00006773
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006775if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006776
6777 ac_cv_no_strict_aliasing=no
6778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779else
Matthias Kloseb159a552010-04-25 21:00:44 +00006780
6781 ac_cv_no_strict_aliasing=yes
6782
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006783fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006785
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006786else
Matthias Kloseb159a552010-04-25 21:00:44 +00006787
6788 ac_cv_no_strict_aliasing=no
6789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006790fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006792fi
6793
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006794 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6797$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006798 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799 then
6800 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6801 fi
6802
Zachary Ware5af85642015-12-21 12:09:17 -06006803 # ICC doesn't recognize the option, but only emits a warning
6804 ## XXX does it emit an unused result warning and can it be disabled?
6805 case "$CC" in
6806 *icc*)
6807 ac_cv_disable_unused_result_warning=no
6808 ;;
6809 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6811$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6812 ac_save_cc="$CC"
6813 CC="$CC -Wunused-result -Werror"
6814 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006815 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006816 $as_echo_n "(cached) " >&6
6817else
6818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6819/* end confdefs.h. */
6820
6821
6822int
6823main ()
6824{
6825
6826 ;
6827 return 0;
6828}
6829
6830_ACEOF
6831if ac_fn_c_try_compile "$LINENO"; then :
6832
6833 ac_cv_disable_unused_result_warning=yes
6834
6835else
6836
6837 ac_cv_disable_unused_result_warning=no
6838
6839fi
6840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6841fi
6842
6843 CFLAGS="$save_CFLAGS"
6844 CC="$ac_save_cc"
6845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6846$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006847 ;;
6848 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006849
6850 if test $ac_cv_disable_unused_result_warning = yes
6851 then
6852 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6853 fi
6854
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6856$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6857 ac_save_cc="$CC"
6858 CC="$CC -Werror=declaration-after-statement"
6859 save_CFLAGS="$CFLAGS"
6860 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6861 $as_echo_n "(cached) " >&6
6862else
6863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6864/* end confdefs.h. */
6865
6866
6867int
6868main ()
6869{
6870
6871 ;
6872 return 0;
6873}
6874
6875_ACEOF
6876if ac_fn_c_try_compile "$LINENO"; then :
6877
6878 ac_cv_declaration_after_statement_warning=yes
6879
6880else
6881
6882 ac_cv_declaration_after_statement_warning=no
6883
6884fi
6885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6886fi
6887
6888 CFLAGS="$save_CFLAGS"
6889 CC="$ac_save_cc"
6890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6891$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6892
6893 if test $ac_cv_declaration_after_statement_warning = yes
6894 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006895 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006896 fi
6897
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6899$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6900 ac_save_cc="$CC"
6901 CC="$CC -Wsign-compare"
6902 save_CFLAGS="$CFLAGS"
6903 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6904 $as_echo_n "(cached) " >&6
6905else
6906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6907/* end confdefs.h. */
6908
6909
6910int
6911main ()
6912{
6913
6914 ;
6915 return 0;
6916}
6917
6918_ACEOF
6919if ac_fn_c_try_compile "$LINENO"; then :
6920
6921 ac_cv_enable_sign_compare_warning=yes
6922
6923else
6924
6925 ac_cv_enable_sign_compare_warning=no
6926
6927fi
6928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6929fi
6930
6931 CFLAGS="$save_CFLAGS"
6932 CC="$ac_save_cc"
6933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6934$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6935
6936 if test $ac_cv_enable_sign_compare_warning = yes
6937 then
6938 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6939 fi
6940
6941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6942$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6943 ac_save_cc="$CC"
6944 CC="$CC -Wunreachable-code"
6945 save_CFLAGS="$CFLAGS"
6946 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6947 $as_echo_n "(cached) " >&6
6948else
6949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6950/* end confdefs.h. */
6951
6952
6953int
6954main ()
6955{
6956
6957 ;
6958 return 0;
6959}
6960
6961_ACEOF
6962if ac_fn_c_try_compile "$LINENO"; then :
6963
6964 ac_cv_enable_unreachable_code_warning=yes
6965
6966else
6967
6968 ac_cv_enable_unreachable_code_warning=no
6969
6970fi
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6972fi
6973
6974 CFLAGS="$save_CFLAGS"
6975 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006976
6977 # Don't enable unreachable code warning in debug mode, since it usually
6978 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006979 # Issue #24324: Unfortunately, the unreachable code warning does not work
6980 # correctly on gcc and has been silently removed from the compiler.
6981 # It is supported on clang but on OS X systems gcc may be an alias
6982 # for clang. Try to determine if the compiler is not really gcc and,
6983 # if so, only then enable the warning.
6984 if test $ac_cv_enable_unreachable_code_warning = yes && \
6985 test "$Py_DEBUG" != "true" && \
6986 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006987 then
6988 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006989 else
6990 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006991 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6993$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006994
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006995 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6996 # support. Without this, treatment of subnormals doesn't follow
6997 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006998 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006999 alpha*)
7000 BASECFLAGS="$BASECFLAGS -mieee"
7001 ;;
7002 esac
7003
7004 case $ac_sys_system in
7005 SCO_SV*)
7006 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7007 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007008
7009 # is there any other compiler on Darwin besides gcc?
7010 Darwin*)
7011 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7012 # used to be here, but non-Apple gcc doesn't accept them.
7013 if test "${CC}" = gcc
7014 then
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007016$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007017 case "${UNIVERSALSDK}" in
7018 */MacOSX10.4u.sdk)
7019 # Build using 10.4 SDK, force usage of gcc when the
7020 # compiler is gcc, otherwise the user will get very
7021 # confusing error messages when building on OSX 10.6
7022 CC=gcc-4.0
7023 CPP=cpp-4.0
7024 ;;
7025 esac
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007027$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007028 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007029
Ned Deily87adb6e2013-10-18 21:09:56 -07007030 if test "${enable_universalsdk}"
7031 then
7032 case "$UNIVERSAL_ARCHS" in
7033 32-bit)
7034 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7035 LIPO_32BIT_FLAGS=""
7036 ARCH_RUN_32BIT=""
7037 ;;
7038 64-bit)
7039 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7040 LIPO_32BIT_FLAGS=""
7041 ARCH_RUN_32BIT="true"
7042 ;;
7043 all)
7044 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7045 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7046 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7047 ;;
7048 intel)
7049 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7050 LIPO_32BIT_FLAGS="-extract i386"
7051 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7052 ;;
7053 intel-32)
7054 UNIVERSAL_ARCH_FLAGS="-arch i386"
7055 LIPO_32BIT_FLAGS=""
7056 ARCH_RUN_32BIT=""
7057 ;;
7058 3-way)
7059 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7060 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7061 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7062 ;;
7063 *)
7064 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7065 ;;
7066 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007067
Ned Deily87adb6e2013-10-18 21:09:56 -07007068 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7069 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7070 if test "${UNIVERSALSDK}" != "/"
7071 then
7072 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7073 fi
7074 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007075
Ned Deily87adb6e2013-10-18 21:09:56 -07007076 # Calculate an appropriate deployment target for this build:
7077 # The deployment target value is used explicitly to enable certain
7078 # features are enabled (such as builtin libedit support for readline)
7079 # through the use of Apple's Availabiliy Macros and is used as a
7080 # component of the string returned by distutils.get_platform().
7081 #
7082 # Use the value from:
7083 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7084 # 2. the operating system version of the build machine if >= 10.6
7085 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7086 # below to pick either 10.3, 10.4, or 10.5 as the target.
7087 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007088
Ned Deily87adb6e2013-10-18 21:09:56 -07007089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7090$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007091 cur_target_major=`sw_vers -productVersion | \
7092 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7093 cur_target_minor=`sw_vers -productVersion | \
7094 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7095 cur_target="${cur_target_major}.${cur_target_minor}"
7096 if test ${cur_target_major} -eq 10 && \
7097 test ${cur_target_minor} -ge 3 && \
7098 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007099 then
Ned Deily36820b62014-06-25 13:44:22 -07007100 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007101 cur_target=10.3
7102 if test ${enable_universalsdk}
7103 then
7104 case "$UNIVERSAL_ARCHS" in
7105 all|3-way|intel|64-bit)
7106 # These configurations were first supported in 10.5
7107 cur_target='10.5'
7108 ;;
7109 esac
7110 else
7111 if test `/usr/bin/arch` = "i386"
7112 then
7113 # 10.4 was the first release to support Intel archs
7114 cur_target="10.4"
7115 fi
7116 fi
7117 fi
7118 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007119
Ned Deily87adb6e2013-10-18 21:09:56 -07007120 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7121 # environment with a value that is the same as what we'll use
7122 # in the Makefile to ensure that we'll get the same compiler
7123 # environment during configure and build time.
7124 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7125 export MACOSX_DEPLOYMENT_TARGET
7126 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7128$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007129
Ned Deily87adb6e2013-10-18 21:09:56 -07007130 # end of Darwin* tests
7131 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007132 esac
7133 ;;
7134
7135*)
7136 case $ac_sys_system in
7137 OpenUNIX*|UnixWare*)
7138 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7139 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007140 SCO_SV*)
7141 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7142 ;;
7143 esac
7144 ;;
7145esac
7146
Zachary Ware5af85642015-12-21 12:09:17 -06007147# ICC needs -fp-model strict or floats behave badly
7148case "$CC" in
7149*icc*)
7150 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7151 ;;
7152esac
7153
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007154if test "$Py_DEBUG" = 'true'; then
7155 :
7156else
7157 OPT="-DNDEBUG $OPT"
7158fi
7159
7160if test "$ac_arch_flags"
7161then
7162 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7163fi
7164
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165# On some compilers, pthreads are available without further options
7166# (e.g. MacOS X). On some of these systems, the compiler will not
7167# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7168# So we have to see first whether pthreads are available without
7169# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7171$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007172if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007173 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007174else
Matthias Kloseb9621712010-04-24 17:59:49 +00007175 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007176 ac_cv_pthread_is_default=no
7177else
Matthias Kloseb9621712010-04-24 17:59:49 +00007178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007179/* end confdefs.h. */
7180
Stefan Krah7dba5942012-11-22 22:49:11 +01007181#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007182#include <pthread.h>
7183
7184void* routine(void* p){return NULL;}
7185
7186int main(){
7187 pthread_t p;
7188 if(pthread_create(&p,NULL,routine,NULL)!=0)
7189 return 1;
7190 (void)pthread_detach(p);
7191 return 0;
7192}
7193
7194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007195if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007196
7197 ac_cv_pthread_is_default=yes
7198 ac_cv_kthread=no
7199 ac_cv_pthread=no
7200
7201else
Matthias Kloseb9621712010-04-24 17:59:49 +00007202 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7205 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007206fi
7207
7208
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007209fi
7210
Matthias Kloseb9621712010-04-24 17:59:49 +00007211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7212$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213
7214
7215if test $ac_cv_pthread_is_default = yes
7216then
7217 ac_cv_kpthread=no
7218else
7219# -Kpthread, if available, provides the right #defines
7220# and linker options to make pthread_create available
7221# Some compilers won't report that they do not support -Kpthread,
7222# so we need to run a program to see whether it really made the
7223# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7225$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007226if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007227 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007228else
7229 ac_save_cc="$CC"
7230CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232 ac_cv_kpthread=no
7233else
Matthias Kloseb9621712010-04-24 17:59:49 +00007234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235/* end confdefs.h. */
7236
Stefan Krah7dba5942012-11-22 22:49:11 +01007237#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007238#include <pthread.h>
7239
7240void* routine(void* p){return NULL;}
7241
7242int main(){
7243 pthread_t p;
7244 if(pthread_create(&p,NULL,routine,NULL)!=0)
7245 return 1;
7246 (void)pthread_detach(p);
7247 return 0;
7248}
7249
7250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007251if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007252 ac_cv_kpthread=yes
7253else
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7257 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258fi
7259
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260CC="$ac_save_cc"
7261fi
7262
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7264$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265fi
7266
7267if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7268then
7269# -Kthread, if available, provides the right #defines
7270# and linker options to make pthread_create available
7271# Some compilers won't report that they do not support -Kthread,
7272# so we need to run a program to see whether it really made the
7273# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7275$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007276if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007277 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278else
7279 ac_save_cc="$CC"
7280CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007281if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007282 ac_cv_kthread=no
7283else
Matthias Kloseb9621712010-04-24 17:59:49 +00007284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285/* end confdefs.h. */
7286
Stefan Krah7dba5942012-11-22 22:49:11 +01007287#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288#include <pthread.h>
7289
7290void* routine(void* p){return NULL;}
7291
7292int main(){
7293 pthread_t p;
7294 if(pthread_create(&p,NULL,routine,NULL)!=0)
7295 return 1;
7296 (void)pthread_detach(p);
7297 return 0;
7298}
7299
7300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007301if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302 ac_cv_kthread=yes
7303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007306rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7307 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308fi
7309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310CC="$ac_save_cc"
7311fi
7312
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7314$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315fi
7316
7317if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7318then
7319# -pthread, if available, provides the right #defines
7320# and linker options to make pthread_create available
7321# Some compilers won't report that they do not support -pthread,
7322# so we need to run a program to see whether it really made the
7323# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7325$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007326if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328else
7329 ac_save_cc="$CC"
7330CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007331if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007332 ac_cv_pthread=no
7333else
Matthias Kloseb9621712010-04-24 17:59:49 +00007334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335/* end confdefs.h. */
7336
Stefan Krah7dba5942012-11-22 22:49:11 +01007337#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338#include <pthread.h>
7339
7340void* routine(void* p){return NULL;}
7341
7342int main(){
7343 pthread_t p;
7344 if(pthread_create(&p,NULL,routine,NULL)!=0)
7345 return 1;
7346 (void)pthread_detach(p);
7347 return 0;
7348}
7349
7350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007351if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352 ac_cv_pthread=yes
7353else
Matthias Kloseb9621712010-04-24 17:59:49 +00007354 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7357 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358fi
7359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360CC="$ac_save_cc"
7361fi
7362
Matthias Kloseb9621712010-04-24 17:59:49 +00007363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7364$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365fi
7366
7367# If we have set a CC compiler flag for thread support then
7368# check if it works for CXX, too.
7369ac_cv_cxx_thread=no
7370if test ! -z "$CXX"
7371then
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7373$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374ac_save_cxx="$CXX"
7375
7376if test "$ac_cv_kpthread" = "yes"
7377then
7378 CXX="$CXX -Kpthread"
7379 ac_cv_cxx_thread=yes
7380elif test "$ac_cv_kthread" = "yes"
7381then
7382 CXX="$CXX -Kthread"
7383 ac_cv_cxx_thread=yes
7384elif test "$ac_cv_pthread" = "yes"
7385then
7386 CXX="$CXX -pthread"
7387 ac_cv_cxx_thread=yes
7388fi
7389
7390if test $ac_cv_cxx_thread = yes
7391then
7392 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7393 $CXX -c conftest.$ac_ext 2>&5
7394 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7395 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7396 then
7397 ac_cv_cxx_thread=yes
7398 else
7399 ac_cv_cxx_thread=no
7400 fi
7401 rm -fr conftest*
7402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7404$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405fi
7406CXX="$ac_save_cxx"
7407
7408
7409# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7411$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007412if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007413 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414else
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416/* end confdefs.h. */
7417#include <stdlib.h>
7418#include <stdarg.h>
7419#include <string.h>
7420#include <float.h>
7421
7422int
7423main ()
7424{
7425
7426 ;
7427 return 0;
7428}
7429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007430if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431 ac_cv_header_stdc=yes
7432else
Matthias Kloseb9621712010-04-24 17:59:49 +00007433 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7436
7437if test $ac_cv_header_stdc = yes; then
7438 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440/* end confdefs.h. */
7441#include <string.h>
7442
7443_ACEOF
7444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 $EGREP "memchr" >/dev/null 2>&1; then :
7446
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447else
7448 ac_cv_header_stdc=no
7449fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007450rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451
7452fi
7453
7454if test $ac_cv_header_stdc = yes; then
7455 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457/* end confdefs.h. */
7458#include <stdlib.h>
7459
7460_ACEOF
7461if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 $EGREP "free" >/dev/null 2>&1; then :
7463
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464else
7465 ac_cv_header_stdc=no
7466fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007467rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468
7469fi
7470
7471if test $ac_cv_header_stdc = yes; then
7472 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474 :
7475else
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477/* end confdefs.h. */
7478#include <ctype.h>
7479#include <stdlib.h>
7480#if ((' ' & 0x0FF) == 0x020)
7481# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7482# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7483#else
7484# define ISLOWER(c) \
7485 (('a' <= (c) && (c) <= 'i') \
7486 || ('j' <= (c) && (c) <= 'r') \
7487 || ('s' <= (c) && (c) <= 'z'))
7488# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7489#endif
7490
7491#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7492int
7493main ()
7494{
7495 int i;
7496 for (i = 0; i < 256; i++)
7497 if (XOR (islower (i), ISLOWER (i))
7498 || toupper (i) != TOUPPER (i))
7499 return 2;
7500 return 0;
7501}
7502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007503if ac_fn_c_try_run "$LINENO"; then :
7504
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510fi
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512fi
7513fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7515$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516if test $ac_cv_header_stdc = yes; then
7517
Matthias Kloseb9621712010-04-24 17:59:49 +00007518$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519
7520fi
7521
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007522for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007523fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007524ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007525sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007526unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007527poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007528sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007529sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007530sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007531sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007532sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007533libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007534bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007535sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007536do :
7537 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7538ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007539if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007540 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007542_ACEOF
7543
7544fi
7545
Guido van Rossum627b2d71993-12-24 10:39:16 +00007546done
7547
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007548ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007549for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7552$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007553if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007557/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007558#include <sys/types.h>
7559#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007560
Martin v. Löwis11437992002-04-12 09:54:03 +00007561int
7562main ()
7563{
7564if ((DIR *) 0)
7565return 0;
7566 ;
7567 return 0;
7568}
7569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007570if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007571 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007572else
Matthias Kloseb9621712010-04-24 17:59:49 +00007573 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577eval ac_res=\$$as_ac_Header
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7579$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007580if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007582#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007583_ACEOF
7584
7585ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007586fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007587
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007588done
7589# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7590if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7592$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007595else
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007600/* Override any GCC internal prototype to avoid an error.
7601 Use char because int might match the return type of a GCC
7602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007603#ifdef __cplusplus
7604extern "C"
7605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007606char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007607int
7608main ()
7609{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 ;
7612 return 0;
7613}
7614_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615for ac_lib in '' dir; do
7616 if test -z "$ac_lib"; then
7617 ac_res="none required"
7618 else
7619 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625rm -f core conftest.err conftest.$ac_objext \
7626 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007627 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630done
Victor Stinnere0be4232011-10-25 13:06:09 +02007631if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633else
7634 ac_cv_search_opendir=no
7635fi
7636rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007637LIBS=$ac_func_search_save_LIBS
7638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7640$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007641ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007642if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007643 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007644
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007645fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007646
Michael W. Hudson54241132001-12-07 15:38:26 +00007647else
Matthias Kloseb9621712010-04-24 17:59:49 +00007648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7649$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007650if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007652else
7653 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657/* Override any GCC internal prototype to avoid an error.
7658 Use char because int might match the return type of a GCC
7659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007660#ifdef __cplusplus
7661extern "C"
7662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007663char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007664int
7665main ()
7666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007668 ;
7669 return 0;
7670}
7671_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672for ac_lib in '' x; do
7673 if test -z "$ac_lib"; then
7674 ac_res="none required"
7675 else
7676 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007677 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682rm -f core conftest.err conftest.$ac_objext \
7683 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007684 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687done
Victor Stinnere0be4232011-10-25 13:06:09 +02007688if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690else
7691 ac_cv_search_opendir=no
7692fi
7693rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007694LIBS=$ac_func_search_save_LIBS
7695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7697$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007699if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007702fi
7703
7704fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007705
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7707$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007708if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007710else
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007712/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007713#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007714int
7715main ()
7716{
7717return makedev(0, 0);
7718 ;
7719 return 0;
7720}
7721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007722if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007723 ac_cv_header_sys_types_h_makedev=yes
7724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007727rm -f core conftest.err conftest.$ac_objext \
7728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007729
7730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7732$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007733
7734if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007735ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007736if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007737
Matthias Kloseb9621712010-04-24 17:59:49 +00007738$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007739
7740fi
7741
7742
7743
7744 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007746if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007747
Matthias Kloseb9621712010-04-24 17:59:49 +00007748$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007749
7750fi
7751
7752
7753 fi
7754fi
7755
Michael W. Hudson54241132001-12-07 15:38:26 +00007756
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007757# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7758for ac_header in net/if.h
7759do :
7760 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7761#ifdef STDC_HEADERS
7762# include <stdlib.h>
7763# include <stddef.h>
7764#else
7765# ifdef HAVE_STDLIB_H
7766# include <stdlib.h>
7767# endif
7768#endif
7769#ifdef HAVE_SYS_SOCKET_H
7770# include <sys/socket.h>
7771#endif
7772
7773"
Victor Stinnere0be4232011-10-25 13:06:09 +02007774if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007775 cat >>confdefs.h <<_ACEOF
7776#define HAVE_NET_IF_H 1
7777_ACEOF
7778
7779fi
7780
7781done
7782
7783
Martin v. Löwis11017b12006-01-14 18:12:57 +00007784# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007785for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007786do :
7787 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 +00007788#ifdef HAVE_ASM_TYPES_H
7789#include <asm/types.h>
7790#endif
7791#ifdef HAVE_SYS_SOCKET_H
7792#include <sys/socket.h>
7793#endif
7794
Matthias Kloseb9621712010-04-24 17:59:49 +00007795"
Victor Stinnere0be4232011-10-25 13:06:09 +02007796if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007797 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007798#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007799_ACEOF
7800
7801fi
7802
7803done
7804
7805
Charles-François Natali47413c12011-10-06 19:47:44 +02007806# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007807for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007808do :
7809 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7810ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7811#ifdef HAVE_SYS_SOCKET_H
7812#include <sys/socket.h>
7813#endif
7814
7815"
7816if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7817 cat >>confdefs.h <<_ACEOF
7818#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7819_ACEOF
7820
7821fi
7822
7823done
7824
7825
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007827was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7829$as_echo_n "checking for clock_t in time.h... " >&6; }
7830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007831/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007832#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007833
7834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007837 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007838else
Martin v. Löwis11437992002-04-12 09:54:03 +00007839
7840
Matthias Kloseb9621712010-04-24 17:59:49 +00007841$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007842
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007843
Guido van Rossum627b2d71993-12-24 10:39:16 +00007844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007845rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007846
Matthias Kloseb9621712010-04-24 17:59:49 +00007847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7848$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007849
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7851$as_echo_n "checking for makedev... " >&6; }
7852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007853/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007854
Jesus Cea740f53a2010-04-28 11:35:30 +00007855#if defined(MAJOR_IN_MKDEV)
7856#include <sys/mkdev.h>
7857#elif defined(MAJOR_IN_SYSMACROS)
7858#include <sys/sysmacros.h>
7859#else
7860#include <sys/types.h>
7861#endif
7862
Neal Norwitz11690112002-07-30 01:08:28 +00007863int
7864main ()
7865{
Jesus Cea740f53a2010-04-28 11:35:30 +00007866
7867 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007868 ;
7869 return 0;
7870}
Matthias Kloseb159a552010-04-25 21:00:44 +00007871
Neal Norwitz11690112002-07-30 01:08:28 +00007872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007873if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007874 ac_cv_has_makedev=yes
7875else
Matthias Kloseb9621712010-04-24 17:59:49 +00007876 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007878rm -f core conftest.err conftest.$ac_objext \
7879 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7881$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007882if test "$ac_cv_has_makedev" = "yes"; then
7883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007885
7886fi
7887
Christian Heimes985ecdc2013-11-20 11:46:18 +01007888# byte swapping
7889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7890$as_echo_n "checking for le64toh... " >&6; }
7891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7892/* end confdefs.h. */
7893
7894#ifdef HAVE_ENDIAN_H
7895#include <endian.h>
7896#elif defined(HAVE_SYS_ENDIAN_H)
7897#include <sys/endian.h>
7898#endif
7899
7900int
7901main ()
7902{
7903
7904 le64toh(1)
7905 ;
7906 return 0;
7907}
7908
7909_ACEOF
7910if ac_fn_c_try_link "$LINENO"; then :
7911 ac_cv_has_le64toh=yes
7912else
7913 ac_cv_has_le64toh=no
7914fi
7915rm -f core conftest.err conftest.$ac_objext \
7916 conftest$ac_exeext conftest.$ac_ext
7917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7918$as_echo "$ac_cv_has_le64toh" >&6; }
7919if test "$ac_cv_has_le64toh" = "yes"; then
7920
7921$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7922
7923fi
7924
Martin v. Löwis399a6892002-10-04 10:22:02 +00007925# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7926# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7927# defined, but the compiler does not support pragma redefine_extname,
7928# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7929# structures (such as rlimit64) without declaring them. As a
7930# work-around, disable LFS on such configurations
7931
7932use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7934$as_echo_n "checking Solaris LFS bug... " >&6; }
7935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007936/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007937
7938#define _LARGEFILE_SOURCE 1
7939#define _FILE_OFFSET_BITS 64
7940#include <sys/resource.h>
7941
Martin v. Löwis399a6892002-10-04 10:22:02 +00007942int
7943main ()
7944{
7945struct rlimit foo;
7946 ;
7947 return 0;
7948}
7949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007951 sol_lfs_bug=no
7952else
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7957$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007958if test "$sol_lfs_bug" = "yes"; then
7959 use_lfs=no
7960fi
7961
7962if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007963# Two defines needed to enable largefile support on various platforms
7964# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007965case $ac_sys_system/$ac_sys_release in
7966AIX*)
7967
7968$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7969
7970 ;;
7971esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007972
Matthias Kloseb9621712010-04-24 17:59:49 +00007973$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007974
7975
Matthias Kloseb9621712010-04-24 17:59:49 +00007976$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007977
Martin v. Löwis399a6892002-10-04 10:22:02 +00007978fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007979
Guido van Rossum84e7b241996-08-19 21:59:00 +00007980# Add some code to confdefs.h so that the test for off_t works on SCO
7981cat >> confdefs.h <<\EOF
7982#if defined(SCO_DS)
7983#undef _OFF_T
7984#endif
7985EOF
7986
Guido van Rossumef2255b2000-03-10 22:30:29 +00007987# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007988ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007989if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007990
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007991else
Martin v. Löwis11437992002-04-12 09:54:03 +00007992
7993cat >>confdefs.h <<_ACEOF
7994#define mode_t int
7995_ACEOF
7996
7997fi
7998
Matthias Kloseb9621712010-04-24 17:59:49 +00007999ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008000if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008002else
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
8004cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
8007
8008fi
8009
Matthias Kloseb9621712010-04-24 17:59:49 +00008010ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008011if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008013else
Martin v. Löwis11437992002-04-12 09:54:03 +00008014
8015cat >>confdefs.h <<_ACEOF
8016#define pid_t int
8017_ACEOF
8018
8019fi
8020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008021
Martin v. Löwis11437992002-04-12 09:54:03 +00008022cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008023#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008024_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008027if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008028
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008029else
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
8031cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008033_ACEOF
8034
8035fi
8036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8038$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008039if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008041else
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008043/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008044#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008045
8046_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049 ac_cv_type_uid_t=yes
8050else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008051 ac_cv_type_uid_t=no
8052fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008053rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8057$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008058if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008059
Matthias Kloseb9621712010-04-24 17:59:49 +00008060$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008061
8062
Matthias Kloseb9621712010-04-24 17:59:49 +00008063$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008064
8065fi
8066
Mark Dickinson983bc162012-12-02 12:11:38 +00008067
8068# There are two separate checks for each of the exact-width integer types we
8069# need. First we check whether the type is available using the usual
8070# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8071# and <stdint.h> where available). We then also use the special type checks of
8072# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8073# directly, #define's uint32_t to be a suitable type.
8074
8075ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8076if test "x$ac_cv_type_uint32_t" = xyes; then :
8077
8078$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8079
8080fi
8081
Matthias Kloseb9621712010-04-24 17:59:49 +00008082ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8083case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008084 no|yes) ;; #(
8085 *)
8086
Matthias Kloseb9621712010-04-24 17:59:49 +00008087$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008088
8089
8090cat >>confdefs.h <<_ACEOF
8091#define uint32_t $ac_cv_c_uint32_t
8092_ACEOF
8093;;
8094 esac
8095
Mark Dickinson983bc162012-12-02 12:11:38 +00008096
8097ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8098if test "x$ac_cv_type_uint64_t" = xyes; then :
8099
8100$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8101
8102fi
8103
Matthias Kloseb9621712010-04-24 17:59:49 +00008104ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8105case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008106 no|yes) ;; #(
8107 *)
8108
Matthias Kloseb9621712010-04-24 17:59:49 +00008109$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008110
8111
8112cat >>confdefs.h <<_ACEOF
8113#define uint64_t $ac_cv_c_uint64_t
8114_ACEOF
8115;;
8116 esac
8117
Mark Dickinson983bc162012-12-02 12:11:38 +00008118
8119ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8120if test "x$ac_cv_type_int32_t" = xyes; then :
8121
8122$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8123
8124fi
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8127case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008128 no|yes) ;; #(
8129 *)
8130
8131cat >>confdefs.h <<_ACEOF
8132#define int32_t $ac_cv_c_int32_t
8133_ACEOF
8134;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008135esac
8136
Mark Dickinson983bc162012-12-02 12:11:38 +00008137
8138ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8139if test "x$ac_cv_type_int64_t" = xyes; then :
8140
8141$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8142
8143fi
8144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8146case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008147 no|yes) ;; #(
8148 *)
8149
8150cat >>confdefs.h <<_ACEOF
8151#define int64_t $ac_cv_c_int64_t
8152_ACEOF
8153;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008154esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008155
Mark Dickinson983bc162012-12-02 12:11:38 +00008156
Matthias Kloseb9621712010-04-24 17:59:49 +00008157ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008158if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008161
8162fi
8163
Stefan Krah1919b7e2012-03-21 18:25:23 +01008164ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8165if test "x$ac_cv_type___uint128_t" = xyes; then :
8166
8167$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8168
8169fi
8170
Jack Jansendd19cf82001-12-06 22:36:17 +00008171
Michael W. Hudson54241132001-12-07 15:38:26 +00008172# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008173# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008174# The cast to long int works around a bug in the HP C Compiler
8175# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8176# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8177# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8179$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008180if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008182else
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 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 +00008184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185else
Matthias Kloseb9621712010-04-24 17:59:49 +00008186 if test "$ac_cv_type_int" = yes; then
8187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008189as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008190See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008191 else
8192 ac_cv_sizeof_int=0
8193 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008194fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008195
Martin v. Löwis11437992002-04-12 09:54:03 +00008196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8198$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008199
8200
8201
Martin v. Löwis11437992002-04-12 09:54:03 +00008202cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008203#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008204_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008205
8206
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008207# The cast to long int works around a bug in the HP C Compiler
8208# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8209# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8210# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8212$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008213if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 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 +00008217
Martin v. Löwis11437992002-04-12 09:54:03 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 if test "$ac_cv_type_long" = yes; then
8220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8221$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008222as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008223See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008224 else
8225 ac_cv_sizeof_long=0
8226 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008228
Martin v. Löwis11437992002-04-12 09:54:03 +00008229fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8231$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232
8233
8234
Martin v. Löwis11437992002-04-12 09:54:03 +00008235cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008236#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008237_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008238
8239
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008240# The cast to long int works around a bug in the HP C Compiler
8241# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8242# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8243# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8245$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008246if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 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 +00008250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251else
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 if test "$ac_cv_type_void_p" = yes; then
8253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8254$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008255as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008256See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008257 else
8258 ac_cv_sizeof_void_p=0
8259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008260fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008261
Martin v. Löwis11437992002-04-12 09:54:03 +00008262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8264$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265
8266
8267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008269#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008270_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008271
8272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008273# The cast to long int works around a bug in the HP C Compiler
8274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8276# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8278$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008279if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 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 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 if test "$ac_cv_type_short" = yes; then
8286 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008288as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008289See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 else
8291 ac_cv_sizeof_short=0
8292 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294
Martin v. Löwis11437992002-04-12 09:54:03 +00008295fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8297$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298
8299
8300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008302#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008303_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008304
8305
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008306# The cast to long int works around a bug in the HP C Compiler
8307# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8308# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8309# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8311$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008312if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 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 +00008316
Martin v. Löwis11437992002-04-12 09:54:03 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if test "$ac_cv_type_float" = yes; then
8319 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008321as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008322See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008323 else
8324 ac_cv_sizeof_float=0
8325 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008326fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008327
Martin v. Löwis11437992002-04-12 09:54:03 +00008328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8330$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331
8332
8333
Martin v. Löwis11437992002-04-12 09:54:03 +00008334cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008335#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008336_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008337
8338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339# The cast to long int works around a bug in the HP C Compiler
8340# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8341# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8342# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8344$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008345if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008347else
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 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 +00008349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350else
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 if test "$ac_cv_type_double" = yes; then
8352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008354as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008355See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356 else
8357 ac_cv_sizeof_double=0
8358 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008359fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008360
Martin v. Löwis11437992002-04-12 09:54:03 +00008361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8363$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364
8365
8366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008368#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008369_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008370
8371
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372# The cast to long int works around a bug in the HP C Compiler
8373# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8374# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8375# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8377$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008378if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 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 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 if test "$ac_cv_type_fpos_t" = yes; then
8385 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8386$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008387as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008388See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389 else
8390 ac_cv_sizeof_fpos_t=0
8391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008392fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008393
Martin v. Löwis11437992002-04-12 09:54:03 +00008394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8396$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008397
8398
8399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008401#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008402_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008403
Michael W. Hudson54241132001-12-07 15:38:26 +00008404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405# The cast to long int works around a bug in the HP C Compiler
8406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8408# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8410$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008411if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008413else
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 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 +00008415
Martin v. Löwis18e16552006-02-15 17:27:45 +00008416else
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 if test "$ac_cv_type_size_t" = yes; then
8418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008420as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008421See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422 else
8423 ac_cv_sizeof_size_t=0
8424 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426
Martin v. Löwis18e16552006-02-15 17:27:45 +00008427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8429$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430
8431
8432
Martin v. Löwis18e16552006-02-15 17:27:45 +00008433cat >>confdefs.h <<_ACEOF
8434#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8435_ACEOF
8436
8437
Christian Heimes400adb02008-02-01 08:12:03 +00008438# The cast to long int works around a bug in the HP C Compiler
8439# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8440# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8441# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8443$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008444if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00008448
Christian Heimes400adb02008-02-01 08:12:03 +00008449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 if test "$ac_cv_type_pid_t" = yes; then
8451 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008453as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008454See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008455 else
8456 ac_cv_sizeof_pid_t=0
8457 fi
8458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008459
Christian Heimes400adb02008-02-01 08:12:03 +00008460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8462$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008463
8464
8465
8466cat >>confdefs.h <<_ACEOF
8467#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8468_ACEOF
8469
8470
Michael W. Hudson54241132001-12-07 15:38:26 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8473$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008474have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008476/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008477
Martin v. Löwis11437992002-04-12 09:54:03 +00008478int
8479main ()
8480{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008481long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ;
8483 return 0;
8484}
8485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008486if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008487
8488
Matthias Kloseb9621712010-04-24 17:59:49 +00008489$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008491 have_long_long=yes
8492
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8496$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008497if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498# The cast to long int works around a bug in the HP C Compiler
8499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8501# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8503$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008504if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008505 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008506else
Matthias Kloseb9621712010-04-24 17:59:49 +00008507 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 +00008508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509else
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 if test "$ac_cv_type_long_long" = yes; then
8511 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8512$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008513as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008514See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008515 else
8516 ac_cv_sizeof_long_long=0
8517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008518fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8522$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523
8524
8525
Martin v. Löwis11437992002-04-12 09:54:03 +00008526cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008527#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008528_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008529
Michael W. Hudson54241132001-12-07 15:38:26 +00008530
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008531fi
8532
Matthias Kloseb9621712010-04-24 17:59:49 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8534$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008535have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008537/* end confdefs.h. */
8538
8539int
8540main ()
8541{
8542long double x; x = (long double)0;
8543 ;
8544 return 0;
8545}
8546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008547if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008548
8549
Matthias Kloseb9621712010-04-24 17:59:49 +00008550$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008551
8552 have_long_double=yes
8553
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008554fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8557$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008558if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008559# The cast to long int works around a bug in the HP C Compiler
8560# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8561# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8562# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8564$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008565if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008567else
Matthias Kloseb9621712010-04-24 17:59:49 +00008568 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008569
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008570else
Matthias Kloseb9621712010-04-24 17:59:49 +00008571 if test "$ac_cv_type_long_double" = yes; then
8572 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8573$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008574as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008575See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008576 else
8577 ac_cv_sizeof_long_double=0
8578 fi
8579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008580
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8583$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008584
8585
8586
8587cat >>confdefs.h <<_ACEOF
8588#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8589_ACEOF
8590
8591
8592fi
8593
8594
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8596$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008597have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008599/* end confdefs.h. */
8600
8601int
8602main ()
8603{
8604_Bool x; x = (_Bool)0;
8605 ;
8606 return 0;
8607}
8608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008609if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008610
8611
Matthias Kloseb9621712010-04-24 17:59:49 +00008612$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008613
8614 have_c99_bool=yes
8615
Thomas Woutersb2137042007-02-01 18:02:27 +00008616fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8619$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008620if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621# The cast to long int works around a bug in the HP C Compiler
8622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8624# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8626$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008627if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008631
Thomas Woutersb2137042007-02-01 18:02:27 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 if test "$ac_cv_type__Bool" = yes; then
8634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008636as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008637See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 else
8639 ac_cv_sizeof__Bool=0
8640 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642
Thomas Woutersb2137042007-02-01 18:02:27 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8645$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646
8647
8648
Thomas Woutersb2137042007-02-01 18:02:27 +00008649cat >>confdefs.h <<_ACEOF
8650#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8651_ACEOF
8652
8653
8654fi
8655
Matthias Kloseb9621712010-04-24 17:59:49 +00008656ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008657 #include <stdint.h>
8658 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008659 #ifdef HAVE_INTTYPES_H
8660 #include <inttypes.h>
8661 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008662"
Victor Stinnere0be4232011-10-25 13:06:09 +02008663if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008664
8665cat >>confdefs.h <<_ACEOF
8666#define HAVE_UINTPTR_T 1
8667_ACEOF
8668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669# The cast to long int works around a bug in the HP C Compiler
8670# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8671# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8672# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8674$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008675if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 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 +00008679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680else
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 if test "$ac_cv_type_uintptr_t" = yes; then
8682 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008684as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008685See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686 else
8687 ac_cv_sizeof_uintptr_t=0
8688 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008689fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008690
Martin v. Löwis11437992002-04-12 09:54:03 +00008691fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8693$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008694
8695
8696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008698#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008699_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008700
Michael W. Hudson54241132001-12-07 15:38:26 +00008701
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008702fi
8703
Thomas Wouters89f507f2006-12-13 04:49:30 +00008704
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008705# The cast to long int works around a bug in the HP C Compiler
8706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8708# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8710$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008711if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008715#ifdef HAVE_SYS_TYPES_H
8716#include <sys/types.h>
8717#endif
8718
Matthias Kloseb9621712010-04-24 17:59:49 +00008719"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008720
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008721else
Matthias Kloseb9621712010-04-24 17:59:49 +00008722 if test "$ac_cv_type_off_t" = yes; then
8723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8724$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008725as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008726See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008727 else
8728 ac_cv_sizeof_off_t=0
8729 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8734$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008735
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008736
8737
Martin v. Löwis11437992002-04-12 09:54:03 +00008738cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008739#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008740_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008741
Michael W. Hudson54241132001-12-07 15:38:26 +00008742
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008743
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8745$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008746if test "$have_long_long" = yes
8747then
8748if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008749 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008750
Matthias Kloseb9621712010-04-24 17:59:49 +00008751$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008752
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8754$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8757$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008758fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008759else
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8761$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008762fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008763
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764# The cast to long int works around a bug in the HP C Compiler
8765# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8766# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8767# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8769$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008770if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008771 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774#ifdef HAVE_SYS_TYPES_H
8775#include <sys/types.h>
8776#endif
8777#ifdef HAVE_TIME_H
8778#include <time.h>
8779#endif
8780
Matthias Kloseb9621712010-04-24 17:59:49 +00008781"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 if test "$ac_cv_type_time_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008787as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008788See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008789 else
8790 ac_cv_sizeof_time_t=0
8791 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008793
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8796$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798
8799
Martin v. Löwis11437992002-04-12 09:54:03 +00008800cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008801#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008802_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008803
Michael W. Hudson54241132001-12-07 15:38:26 +00008804
8805
Trent Mick635f6fb2000-08-23 21:33:05 +00008806# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008807ac_save_cc="$CC"
8808if test "$ac_cv_kpthread" = "yes"
8809then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008810elif test "$ac_cv_kthread" = "yes"
8811then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008812elif test "$ac_cv_pthread" = "yes"
8813then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008814fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8817$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008818have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008820/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008821
8822 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008823int
8824main ()
8825{
Guido van Rossum12580492000-09-24 16:47:19 +00008826pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ;
8828 return 0;
8829}
Matthias Kloseb159a552010-04-25 21:00:44 +00008830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008833 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8837$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008838if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008839 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8841# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8842# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8844$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008845if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847else
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008849#ifdef HAVE_PTHREAD_H
8850#include <pthread.h>
8851#endif
8852
Matthias Kloseb9621712010-04-24 17:59:49 +00008853"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855else
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 if test "$ac_cv_type_pthread_t" = yes; then
8857 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008859as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008860See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861 else
8862 ac_cv_sizeof_pthread_t=0
8863 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865
Trent Mick635f6fb2000-08-23 21:33:05 +00008866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8868$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008869
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008870
8871
Martin v. Löwis11437992002-04-12 09:54:03 +00008872cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008873#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008874_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008875
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008876
Trent Mick635f6fb2000-08-23 21:33:05 +00008877fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008878CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008879
Michael W. Hudson54241132001-12-07 15:38:26 +00008880
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008881case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008882 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008883 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8884 ;;
8885 Darwin/*)
8886 OTHER_LIBTOOL_OPT=""
8887 ;;
8888esac
8889
8890
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008891
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008892case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008893 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008894 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8895 if test "${enable_universalsdk}"; then
8896 :
8897 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008898 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008899 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008900 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008901 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008902 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008903 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008904 if test ${gcc_version} '<' 4.0
8905 then
8906 LIBTOOL_CRUFT="-lcc_dynamic"
8907 else
8908 LIBTOOL_CRUFT=""
8909 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008911 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008912else
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008914/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008915
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008916 #include <unistd.h>
8917 int main(int argc, char*argv[])
8918 {
8919 if (sizeof(long) == 4) {
8920 return 0;
8921 } else {
8922 return 1;
8923 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008924 }
8925
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008927if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008928 ac_osx_32bit=yes
8929else
Matthias Kloseb9621712010-04-24 17:59:49 +00008930 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008934fi
8935
8936
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008937 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008938 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008939 i386)
8940 MACOSX_DEFAULT_ARCH="i386"
8941 ;;
8942 ppc)
8943 MACOSX_DEFAULT_ARCH="ppc"
8944 ;;
8945 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008946 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008947 ;;
8948 esac
8949 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008950 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008951 i386)
8952 MACOSX_DEFAULT_ARCH="x86_64"
8953 ;;
8954 ppc)
8955 MACOSX_DEFAULT_ARCH="ppc64"
8956 ;;
8957 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008958 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008959 ;;
8960 esac
8961
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008962 fi
8963
8964 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008965 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008966 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008967esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8969$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008970if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008971then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008972 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008974 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008975
Matthias Kloseb9621712010-04-24 17:59:49 +00008976$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8979$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008980 if test $enable_shared = "yes"
8981 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008982 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00008983 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008984else
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008987fi
8988
Matthias Kloseb9621712010-04-24 17:59:49 +00008989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8990$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008991case $ac_sys_system/$ac_sys_release in
8992 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008993
Matthias Kloseb9621712010-04-24 17:59:49 +00008994$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008995
Matthias Kloseb9621712010-04-24 17:59:49 +00008996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8997$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008998 ;;
8999 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9001$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009002 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009003esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009004
Guido van Rossum0a516c91994-09-12 10:58:40 +00009005# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009006
Michael W. Hudson54241132001-12-07 15:38:26 +00009007
9008
9009
9010
Benjamin Peterson99f03762010-04-11 22:15:28 +00009011
Thomas Wouters477c8d52006-05-27 19:21:47 +00009012
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009013# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9014# -- usually .so, .sl on HP-UX, .dll on Cygwin
9015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9016$as_echo_n "checking the extension of shared libraries... " >&6; }
9017if test -z "$SHLIB_SUFFIX"; then
9018 case $ac_sys_system in
9019 hp*|HP*)
9020 case `uname -m` in
9021 ia64) SHLIB_SUFFIX=.so;;
9022 *) SHLIB_SUFFIX=.sl;;
9023 esac
9024 ;;
9025 CYGWIN*) SHLIB_SUFFIX=.dll;;
9026 *) SHLIB_SUFFIX=.so;;
9027 esac
9028fi
9029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9030$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009031
Guido van Rossum0a516c91994-09-12 10:58:40 +00009032# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009033# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009034# (Shared libraries in this instance are shared modules to be loaded into
9035# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9037$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009038if test -z "$LDSHARED"
9039then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009040 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009041 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009042 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009043 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009044 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009045 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009046 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009048 if test "$GCC" = "yes" ; then
9049 LDSHARED='$(CC) -shared'
9050 LDCXXSHARED='$(CXX) -shared'
9051 else
9052 LDSHARED='$(CC) -G'
9053 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009054 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009055 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009056 if test "$GCC" = "yes" ; then
9057 LDSHARED='$(CC) -shared'
9058 LDCXXSHARED='$(CXX) -shared'
9059 else
9060 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009061 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009062 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009063 LDSHARED='$(CC) -bundle'
9064 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009065 if test "$enable_framework" ; then
9066 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009067 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9068 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009069 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009070 else
9071 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009072 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009073 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009074 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009075 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009076 LDSHARED='$(CC) -bundle'
9077 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009078 if test "$enable_framework" ; then
9079 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009080 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9081 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009082 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009083 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009084 # No framework, use the Python app as bundle-loader
9085 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009086 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009087 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009088 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009089 Darwin/*)
9090 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9091 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009092
Ned Deily36820b62014-06-25 13:44:22 -07009093 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9094 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9095 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9096 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9097 if test ${dep_target_major} -eq 10 && \
9098 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009099 then
Ned Deily36820b62014-06-25 13:44:22 -07009100 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009101 LDSHARED='$(CC) -bundle'
9102 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009103 if test "$enable_framework" ; then
9104 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009105 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9106 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009107 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009108 else
9109 # No framework, use the Python app as bundle-loader
9110 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9111 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009112 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009113 fi
Ned Deily36820b62014-06-25 13:44:22 -07009114 else
9115 # building for OS X 10.3 and later
9116 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9117 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9118 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009119 fi
9120 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009121 Linux*|GNU*|QNX*)
9122 LDSHARED='$(CC) -shared'
9123 LDCXXSHARED='$(CXX) -shared';;
9124 BSD/OS*/4*)
9125 LDSHARED="gcc -shared"
9126 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009127 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009128 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009129 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009130 LDSHARED='$(CC) -shared'
9131 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009132 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009133 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009134 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009135 OpenBSD*)
9136 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9137 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009138 LDSHARED='$(CC) -shared $(CCSHARED)'
9139 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009140 else
9141 case `uname -r` in
9142 [01].* | 2.[0-7] | 2.[0-7].*)
9143 LDSHARED="ld -Bshareable ${LDFLAGS}"
9144 ;;
9145 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009146 LDSHARED='$(CC) -shared $(CCSHARED)'
9147 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009148 ;;
9149 esac
9150 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009152 LDSHARED='$(CC) -shared'
9153 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009154 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009155 if test "$GCC" = "yes" ; then
9156 LDSHARED='$(CC) -shared'
9157 LDCXXSHARED='$(CXX) -shared'
9158 else
9159 LDSHARED='$(CC) -G'
9160 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009161 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162 SCO_SV*)
9163 LDSHARED='$(CC) -Wl,-G,-Bexport'
9164 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9165 CYGWIN*)
9166 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9167 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168 *) LDSHARED="ld";;
9169 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009170fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9172$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009173LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009174BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009175# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009176# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9178$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009179if test -z "$CCSHARED"
9180then
Guido van Rossum07397971997-04-29 21:49:50 +00009181 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009182 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009183 then CCSHARED="-fPIC";
9184 elif test `uname -p` = sparc;
9185 then CCSHARED="-xcode=pic32";
9186 else CCSHARED="-Kpic";
9187 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009188 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009189 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009190 else CCSHARED="+z";
9191 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009192 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009193 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009194 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009195 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009196 if test "$GCC" = "yes"
9197 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009198 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009199 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009200 SCO_SV*)
9201 if test "$GCC" = "yes"
9202 then CCSHARED="-fPIC"
9203 else CCSHARED="-Kpic -belf"
9204 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009205 IRIX*/6*) case $CC in
9206 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009207 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009208 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009209 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009210fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9212$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009213# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009214# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9216$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009217if test -z "$LINKFORSHARED"
9218then
Guido van Rossum07397971997-04-29 21:49:50 +00009219 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009220 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009221 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009222 LINKFORSHARED="-Wl,-E -Wl,+s";;
9223# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009224 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009225 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009226 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009227 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009228 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009229
9230 # Issue #18075: the default maximum stack size (8MBytes) is too
9231 # small for the default recursion limit. Increase the stack size
9232 # to ensure that tests don't crash
9233 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9234
Jack Jansene578a632001-08-15 01:27:14 +00009235 if test "$enable_framework"
9236 then
Jack Jansenda49e192005-01-07 13:08:22 +00009237 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009238 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009239 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009240 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009241 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009242 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009243 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009244 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9245 then
9246 LINKFORSHARED="-Wl,--export-dynamic"
9247 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009248 SunOS/5*) case $CC in
9249 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009250 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009251 then
9252 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009253 fi;;
9254 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009255 CYGWIN*)
9256 if test $enable_shared = "no"
9257 then
9258 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9259 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009260 QNX*)
9261 # -Wl,-E causes the symbols to be added to the dynamic
9262 # symbol table so that they can be found when a module
9263 # is loaded. -N 2048K causes the stack size to be set
9264 # to 2048 kilobytes so that the stack doesn't overflow
9265 # when running test_compile.py.
9266 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009267 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9270$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009271
Michael W. Hudson54241132001-12-07 15:38:26 +00009272
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009273
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9275$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009276if test ! "$LIBRARY" = "$LDLIBRARY"
9277then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009278 case $ac_sys_system in
9279 CYGWIN*)
9280 # Cygwin needs CCSHARED when building extension DLLs
9281 # but not when building the interpreter DLL.
9282 CFLAGSFORSHARED='';;
9283 *)
9284 CFLAGSFORSHARED='$(CCSHARED)'
9285 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009286fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9288$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009289
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009290# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9291# library (with --enable-shared).
9292# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009293# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9294# if it is not required, since it creates a dependency of the shared library
9295# to LIBS. This, in turn, means that applications linking the shared libpython
9296# don't need to link LIBS explicitly. The default should be only changed
9297# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9300$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009301case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009302 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009303 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009304esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9306$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009307
9308
Guido van Rossum627b2d71993-12-24 10:39:16 +00009309# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9311$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009312if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009313 $as_echo_n "(cached) " >&6
9314else
9315 ac_check_lib_save_LIBS=$LIBS
9316LIBS="-lsendfile $LIBS"
9317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9318/* end confdefs.h. */
9319
9320/* Override any GCC internal prototype to avoid an error.
9321 Use char because int might match the return type of a GCC
9322 builtin and then its argument prototype would still apply. */
9323#ifdef __cplusplus
9324extern "C"
9325#endif
9326char sendfile ();
9327int
9328main ()
9329{
9330return sendfile ();
9331 ;
9332 return 0;
9333}
9334_ACEOF
9335if ac_fn_c_try_link "$LINENO"; then :
9336 ac_cv_lib_sendfile_sendfile=yes
9337else
9338 ac_cv_lib_sendfile_sendfile=no
9339fi
9340rm -f core conftest.err conftest.$ac_objext \
9341 conftest$ac_exeext conftest.$ac_ext
9342LIBS=$ac_check_lib_save_LIBS
9343fi
9344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9345$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009346if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009347 cat >>confdefs.h <<_ACEOF
9348#define HAVE_LIBSENDFILE 1
9349_ACEOF
9350
9351 LIBS="-lsendfile $LIBS"
9352
9353fi
9354
Matthias Kloseb9621712010-04-24 17:59:49 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9356$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009357if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009358 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009359else
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009361LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365/* Override any GCC internal prototype to avoid an error.
9366 Use char because int might match the return type of a GCC
9367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009368#ifdef __cplusplus
9369extern "C"
9370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009371char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009372int
9373main ()
9374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009375return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009376 ;
9377 return 0;
9378}
9379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009382else
Matthias Kloseb9621712010-04-24 17:59:49 +00009383 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385rm -f core conftest.err conftest.$ac_objext \
9386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009388fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9390$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009391if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 cat >>confdefs.h <<_ACEOF
9393#define HAVE_LIBDL 1
9394_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009395
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009396 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009397
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009398fi
9399 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9401$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009402if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009403 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009404else
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009406LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410/* Override any GCC internal prototype to avoid an error.
9411 Use char because int might match the return type of a GCC
9412 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009413#ifdef __cplusplus
9414extern "C"
9415#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009416char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009417int
9418main ()
9419{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009420return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009421 ;
9422 return 0;
9423}
9424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009425if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009427else
Matthias Kloseb9621712010-04-24 17:59:49 +00009428 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009430rm -f core conftest.err conftest.$ac_objext \
9431 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009432LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9435$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009436if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 cat >>confdefs.h <<_ACEOF
9438#define HAVE_LIBDLD 1
9439_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009440
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009441 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443fi
9444 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009445
Georg Brandlb1441c72009-01-03 22:33:39 +00009446# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009447if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9449$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009451 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009452else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009453 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009456
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460#ifdef __cplusplus
9461extern "C"
9462#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009463char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472for ac_lib in '' pthread rt posix4; do
9473 if test -z "$ac_lib"; then
9474 ac_res="none required"
9475 else
9476 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009477 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009482rm -f core conftest.err conftest.$ac_objext \
9483 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009484 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487done
Victor Stinnere0be4232011-10-25 13:06:09 +02009488if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009489
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490else
9491 ac_cv_search_sem_init=no
9492fi
9493rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009494LIBS=$ac_func_search_save_LIBS
9495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9497$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009498ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009499if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009501
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009502fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009503 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009504 # posix4 on Solaris 2.6
9505 # pthread (first!) on Linux
9506fi
9507
Martin v. Löwis19d17342003-06-14 21:03:05 +00009508# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9510$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009511if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009512 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009513else
9514 ac_check_lib_save_LIBS=$LIBS
9515LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009517/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519/* Override any GCC internal prototype to avoid an error.
9520 Use char because int might match the return type of a GCC
9521 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009522#ifdef __cplusplus
9523extern "C"
9524#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009525char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009526int
9527main ()
9528{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009530 ;
9531 return 0;
9532}
9533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009534if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009535 ac_cv_lib_intl_textdomain=yes
9536else
Matthias Kloseb9621712010-04-24 17:59:49 +00009537 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009538fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009539rm -f core conftest.err conftest.$ac_objext \
9540 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009541LIBS=$ac_check_lib_save_LIBS
9542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9544$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009545if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009546
Matthias Kloseb9621712010-04-24 17:59:49 +00009547$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009548
Brett Cannonc6d936e2009-06-07 20:09:53 +00009549 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009550fi
9551
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009552
9553# checks for system dependent C++ extensions support
9554case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009555 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9556$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009558/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009559
Georg Brandl59e87bd2011-02-15 19:48:59 +00009560 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009561int
9562main ()
9563{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009564loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ;
9566 return 0;
9567}
Matthias Kloseb159a552010-04-25 21:00:44 +00009568
Martin v. Löwis11437992002-04-12 09:54:03 +00009569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009570if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009571
Matthias Kloseb159a552010-04-25 21:00:44 +00009572
Matthias Kloseb9621712010-04-24 17:59:49 +00009573$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009574
Matthias Kloseb159a552010-04-25 21:00:44 +00009575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009576$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009577
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009578else
Matthias Kloseb159a552010-04-25 21:00:44 +00009579
9580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009581$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009582
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009584rm -f core conftest.err conftest.$ac_objext \
9585 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009586 *) ;;
9587esac
9588
Christian Heimes985ecdc2013-11-20 11:46:18 +01009589# check for systems that require aligned memory access
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9591$as_echo_n "checking aligned memory access is required... " >&6; }
9592if test "$cross_compiling" = yes; then :
9593 aligned_required=yes
9594else
9595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9596/* end confdefs.h. */
9597
9598int main()
9599{
9600 char s[16];
9601 int i, *p1, *p2;
9602 for (i=0; i < 16; i++)
9603 s[i] = i;
9604 p1 = (int*)(s+1);
9605 p2 = (int*)(s+2);
9606 if (*p1 == *p2)
9607 return 1;
9608 return 0;
9609}
9610
9611_ACEOF
9612if ac_fn_c_try_run "$LINENO"; then :
9613 aligned_required=no
9614else
9615 aligned_required=yes
9616fi
9617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9618 conftest.$ac_objext conftest.beam conftest.$ac_ext
9619fi
9620
9621
9622if test "$aligned_required" = yes ; then
9623
9624$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9625
9626fi
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9628$as_echo "$aligned_required" >&6; }
9629
9630
9631# str, bytes and memoryview hash algorithm
9632
9633
9634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9635$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9636
9637# Check whether --with-hash_algorithm was given.
9638if test "${with_hash_algorithm+set}" = set; then :
9639 withval=$with_hash_algorithm;
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9641$as_echo "$withval" >&6; }
9642case "$withval" in
9643 siphash24)
9644 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9645
9646 ;;
9647 fnv)
9648 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9649
9650 ;;
9651 *)
9652 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9653 ;;
9654esac
9655
9656else
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9658$as_echo "default" >&6; }
9659fi
9660
9661
Charles-François Natalid30b0222014-05-08 23:08:51 +01009662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9663$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9664
9665# Check whether --with-address_sanitizer was given.
9666if test "${with_address_sanitizer+set}" = set; then :
9667 withval=$with_address_sanitizer;
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9669$as_echo "$withval" >&6; }
9670BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9671LDFLAGS="-fsanitize=address $LDFLAGS"
9672
9673else
9674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9675$as_echo "no" >&6; }
9676fi
9677
9678
Guido van Rossum70c7f481998-03-26 18:44:10 +00009679# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9681$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009682if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009684else
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009686LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690/* Override any GCC internal prototype to avoid an error.
9691 Use char because int might match the return type of a GCC
9692 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009693#ifdef __cplusplus
9694extern "C"
9695#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009696char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009697int
9698main ()
9699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009700return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ;
9702 return 0;
9703}
9704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009705if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009706 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009707else
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009710rm -f core conftest.err conftest.$ac_objext \
9711 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009712LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9715$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009716if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009717 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009718fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009719 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9721$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009722if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009723 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009724else
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009726LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009730/* Override any GCC internal prototype to avoid an error.
9731 Use char because int might match the return type of a GCC
9732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009733#ifdef __cplusplus
9734extern "C"
9735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009736char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009737int
9738main ()
9739{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ;
9742 return 0;
9743}
9744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009747else
Matthias Kloseb9621712010-04-24 17:59:49 +00009748 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750rm -f core conftest.err conftest.$ac_objext \
9751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009752LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9755$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009756if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009757 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009758fi
9759 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009760
Matthias Kloseb9621712010-04-24 17:59:49 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9762$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009765if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9768$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009769LIBS="$withval $LIBS"
9770
9771else
Matthias Kloseb9621712010-04-24 17:59:49 +00009772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774fi
9775
Guido van Rossum7f43da71994-08-01 12:15:30 +00009776
Victor Stinner8291b5e2015-03-20 16:03:14 +01009777
9778
9779
9780
9781
9782
9783
9784if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9785 if test -n "$ac_tool_prefix"; then
9786 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9787set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9789$as_echo_n "checking for $ac_word... " >&6; }
9790if ${ac_cv_path_PKG_CONFIG+:} false; then :
9791 $as_echo_n "(cached) " >&6
9792else
9793 case $PKG_CONFIG in
9794 [\\/]* | ?:[\\/]*)
9795 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9796 ;;
9797 *)
9798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9799for as_dir in $PATH
9800do
9801 IFS=$as_save_IFS
9802 test -z "$as_dir" && as_dir=.
9803 for ac_exec_ext in '' $ac_executable_extensions; do
9804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9805 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9807 break 2
9808 fi
9809done
9810 done
9811IFS=$as_save_IFS
9812
9813 ;;
9814esac
9815fi
9816PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9817if test -n "$PKG_CONFIG"; then
9818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9819$as_echo "$PKG_CONFIG" >&6; }
9820else
9821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9822$as_echo "no" >&6; }
9823fi
9824
9825
9826fi
9827if test -z "$ac_cv_path_PKG_CONFIG"; then
9828 ac_pt_PKG_CONFIG=$PKG_CONFIG
9829 # Extract the first word of "pkg-config", so it can be a program name with args.
9830set dummy pkg-config; ac_word=$2
9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9832$as_echo_n "checking for $ac_word... " >&6; }
9833if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9834 $as_echo_n "(cached) " >&6
9835else
9836 case $ac_pt_PKG_CONFIG in
9837 [\\/]* | ?:[\\/]*)
9838 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9839 ;;
9840 *)
9841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842for as_dir in $PATH
9843do
9844 IFS=$as_save_IFS
9845 test -z "$as_dir" && as_dir=.
9846 for ac_exec_ext in '' $ac_executable_extensions; do
9847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850 break 2
9851 fi
9852done
9853 done
9854IFS=$as_save_IFS
9855
9856 ;;
9857esac
9858fi
9859ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9860if test -n "$ac_pt_PKG_CONFIG"; then
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9862$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9863else
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9865$as_echo "no" >&6; }
9866fi
9867
9868 if test "x$ac_pt_PKG_CONFIG" = x; then
9869 PKG_CONFIG=""
9870 else
9871 case $cross_compiling:$ac_tool_warned in
9872yes:)
9873{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9874$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9875ac_tool_warned=yes ;;
9876esac
9877 PKG_CONFIG=$ac_pt_PKG_CONFIG
9878 fi
9879else
9880 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9881fi
9882
9883fi
9884if test -n "$PKG_CONFIG"; then
9885 _pkg_min_version=0.9.0
9886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9887$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9888 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9890$as_echo "yes" >&6; }
9891 else
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894 PKG_CONFIG=""
9895 fi
9896fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009897
9898# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9900$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009901
9902# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009903if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009904 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009905else
9906 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009907fi
9908
9909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9911$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009912
9913# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9915$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009916
9917# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009918if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009919 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009920else
9921 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009922fi
9923
9924
9925if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009926 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9927else
9928 LIBFFI_INCLUDEDIR=""
9929fi
9930
9931
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9933$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009934
Stefan Krah60187b52012-03-23 19:06:27 +01009935# Check for use of the system libmpdec library
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9937$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9938
9939# Check whether --with-system_libmpdec was given.
9940if test "${with_system_libmpdec+set}" = set; then :
9941 withval=$with_system_libmpdec;
9942else
9943 with_system_libmpdec="no"
9944fi
9945
9946
9947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9948$as_echo "$with_system_libmpdec" >&6; }
9949
Benjamin Peterson076ed002010-10-31 17:11:02 +00009950# Check for support for loadable sqlite extensions
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9952$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9953# Check whether --enable-loadable-sqlite-extensions was given.
9954if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9955 enableval=$enable_loadable_sqlite_extensions;
9956else
9957 enable_loadable_sqlite_extensions="no"
9958fi
9959
9960
9961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9962$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9963
Ned Deilyd819b932013-09-06 01:07:05 -07009964# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9965
9966
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9968$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9969
9970# Check whether --with-tcltk-includes was given.
9971if test "${with_tcltk_includes+set}" = set; then :
9972 withval=$with_tcltk_includes;
9973else
9974 with_tcltk_includes="default"
9975fi
9976
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9978$as_echo "$with_tcltk_includes" >&6; }
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9980$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9981
9982# Check whether --with-tcltk-libs was given.
9983if test "${with_tcltk_libs+set}" = set; then :
9984 withval=$with_tcltk_libs;
9985else
9986 with_tcltk_libs="default"
9987fi
9988
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9990$as_echo "$with_tcltk_libs" >&6; }
9991if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9992then
9993 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9994 then
9995 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9996 fi
9997 TCLTK_INCLUDES=""
9998 TCLTK_LIBS=""
9999else
10000 TCLTK_INCLUDES="$with_tcltk_includes"
10001 TCLTK_LIBS="$with_tcltk_libs"
10002fi
10003
Matthias Klose55708cc2009-04-30 08:06:49 +000010004# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10006$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010007
10008# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010009if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010010 withval=$with_dbmliborder;
10011if test x$with_dbmliborder = xyes
10012then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010013as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010014else
10015 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10016 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10017 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010018 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010019 fi
10020 done
10021fi
10022fi
10023
Matthias Kloseb9621712010-04-24 17:59:49 +000010024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10025$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010026
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010027# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010028
10029
Matthias Kloseb9621712010-04-24 17:59:49 +000010030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10031$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010033# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010034if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010035 withval=$with_signal_module;
10036fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010037
10038
10039if test -z "$with_signal_module"
10040then with_signal_module="yes"
10041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10043$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010044
10045if test "${with_signal_module}" = "yes"; then
10046 USE_SIGNAL_MODULE=""
10047 SIGNAL_OBJS=""
10048else
10049 USE_SIGNAL_MODULE="#"
10050 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10051fi
10052
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010053# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010054
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010055USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057
Martin v. Löwis11437992002-04-12 09:54:03 +000010058
10059# Templates for things AC_DEFINEd more than once.
10060# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010061
10062
Martin v. Löwis11437992002-04-12 09:54:03 +000010063
Matthias Kloseb9621712010-04-24 17:59:49 +000010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10065$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069 withval=$with_threads;
10070fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010071
10072
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010073# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010075# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010076if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077 withval=$with_thread; with_threads=$with_thread
10078fi
10079
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010080
10081if test -z "$with_threads"
10082then with_threads="yes"
10083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10085$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010086
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010087
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010088if test "$with_threads" = "no"
10089then
10090 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010091elif test "$ac_cv_pthread_is_default" = yes
10092then
Matthias Kloseb9621712010-04-24 17:59:49 +000010093 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010094
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010095 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010096 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010097
10098 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010100elif test "$ac_cv_kpthread" = "yes"
10101then
10102 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010103 if test "$ac_cv_cxx_thread" = "yes"; then
10104 CXX="$CXX -Kpthread"
10105 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010106 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010107
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010108 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010109 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010110elif test "$ac_cv_kthread" = "yes"
10111then
10112 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010113 if test "$ac_cv_cxx_thread" = "yes"; then
10114 CXX="$CXX -Kthread"
10115 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010116 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010117
10118 posix_threads=yes
10119 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010120elif test "$ac_cv_pthread" = "yes"
10121then
10122 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010123 if test "$ac_cv_cxx_thread" = "yes"; then
10124 CXX="$CXX -pthread"
10125 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010127
10128 posix_threads=yes
10129 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010130else
10131 if test ! -z "$with_threads" -a -d "$with_threads"
10132 then LDFLAGS="$LDFLAGS -L$with_threads"
10133 fi
10134 if test ! -z "$withval" -a -d "$withval"
10135 then LDFLAGS="$LDFLAGS -L$withval"
10136 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010137
10138 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010139 # define _POSIX_THREADS in unistd.h. Some apparently don't
10140 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10142$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010144/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010145
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010146#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010147#ifdef _POSIX_THREADS
10148yes
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150
10151_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010154 unistd_defines_pthreads=yes
10155else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010156 unistd_defines_pthreads=no
10157fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010158rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010159
Matthias Kloseb9621712010-04-24 17:59:49 +000010160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10161$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010162
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010164
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010165 # Just looking for pthread_create in libpthread is not enough:
10166 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10167 # So we really have to include pthread.h, and then link.
10168 _libs=$LIBS
10169 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10171$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010173/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010174
10175#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010176#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010177
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010178void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010179int
10180main ()
10181{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010182
10183pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010184 ;
10185 return 0;
10186}
10187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010189
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10191$as_echo "yes" >&6; }
10192 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010193
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010194 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010195 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010196else
Martin v. Löwis11437992002-04-12 09:54:03 +000010197
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010198 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010200if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010201 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010202
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010203 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010204 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010205else
Guido van Rossumad678af1998-10-02 14:42:15 +000010206
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10208$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010209if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010210 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010211else
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010213LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217/* Override any GCC internal prototype to avoid an error.
10218 Use char because int might match the return type of a GCC
10219 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010220#ifdef __cplusplus
10221extern "C"
10222#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010223char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010224int
10225main ()
10226{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010228 ;
10229 return 0;
10230}
10231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010233 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010234else
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010236fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010237rm -f core conftest.err conftest.$ac_objext \
10238 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010239LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010240fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10242$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010243if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010244 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010245
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010246 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010247 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010248 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010249else
Greg Steinadf63d62000-07-05 10:38:09 +000010250
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10252$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010253if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010254 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010255else
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010257LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010259/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010261/* Override any GCC internal prototype to avoid an error.
10262 Use char because int might match the return type of a GCC
10263 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010264#ifdef __cplusplus
10265extern "C"
10266#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010267char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010268int
10269main ()
10270{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010271return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 ;
10273 return 0;
10274}
10275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010278else
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281rm -f core conftest.err conftest.$ac_objext \
10282 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010283LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10286$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010287if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010289
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010290 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010291 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010292 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010293else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010294
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10296$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010297if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010298 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010299else
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010301LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305/* Override any GCC internal prototype to avoid an error.
10306 Use char because int might match the return type of a GCC
10307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010308#ifdef __cplusplus
10309extern "C"
10310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010311char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010312int
10313main ()
10314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010315return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ;
10317 return 0;
10318}
10319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010322else
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010325rm -f core conftest.err conftest.$ac_objext \
10326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010327LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10330$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010331if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010333
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010334 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010335 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010336 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010337else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010338
Matthias Kloseb9621712010-04-24 17:59:49 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10340$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010341if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010343else
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010345LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349/* Override any GCC internal prototype to avoid an error.
10350 Use char because int might match the return type of a GCC
10351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010352#ifdef __cplusplus
10353extern "C"
10354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010355char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010356int
10357main ()
10358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ;
10361 return 0;
10362}
10363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010365 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010366else
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010369rm -f core conftest.err conftest.$ac_objext \
10370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010371LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10374$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010375if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010377
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010378 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010379 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010380 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010381else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010382
Martin v. Löwis130fb172001-07-19 11:00:41 +000010383 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010384fi
10385
Guido van Rossum627b2d71993-12-24 10:39:16 +000010386
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010387fi
10388
Guido van Rossum0be3e491997-05-22 20:33:33 +000010389fi
10390
Guido van Rossum49545951997-12-02 19:28:29 +000010391fi
10392
Guido van Rossumb93a8621998-05-07 13:27:32 +000010393fi
10394
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010395fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010396rm -f core conftest.err conftest.$ac_objext \
10397 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010398
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10400$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010401if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010403else
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010405LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409/* Override any GCC internal prototype to avoid an error.
10410 Use char because int might match the return type of a GCC
10411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010412#ifdef __cplusplus
10413extern "C"
10414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010415char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010416int
10417main ()
10418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ;
10421 return 0;
10422}
10423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010424if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010426else
Matthias Kloseb9621712010-04-24 17:59:49 +000010427 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429rm -f core conftest.err conftest.$ac_objext \
10430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10434$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010435if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010437
Martin v. Löwis130fb172001-07-19 11:00:41 +000010438 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010439 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010440 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010441fi
10442
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010443
Neal Norwitza978ab02002-11-02 16:58:05 +000010444 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10446$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010447if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010449else
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010451LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010454
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455/* Override any GCC internal prototype to avoid an error.
10456 Use char because int might match the return type of a GCC
10457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010458#ifdef __cplusplus
10459extern "C"
10460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010461char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010462int
10463main ()
10464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010466 ;
10467 return 0;
10468}
10469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010470if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010471 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010472else
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010474fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010475rm -f core conftest.err conftest.$ac_objext \
10476 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010477LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010478fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10480$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010481if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010483
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010484 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010485 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010486 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010487fi
10488
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010489 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010490fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010491
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492if test "$posix_threads" = "yes"; then
10493 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010494
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010496
10497 fi
10498
10499 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10500 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010501 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010502$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010503
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010504 ;;
10505 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010506$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010507
10508 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010509 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010510$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010511
10512 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010513 esac
10514
Matthias Kloseb9621712010-04-24 17:59:49 +000010515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10516$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010517 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010519else
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010521 ac_cv_pthread_system_supported=no
10522else
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010524/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010525
10526 #include <stdio.h>
10527 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010528 void *foo(void *parm) {
10529 return NULL;
10530 }
10531 main() {
10532 pthread_attr_t attr;
10533 pthread_t id;
10534 if (pthread_attr_init(&attr)) exit(-1);
10535 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10536 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10537 exit(0);
10538 }
10539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010540if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541 ac_cv_pthread_system_supported=yes
10542else
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010547fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010549
Guido van Rossum627b2d71993-12-24 10:39:16 +000010550fi
10551
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10553$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554 if test "$ac_cv_pthread_system_supported" = "yes"; then
10555
Matthias Kloseb9621712010-04-24 17:59:49 +000010556$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557
10558 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 for ac_func in pthread_sigmask
10560do :
10561 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010562if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010564#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010565_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010566 case $ac_sys_system in
10567 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010568
Matthias Kloseb9621712010-04-24 17:59:49 +000010569$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010570
10571 ;;
10572 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010573fi
10574done
10575
Christian Heimesf77b4b22013-08-21 13:26:05 +020010576 for ac_func in pthread_atfork
10577do :
10578 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10579if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10580 cat >>confdefs.h <<_ACEOF
10581#define HAVE_PTHREAD_ATFORK 1
10582_ACEOF
10583
10584fi
10585done
10586
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010587fi
10588
10589
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010591
Matthias Kloseb9621712010-04-24 17:59:49 +000010592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10593$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010595if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10599$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010600 ipv6=no
10601 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010602 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10603$as_echo "yes" >&6; }
10604 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010605
10606 ipv6=yes
10607 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010609else
Martin v. Löwis11437992002-04-12 09:54:03 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613 /* AF_INET6 available check */
10614#include <sys/types.h>
10615#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010616int
10617main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010618{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010619int domain = AF_INET6;
10620 ;
10621 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622}
Martin v. Löwis11437992002-04-12 09:54:03 +000010623_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010624if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10627$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010629
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630else
Matthias Kloseb159a552010-04-25 21:00:44 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010634 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010639if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10641$as_echo_n "checking if RFC2553 API is available... " >&6; }
10642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010644
10645 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010646#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010647int
10648main ()
10649{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010650struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010651 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 ;
10653 return 0;
10654}
Matthias Kloseb159a552010-04-25 21:00:44 +000010655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010657if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010658
10659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010660$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010661 ipv6=yes
10662
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010663else
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
10665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010666$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010667 ipv6=no
10668
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010671fi
10672
10673if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010675
10676fi
10677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010678fi
10679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680
10681ipv6type=unknown
10682ipv6lib=none
10683ipv6trylibc=no
10684
10685if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10687$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010688 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10689 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690 case $i in
10691 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010694
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010695#include <netinet/in.h>
10696#ifdef IPV6_INRIA_VERSION
10697yes
10698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010699_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010701 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010702 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010704rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705
10706 ;;
10707 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010709/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010710
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711#include <netinet/in.h>
10712#ifdef __KAME__
10713yes
10714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010715_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010717 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 ipv6type=$i;
10719 ipv6lib=inet6
10720 ipv6libdir=/usr/local/v6/lib
10721 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010723rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724
10725 ;;
10726 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010728/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010729
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730#include <features.h>
10731#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10732yes
10733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010734_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737 ipv6type=$i;
10738 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010740rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741
10742 ;;
10743 linux-inet6)
10744 if test -d /usr/inet6; then
10745 ipv6type=$i
10746 ipv6lib=inet6
10747 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010748 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010749 fi
10750 ;;
10751 solaris)
10752 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010753 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754 ipv6type=$i
10755 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756 fi
10757 fi
10758 ;;
10759 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010761/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010762
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763#include <sys/param.h>
10764#ifdef _TOSHIBA_INET6
10765yes
10766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010767_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770 ipv6type=$i;
10771 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010772 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010774rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775
10776 ;;
10777 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010779/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010780
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781#include </usr/local/v6/include/sys/v6config.h>
10782#ifdef __V6D__
10783yes
10784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010785_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010786if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 ipv6type=$i;
10789 ipv6lib=v6;
10790 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010791 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010793rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794
10795 ;;
10796 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800#include <sys/param.h>
10801#ifdef _ZETA_MINAMI_INET6
10802yes
10803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807 ipv6type=$i;
10808 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010809 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010811rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812
10813 ;;
10814 esac
10815 if test "$ipv6type" != "unknown"; then
10816 break
10817 fi
10818 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10820$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821fi
10822
10823if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10824 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10825 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10826 echo "using lib$ipv6lib"
10827 else
10828 if test $ipv6trylibc = "yes"; then
10829 echo "using libc"
10830 else
10831 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10832 echo "You need to fetch lib$ipv6lib.a from appropriate"
10833 echo 'ipv6 kit and compile beforehand.'
10834 exit 1
10835 fi
10836 fi
10837fi
10838
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10840$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10842/* end confdefs.h. */
10843 /* CAN_RAW_FD_FRAMES available check */
10844#include <linux/can/raw.h>
10845int
10846main ()
10847{
10848int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10849 ;
10850 return 0;
10851}
10852_ACEOF
10853if ac_fn_c_try_compile "$LINENO"; then :
10854
10855
10856$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10857
10858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10859$as_echo "yes" >&6; }
10860
10861else
10862
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10864$as_echo "no" >&6; }
10865
10866fi
10867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10868
Matthias Kloseb9621712010-04-24 17:59:49 +000010869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10870$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010872/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010873
10874 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010875int
10876main ()
10877{
10878FSIORefNum fRef = 0
10879 ;
10880 return 0;
10881}
Matthias Kloseb159a552010-04-25 21:00:44 +000010882
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010884if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010885
Matthias Kloseb159a552010-04-25 21:00:44 +000010886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010888
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10890$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010891
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010892else
Matthias Kloseb159a552010-04-25 21:00:44 +000010893
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010896
10897fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10899
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010900# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10902$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010905if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906 withval=$with_doc_strings;
10907fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010908
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010909
10910if test -z "$with_doc_strings"
10911then with_doc_strings="yes"
10912fi
10913if test "$with_doc_strings" != "no"
10914then
10915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010917
10918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10920$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010921
Antoine Pitrou042b1282010-08-13 21:15:58 +000010922# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10924$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010925
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010927if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010928 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010929if test "$withval" != no
10930then
10931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010933
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10935$as_echo "yes" >&6; }
10936else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10937$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010938fi
10939else
Matthias Kloseb9621712010-04-24 17:59:49 +000010940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10941$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010942fi
10943
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010944
10945# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10947$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951 withval=$with_pymalloc;
10952fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010953
Neil Schemenauera35c6882001-02-27 04:45:05 +000010954
Neil Schemenauer16c22972002-03-22 15:34:49 +000010955if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010956then
10957 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010958fi
10959if test "$with_pymalloc" != "no"
10960then
Martin v. Löwis11437992002-04-12 09:54:03 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010963
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010964 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10967$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010968
Benjamin Peterson05159c42009-12-03 03:01:27 +000010969# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10971$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010972
10973# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010974if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010975 withval=$with_valgrind;
10976else
10977 with_valgrind=no
10978fi
10979
Matthias Kloseb9621712010-04-24 17:59:49 +000010980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10981$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010982if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010983 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020010984if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010985
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010987
10988else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010989 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010990
10991fi
10992
10993
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010994 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010995fi
10996
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010997# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010998
Guido van Rossum98935bf2001-09-05 19:13:16 +000010999DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011000
Guido van Rossume97ee181999-12-20 21:27:22 +000011001# the dlopen() function means we might want to use dynload_shlib.o. some
11002# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011003for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011004do :
11005 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011006if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011008#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011009_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011010
Guido van Rossume97ee181999-12-20 21:27:22 +000011011fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011012done
Guido van Rossume97ee181999-12-20 21:27:22 +000011013
Michael W. Hudson54241132001-12-07 15:38:26 +000011014
Guido van Rossume97ee181999-12-20 21:27:22 +000011015# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11016# loading of modules.
11017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11019$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011020if test -z "$DYNLOADFILE"
11021then
11022 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011023 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11024 if test "$ac_cv_func_dlopen" = yes
11025 then DYNLOADFILE="dynload_shlib.o"
11026 else DYNLOADFILE="dynload_aix.o"
11027 fi
11028 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011029 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011030 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11031 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011032 *)
11033 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11034 # out any dynamic loading
11035 if test "$ac_cv_func_dlopen" = yes
11036 then DYNLOADFILE="dynload_shlib.o"
11037 else DYNLOADFILE="dynload_stub.o"
11038 fi
11039 ;;
11040 esac
11041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11043$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011044if test "$DYNLOADFILE" != "dynload_stub.o"
11045then
Martin v. Löwis11437992002-04-12 09:54:03 +000011046
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011048
11049fi
11050
Neil Schemenauer4e425612001-06-19 15:44:15 +000011051# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11052
Michael W. Hudson54241132001-12-07 15:38:26 +000011053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11055$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011056if test -z "$MACHDEP_OBJS"
11057then
Jack Jansene578a632001-08-15 01:27:14 +000011058 MACHDEP_OBJS=$extra_machdep_objs
11059else
11060 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011061fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011062if test -z "$MACHDEP_OBJS"; then
11063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11064$as_echo "none" >&6; }
11065else
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11067$as_echo "$MACHDEP_OBJS" >&6; }
11068fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011069
Guido van Rossum627b2d71993-12-24 10:39:16 +000011070# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011071for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011072 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011073 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011074 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011075 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011076 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011077 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011078 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11079 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011080 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011081 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011082 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011083 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011084 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011085 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011086 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11087 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011088 sigaction sigaltstack siginterrupt sigpending sigrelse \
11089 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011090 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011091 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011092 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011093do :
11094 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11095ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011096if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011098#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011099_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011101fi
11102done
11103
Michael W. Hudson54241132001-12-07 15:38:26 +000011104
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011105ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11106 #include <dirent.h>
11107"
11108if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11109
11110$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11111
11112fi
11113
11114
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011115# For some functions, having a definition is not sufficient, since
11116# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11118$as_echo_n "checking for chroot... " >&6; }
11119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011121#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011122int
11123main ()
11124{
11125void *x=chroot
11126 ;
11127 return 0;
11128}
11129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011133
Matthias Kloseb159a552010-04-25 21:00:44 +000011134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011135$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011136else
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11138$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011139
11140fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11143$as_echo_n "checking for link... " >&6; }
11144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011145/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011146#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011147int
11148main ()
11149{
11150void *x=link
11151 ;
11152 return 0;
11153}
11154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011156
Matthias Kloseb9621712010-04-24 17:59:49 +000011157$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011158
Matthias Kloseb159a552010-04-25 21:00:44 +000011159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011160$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011161else
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011164
11165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11168$as_echo_n "checking for symlink... " >&6; }
11169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011171#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172int
11173main ()
11174{
11175void *x=symlink
11176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011183
Matthias Kloseb159a552010-04-25 21:00:44 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186else
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011189
11190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11193$as_echo_n "checking for fchdir... " >&6; }
11194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011196#include <unistd.h>
11197int
11198main ()
11199{
11200void *x=fchdir
11201 ;
11202 return 0;
11203}
11204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011208
Matthias Kloseb159a552010-04-25 21:00:44 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011211else
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011214
11215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11218$as_echo_n "checking for fsync... " >&6; }
11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011221#include <unistd.h>
11222int
11223main ()
11224{
11225void *x=fsync
11226 ;
11227 return 0;
11228}
11229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011231
Matthias Kloseb9621712010-04-24 17:59:49 +000011232$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011233
Matthias Kloseb159a552010-04-25 21:00:44 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011236else
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011239
11240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11243$as_echo_n "checking for fdatasync... " >&6; }
11244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011246#include <unistd.h>
11247int
11248main ()
11249{
11250void *x=fdatasync
11251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011256
Matthias Kloseb9621712010-04-24 17:59:49 +000011257$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011258
Matthias Kloseb159a552010-04-25 21:00:44 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011261else
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011264
11265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11268$as_echo_n "checking for epoll... " >&6; }
11269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011270/* end confdefs.h. */
11271#include <sys/epoll.h>
11272int
11273main ()
11274{
11275void *x=epoll_create
11276 ;
11277 return 0;
11278}
11279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011280if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281
Matthias Kloseb9621712010-04-24 17:59:49 +000011282$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011283
Matthias Kloseb159a552010-04-25 21:00:44 +000011284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011286else
Matthias Kloseb9621712010-04-24 17:59:49 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011289
11290fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11293$as_echo_n "checking for epoll_create1... " >&6; }
11294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11295/* end confdefs.h. */
11296#include <sys/epoll.h>
11297int
11298main ()
11299{
11300void *x=epoll_create1
11301 ;
11302 return 0;
11303}
11304_ACEOF
11305if ac_fn_c_try_compile "$LINENO"; then :
11306
11307$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11308
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11310$as_echo "yes" >&6; }
11311else
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11313$as_echo "no" >&6; }
11314
11315fi
11316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11318$as_echo_n "checking for kqueue... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011320/* end confdefs.h. */
11321
11322#include <sys/types.h>
11323#include <sys/event.h>
11324
11325int
11326main ()
11327{
11328int x=kqueue()
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011342
11343fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11346$as_echo_n "checking for prlimit... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11348/* end confdefs.h. */
11349
11350#include <sys/time.h>
11351#include <sys/resource.h>
11352
11353int
11354main ()
11355{
11356void *x=prlimit
11357 ;
11358 return 0;
11359}
11360_ACEOF
11361if ac_fn_c_try_compile "$LINENO"; then :
11362
11363$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11364
11365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11366$as_echo "yes" >&6; }
11367else
11368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
11370
11371fi
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11373
Martin v. Löwisd5843682002-11-21 20:41:28 +000011374# On some systems (eg. FreeBSD 5), we would find a definition of the
11375# functions ctermid_r, setgroups in the library, but no prototype
11376# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11377# address to avoid compiler warnings and potential miscompilations
11378# because of the missing prototypes.
11379
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11381$as_echo_n "checking for ctermid_r... " >&6; }
11382cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011383/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011384
Martin v. Löwisd5843682002-11-21 20:41:28 +000011385#include <stdio.h>
11386
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387int
11388main ()
11389{
11390void* p = ctermid_r
11391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011396
Matthias Kloseb9621712010-04-24 17:59:49 +000011397$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011398
Matthias Kloseb159a552010-04-25 21:00:44 +000011399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011400$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011401else
Matthias Kloseb9621712010-04-24 17:59:49 +000011402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011404
11405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11407
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11409$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011410if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011411 $as_echo_n "(cached) " >&6
11412else
11413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011415#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011416int
11417main ()
11418{
11419void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011420
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011421 ;
11422 return 0;
11423}
11424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011425if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011426 ac_cv_flock_decl=yes
11427else
11428 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011429
11430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011432
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011433fi
11434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11435$as_echo "$ac_cv_flock_decl" >&6; }
11436if test "x${ac_cv_flock_decl}" = xyes; then
11437 for ac_func in flock
11438do :
11439 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011440if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011441 cat >>confdefs.h <<_ACEOF
11442#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011443_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011444
Antoine Pitroua3000072010-09-07 14:52:42 +000011445else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011447$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011448if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011449 $as_echo_n "(cached) " >&6
11450else
11451 ac_check_lib_save_LIBS=$LIBS
11452LIBS="-lbsd $LIBS"
11453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11454/* end confdefs.h. */
11455
11456/* Override any GCC internal prototype to avoid an error.
11457 Use char because int might match the return type of a GCC
11458 builtin and then its argument prototype would still apply. */
11459#ifdef __cplusplus
11460extern "C"
11461#endif
11462char flock ();
11463int
11464main ()
11465{
11466return flock ();
11467 ;
11468 return 0;
11469}
11470_ACEOF
11471if ac_fn_c_try_link "$LINENO"; then :
11472 ac_cv_lib_bsd_flock=yes
11473else
11474 ac_cv_lib_bsd_flock=no
11475fi
11476rm -f core conftest.err conftest.$ac_objext \
11477 conftest$ac_exeext conftest.$ac_ext
11478LIBS=$ac_check_lib_save_LIBS
11479fi
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11481$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011482if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011483 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011484
11485
11486$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11487
11488
11489fi
11490
11491
11492fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011493done
11494
Antoine Pitroua3000072010-09-07 14:52:42 +000011495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011496
Matthias Kloseb9621712010-04-24 17:59:49 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11498$as_echo_n "checking for getpagesize... " >&6; }
11499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011501
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011502#include <unistd.h>
11503
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011504int
11505main ()
11506{
11507void* p = getpagesize
11508 ;
11509 return 0;
11510}
11511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011513
Matthias Kloseb9621712010-04-24 17:59:49 +000011514$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011515
Matthias Kloseb159a552010-04-25 21:00:44 +000011516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011517$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011518else
Matthias Kloseb9621712010-04-24 17:59:49 +000011519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11520$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011521
11522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011524
Victor Stinner984890f2011-11-24 13:53:38 +010011525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11526$as_echo_n "checking for broken unsetenv... " >&6; }
11527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11528/* end confdefs.h. */
11529
11530#include <stdlib.h>
11531
11532int
11533main ()
11534{
11535int res = unsetenv("DUMMY")
11536 ;
11537 return 0;
11538}
11539_ACEOF
11540if ac_fn_c_try_compile "$LINENO"; then :
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
11543else
11544
11545$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11546
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11548$as_echo "yes" >&6; }
11549
11550fi
11551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11552
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011553for ac_prog in true
11554do
11555 # Extract the first word of "$ac_prog", so it can be a program name with args.
11556set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11558$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011559if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011560 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011561else
11562 if test -n "$TRUE"; then
11563 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11564else
11565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11566for as_dir in $PATH
11567do
11568 IFS=$as_save_IFS
11569 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011571 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011572 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 $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 +000011574 break 2
11575 fi
11576done
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011579
11580fi
11581fi
11582TRUE=$ac_cv_prog_TRUE
11583if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11585$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011586else
Matthias Kloseb9621712010-04-24 17:59:49 +000011587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11588$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589fi
11590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011591
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011592 test -n "$TRUE" && break
11593done
11594test -n "$TRUE" || TRUE="/bin/true"
11595
11596
Matthias Kloseb9621712010-04-24 17:59:49 +000011597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11598$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011599if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011600 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011601else
11602 ac_check_lib_save_LIBS=$LIBS
11603LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607/* Override any GCC internal prototype to avoid an error.
11608 Use char because int might match the return type of a GCC
11609 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011610#ifdef __cplusplus
11611extern "C"
11612#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011613char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011614int
11615main ()
11616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011618 ;
11619 return 0;
11620}
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011623 ac_cv_lib_c_inet_aton=yes
11624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011627rm -f core conftest.err conftest.$ac_objext \
11628 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011629LIBS=$ac_check_lib_save_LIBS
11630fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11632$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011633if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011634 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011635else
Matthias Kloseb9621712010-04-24 17:59:49 +000011636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11637$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011638if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011640else
11641 ac_check_lib_save_LIBS=$LIBS
11642LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646/* Override any GCC internal prototype to avoid an error.
11647 Use char because int might match the return type of a GCC
11648 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011649#ifdef __cplusplus
11650extern "C"
11651#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011652char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011653int
11654main ()
11655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657 ;
11658 return 0;
11659}
11660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011662 ac_cv_lib_resolv_inet_aton=yes
11663else
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011666rm -f core conftest.err conftest.$ac_objext \
11667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668LIBS=$ac_check_lib_save_LIBS
11669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11671$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011672if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011673 cat >>confdefs.h <<_ACEOF
11674#define HAVE_LIBRESOLV 1
11675_ACEOF
11676
11677 LIBS="-lresolv $LIBS"
11678
11679fi
11680
11681
11682fi
11683
11684
Christian Heimesd0764e22007-12-04 15:00:33 +000011685# On Tru64, chflags seems to be present, but calling it will
11686# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11688$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011689if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011690 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011691else
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011693 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011694else
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011696/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011697
Christian Heimesd0764e22007-12-04 15:00:33 +000011698#include <sys/stat.h>
11699#include <unistd.h>
11700int main(int argc, char*argv[])
11701{
11702 if(chflags(argv[0], 0) != 0)
11703 return 1;
11704 return 0;
11705}
Ned Deily3eb67d52011-06-28 00:00:28 -070011706
Christian Heimesd0764e22007-12-04 15:00:33 +000011707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011708if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011709 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011710else
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011715fi
11716
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011717
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11720$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011721if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011723if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011724 ac_cv_have_chflags="yes"
11725else
11726 ac_cv_have_chflags="no"
11727fi
11728
11729fi
11730if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011731
Matthias Kloseb9621712010-04-24 17:59:49 +000011732$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011733
11734fi
11735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11737$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011738if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011742 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011745/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011746
Christian Heimesd0764e22007-12-04 15:00:33 +000011747#include <sys/stat.h>
11748#include <unistd.h>
11749int main(int argc, char*argv[])
11750{
11751 if(lchflags(argv[0], 0) != 0)
11752 return 1;
11753 return 0;
11754}
Ned Deily3eb67d52011-06-28 00:00:28 -070011755
Christian Heimesd0764e22007-12-04 15:00:33 +000011756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011757if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011758 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011759else
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011764fi
11765
11766
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11769$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011770if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011771 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011772if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011773 ac_cv_have_lchflags="yes"
11774else
11775 ac_cv_have_lchflags="no"
11776fi
11777
11778fi
11779if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011780
Matthias Kloseb9621712010-04-24 17:59:49 +000011781$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011782
11783fi
11784
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011785case $ac_sys_system/$ac_sys_release in
11786Darwin/*)
11787 _CUR_CFLAGS="${CFLAGS}"
11788 _CUR_LDFLAGS="${LDFLAGS}"
11789 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11790 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11791 ;;
11792esac
11793
Matthias Kloseb9621712010-04-24 17:59:49 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11795$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011797 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011798else
11799 ac_check_lib_save_LIBS=$LIBS
11800LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011802/* end confdefs.h. */
11803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011804/* Override any GCC internal prototype to avoid an error.
11805 Use char because int might match the return type of a GCC
11806 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011807#ifdef __cplusplus
11808extern "C"
11809#endif
11810char inflateCopy ();
11811int
11812main ()
11813{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011815 ;
11816 return 0;
11817}
11818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011819if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011820 ac_cv_lib_z_inflateCopy=yes
11821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011824rm -f core conftest.err conftest.$ac_objext \
11825 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011826LIBS=$ac_check_lib_save_LIBS
11827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11829$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011830if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011833
11834fi
11835
11836
11837case $ac_sys_system/$ac_sys_release in
11838Darwin/*)
11839 CFLAGS="${_CUR_CFLAGS}"
11840 LDFLAGS="${_CUR_LDFLAGS}"
11841 ;;
11842esac
11843
Matthias Kloseb9621712010-04-24 17:59:49 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11845$as_echo_n "checking for hstrerror... " >&6; }
11846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011847/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011848
Martin v. Löwise9416172003-05-03 10:12:45 +000011849#include <netdb.h>
11850
Martin v. Löwise9416172003-05-03 10:12:45 +000011851int
11852main ()
11853{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011854void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011855 ;
11856 return 0;
11857}
11858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011862
Matthias Kloseb159a552010-04-25 21:00:44 +000011863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011864$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11867$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011868
11869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011870rm -f core conftest.err conftest.$ac_objext \
11871 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011872
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11874$as_echo_n "checking for inet_aton... " >&6; }
11875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011876/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011877
Martin v. Löwis86d66262006-02-17 08:40:11 +000011878#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011879#include <sys/socket.h>
11880#include <netinet/in.h>
11881#include <arpa/inet.h>
11882
Martin v. Löwise9416172003-05-03 10:12:45 +000011883int
11884main ()
11885{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011886void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011894
Matthias Kloseb159a552010-04-25 21:00:44 +000011895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011896$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011897else
Matthias Kloseb9621712010-04-24 17:59:49 +000011898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11899$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011900
11901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11906$as_echo_n "checking for inet_pton... " >&6; }
11907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011908/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011909
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011910#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011911#include <sys/socket.h>
11912#include <netinet/in.h>
11913#include <arpa/inet.h>
11914
Martin v. Löwise9416172003-05-03 10:12:45 +000011915int
11916main ()
11917{
11918void* p = inet_pton
11919 ;
11920 return 0;
11921}
11922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011924
Matthias Kloseb9621712010-04-24 17:59:49 +000011925$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011926
Matthias Kloseb159a552010-04-25 21:00:44 +000011927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011928$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11931$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011932
11933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011935
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011936# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11938$as_echo_n "checking for setgroups... " >&6; }
11939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011941
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011942#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011943#ifdef HAVE_GRP_H
11944#include <grp.h>
11945#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011946
Martin v. Löwisd5843682002-11-21 20:41:28 +000011947int
11948main ()
11949{
11950void* p = setgroups
11951 ;
11952 return 0;
11953}
11954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011955if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011956
Matthias Kloseb9621712010-04-24 17:59:49 +000011957$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011958
Matthias Kloseb159a552010-04-25 21:00:44 +000011959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011960$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11963$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011964
11965fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011967
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011968# check for openpty and forkpty
11969
11970for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011971do :
11972 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011973if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011975#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011976_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011977
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011978else
Matthias Kloseb9621712010-04-24 17:59:49 +000011979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11980$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011981if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011983else
Martin v. Löwis11437992002-04-12 09:54:03 +000011984 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011985LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989/* Override any GCC internal prototype to avoid an error.
11990 Use char because int might match the return type of a GCC
11991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011992#ifdef __cplusplus
11993extern "C"
11994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011995char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011996int
11997main ()
11998{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012000 ;
12001 return 0;
12002}
12003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012004if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012008fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012009rm -f core conftest.err conftest.$ac_objext \
12010 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012011LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12014$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012015if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012017 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012018else
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12020$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012021if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012023else
12024 ac_check_lib_save_LIBS=$LIBS
12025LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012027/* end confdefs.h. */
12028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012029/* Override any GCC internal prototype to avoid an error.
12030 Use char because int might match the return type of a GCC
12031 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012032#ifdef __cplusplus
12033extern "C"
12034#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012035char openpty ();
12036int
12037main ()
12038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012039return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012045 ac_cv_lib_bsd_openpty=yes
12046else
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012049rm -f core conftest.err conftest.$ac_objext \
12050 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012051LIBS=$ac_check_lib_save_LIBS
12052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12054$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012055if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012057 LIBS="$LIBS -lbsd"
12058fi
12059
12060
12061fi
12062
Fred Drake8cef4cf2000-06-28 16:40:38 +000012063
12064fi
12065done
12066
12067for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012068do :
12069 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012073_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012074
Fred Drake8cef4cf2000-06-28 16:40:38 +000012075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12077$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012078if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012079 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012080else
Martin v. Löwis11437992002-04-12 09:54:03 +000012081 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012082LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012086/* Override any GCC internal prototype to avoid an error.
12087 Use char because int might match the return type of a GCC
12088 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012089#ifdef __cplusplus
12090extern "C"
12091#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012092char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012093int
12094main ()
12095{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012096return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012097 ;
12098 return 0;
12099}
12100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012101if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106rm -f core conftest.err conftest.$ac_objext \
12107 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012108LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012109fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12111$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012112if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012113 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012114 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012115else
Matthias Kloseb9621712010-04-24 17:59:49 +000012116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12117$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012118if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012120else
12121 ac_check_lib_save_LIBS=$LIBS
12122LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012123cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012124/* end confdefs.h. */
12125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126/* Override any GCC internal prototype to avoid an error.
12127 Use char because int might match the return type of a GCC
12128 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012129#ifdef __cplusplus
12130extern "C"
12131#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012132char forkpty ();
12133int
12134main ()
12135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012137 ;
12138 return 0;
12139}
12140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012141if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012142 ac_cv_lib_bsd_forkpty=yes
12143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012146rm -f core conftest.err conftest.$ac_objext \
12147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012148LIBS=$ac_check_lib_save_LIBS
12149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12151$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012152if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012154 LIBS="$LIBS -lbsd"
12155fi
12156
12157
12158fi
12159
Fred Drake8cef4cf2000-06-28 16:40:38 +000012160
12161fi
12162done
12163
Jack Jansendd19cf82001-12-06 22:36:17 +000012164
Christian Heimesb186d002008-03-18 15:15:01 +000012165# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012166for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012167do :
12168 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012169if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012170 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012171#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012172_ACEOF
12173
12174fi
12175done
12176
12177
Michael W. Hudson54241132001-12-07 15:38:26 +000012178# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012179for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012180do :
12181 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12182ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012183if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012185#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012186_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012187
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012189done
12190
Michael W. Hudson54241132001-12-07 15:38:26 +000012191
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012192ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012193if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012194 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012195
Martin v. Löwis1142de32002-03-29 16:28:31 +000012196else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012198 *" dup2.$ac_objext "* ) ;;
12199 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012200 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012201esac
12202
Martin v. Löwis1142de32002-03-29 16:28:31 +000012203fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012204
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012205ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012206if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012207 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12208
12209else
12210 case " $LIBOBJS " in
12211 *" strdup.$ac_objext "* ) ;;
12212 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12213 ;;
12214esac
12215
12216fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012217
12218
12219for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012220do :
12221 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012222if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012227/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012229int
12230main ()
12231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012233 ;
12234 return 0;
12235}
12236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012237if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Matthias Kloseb9621712010-04-24 17:59:49 +000012239$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012240
Guido van Rossum627b2d71993-12-24 10:39:16 +000012241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012243
Guido van Rossum627b2d71993-12-24 10:39:16 +000012244fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012245done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246
Jack Jansen150753c2003-03-29 22:07:47 +000012247for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012248do :
12249 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012250if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012252#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012256#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012257int
12258main ()
12259{
12260setpgrp(0,0);
12261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012268
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012271
12272fi
12273done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012274
Thomas Wouters3a584202000-08-05 23:28:51 +000012275for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012276do :
12277 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012284#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012285int
12286main ()
12287{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
12294
Guido van Rossum627b2d71993-12-24 10:39:16 +000012295else
Skip Montanaro6dead952003-09-25 14:50:04 +000012296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
Guido van Rossum627b2d71993-12-24 10:39:16 +000012300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012303fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012304done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012305
Michael W. Hudson54241132001-12-07 15:38:26 +000012306
Victor Stinnere0be4232011-10-25 13:06:09 +020012307for ac_func in clock_gettime
12308do :
12309 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12310if test "x$ac_cv_func_clock_gettime" = xyes; then :
12311 cat >>confdefs.h <<_ACEOF
12312#define HAVE_CLOCK_GETTIME 1
12313_ACEOF
12314
12315else
12316
12317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12318$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12319if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12320 $as_echo_n "(cached) " >&6
12321else
12322 ac_check_lib_save_LIBS=$LIBS
12323LIBS="-lrt $LIBS"
12324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12325/* end confdefs.h. */
12326
12327/* Override any GCC internal prototype to avoid an error.
12328 Use char because int might match the return type of a GCC
12329 builtin and then its argument prototype would still apply. */
12330#ifdef __cplusplus
12331extern "C"
12332#endif
12333char clock_gettime ();
12334int
12335main ()
12336{
12337return clock_gettime ();
12338 ;
12339 return 0;
12340}
12341_ACEOF
12342if ac_fn_c_try_link "$LINENO"; then :
12343 ac_cv_lib_rt_clock_gettime=yes
12344else
12345 ac_cv_lib_rt_clock_gettime=no
12346fi
12347rm -f core conftest.err conftest.$ac_objext \
12348 conftest$ac_exeext conftest.$ac_ext
12349LIBS=$ac_check_lib_save_LIBS
12350fi
12351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12352$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12353if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12354
Victor Stinner7efb8332014-08-29 15:41:08 +020012355 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012356 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12357
12358
12359$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12360
12361
12362fi
12363
12364
12365fi
12366done
12367
12368
12369for ac_func in clock_getres
12370do :
12371 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12372if test "x$ac_cv_func_clock_getres" = xyes; then :
12373 cat >>confdefs.h <<_ACEOF
12374#define HAVE_CLOCK_GETRES 1
12375_ACEOF
12376
12377else
12378
12379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12380$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12381if ${ac_cv_lib_rt_clock_getres+:} false; then :
12382 $as_echo_n "(cached) " >&6
12383else
12384 ac_check_lib_save_LIBS=$LIBS
12385LIBS="-lrt $LIBS"
12386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12387/* end confdefs.h. */
12388
12389/* Override any GCC internal prototype to avoid an error.
12390 Use char because int might match the return type of a GCC
12391 builtin and then its argument prototype would still apply. */
12392#ifdef __cplusplus
12393extern "C"
12394#endif
12395char clock_getres ();
12396int
12397main ()
12398{
12399return clock_getres ();
12400 ;
12401 return 0;
12402}
12403_ACEOF
12404if ac_fn_c_try_link "$LINENO"; then :
12405 ac_cv_lib_rt_clock_getres=yes
12406else
12407 ac_cv_lib_rt_clock_getres=no
12408fi
12409rm -f core conftest.err conftest.$ac_objext \
12410 conftest$ac_exeext conftest.$ac_ext
12411LIBS=$ac_check_lib_save_LIBS
12412fi
12413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12414$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12415if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12416
12417 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12418
12419
12420fi
12421
12422
12423fi
12424done
12425
12426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12428$as_echo_n "checking for major... " >&6; }
12429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012431
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012432#if defined(MAJOR_IN_MKDEV)
12433#include <sys/mkdev.h>
12434#elif defined(MAJOR_IN_SYSMACROS)
12435#include <sys/sysmacros.h>
12436#else
12437#include <sys/types.h>
12438#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012439
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012440int
12441main ()
12442{
12443
12444 makedev(major(0),minor(0));
12445
12446 ;
12447 return 0;
12448}
12449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012450if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012451
12452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12456$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012457
12458else
Skip Montanaro6dead952003-09-25 14:50:04 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12461$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012462
12463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012464rm -f core conftest.err conftest.$ac_objext \
12465 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012466
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012467# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012468# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12470$as_echo_n "checking for getaddrinfo... " >&6; }
12471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012472/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012473
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012474#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012475#include <sys/socket.h>
12476#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012477#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012478
Martin v. Löwis11437992002-04-12 09:54:03 +000012479int
12480main ()
12481{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012482getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012488 have_getaddrinfo=yes
12489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
12494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12495$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012496if test $have_getaddrinfo = yes
12497then
Matthias Kloseb9621712010-04-24 17:59:49 +000012498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12499$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012500 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012501 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012502else
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012504
12505if test "${enable_ipv6+set}" = set; then
12506 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12507else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012508 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012509fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510else
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012512/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012513
Stefan Krah19c21392012-11-22 23:47:32 +010012514#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012515#include <sys/types.h>
12516#include <netdb.h>
12517#include <string.h>
12518#include <sys/socket.h>
12519#include <netinet/in.h>
12520
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012521int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012522{
12523 int passive, gaierr, inet4 = 0, inet6 = 0;
12524 struct addrinfo hints, *ai, *aitop;
12525 char straddr[INET6_ADDRSTRLEN], strport[16];
12526
12527 for (passive = 0; passive <= 1; passive++) {
12528 memset(&hints, 0, sizeof(hints));
12529 hints.ai_family = AF_UNSPEC;
12530 hints.ai_flags = passive ? AI_PASSIVE : 0;
12531 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012532 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012533 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12534 (void)gai_strerror(gaierr);
12535 goto bad;
12536 }
12537 for (ai = aitop; ai; ai = ai->ai_next) {
12538 if (ai->ai_addr == NULL ||
12539 ai->ai_addrlen == 0 ||
12540 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12541 straddr, sizeof(straddr), strport, sizeof(strport),
12542 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12543 goto bad;
12544 }
12545 switch (ai->ai_family) {
12546 case AF_INET:
12547 if (strcmp(strport, "54321") != 0) {
12548 goto bad;
12549 }
12550 if (passive) {
12551 if (strcmp(straddr, "0.0.0.0") != 0) {
12552 goto bad;
12553 }
12554 } else {
12555 if (strcmp(straddr, "127.0.0.1") != 0) {
12556 goto bad;
12557 }
12558 }
12559 inet4++;
12560 break;
12561 case AF_INET6:
12562 if (strcmp(strport, "54321") != 0) {
12563 goto bad;
12564 }
12565 if (passive) {
12566 if (strcmp(straddr, "::") != 0) {
12567 goto bad;
12568 }
12569 } else {
12570 if (strcmp(straddr, "::1") != 0) {
12571 goto bad;
12572 }
12573 }
12574 inet6++;
12575 break;
12576 case AF_UNSPEC:
12577 goto bad;
12578 break;
12579 default:
12580 /* another family support? */
12581 break;
12582 }
12583 }
12584 }
12585
12586 if (!(inet4 == 0 || inet4 == 2))
12587 goto bad;
12588 if (!(inet6 == 0 || inet6 == 2))
12589 goto bad;
12590
12591 if (aitop)
12592 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012593 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594
12595 bad:
12596 if (aitop)
12597 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012598 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012599}
12600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012602if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012603 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012604else
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012610
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012611fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012612
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12616$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12617
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012618if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012619then
12620 if test $ipv6 = yes
12621 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012622 echo 'Fatal: You must get working getaddrinfo() function.'
12623 echo ' or you can specify "--disable-ipv6"'.
12624 exit 1
12625 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012626else
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
Matthias Kloseb9621712010-04-24 17:59:49 +000012628$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012629
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012630fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012631
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012632for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012633do :
12634 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012635if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012636 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012637#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012638_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012639
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640fi
12641done
12642
Michael W. Hudson54241132001-12-07 15:38:26 +000012643
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12646$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012647if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012648 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012649else
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652#include <sys/types.h>
12653#include <sys/time.h>
12654#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656int
12657main ()
12658{
12659if ((struct tm *) 0)
12660return 0;
12661 ;
12662 return 0;
12663}
12664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012667else
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12673$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012674if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677
12678fi
12679
Matthias Kloseb9621712010-04-24 17:59:49 +000012680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12681$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012682if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684else
Matthias Kloseb9621712010-04-24 17:59:49 +000012685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687#include <sys/types.h>
12688#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
Martin v. Löwis11437992002-04-12 09:54:03 +000012690int
12691main ()
12692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693struct tm tm;
12694 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012696 ;
12697 return 0;
12698}
12699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012700if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701 ac_cv_struct_tm=time.h
12702else
Matthias Kloseb9621712010-04-24 17:59:49 +000012703 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12708$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012709if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Matthias Kloseb9621712010-04-24 17:59:49 +000012711$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712
12713fi
12714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715ac_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 +000012716#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718"
Victor Stinnere0be4232011-10-25 13:06:09 +020012719if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
12721cat >>confdefs.h <<_ACEOF
12722#define HAVE_STRUCT_TM_TM_ZONE 1
12723_ACEOF
12724
12725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012727
Martin v. Löwis11437992002-04-12 09:54:03 +000012728if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012731
12732else
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12734"
Victor Stinnere0be4232011-10-25 13:06:09 +020012735if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012739fi
12740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012742#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012743_ACEOF
12744
Matthias Kloseb9621712010-04-24 17:59:49 +000012745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12746$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012747if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749else
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012751/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012753#if !HAVE_DECL_TZNAME
12754extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Martin v. Löwis11437992002-04-12 09:54:03 +000012757int
12758main ()
12759{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012760return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012761 ;
12762 return 0;
12763}
12764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012765if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012766 ac_cv_var_tzname=yes
12767else
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012770rm -f core conftest.err conftest.$ac_objext \
12771 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12774$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012775 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779 fi
12780fi
12781
Matthias Kloseb9621712010-04-24 17:59:49 +000012782ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012783if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
12785cat >>confdefs.h <<_ACEOF
12786#define HAVE_STRUCT_STAT_ST_RDEV 1
12787_ACEOF
12788
12789
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012790fi
12791
Matthias Kloseb9621712010-04-24 17:59:49 +000012792ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012793if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012794
Martin v. Löwis11437992002-04-12 09:54:03 +000012795cat >>confdefs.h <<_ACEOF
12796#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12797_ACEOF
12798
12799
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012800fi
12801
Matthias Kloseb9621712010-04-24 17:59:49 +000012802ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012803if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012804
12805cat >>confdefs.h <<_ACEOF
12806#define HAVE_STRUCT_STAT_ST_FLAGS 1
12807_ACEOF
12808
12809
12810fi
12811
Matthias Kloseb9621712010-04-24 17:59:49 +000012812ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012813if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012814
12815cat >>confdefs.h <<_ACEOF
12816#define HAVE_STRUCT_STAT_ST_GEN 1
12817_ACEOF
12818
12819
12820fi
12821
Matthias Kloseb9621712010-04-24 17:59:49 +000012822ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012823if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012824
12825cat >>confdefs.h <<_ACEOF
12826#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12827_ACEOF
12828
12829
12830fi
12831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012833if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835cat >>confdefs.h <<_ACEOF
12836#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12837_ACEOF
12838
12839
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012840fi
12841
Michael W. Hudson54241132001-12-07 15:38:26 +000012842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12844$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012845if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012847else
Matthias Kloseb159a552010-04-25 21:00:44 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012850/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012851#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012852int
12853main ()
12854{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012855return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012856 ;
12857 return 0;
12858}
12859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012860if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012861 ac_cv_header_time_altzone=yes
12862else
Matthias Kloseb9621712010-04-24 17:59:49 +000012863 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012867fi
12868
Matthias Kloseb9621712010-04-24 17:59:49 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12870$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012871if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012872
Matthias Kloseb9621712010-04-24 17:59:49 +000012873$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012874
12875fi
12876
Guido van Rossumda88dad1995-01-26 00:46:29 +000012877was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12879$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012882
12883#include <sys/types.h>
12884#include <sys/select.h>
12885#include <sys/time.h>
12886
Martin v. Löwis11437992002-04-12 09:54:03 +000012887int
12888main ()
12889{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012890;
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ;
12892 return 0;
12893}
12894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
12897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012900 was_it_defined=yes
12901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12905$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906
Matthias Kloseb9621712010-04-24 17:59:49 +000012907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12908$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012909if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012910 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012911else
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012913/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012914#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012915int
12916main ()
12917{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012918struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ;
12920 return 0;
12921}
12922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012924 ac_cv_struct_addrinfo=yes
12925else
Matthias Kloseb9621712010-04-24 17:59:49 +000012926 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12929fi
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12932$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012933if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012936
12937fi
12938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12940$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012941if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012943else
Matthias Kloseb9621712010-04-24 17:59:49 +000012944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012946
12947# include <sys/types.h>
12948# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012949int
12950main ()
12951{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012952struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ;
12954 return 0;
12955}
12956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012957if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012958 ac_cv_struct_sockaddr_storage=yes
12959else
Matthias Kloseb9621712010-04-24 17:59:49 +000012960 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12963fi
12964
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12966$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012967if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012970
12971fi
12972
Guido van Rossum627b2d71993-12-24 10:39:16 +000012973# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12976$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012977if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012979else
Matthias Kloseb9621712010-04-24 17:59:49 +000012980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012981/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012982$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012983int
12984main ()
12985{
12986static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012987test_array [0] = 0;
12988return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
12990 ;
12991 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012992}
Martin v. Löwis11437992002-04-12 09:54:03 +000012993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012994if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012995 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012996else
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13002$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013005
13006fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13009$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013010if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013012else
Matthias Kloseb9621712010-04-24 17:59:49 +000013013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013014/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013015
Martin v. Löwis11437992002-04-12 09:54:03 +000013016int
13017main ()
13018{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013019
Martin v. Löwis11437992002-04-12 09:54:03 +000013020#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013021 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013022 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013023 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025 char const *const *pcpcc;
13026 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 /* NEC SVR4.0.2 mips cc rejects this. */
13028 struct point {int x, y;};
13029 static struct point const zero = {0,0};
13030 /* AIX XL C 1.02.0.0 rejects this.
13031 It does not let you subtract one const X* pointer from another in
13032 an arm of an if-expression whose if-part is not a constant
13033 expression */
13034 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037 ++pcpcc;
13038 ppc = (char**) pcpcc;
13039 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013040 { /* SCO 3.2v4 cc rejects this sort of thing. */
13041 char tx;
13042 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013043 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013044
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 }
13048 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13049 int x[] = {25, 17};
13050 const int *foo = &x[0];
13051 ++foo;
13052 }
13053 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13054 typedef const int *iptr;
13055 iptr p = 0;
13056 ++p;
13057 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013058 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013060 struct s { int j; const int *ap[3]; } bx;
13061 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013062 }
13063 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13064 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013066 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013068#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013069
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ;
13071 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013072}
Martin v. Löwis11437992002-04-12 09:54:03 +000013073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075 ac_cv_c_const=yes
13076else
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13082$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013086
13087fi
13088
Michael W. Hudson54241132001-12-07 15:38:26 +000013089
Guido van Rossumda88dad1995-01-26 00:46:29 +000013090works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13092$as_echo_n "checking for working volatile... " >&6; }
13093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013094/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013095
Martin v. Löwis11437992002-04-12 09:54:03 +000013096int
13097main ()
13098{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 ;
13101 return 0;
13102}
13103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013104if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013105 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013106else
Skip Montanaro6dead952003-09-25 14:50:04 +000013107
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013109
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013110
Guido van Rossum627b2d71993-12-24 10:39:16 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13114$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013115
Guido van Rossumda88dad1995-01-26 00:46:29 +000013116works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13118$as_echo_n "checking for working signed char... " >&6; }
13119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013120/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013121
Martin v. Löwis11437992002-04-12 09:54:03 +000013122int
13123main ()
13124{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013125signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013126 ;
13127 return 0;
13128}
13129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013130if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013131 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013132else
Skip Montanaro6dead952003-09-25 14:50:04 +000013133
Matthias Kloseb9621712010-04-24 17:59:49 +000013134$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013135
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013136
Guido van Rossum7f43da71994-08-01 12:15:30 +000013137fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13140$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013141
Guido van Rossumda88dad1995-01-26 00:46:29 +000013142have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13144$as_echo_n "checking for prototypes... " >&6; }
13145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013146/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013147int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013148int
13149main ()
13150{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013151return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013152 ;
13153 return 0;
13154}
13155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013156if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Matthias Kloseb9621712010-04-24 17:59:49 +000013158$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013159
Matthias Kloseb159a552010-04-25 21:00:44 +000013160 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13164$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013165
Guido van Rossumda88dad1995-01-26 00:46:29 +000013166works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13168$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013170/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013171
13172#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013173int foo(int x, ...) {
13174 va_list va;
13175 va_start(va, x);
13176 va_arg(va, int);
13177 va_arg(va, char *);
13178 va_arg(va, double);
13179 return 0;
13180}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013181
Martin v. Löwis11437992002-04-12 09:54:03 +000013182int
13183main ()
13184{
Guido van Rossum90eea071996-08-30 20:58:57 +000013185return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013186 ;
13187 return 0;
13188}
13189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013191
13192
Matthias Kloseb9621712010-04-24 17:59:49 +000013193$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013195 works=yes
13196
Guido van Rossum627b2d71993-12-24 10:39:16 +000013197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13200$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013201
Martin v. Löwisd6320502004-08-12 13:45:08 +000013202# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13204$as_echo_n "checking for socketpair... " >&6; }
13205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013206/* end confdefs.h. */
13207
13208#include <sys/types.h>
13209#include <sys/socket.h>
13210
13211int
13212main ()
13213{
13214void *x=socketpair
13215 ;
13216 return 0;
13217}
13218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013220
Matthias Kloseb9621712010-04-24 17:59:49 +000013221$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013222
Matthias Kloseb159a552010-04-25 21:00:44 +000013223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013224$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013225else
Matthias Kloseb9621712010-04-24 17:59:49 +000013226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13227$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013228
13229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013231
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13234$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013237#include <sys/types.h>
13238#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013239int
13240main ()
13241{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242struct sockaddr x;
13243x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013244 ;
13245 return 0;
13246}
13247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013248if ac_fn_c_try_compile "$LINENO"; then :
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13250$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013251
Matthias Kloseb9621712010-04-24 17:59:49 +000013252$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013253
13254else
Matthias Kloseb9621712010-04-24 17:59:49 +000013255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13256$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013257
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260
Guido van Rossumda88dad1995-01-26 00:46:29 +000013261va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13263$as_echo_n "checking whether va_list is an array... " >&6; }
13264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013266
13267#ifdef HAVE_STDARG_PROTOTYPES
13268#include <stdarg.h>
13269#else
13270#include <varargs.h>
13271#endif
13272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ;
13278 return 0;
13279}
13280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013281if ac_fn_c_try_compile "$LINENO"; then :
13282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283else
Skip Montanaro6dead952003-09-25 14:50:04 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Guido van Rossumda88dad1995-01-26 00:46:29 +000013288 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13293$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013295# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013296
13297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013299if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13304$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013305 OLD_CFLAGS=$CFLAGS
13306 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013308/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013309
13310# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013311
Martin v. Löwis11437992002-04-12 09:54:03 +000013312int
13313main ()
13314{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013315
13316 char *name;
13317 struct hostent *he, *res;
13318 char buffer[2048];
13319 int buflen = 2048;
13320 int h_errnop;
13321
13322 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
13324 ;
13325 return 0;
13326}
13327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013331
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013334
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13336$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013338else
Skip Montanaro6dead952003-09-25 14:50:04 +000013339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13341$as_echo "no" >&6; }
13342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13343$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013345/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013346
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013347# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349int
13350main ()
13351{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013352
13353 char *name;
13354 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013355 char buffer[2048];
13356 int buflen = 2048;
13357 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013358
Matthias Kloseb159a552010-04-25 21:00:44 +000013359 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
13361 ;
13362 return 0;
13363}
13364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013368
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
Matthias Kloseb159a552010-04-25 21:00:44 +000013370$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13373$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013375else
Skip Montanaro6dead952003-09-25 14:50:04 +000013376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13378$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13380$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13381 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13382/* end confdefs.h. */
13383
13384# include <netdb.h>
13385
13386int
13387main ()
13388{
13389
13390 char *name;
13391 struct hostent *he;
13392 struct hostent_data data;
13393
13394 (void) gethostbyname_r(name, he, &data);
13395
13396 ;
13397 return 0;
13398}
13399_ACEOF
13400if ac_fn_c_try_compile "$LINENO"; then :
13401
13402 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13403
13404
13405$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13406
13407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13408$as_echo "yes" >&6; }
13409
13410else
13411
13412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13413$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013417
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013423 CFLAGS=$OLD_CFLAGS
13424
13425else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 for ac_func in gethostbyname
13428do :
13429 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013430if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013432#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013433_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013434
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013435fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013436done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013437
Michael W. Hudson54241132001-12-07 15:38:26 +000013438
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013439fi
13440
Michael W. Hudson54241132001-12-07 15:38:26 +000013441
13442
13443
13444
13445
13446
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447# checks for system services
13448# (none yet)
13449
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013451ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013452if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013453
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013454else
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13456$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013457if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013459else
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013461LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013465/* Override any GCC internal prototype to avoid an error.
13466 Use char because int might match the return type of a GCC
13467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013468#ifdef __cplusplus
13469extern "C"
13470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013471char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013472int
13473main ()
13474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 ;
13477 return 0;
13478}
13479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482else
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013485rm -f core conftest.err conftest.$ac_objext \
13486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013487LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13490$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013491if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 cat >>confdefs.h <<_ACEOF
13493#define HAVE_LIBIEEE 1
13494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013495
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013496 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497
Guido van Rossum627b2d71993-12-24 10:39:16 +000013498fi
13499
Michael W. Hudson54241132001-12-07 15:38:26 +000013500
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013501fi
13502
Michael W. Hudson54241132001-12-07 15:38:26 +000013503
Guido van Rossum7f253911997-05-09 02:42:48 +000013504# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13506$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013509if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013510 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013511if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013512then
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13517$as_echo "yes" >&6; }
13518else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13519$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013520fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13523$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524fi
13525
Guido van Rossum7f253911997-05-09 02:42:48 +000013526
Guido van Rossum7f43da71994-08-01 12:15:30 +000013527# check for --with-libm=...
13528
Guido van Rossum563e7081996-09-10 18:20:48 +000013529case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013530Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013531*) LIBM=-lm
13532esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13534$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013537if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013539if test "$withval" = no
13540then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13542$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013543elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013544then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13546$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013547else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13551$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013552fi
13553
Guido van Rossum7f43da71994-08-01 12:15:30 +000013554
13555# check for --with-libc=...
13556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13558$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013563if test "$withval" = no
13564then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13566$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013567elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013568then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13570$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013571else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013572fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013573else
Matthias Kloseb9621712010-04-24 17:59:49 +000013574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13575$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576fi
13577
Guido van Rossum7f43da71994-08-01 12:15:30 +000013578
Stefan Krah1919b7e2012-03-21 18:25:23 +010013579# **************************************
13580# * Check for gcc x64 inline assembler *
13581# **************************************
13582
13583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13584$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13586/* end confdefs.h. */
13587
13588int
13589main ()
13590{
13591
13592 __asm__ __volatile__ ("movq %rcx, %rax");
13593
13594 ;
13595 return 0;
13596}
13597_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013598if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013599 have_gcc_asm_for_x64=yes
13600else
13601 have_gcc_asm_for_x64=no
13602fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013603rm -f core conftest.err conftest.$ac_objext \
13604 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13606$as_echo "$have_gcc_asm_for_x64" >&6; }
13607if test "$have_gcc_asm_for_x64" = yes
13608then
13609
13610$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13611
13612fi
13613
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013614# **************************************************
13615# * Check for various properties of floating point *
13616# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13619$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013620if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013621 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013622else
13623
Matthias Kloseb9621712010-04-24 17:59:49 +000013624if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013625 ac_cv_little_endian_double=no
13626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013628/* end confdefs.h. */
13629
13630#include <string.h>
13631int main() {
13632 double x = 9006104071832581.0;
13633 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13634 return 0;
13635 else
13636 return 1;
13637}
13638
13639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013640if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013641 ac_cv_little_endian_double=yes
13642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13646 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013647fi
13648
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013649fi
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13652$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013653if test "$ac_cv_little_endian_double" = yes
13654then
13655
Matthias Kloseb9621712010-04-24 17:59:49 +000013656$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013657
13658fi
13659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13661$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013662if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013663 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013664else
13665
Matthias Kloseb9621712010-04-24 17:59:49 +000013666if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013667 ac_cv_big_endian_double=no
13668else
Matthias Kloseb9621712010-04-24 17:59:49 +000013669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013670/* end confdefs.h. */
13671
13672#include <string.h>
13673int main() {
13674 double x = 9006104071832581.0;
13675 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13676 return 0;
13677 else
13678 return 1;
13679}
13680
13681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013682if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013683 ac_cv_big_endian_double=yes
13684else
Matthias Kloseb9621712010-04-24 17:59:49 +000013685 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013689fi
13690
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013691fi
13692
Matthias Kloseb9621712010-04-24 17:59:49 +000013693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13694$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013695if test "$ac_cv_big_endian_double" = yes
13696then
13697
Matthias Kloseb9621712010-04-24 17:59:49 +000013698$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013699
13700fi
13701
13702# Some ARM platforms use a mixed-endian representation for doubles.
13703# While Python doesn't currently have full support for these platforms
13704# (see e.g., issue 1762561), we can at least make sure that float <-> string
13705# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13707$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013708if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013710else
13711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013713 ac_cv_mixed_endian_double=no
13714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013716/* end confdefs.h. */
13717
13718#include <string.h>
13719int main() {
13720 double x = 9006104071832581.0;
13721 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13722 return 0;
13723 else
13724 return 1;
13725}
13726
13727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013728if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013729 ac_cv_mixed_endian_double=yes
13730else
Matthias Kloseb9621712010-04-24 17:59:49 +000013731 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013735fi
13736
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013737fi
13738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13740$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013741if test "$ac_cv_mixed_endian_double" = yes
13742then
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013745
13746fi
13747
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013748# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013749# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013750# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013751# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013752# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013753# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013754
13755# This inline assembler syntax may also work for suncc and icc,
13756# so we try it on all platforms.
13757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13759$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761/* end confdefs.h. */
13762
13763int
13764main ()
13765{
13766
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013767 unsigned short cw;
13768 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13769 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013770
13771 ;
13772 return 0;
13773}
13774_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013775if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776 have_gcc_asm_for_x87=yes
13777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013780rm -f core conftest.err conftest.$ac_objext \
13781 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13783$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013784if test "$have_gcc_asm_for_x87" = yes
13785then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013789fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13792$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13794/* end confdefs.h. */
13795
13796int
13797main ()
13798{
13799
13800 unsigned int fpcr;
13801 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13802 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13803
13804 ;
13805 return 0;
13806}
13807_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013808if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013809 have_gcc_asm_for_mc68881=yes
13810else
13811 have_gcc_asm_for_mc68881=no
13812fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013813rm -f core conftest.err conftest.$ac_objext \
13814 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13816$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13817if test "$have_gcc_asm_for_mc68881" = yes
13818then
13819
13820$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13821
13822fi
13823
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013824# Detect whether system arithmetic is subject to x87-style double
13825# rounding issues. The result of this test has little meaning on non
13826# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13827# mode is round-to-nearest and double rounding issues are present, and
13828# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13830$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831# $BASECFLAGS may affect the result
13832ac_save_cc="$CC"
13833CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013834if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013835 ac_cv_x87_double_rounding=no
13836else
Matthias Kloseb9621712010-04-24 17:59:49 +000013837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013838/* end confdefs.h. */
13839
13840#include <stdlib.h>
13841#include <math.h>
13842int main() {
13843 volatile double x, y, z;
13844 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13845 x = 0.99999999999999989; /* 1-2**-53 */
13846 y = 1./x;
13847 if (y != 1.)
13848 exit(0);
13849 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13850 x = 1e16;
13851 y = 2.99999;
13852 z = x + y;
13853 if (z != 1e16+4.)
13854 exit(0);
13855 /* both tests show evidence of double rounding */
13856 exit(1);
13857}
13858
13859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013860if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013861 ac_cv_x87_double_rounding=no
13862else
Matthias Kloseb9621712010-04-24 17:59:49 +000013863 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013865rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13866 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013867fi
13868
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013869CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13871$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013872if test "$ac_cv_x87_double_rounding" = yes
13873then
13874
Matthias Kloseb9621712010-04-24 17:59:49 +000013875$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013876
13877fi
13878
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879# ************************************
13880# * Check for mathematical functions *
13881# ************************************
13882
13883LIBS_SAVE=$LIBS
13884LIBS="$LIBS $LIBM"
13885
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013886for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13887do :
13888 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13889ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013890if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013891 cat >>confdefs.h <<_ACEOF
13892#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13893_ACEOF
13894
13895fi
13896done
13897
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013898for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013899do :
13900 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13901ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013902if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013903 cat >>confdefs.h <<_ACEOF
13904#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13905_ACEOF
13906
13907fi
13908done
13909
13910ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13911"
Victor Stinnere0be4232011-10-25 13:06:09 +020013912if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013913 ac_have_decl=1
13914else
13915 ac_have_decl=0
13916fi
13917
13918cat >>confdefs.h <<_ACEOF
13919#define HAVE_DECL_ISINF $ac_have_decl
13920_ACEOF
13921ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13922"
Victor Stinnere0be4232011-10-25 13:06:09 +020013923if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013924 ac_have_decl=1
13925else
13926 ac_have_decl=0
13927fi
13928
13929cat >>confdefs.h <<_ACEOF
13930#define HAVE_DECL_ISNAN $ac_have_decl
13931_ACEOF
13932ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13933"
Victor Stinnere0be4232011-10-25 13:06:09 +020013934if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013935 ac_have_decl=1
13936else
13937 ac_have_decl=0
13938fi
13939
13940cat >>confdefs.h <<_ACEOF
13941#define HAVE_DECL_ISFINITE $ac_have_decl
13942_ACEOF
13943
13944
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013945# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13946# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13948$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013949if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013951else
13952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013954 ac_cv_tanh_preserves_zero_sign=no
13955else
Matthias Kloseb9621712010-04-24 17:59:49 +000013956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013957/* end confdefs.h. */
13958
13959#include <math.h>
13960#include <stdlib.h>
13961int main() {
13962 /* return 0 if either negative zeros don't exist
13963 on this platform or if negative zeros exist
13964 and tanh(-0.) == -0. */
13965 if (atan2(0., -1.) == atan2(-0., -1.) ||
13966 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13967 else exit(1);
13968}
13969
13970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013971if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013972 ac_cv_tanh_preserves_zero_sign=yes
13973else
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013978fi
13979
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013980fi
13981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13983$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013984if test "$ac_cv_tanh_preserves_zero_sign" = yes
13985then
13986
Matthias Kloseb9621712010-04-24 17:59:49 +000013987$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013988
13989fi
13990
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013991if test "$ac_cv_func_log1p" = yes
13992then
13993 # On some versions of AIX, log1p(-0.) returns 0. instead of
13994 # -0. See issue #9920.
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13996$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013997 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013998 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013999else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014000
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014001 if test "$cross_compiling" = yes; then :
14002 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014003else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14005/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014006
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014007 #include <math.h>
14008 #include <stdlib.h>
14009 int main() {
14010 /* Fail if the signs of log1p(-0.) and -0. can be
14011 distinguished. */
14012 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14013 return 0;
14014 else
14015 return 1;
14016 }
14017
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014018_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019if ac_fn_c_try_run "$LINENO"; then :
14020 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014021else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014022 ac_cv_log1p_drops_zero_sign=yes
14023fi
14024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014026fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014028fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014029
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14031$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14032fi
14033if test "$ac_cv_log1p_drops_zero_sign" = yes
14034then
14035
14036$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14037
14038fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014039
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014040LIBS=$LIBS_SAVE
14041
Mark Dickinsona614f042009-11-28 12:48:43 +000014042# For multiprocessing module, check that sem_open
14043# actually works. For FreeBSD versions <= 7.2,
14044# the kernel module that provides POSIX semaphores
14045# isn't loaded by default, so an attempt to call
14046# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14048$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014049if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014050 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014053 ac_cv_posix_semaphores_enabled=yes
14054else
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014056/* end confdefs.h. */
14057
14058#include <unistd.h>
14059#include <fcntl.h>
14060#include <stdio.h>
14061#include <semaphore.h>
14062#include <sys/stat.h>
14063
14064int main(void) {
14065 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14066 if (a == SEM_FAILED) {
14067 perror("sem_open");
14068 return 1;
14069 }
14070 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014071 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014072 return 0;
14073}
14074
14075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014076if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014077 ac_cv_posix_semaphores_enabled=yes
14078else
Matthias Kloseb9621712010-04-24 17:59:49 +000014079 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14082 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014083fi
14084
14085
Mark Dickinsona614f042009-11-28 12:48:43 +000014086fi
14087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14089$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014090if test $ac_cv_posix_semaphores_enabled = no
14091then
14092
Matthias Kloseb9621712010-04-24 17:59:49 +000014093$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014094
14095fi
14096
Mark Dickinson10683072009-04-18 21:18:19 +000014097# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14099$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014100if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014102else
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014104 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014105else
Matthias Kloseb9621712010-04-24 17:59:49 +000014106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014107/* end confdefs.h. */
14108
14109#include <unistd.h>
14110#include <fcntl.h>
14111#include <stdio.h>
14112#include <semaphore.h>
14113#include <sys/stat.h>
14114
14115int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014116 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014117 int count;
14118 int res;
14119 if(a==SEM_FAILED){
14120 perror("sem_open");
14121 return 1;
14122
14123 }
14124 res = sem_getvalue(a, &count);
14125 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014126 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014127 return res==-1 ? 1 : 0;
14128}
14129
Mark Dickinson10683072009-04-18 21:18:19 +000014130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014131if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014132 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014133else
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014138fi
14139
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014141fi
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14144$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014145if test $ac_cv_broken_sem_getvalue = yes
14146then
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014149
14150fi
14151
Mark Dickinsonbd792642009-03-18 20:06:12 +000014152# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14154$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014155# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014157 enableval=$enable_big_digits; case $enable_big_digits in
14158yes)
14159 enable_big_digits=30 ;;
14160no)
14161 enable_big_digits=15 ;;
1416215|30)
14163 ;;
14164*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014165 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000014166esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14168$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014169
14170cat >>confdefs.h <<_ACEOF
14171#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14172_ACEOF
14173
14174
14175else
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14177$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014178fi
14179
14180
Guido van Rossumef2255b2000-03-10 22:30:29 +000014181# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014182ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014183if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
14185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014188 wchar_h="yes"
14189
Guido van Rossumef2255b2000-03-10 22:30:29 +000014190else
Martin v. Löwis11437992002-04-12 09:54:03 +000014191 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014192
14193fi
14194
Michael W. Hudson54241132001-12-07 15:38:26 +000014195
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014197# determine wchar_t size
14198if test "$wchar_h" = yes
14199then
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014201# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14202# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14203# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14205$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014206if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14210"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212else
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 if test "$ac_cv_type_wchar_t" = yes; then
14214 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014216as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014217See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218 else
14219 ac_cv_sizeof_wchar_t=0
14220 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014222
Martin v. Löwis11437992002-04-12 09:54:03 +000014223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14225$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226
14227
14228
Martin v. Löwis11437992002-04-12 09:54:03 +000014229cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014230#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014231_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014232
Michael W. Hudson54241132001-12-07 15:38:26 +000014233
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014234fi
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14237$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014238have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014240/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014241
14242#include <tcl.h>
14243#if TCL_UTF_MAX != 6
14244# error "NOT UCS4_TCL"
14245#endif
14246int
14247main ()
14248{
14249
14250 ;
14251 return 0;
14252}
14253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014254if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014255
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014258
14259 have_ucs4_tcl=yes
14260
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014261fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14264$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014265
Skip Montanaro6dead952003-09-25 14:50:04 +000014266# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014267if test "$wchar_h" = yes
14268then
14269 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14271$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014272 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014273 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014274else
14275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014277 ac_cv_wchar_t_signed=yes
14278else
Matthias Kloseb9621712010-04-24 17:59:49 +000014279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014280/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014281
14282 #include <wchar.h>
14283 int main()
14284 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014285 /* Success: exit code 0 */
14286 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014287 }
14288
14289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014291 ac_cv_wchar_t_signed=yes
14292else
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014297fi
14298
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014299fi
14300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14302$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303fi
14304
Georg Brandl52d168a2008-01-07 18:10:24 +000014305# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014306if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014307 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014308then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014309 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014310
Matthias Kloseb9621712010-04-24 17:59:49 +000014311$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014312
Georg Brandl52d168a2008-01-07 18:10:24 +000014313else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014314 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014315fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14317$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014318
14319# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14321$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014322if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014323 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014324else
Matthias Kloseb9621712010-04-24 17:59:49 +000014325 ac_cv_c_bigendian=unknown
14326 # See if we're dealing with a universal compiler.
14327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14328/* end confdefs.h. */
14329#ifndef __APPLE_CC__
14330 not a universal capable compiler
14331 #endif
14332 typedef int dummy;
14333
Skip Montanaro6dead952003-09-25 14:50:04 +000014334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014335if ac_fn_c_try_compile "$LINENO"; then :
14336
14337 # Check for potential -arch flags. It is not universal unless
14338 # there are at least two -arch flags with different values.
14339 ac_arch=
14340 ac_prev=
14341 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14342 if test -n "$ac_prev"; then
14343 case $ac_word in
14344 i?86 | x86_64 | ppc | ppc64)
14345 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14346 ac_arch=$ac_word
14347 else
14348 ac_cv_c_bigendian=universal
14349 break
14350 fi
14351 ;;
14352 esac
14353 ac_prev=
14354 elif test "x$ac_word" = "x-arch"; then
14355 ac_prev=arch
14356 fi
14357 done
14358fi
14359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14360 if test $ac_cv_c_bigendian = unknown; then
14361 # See if sys/param.h defines the BYTE_ORDER macro.
14362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014363/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014364#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014365 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014366
Martin v. Löwis11437992002-04-12 09:54:03 +000014367int
14368main ()
14369{
Matthias Kloseb9621712010-04-24 17:59:49 +000014370#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14371 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14372 && LITTLE_ENDIAN)
14373 bogus endian macros
14374 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014375
14376 ;
14377 return 0;
14378}
14379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014380if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014381 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014383/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014384#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014385 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014386
Martin v. Löwis11437992002-04-12 09:54:03 +000014387int
14388main ()
14389{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014390#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014391 not big endian
14392 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
14394 ;
14395 return 0;
14396}
14397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014399 ac_cv_c_bigendian=yes
14400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014404fi
14405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14406 fi
14407 if test $ac_cv_c_bigendian = unknown; then
14408 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014410/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014411#include <limits.h>
14412
Martin v. Löwis11437992002-04-12 09:54:03 +000014413int
14414main ()
14415{
Matthias Kloseb9621712010-04-24 17:59:49 +000014416#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14417 bogus endian macros
14418 #endif
14419
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 ;
14421 return 0;
14422}
14423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014424if ac_fn_c_try_compile "$LINENO"; then :
14425 # It does; now see whether it defined to _BIG_ENDIAN or not.
14426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14427/* end confdefs.h. */
14428#include <limits.h>
14429
14430int
14431main ()
14432{
14433#ifndef _BIG_ENDIAN
14434 not big endian
14435 #endif
14436
14437 ;
14438 return 0;
14439}
14440_ACEOF
14441if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014443else
Matthias Kloseb9621712010-04-24 17:59:49 +000014444 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14447fi
14448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14449 fi
14450 if test $ac_cv_c_bigendian = unknown; then
14451 # Compile a test program.
14452 if test "$cross_compiling" = yes; then :
14453 # Try to guess by grepping values from an object file.
14454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14455/* end confdefs.h. */
14456short int ascii_mm[] =
14457 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14458 short int ascii_ii[] =
14459 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14460 int use_ascii (int i) {
14461 return ascii_mm[i] + ascii_ii[i];
14462 }
14463 short int ebcdic_ii[] =
14464 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14465 short int ebcdic_mm[] =
14466 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14467 int use_ebcdic (int i) {
14468 return ebcdic_mm[i] + ebcdic_ii[i];
14469 }
14470 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472int
14473main ()
14474{
14475return use_ascii (foo) == use_ebcdic (foo);
14476 ;
14477 return 0;
14478}
14479_ACEOF
14480if ac_fn_c_try_compile "$LINENO"; then :
14481 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14482 ac_cv_c_bigendian=yes
14483 fi
14484 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14485 if test "$ac_cv_c_bigendian" = unknown; then
14486 ac_cv_c_bigendian=no
14487 else
14488 # finding both strings is unlikely to happen, but who knows?
14489 ac_cv_c_bigendian=unknown
14490 fi
14491 fi
14492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014494else
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014496/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014497$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014498int
14499main ()
14500{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 /* Are we little or big endian? From Harbison&Steele. */
14503 union
14504 {
14505 long int l;
14506 char c[sizeof (long int)];
14507 } u;
14508 u.l = 1;
14509 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014510
14511 ;
14512 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014513}
Martin v. Löwis11437992002-04-12 09:54:03 +000014514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014515if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014516 ac_cv_c_bigendian=no
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014525fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14527$as_echo "$ac_cv_c_bigendian" >&6; }
14528 case $ac_cv_c_bigendian in #(
14529 yes)
14530 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14531;; #(
14532 no)
14533 ;; #(
14534 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 ;; #(
14539 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014540 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014541 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014543
Michael W. Hudson54241132001-12-07 15:38:26 +000014544
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014545# ABI version string for Python extension modules. This appears between the
14546# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14547# from the following attributes which affect the ABI of this Python build (in
14548# this order):
14549#
14550# * The Python implementation (always 'cpython-' for us)
14551# * The major and minor version numbers
14552# * --with-pydebug (adds a 'd')
14553# * --with-pymalloc (adds a 'm')
14554# * --with-wide-unicode (adds a 'u')
14555#
14556# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014557# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14558# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014559
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14561$as_echo_n "checking ABIFLAGS... " >&6; }
14562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14563$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14565$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014566SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14568$as_echo "$SOABI" >&6; }
14569
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014570
14571case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014572 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014573 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14574 *)
14575 EXT_SUFFIX=${SHLIB_SUFFIX};;
14576esac
14577
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14579$as_echo_n "checking LDVERSION... " >&6; }
14580LDVERSION='$(VERSION)$(ABIFLAGS)'
14581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14582$as_echo "$LDVERSION" >&6; }
14583
doko@python.org87421192013-01-26 11:39:31 +010014584
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014585LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014586
14587
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014588# Check whether right shifting a negative integer extends the sign bit
14589# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14591$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014592if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014594else
Martin v. Löwis11437992002-04-12 09:54:03 +000014595
Matthias Kloseb9621712010-04-24 17:59:49 +000014596if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014597 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014598else
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014600/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014601
14602int main()
14603{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014604 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014605}
14606
Martin v. Löwis11437992002-04-12 09:54:03 +000014607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014608if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014609 ac_cv_rshift_extends_sign=yes
14610else
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014615fi
14616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014617fi
14618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14620$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014621if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014622then
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014625
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014626fi
14627
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014628# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14630$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014631if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014633else
Martin v. Löwis11437992002-04-12 09:54:03 +000014634
Matthias Kloseb9621712010-04-24 17:59:49 +000014635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014636/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014637#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014638int
14639main ()
14640{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014641
14642 FILE *f = fopen("/dev/null", "r");
14643 flockfile(f);
14644 getc_unlocked(f);
14645 funlockfile(f);
14646
Martin v. Löwis11437992002-04-12 09:54:03 +000014647 ;
14648 return 0;
14649}
14650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014651if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014652 ac_cv_have_getc_unlocked=yes
14653else
Matthias Kloseb9621712010-04-24 17:59:49 +000014654 ac_cv_have_getc_unlocked=no
14655fi
14656rm -f core conftest.err conftest.$ac_objext \
14657 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14661$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014662if test "$ac_cv_have_getc_unlocked" = yes
14663then
Martin v. Löwis11437992002-04-12 09:54:03 +000014664
Matthias Kloseb9621712010-04-24 17:59:49 +000014665$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014666
14667fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014668
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014669# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014670# save the value of LIBS so we don't actually link Python with readline
14671LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014672
Gregory P. Smith18820942008-09-07 06:24:49 +000014673# On some systems we need to link readline to a termcap compatible
14674# library. NOTE: Keep the precedence of listed libraries synchronised
14675# with setup.py.
14676py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14678$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014679for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014680 if test -z "$py_libtermcap"; then
14681 READLINE_LIBS="-lreadline"
14682 else
14683 READLINE_LIBS="-lreadline -l$py_libtermcap"
14684 fi
14685 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014687/* end confdefs.h. */
14688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014689/* Override any GCC internal prototype to avoid an error.
14690 Use char because int might match the return type of a GCC
14691 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014692#ifdef __cplusplus
14693extern "C"
14694#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014695char readline ();
14696int
14697main ()
14698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014700 ;
14701 return 0;
14702}
14703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014704if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014705 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014707rm -f core conftest.err conftest.$ac_objext \
14708 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014709 if test $py_cv_lib_readline = yes; then
14710 break
14711 fi
14712done
14713# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14714#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014715if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14717$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14720$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014721
Matthias Kloseb9621712010-04-24 17:59:49 +000014722$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014723
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014724fi
14725
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014726# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14728$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014729if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014730 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014731else
14732 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014733LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014735/* end confdefs.h. */
14736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737/* Override any GCC internal prototype to avoid an error.
14738 Use char because int might match the return type of a GCC
14739 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014740#ifdef __cplusplus
14741extern "C"
14742#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014743char rl_callback_handler_install ();
14744int
14745main ()
14746{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748 ;
14749 return 0;
14750}
14751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014752if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014753 ac_cv_lib_readline_rl_callback_handler_install=yes
14754else
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014757rm -f core conftest.err conftest.$ac_objext \
14758 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014759LIBS=$ac_check_lib_save_LIBS
14760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14762$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014763if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014766
14767fi
14768
14769
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014770# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014772/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014773#include <readline/readline.h>
14774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014775if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014776 have_readline=yes
14777else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014778 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014779
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014780fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014781rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014782if test $have_readline = yes
14783then
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014785/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014786#include <readline/readline.h>
14787
14788_ACEOF
14789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014790 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014793
14794fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014795rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014796
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014798/* end confdefs.h. */
14799#include <readline/readline.h>
14800
14801_ACEOF
14802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014804
Matthias Kloseb9621712010-04-24 17:59:49 +000014805$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014806
14807fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014808rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014809
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014810fi
14811
Martin v. Löwis0daad592001-09-30 21:09:59 +000014812# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14814$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014815if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014817else
Martin v. Löwis11437992002-04-12 09:54:03 +000014818 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014819LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014823/* Override any GCC internal prototype to avoid an error.
14824 Use char because int might match the return type of a GCC
14825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014826#ifdef __cplusplus
14827extern "C"
14828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014829char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014830int
14831main ()
14832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014833return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 ;
14835 return 0;
14836}
14837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014838if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014842fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014843rm -f core conftest.err conftest.$ac_objext \
14844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014845LIBS=$ac_check_lib_save_LIBS
14846fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14848$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014849if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014850
Matthias Kloseb9621712010-04-24 17:59:49 +000014851$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014852
Martin v. Löwis0daad592001-09-30 21:09:59 +000014853fi
14854
Michael W. Hudson54241132001-12-07 15:38:26 +000014855
Thomas Wouters89d996e2007-09-08 17:39:28 +000014856# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14858$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014859if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014861else
14862 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014863LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014865/* end confdefs.h. */
14866
14867/* Override any GCC internal prototype to avoid an error.
14868 Use char because int might match the return type of a GCC
14869 builtin and then its argument prototype would still apply. */
14870#ifdef __cplusplus
14871extern "C"
14872#endif
14873char rl_completion_display_matches_hook ();
14874int
14875main ()
14876{
14877return rl_completion_display_matches_hook ();
14878 ;
14879 return 0;
14880}
14881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014882if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014883 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014887rm -f core conftest.err conftest.$ac_objext \
14888 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014889LIBS=$ac_check_lib_save_LIBS
14890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14892$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014893if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014894
Matthias Kloseb9621712010-04-24 17:59:49 +000014895$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014896
14897fi
14898
14899
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014900# also in 4.0, but not in editline
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14902$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14903if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14904 $as_echo_n "(cached) " >&6
14905else
14906 ac_check_lib_save_LIBS=$LIBS
14907LIBS="-lreadline $READLINE_LIBS $LIBS"
14908cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14909/* end confdefs.h. */
14910
14911/* Override any GCC internal prototype to avoid an error.
14912 Use char because int might match the return type of a GCC
14913 builtin and then its argument prototype would still apply. */
14914#ifdef __cplusplus
14915extern "C"
14916#endif
14917char rl_resize_terminal ();
14918int
14919main ()
14920{
14921return rl_resize_terminal ();
14922 ;
14923 return 0;
14924}
14925_ACEOF
14926if ac_fn_c_try_link "$LINENO"; then :
14927 ac_cv_lib_readline_rl_resize_terminal=yes
14928else
14929 ac_cv_lib_readline_rl_resize_terminal=no
14930fi
14931rm -f core conftest.err conftest.$ac_objext \
14932 conftest$ac_exeext conftest.$ac_ext
14933LIBS=$ac_check_lib_save_LIBS
14934fi
14935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14936$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14937if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14938
14939$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14940
14941fi
14942
14943
Martin v. Löwis0daad592001-09-30 21:09:59 +000014944# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14946$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014947if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014949else
Martin v. Löwis11437992002-04-12 09:54:03 +000014950 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014951LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014955/* Override any GCC internal prototype to avoid an error.
14956 Use char because int might match the return type of a GCC
14957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014958#ifdef __cplusplus
14959extern "C"
14960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014961char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014962int
14963main ()
14964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ;
14967 return 0;
14968}
14969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014970if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014972else
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014975rm -f core conftest.err conftest.$ac_objext \
14976 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014977LIBS=$ac_check_lib_save_LIBS
14978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14980$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014981if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014982
Matthias Kloseb9621712010-04-24 17:59:49 +000014983$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014984
Guido van Rossum353ae582001-07-10 16:45:32 +000014985fi
14986
Jack Jansendd19cf82001-12-06 22:36:17 +000014987
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014990/* end confdefs.h. */
14991#include <readline/readline.h>
14992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014993if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014994 have_readline=yes
14995else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014996 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014997
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014998fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014999rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015000if test $have_readline = yes
15001then
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015003/* end confdefs.h. */
15004#include <readline/readline.h>
15005
15006_ACEOF
15007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015008 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015009
Matthias Kloseb9621712010-04-24 17:59:49 +000015010$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015011
15012fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015013rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015014
15015fi
15016
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15018$as_echo_n "checking for append_history in -lreadline... " >&6; }
15019if ${ac_cv_lib_readline_append_history+:} false; then :
15020 $as_echo_n "(cached) " >&6
15021else
15022 ac_check_lib_save_LIBS=$LIBS
15023LIBS="-lreadline $READLINE_LIBS $LIBS"
15024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15025/* end confdefs.h. */
15026
15027/* Override any GCC internal prototype to avoid an error.
15028 Use char because int might match the return type of a GCC
15029 builtin and then its argument prototype would still apply. */
15030#ifdef __cplusplus
15031extern "C"
15032#endif
15033char append_history ();
15034int
15035main ()
15036{
15037return append_history ();
15038 ;
15039 return 0;
15040}
15041_ACEOF
15042if ac_fn_c_try_link "$LINENO"; then :
15043 ac_cv_lib_readline_append_history=yes
15044else
15045 ac_cv_lib_readline_append_history=no
15046fi
15047rm -f core conftest.err conftest.$ac_objext \
15048 conftest$ac_exeext conftest.$ac_ext
15049LIBS=$ac_check_lib_save_LIBS
15050fi
15051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15052$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15053if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15054
15055$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15056
15057fi
15058
15059
Martin v. Löwis82bca632006-02-10 20:49:30 +000015060# End of readline checks: restore LIBS
15061LIBS=$LIBS_no_readline
15062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15064$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015065if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015066 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015067else
Martin v. Löwis11437992002-04-12 09:54:03 +000015068
Matthias Kloseb9621712010-04-24 17:59:49 +000015069if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015070 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015071else
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015073/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015074
15075int main()
15076{
15077 int val1 = nice(1);
15078 if (val1 != -1 && val1 == nice(2))
15079 exit(0);
15080 exit(1);
15081}
15082
Martin v. Löwis11437992002-04-12 09:54:03 +000015083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015084if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015085 ac_cv_broken_nice=yes
15086else
Matthias Kloseb9621712010-04-24 17:59:49 +000015087 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15090 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015091fi
15092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093fi
15094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15096$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015097if test "$ac_cv_broken_nice" = yes
15098then
Martin v. Löwis11437992002-04-12 09:54:03 +000015099
Matthias Kloseb9621712010-04-24 17:59:49 +000015100$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015101
15102fi
15103
Matthias Kloseb9621712010-04-24 17:59:49 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15105$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015106if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015107 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015108else
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015110 ac_cv_broken_poll=no
15111else
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015113/* end confdefs.h. */
15114
15115#include <poll.h>
15116
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015117int main()
15118{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015119 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015120 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015121
15122 close (42);
15123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015124 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015125 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015126 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015127 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015128 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015129 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015130 return 1;
15131}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015132
15133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015134if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015135 ac_cv_broken_poll=yes
15136else
Matthias Kloseb9621712010-04-24 17:59:49 +000015137 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15140 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015143fi
15144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15146$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015147if test "$ac_cv_broken_poll" = yes
15148then
15149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015151
15152fi
15153
Brett Cannon43802422005-02-10 20:48:03 +000015154# 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 +000015155# (which is not required by ISO C or UNIX spec) and/or if we support
15156# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015157ac_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 +000015158#include <$ac_cv_struct_tm>
15159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160"
Victor Stinnere0be4232011-10-25 13:06:09 +020015161if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015162
15163cat >>confdefs.h <<_ACEOF
15164#define HAVE_STRUCT_TM_TM_ZONE 1
15165_ACEOF
15166
15167
15168fi
15169
15170if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015173
15174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15176"
Victor Stinnere0be4232011-10-25 13:06:09 +020015177if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181fi
15182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015184#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185_ACEOF
15186
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15188$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015189if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015190 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191else
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015193/* end confdefs.h. */
15194#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015195#if !HAVE_DECL_TZNAME
15196extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015197#endif
15198
15199int
15200main ()
15201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015203 ;
15204 return 0;
15205}
15206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015207if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015208 ac_cv_var_tzname=yes
15209else
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015212rm -f core conftest.err conftest.$ac_objext \
15213 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15216$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015217 if test $ac_cv_var_tzname = yes; then
15218
Matthias Kloseb9621712010-04-24 17:59:49 +000015219$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015220
15221 fi
15222fi
15223
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015224
Martin v. Löwis1d459062005-03-14 21:23:33 +000015225# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15227$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015228if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015230else
15231
Matthias Kloseb9621712010-04-24 17:59:49 +000015232if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015233 ac_cv_working_tzset=no
15234else
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015236/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015237
15238#include <stdlib.h>
15239#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015240#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015241
15242#if HAVE_TZNAME
15243extern char *tzname[];
15244#endif
15245
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015246int main()
15247{
Brett Cannon18367812003-09-19 00:59:16 +000015248 /* Note that we need to ensure that not only does tzset(3)
15249 do 'something' with localtime, but it works as documented
15250 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015251 This includes making sure that tzname is set properly if
15252 tm->tm_zone does not exist since it is the alternative way
15253 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015254
15255 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015256 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015257 */
15258
Martin v. Löwis1d459062005-03-14 21:23:33 +000015259 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015260 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15261
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015262 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015263 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015264 if (localtime(&groundhogday)->tm_hour != 0)
15265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015266#if HAVE_TZNAME
15267 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15268 if (strcmp(tzname[0], "UTC") ||
15269 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15270 exit(1);
15271#endif
Brett Cannon18367812003-09-19 00:59:16 +000015272
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015273 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015274 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015275 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015276 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015277#if HAVE_TZNAME
15278 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15279 exit(1);
15280#endif
Brett Cannon18367812003-09-19 00:59:16 +000015281
15282 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15283 tzset();
15284 if (localtime(&groundhogday)->tm_hour != 11)
15285 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015286#if HAVE_TZNAME
15287 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15288 exit(1);
15289#endif
15290
15291#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015292 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15293 exit(1);
15294 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15295 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015296#endif
Brett Cannon18367812003-09-19 00:59:16 +000015297
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015298 exit(0);
15299}
15300
15301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015302if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015303 ac_cv_working_tzset=yes
15304else
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015307rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15308 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015309fi
15310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015311fi
15312
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15314$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015315if test "$ac_cv_working_tzset" = yes
15316then
15317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015319
15320fi
15321
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015322# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15324$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015325if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015326 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015327else
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015329/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015330#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015331int
15332main ()
15333{
15334
15335struct stat st;
15336st.st_mtim.tv_nsec = 1;
15337
15338 ;
15339 return 0;
15340}
15341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015342if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015343 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015344else
Matthias Kloseb9621712010-04-24 17:59:49 +000015345 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15348fi
15349
Matthias Kloseb9621712010-04-24 17:59:49 +000015350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15351$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015352if test "$ac_cv_stat_tv_nsec" = yes
15353then
15354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015356
15357fi
15358
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015359# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15361$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015366/* end confdefs.h. */
15367#include <sys/stat.h>
15368int
15369main ()
15370{
15371
15372struct stat st;
15373st.st_mtimespec.tv_nsec = 1;
15374
15375 ;
15376 return 0;
15377}
15378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015380 ac_cv_stat_tv_nsec2=yes
15381else
Matthias Kloseb9621712010-04-24 17:59:49 +000015382 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15385fi
15386
Matthias Kloseb9621712010-04-24 17:59:49 +000015387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15388$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015389if test "$ac_cv_stat_tv_nsec2" = yes
15390then
15391
Matthias Kloseb9621712010-04-24 17:59:49 +000015392$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015393
15394fi
15395
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015396# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015397ac_save_cppflags="$CPPFLAGS"
15398CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015399
15400for ac_header in curses.h ncurses.h
15401do :
15402 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15403ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15404if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15405 cat >>confdefs.h <<_ACEOF
15406#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15407_ACEOF
15408
15409fi
15410
15411done
15412
15413
15414# On Solaris, term.h requires curses.h
15415for ac_header in term.h
15416do :
15417 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15418#ifdef HAVE_CURSES_H
15419#include <curses.h>
15420#endif
15421
15422"
15423if test "x$ac_cv_header_term_h" = xyes; then :
15424 cat >>confdefs.h <<_ACEOF
15425#define HAVE_TERM_H 1
15426_ACEOF
15427
15428fi
15429
15430done
15431
15432
Jack Jansen666b1e72001-10-31 12:11:48 +000015433# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15435$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015436if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015437 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015438else
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015440/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015441#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015442int
15443main ()
15444{
Jack Jansen666b1e72001-10-31 12:11:48 +000015445
15446 int rtn;
15447 rtn = mvwdelch(0,0,0);
15448
Martin v. Löwis11437992002-04-12 09:54:03 +000015449 ;
15450 return 0;
15451}
15452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015453if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015454 ac_cv_mvwdelch_is_expression=yes
15455else
Matthias Kloseb9621712010-04-24 17:59:49 +000015456 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15459fi
15460
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15462$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015463
15464if test "$ac_cv_mvwdelch_is_expression" = yes
15465then
Martin v. Löwis11437992002-04-12 09:54:03 +000015466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015468
15469fi
15470
Matthias Kloseb9621712010-04-24 17:59:49 +000015471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15472$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015473if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015474 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015475else
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015477/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015478#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015479int
15480main ()
15481{
Jack Jansen666b1e72001-10-31 12:11:48 +000015482
15483 WINDOW *w;
15484 w->_flags = 0;
15485
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ;
15487 return 0;
15488}
15489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015490if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015491 ac_cv_window_has_flags=yes
15492else
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15496fi
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15499$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015500
Jack Jansen666b1e72001-10-31 12:11:48 +000015501
15502if test "$ac_cv_window_has_flags" = yes
15503then
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Matthias Kloseb9621712010-04-24 17:59:49 +000015505$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015506
15507fi
15508
Matthias Kloseb9621712010-04-24 17:59:49 +000015509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15510$as_echo_n "checking for is_term_resized... " >&6; }
15511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015512/* end confdefs.h. */
15513#include <curses.h>
15514int
15515main ()
15516{
15517void *x=is_term_resized
15518 ;
15519 return 0;
15520}
15521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015525
Matthias Kloseb159a552010-04-25 21:00:44 +000015526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015527$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015528else
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15530$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015531
15532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15536$as_echo_n "checking for resize_term... " >&6; }
15537cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015538/* end confdefs.h. */
15539#include <curses.h>
15540int
15541main ()
15542{
15543void *x=resize_term
15544 ;
15545 return 0;
15546}
15547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015548if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015551
Matthias Kloseb159a552010-04-25 21:00:44 +000015552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015553$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015554else
Matthias Kloseb9621712010-04-24 17:59:49 +000015555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15556$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015557
15558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15560
Matthias Kloseb9621712010-04-24 17:59:49 +000015561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15562$as_echo_n "checking for resizeterm... " >&6; }
15563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015564/* end confdefs.h. */
15565#include <curses.h>
15566int
15567main ()
15568{
15569void *x=resizeterm
15570 ;
15571 return 0;
15572}
15573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015574if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015577
Matthias Kloseb159a552010-04-25 21:00:44 +000015578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015579$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015580else
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15582$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015583
15584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015586# last curses configure check
15587CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15590$as_echo "$as_me: checking for device files" >&6;}
15591
15592if test "x$cross_compiling" = xyes; then
15593 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15595$as_echo_n "checking for /dev/ptmx... " >&6; }
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15597$as_echo "not set" >&6; }
15598 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15599 fi
15600 if test "${ac_cv_file__dev_ptc+set}" != set; then
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15602$as_echo_n "checking for /dev/ptc... " >&6; }
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15604$as_echo "not set" >&6; }
15605 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15606 fi
15607fi
15608
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15610$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015611if ${ac_cv_file__dev_ptmx+:} false; then :
15612 $as_echo_n "(cached) " >&6
15613else
15614 test "$cross_compiling" = yes &&
15615 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15616if test -r "/dev/ptmx"; then
15617 ac_cv_file__dev_ptmx=yes
15618else
15619 ac_cv_file__dev_ptmx=no
15620fi
15621fi
15622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15623$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15624if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015625
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015626fi
15627
15628if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015629
Matthias Kloseb9621712010-04-24 17:59:49 +000015630$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015631
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15634$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015635if ${ac_cv_file__dev_ptc+:} false; then :
15636 $as_echo_n "(cached) " >&6
15637else
15638 test "$cross_compiling" = yes &&
15639 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15640if test -r "/dev/ptc"; then
15641 ac_cv_file__dev_ptc=yes
15642else
15643 ac_cv_file__dev_ptc=no
15644fi
15645fi
15646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15647$as_echo "$ac_cv_file__dev_ptc" >&6; }
15648if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015649
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015650fi
15651
15652if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015655
Neal Norwitz865400f2003-03-21 01:42:58 +000015656fi
15657
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015658if test "$have_long_long" = yes
15659then
Matthias Kloseb9621712010-04-24 17:59:49 +000015660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15661$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015662 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015663 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015664else
Matthias Kloseb9621712010-04-24 17:59:49 +000015665 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015666 ac_cv_have_long_long_format="cross -- assuming no"
15667 if test x$GCC = xyes; then
15668 save_CFLAGS=$CFLAGS
15669 CFLAGS="$CFLAGS -Werror -Wformat"
15670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15671/* end confdefs.h. */
15672
15673 #include <stdio.h>
15674 #include <stddef.h>
15675
15676int
15677main ()
15678{
15679
15680 char *buffer;
15681 sprintf(buffer, "%lld", (long long)123);
15682 sprintf(buffer, "%lld", (long long)-123);
15683 sprintf(buffer, "%llu", (unsigned long long)123);
15684
15685 ;
15686 return 0;
15687}
15688_ACEOF
15689if ac_fn_c_try_compile "$LINENO"; then :
15690 ac_cv_have_long_long_format=yes
15691
15692fi
15693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15694 CFLAGS=$save_CFLAGS
15695 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015696else
Matthias Kloseb9621712010-04-24 17:59:49 +000015697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015698/* end confdefs.h. */
15699
15700 #include <stdio.h>
15701 #include <stddef.h>
15702 #include <string.h>
15703
15704 #ifdef HAVE_SYS_TYPES_H
15705 #include <sys/types.h>
15706 #endif
15707
15708 int main()
15709 {
15710 char buffer[256];
15711
15712 if (sprintf(buffer, "%lld", (long long)123) < 0)
15713 return 1;
15714 if (strcmp(buffer, "123"))
15715 return 1;
15716
15717 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15718 return 1;
15719 if (strcmp(buffer, "-123"))
15720 return 1;
15721
15722 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15723 return 1;
15724 if (strcmp(buffer, "123"))
15725 return 1;
15726
15727 return 0;
15728 }
15729
15730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015731if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015732 ac_cv_have_long_long_format=yes
15733else
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015735fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15737 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015738fi
15739
15740
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015741fi
15742
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15744$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015745fi
15746
Mark Dickinson89d7d412009-12-31 20:50:59 +000015747if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015748then
15749
Matthias Kloseb9621712010-04-24 17:59:49 +000015750$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015751
15752fi
15753
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015754if test $ac_sys_system = Darwin
15755then
15756 LIBS="$LIBS -framework CoreFoundation"
15757fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015758
Matthias Kloseb9621712010-04-24 17:59:49 +000015759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15760$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015761if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015762 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015763else
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015765 ac_cv_have_size_t_format="cross -- assuming yes"
15766
Thomas Wouters477c8d52006-05-27 19:21:47 +000015767else
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015769/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015770
Thomas Wouters477c8d52006-05-27 19:21:47 +000015771#include <stdio.h>
15772#include <stddef.h>
15773#include <string.h>
15774
Christian Heimes2c181612007-12-17 20:04:13 +000015775#ifdef HAVE_SYS_TYPES_H
15776#include <sys/types.h>
15777#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015778
15779#ifdef HAVE_SSIZE_T
15780typedef ssize_t Py_ssize_t;
15781#elif SIZEOF_VOID_P == SIZEOF_LONG
15782typedef long Py_ssize_t;
15783#else
15784typedef int Py_ssize_t;
15785#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015786
Christian Heimes2c181612007-12-17 20:04:13 +000015787int main()
15788{
15789 char buffer[256];
15790
Thomas Wouters477c8d52006-05-27 19:21:47 +000015791 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15792 return 1;
15793
Thomas Wouters89f507f2006-12-13 04:49:30 +000015794 if (strcmp(buffer, "123"))
15795 return 1;
15796
15797 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15798 return 1;
15799
15800 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015801 return 1;
15802
15803 return 0;
15804}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015805
Thomas Wouters477c8d52006-05-27 19:21:47 +000015806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015807if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015808 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015809else
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015814fi
15815
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15818$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015819if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015822
15823fi
15824
Matthias Kloseb9621712010-04-24 17:59:49 +000015825ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015826#ifdef HAVE_SYS_TYPES_H
15827#include <sys/types.h>
15828#endif
15829#ifdef HAVE_SYS_SOCKET_H
15830#include <sys/socket.h>
15831#endif
15832
Matthias Kloseb9621712010-04-24 17:59:49 +000015833"
Victor Stinnere0be4232011-10-25 13:06:09 +020015834if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015835
Martin v. Löwis11437992002-04-12 09:54:03 +000015836else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015837
Matthias Kloseb9621712010-04-24 17:59:49 +000015838$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015839
15840fi
15841
Michael W. Hudson54241132001-12-07 15:38:26 +000015842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15844$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015845if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015847else
Matthias Kloseb9621712010-04-24 17:59:49 +000015848 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015849 ac_cv_broken_mbstowcs=no
15850else
Matthias Kloseb9621712010-04-24 17:59:49 +000015851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015852/* end confdefs.h. */
15853
Stefan Krah19c21392012-11-22 23:47:32 +010015854#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015855#include<stdlib.h>
15856int main() {
15857 size_t len = -1;
15858 const char *str = "text";
15859 len = mbstowcs(NULL, str, 0);
15860 return (len != 4);
15861}
15862
15863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015864if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015865 ac_cv_broken_mbstowcs=no
15866else
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15870 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015871fi
15872
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015873fi
15874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15876$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015877if test "$ac_cv_broken_mbstowcs" = yes
15878then
15879
Matthias Kloseb9621712010-04-24 17:59:49 +000015880$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015881
15882fi
15883
Antoine Pitroub52ec782009-01-25 16:34:23 +000015884# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15886$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015887
15888# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015889if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015890 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015891if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015892then
15893
Matthias Kloseb9621712010-04-24 17:59:49 +000015894$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15897$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015898fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015899if test "$withval" = no
15900then
15901
15902$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15903
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15905$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015906fi
15907
Antoine Pitrou042b1282010-08-13 21:15:58 +000015908else
15909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15910$as_echo "no value specified" >&6; }
15911fi
15912
Antoine Pitroub52ec782009-01-25 16:34:23 +000015913
Matthias Kloseb17289e2012-03-15 19:51:34 +010015914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15915$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15916if ${ac_cv_computed_gotos+:} false; then :
15917 $as_echo_n "(cached) " >&6
15918else
15919 if test "$cross_compiling" = yes; then :
15920 if test "${with_computed_gotos+set}" = set; then
15921 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15922 else
15923 ac_cv_computed_gotos=no
15924 fi
15925else
15926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15927/* end confdefs.h. */
15928
15929int main(int argc, char **argv)
15930{
15931 static void *targets[1] = { &&LABEL1 };
15932 goto LABEL2;
15933LABEL1:
15934 return 0;
15935LABEL2:
15936 goto *targets[0];
15937 return 1;
15938}
15939
15940_ACEOF
15941if ac_fn_c_try_run "$LINENO"; then :
15942 ac_cv_computed_gotos=yes
15943else
15944 ac_cv_computed_gotos=no
15945fi
15946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15947 conftest.$ac_objext conftest.beam conftest.$ac_ext
15948fi
15949
15950fi
15951
15952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15953$as_echo "$ac_cv_computed_gotos" >&6; }
15954case "$ac_cv_computed_gotos" in yes*)
15955
15956$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15957
15958esac
15959
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015960case $ac_sys_system in
15961AIX*)
15962
15963$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15964 ;;
15965esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015966
Michael W. Hudson54241132001-12-07 15:38:26 +000015967
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015968
15969
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015970for h in `(cd $srcdir;echo Python/thread_*.h)`
15971do
15972 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15973done
15974
Michael W. Hudson54241132001-12-07 15:38:26 +000015975
Ned Deily0db50cf2014-07-25 12:41:31 -070015976SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15978$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015979for dir in $SRCDIRS; do
15980 if test ! -d $dir; then
15981 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015982 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015983done
Matthias Kloseb9621712010-04-24 17:59:49 +000015984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15985$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015986
Stefan Krah1919b7e2012-03-21 18:25:23 +010015987# Availability of -O2:
15988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15989$as_echo_n "checking for -O2... " >&6; }
15990saved_cflags="$CFLAGS"
15991CFLAGS="-O2"
15992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15993/* end confdefs.h. */
15994
15995int
15996main ()
15997{
15998
15999
16000 ;
16001 return 0;
16002}
16003_ACEOF
16004if ac_fn_c_try_compile "$LINENO"; then :
16005 have_O2=yes
16006else
16007 have_O2=no
16008fi
16009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16011$as_echo "$have_O2" >&6; }
16012CFLAGS="$saved_cflags"
16013
16014# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16015# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16017$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16018saved_cflags="$CFLAGS"
16019CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16020if test "$have_O2" = no; then
16021 CFLAGS=""
16022fi
16023if test "$cross_compiling" = yes; then :
16024 have_glibc_memmove_bug=undefined
16025else
16026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16027/* end confdefs.h. */
16028
16029#include <stdio.h>
16030#include <stdlib.h>
16031#include <string.h>
16032void foo(void *p, void *q) { memmove(p, q, 19); }
16033int main() {
16034 char a[32] = "123456789000000000";
16035 foo(&a[9], a);
16036 if (strcmp(a, "123456789123456789000000000") != 0)
16037 return 1;
16038 foo(a, &a[9]);
16039 if (strcmp(a, "123456789000000000") != 0)
16040 return 1;
16041 return 0;
16042}
16043
16044_ACEOF
16045if ac_fn_c_try_run "$LINENO"; then :
16046 have_glibc_memmove_bug=no
16047else
16048 have_glibc_memmove_bug=yes
16049fi
16050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16051 conftest.$ac_objext conftest.beam conftest.$ac_ext
16052fi
16053
16054CFLAGS="$saved_cflags"
16055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16056$as_echo "$have_glibc_memmove_bug" >&6; }
16057if test "$have_glibc_memmove_bug" = yes; then
16058
16059$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16060
16061fi
16062
16063if test "$have_gcc_asm_for_x87" = yes; then
16064 # Some versions of gcc miscompile inline asm:
16065 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16066 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16067 case $CC in
16068 *gcc*)
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16070$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16071 saved_cflags="$CFLAGS"
16072 CFLAGS="-O2"
16073 if test "$cross_compiling" = yes; then :
16074 have_ipa_pure_const_bug=undefined
16075else
16076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16077/* end confdefs.h. */
16078
16079 __attribute__((noinline)) int
16080 foo(int *p) {
16081 int r;
16082 asm ( "movl \$6, (%1)\n\t"
16083 "xorl %0, %0\n\t"
16084 : "=r" (r) : "r" (p) : "memory"
16085 );
16086 return r;
16087 }
16088 int main() {
16089 int p = 8;
16090 if ((foo(&p) ? : p) != 6)
16091 return 1;
16092 return 0;
16093 }
16094
16095_ACEOF
16096if ac_fn_c_try_run "$LINENO"; then :
16097 have_ipa_pure_const_bug=no
16098else
16099 have_ipa_pure_const_bug=yes
16100fi
16101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16102 conftest.$ac_objext conftest.beam conftest.$ac_ext
16103fi
16104
16105 CFLAGS="$saved_cflags"
16106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16107$as_echo "$have_ipa_pure_const_bug" >&6; }
16108 if test "$have_ipa_pure_const_bug" = yes; then
16109
16110$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16111
16112 fi
16113 ;;
16114 esac
16115fi
16116
Victor Stinner4f5366e2015-01-09 02:13:19 +010016117# Check for stdatomic.h
16118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16119$as_echo_n "checking for stdatomic.h... " >&6; }
16120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16121/* end confdefs.h. */
16122
16123
16124 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016125 atomic_int value = ATOMIC_VAR_INIT(1);
16126 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016127 int main() {
16128 int loaded_value = atomic_load(&value);
16129 return 0;
16130 }
16131
16132
16133_ACEOF
16134if ac_fn_c_try_link "$LINENO"; then :
16135 have_stdatomic_h=yes
16136else
16137 have_stdatomic_h=no
16138fi
16139rm -f core conftest.err conftest.$ac_objext \
16140 conftest$ac_exeext conftest.$ac_ext
16141
16142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16143$as_echo "$have_stdatomic_h" >&6; }
16144
16145if test "$have_stdatomic_h" = yes; then
16146
16147$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16148
16149fi
16150
16151# Check for GCC >= 4.7 __atomic builtins
16152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16153$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16155/* end confdefs.h. */
16156
16157
16158 volatile int val = 1;
16159 int main() {
16160 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16161 return 0;
16162 }
16163
16164
16165_ACEOF
16166if ac_fn_c_try_link "$LINENO"; then :
16167 have_builtin_atomic=yes
16168else
16169 have_builtin_atomic=no
16170fi
16171rm -f core conftest.err conftest.$ac_objext \
16172 conftest$ac_exeext conftest.$ac_ext
16173
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16175$as_echo "$have_builtin_atomic" >&6; }
16176
16177if test "$have_builtin_atomic" = yes; then
16178
16179$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16180
16181fi
16182
Ned Deily322f5ba2013-11-21 23:01:59 -080016183# ensurepip option
16184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16185$as_echo_n "checking for ensurepip... " >&6; }
16186
16187# Check whether --with-ensurepip was given.
16188if test "${with_ensurepip+set}" = set; then :
16189 withval=$with_ensurepip;
16190else
16191 with_ensurepip=upgrade
16192fi
16193
16194case $with_ensurepip in #(
16195 yes|upgrade) :
16196 ENSUREPIP=upgrade ;; #(
16197 install) :
16198 ENSUREPIP=install ;; #(
16199 no) :
16200 ENSUREPIP=no ;; #(
16201 *) :
16202 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16203esac
16204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16205$as_echo "$ENSUREPIP" >&6; }
16206
16207
Victor Stinner35a97c02015-03-08 02:59:09 +010016208# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16210$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212/* end confdefs.h. */
16213
16214
16215 #include <dirent.h>
16216
16217 int main() {
16218 struct dirent entry;
16219 return entry.d_type == DT_UNKNOWN;
16220 }
16221
16222
16223_ACEOF
16224if ac_fn_c_try_link "$LINENO"; then :
16225 have_dirent_d_type=yes
16226else
16227 have_dirent_d_type=no
16228fi
16229rm -f core conftest.err conftest.$ac_objext \
16230 conftest$ac_exeext conftest.$ac_ext
16231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16232$as_echo "$have_dirent_d_type" >&6; }
16233
16234if test "$have_dirent_d_type" = yes; then
16235
16236$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16237
16238fi
16239
Victor Stinner9eb57c52015-03-19 22:21:49 +010016240# check if the Linux getrandom() syscall is available
16241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16242$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16244/* end confdefs.h. */
16245
16246
Victor Stinner1b80b242016-04-12 22:34:58 +020016247 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016248 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016249 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016250
16251 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016252 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016253 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016254 const int flags = GRND_NONBLOCK;
16255 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016256 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016257 return 0;
16258 }
16259
16260
16261_ACEOF
16262if ac_fn_c_try_link "$LINENO"; then :
16263 have_getrandom_syscall=yes
16264else
16265 have_getrandom_syscall=no
16266fi
16267rm -f core conftest.err conftest.$ac_objext \
16268 conftest$ac_exeext conftest.$ac_ext
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16270$as_echo "$have_getrandom_syscall" >&6; }
16271
16272if test "$have_getrandom_syscall" = yes; then
16273
16274$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16275
16276fi
16277
Victor Stinnerbae2d622015-10-01 09:47:30 +020016278# check if the getrandom() function is available
16279# the test was written for the Solaris function of <sys/random.h>
16280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16281$as_echo_n "checking for the getrandom() function... " >&6; }
16282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283/* end confdefs.h. */
16284
16285
16286 #include <sys/random.h>
16287
16288 int main() {
16289 char buffer[1];
16290 const size_t buflen = sizeof(buffer);
16291 const int flags = 0;
16292 /* ignore the result, Python checks for ENOSYS at runtime */
16293 (void)getrandom(buffer, buflen, flags);
16294 return 0;
16295 }
16296
16297
16298_ACEOF
16299if ac_fn_c_try_link "$LINENO"; then :
16300 have_getrandom=yes
16301else
16302 have_getrandom=no
16303fi
16304rm -f core conftest.err conftest.$ac_objext \
16305 conftest$ac_exeext conftest.$ac_ext
16306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16307$as_echo "$have_getrandom" >&6; }
16308
16309if test "$have_getrandom" = yes; then
16310
16311$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16312
16313fi
16314
Guido van Rossum627b2d71993-12-24 10:39:16 +000016315# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016316ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016317
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016318ac_config_files="$ac_config_files Modules/ld_so_aix"
16319
Martin v. Löwis11437992002-04-12 09:54:03 +000016320cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016321# This file is a shell script that caches the results of configure
16322# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016323# scripts and configure runs, see configure's option --config-cache.
16324# It is not useful on other systems. If it contains results you don't
16325# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016326#
Martin v. Löwis11437992002-04-12 09:54:03 +000016327# config.status only pays attention to the cache file if you give it
16328# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016329#
Skip Montanaro6dead952003-09-25 14:50:04 +000016330# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016331# loading this file, other *unset* `ac_cv_foo' will be assigned the
16332# following values.
16333
16334_ACEOF
16335
Guido van Rossumf78abae1997-01-21 22:02:36 +000016336# The following way of writing the cache mishandles newlines in values,
16337# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016339# Ultrix sh set writes to stderr and can't be redirected directly,
16340# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016341(
16342 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16343 eval ac_val=\$$ac_var
16344 case $ac_val in #(
16345 *${as_nl}*)
16346 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016347 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16348$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349 esac
16350 case $ac_var in #(
16351 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016352 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16353 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354 esac ;;
16355 esac
16356 done
16357
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16360 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016361 # `set' does not quote correctly, so add quotes: double-quote
16362 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016364 "s/'/'\\\\''/g;
16365 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 *)
16368 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016370 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371 esac |
16372 sort
16373) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016377 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016378 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16379 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016380 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16381 :end' >>confcache
16382if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16383 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016384 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16386$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016387 if test ! -f "$cache_file" || test -h "$cache_file"; then
16388 cat confcache >"$cache_file"
16389 else
16390 case $cache_file in #(
16391 */* | ?:*)
16392 mv -f confcache "$cache_file"$$ &&
16393 mv -f "$cache_file"$$ "$cache_file" ;; #(
16394 *)
16395 mv -f confcache "$cache_file" ;;
16396 esac
16397 fi
16398 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016399 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016400 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16401$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016402 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016403fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016404rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016406test "x$prefix" = xNONE && prefix=$ac_default_prefix
16407# Let make expand exec_prefix.
16408test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016409
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016410DEFS=-DHAVE_CONFIG_H
16411
Skip Montanaro6dead952003-09-25 14:50:04 +000016412ac_libobjs=
16413ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016414U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016415for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16416 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016417 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016418 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016419 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16420 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016421 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16422 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016423done
16424LIBOBJS=$ac_libobjs
16425
16426LTLIBOBJS=$ac_ltlibobjs
16427
16428
Martin v. Löwis11437992002-04-12 09:54:03 +000016429
Matthias Kloseb9621712010-04-24 17:59:49 +000016430
Victor Stinnere0be4232011-10-25 13:06:09 +020016431: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016432ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016433ac_clean_files_save=$ac_clean_files
16434ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016435{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16436$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16437as_write_fail=0
16438cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016439#! $SHELL
16440# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016441# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016442# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016443# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016444
Martin v. Löwis11437992002-04-12 09:54:03 +000016445debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016446ac_cs_recheck=false
16447ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016448
Matthias Kloseb9621712010-04-24 17:59:49 +000016449SHELL=\${CONFIG_SHELL-$SHELL}
16450export SHELL
16451_ASEOF
16452cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16453## -------------------- ##
16454## M4sh Initialization. ##
16455## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457# Be more Bourne compatible
16458DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016459if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 emulate sh
16461 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016462 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016463 # is contrary to our usage. Disable this feature.
16464 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016465 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016466else
Matthias Kloseb9621712010-04-24 17:59:49 +000016467 case `(set -o) 2>/dev/null` in #(
16468 *posix*) :
16469 set -o posix ;; #(
16470 *) :
16471 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016472esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016473fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016474
16475
Matthias Kloseb9621712010-04-24 17:59:49 +000016476as_nl='
16477'
16478export as_nl
16479# Printing a long string crashes Solaris 7 /usr/bin/printf.
16480as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16481as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16482as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16483# Prefer a ksh shell builtin over an external printf program on Solaris,
16484# but without wasting forks for bash or zsh.
16485if test -z "$BASH_VERSION$ZSH_VERSION" \
16486 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16487 as_echo='print -r --'
16488 as_echo_n='print -rn --'
16489elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16490 as_echo='printf %s\n'
16491 as_echo_n='printf %s'
16492else
16493 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16494 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16495 as_echo_n='/usr/ucb/echo -n'
16496 else
16497 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16498 as_echo_n_body='eval
16499 arg=$1;
16500 case $arg in #(
16501 *"$as_nl"*)
16502 expr "X$arg" : "X\\(.*\\)$as_nl";
16503 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16504 esac;
16505 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16506 '
16507 export as_echo_n_body
16508 as_echo_n='sh -c $as_echo_n_body as_echo'
16509 fi
16510 export as_echo_body
16511 as_echo='sh -c $as_echo_body as_echo'
16512fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016513
16514# The user is always right.
16515if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016516 PATH_SEPARATOR=:
16517 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16518 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16519 PATH_SEPARATOR=';'
16520 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523
16524# IFS
16525# We need space, tab and new line, in precisely that order. Quoting is
16526# there to prevent editors from complaining about space-tab.
16527# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16528# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529IFS=" "" $as_nl"
16530
16531# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016532as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016533case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534 *[\\/]* ) as_myself=$0 ;;
16535 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016536for as_dir in $PATH
16537do
16538 IFS=$as_save_IFS
16539 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016540 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16541 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544 ;;
16545esac
16546# We did not find ourselves, most probably we were run as `sh COMMAND'
16547# in which case we are not to be found in the path.
16548if test "x$as_myself" = x; then
16549 as_myself=$0
16550fi
16551if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016552 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16553 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554fi
16555
Matthias Kloseb9621712010-04-24 17:59:49 +000016556# Unset variables that we do not need and which cause bugs (e.g. in
16557# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16558# suppresses any "Segmentation fault" message there. '((' could
16559# trigger a bug in pdksh 5.2.14.
16560for as_var in BASH_ENV ENV MAIL MAILPATH
16561do eval test x\${$as_var+set} = xset \
16562 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016563done
16564PS1='$ '
16565PS2='> '
16566PS4='+ '
16567
16568# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016569LC_ALL=C
16570export LC_ALL
16571LANGUAGE=C
16572export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573
Matthias Kloseb9621712010-04-24 17:59:49 +000016574# CDPATH.
16575(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16576
16577
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016578# as_fn_error STATUS ERROR [LINENO LOG_FD]
16579# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016580# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16581# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016582# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016583as_fn_error ()
16584{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016585 as_status=$1; test $as_status -eq 0 && as_status=1
16586 if test "$4"; then
16587 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16588 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016589 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016590 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016591 as_fn_exit $as_status
16592} # as_fn_error
16593
16594
16595# as_fn_set_status STATUS
16596# -----------------------
16597# Set $? to STATUS, without forking.
16598as_fn_set_status ()
16599{
16600 return $1
16601} # as_fn_set_status
16602
16603# as_fn_exit STATUS
16604# -----------------
16605# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16606as_fn_exit ()
16607{
16608 set +e
16609 as_fn_set_status $1
16610 exit $1
16611} # as_fn_exit
16612
16613# as_fn_unset VAR
16614# ---------------
16615# Portably unset VAR.
16616as_fn_unset ()
16617{
16618 { eval $1=; unset $1;}
16619}
16620as_unset=as_fn_unset
16621# as_fn_append VAR VALUE
16622# ----------------------
16623# Append the text in VALUE to the end of the definition contained in VAR. Take
16624# advantage of any shell optimizations that allow amortized linear growth over
16625# repeated appends, instead of the typical quadratic growth present in naive
16626# implementations.
16627if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16628 eval 'as_fn_append ()
16629 {
16630 eval $1+=\$2
16631 }'
16632else
16633 as_fn_append ()
16634 {
16635 eval $1=\$$1\$2
16636 }
16637fi # as_fn_append
16638
16639# as_fn_arith ARG...
16640# ------------------
16641# Perform arithmetic evaluation on the ARGs, and store the result in the
16642# global $as_val. Take advantage of shells that can avoid forks. The arguments
16643# must be portable across $(()) and expr.
16644if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16645 eval 'as_fn_arith ()
16646 {
16647 as_val=$(( $* ))
16648 }'
16649else
16650 as_fn_arith ()
16651 {
16652 as_val=`expr "$@" || test $? -eq 1`
16653 }
16654fi # as_fn_arith
16655
16656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016657if expr a : '\(a\)' >/dev/null 2>&1 &&
16658 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16659 as_expr=expr
16660else
16661 as_expr=false
16662fi
16663
16664if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16665 as_basename=basename
16666else
16667 as_basename=false
16668fi
16669
Matthias Kloseb9621712010-04-24 17:59:49 +000016670if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16671 as_dirname=dirname
16672else
16673 as_dirname=false
16674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016676as_me=`$as_basename -- "$0" ||
16677$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16678 X"$0" : 'X\(//\)$' \| \
16679 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016680$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681 sed '/^.*\/\([^/][^/]*\)\/*$/{
16682 s//\1/
16683 q
16684 }
16685 /^X\/\(\/\/\)$/{
16686 s//\1/
16687 q
16688 }
16689 /^X\/\(\/\).*/{
16690 s//\1/
16691 q
16692 }
16693 s/.*/./; q'`
16694
Matthias Kloseb9621712010-04-24 17:59:49 +000016695# Avoid depending upon Character Ranges.
16696as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16697as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16698as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16699as_cr_digits='0123456789'
16700as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701
16702ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016703case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016705 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016707 xy) ECHO_C='\c';;
16708 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16709 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710 esac;;
16711*)
16712 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016713esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016714
Martin v. Löwis11437992002-04-12 09:54:03 +000016715rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016716if test -d conf$$.dir; then
16717 rm -f conf$$.dir/conf$$.file
16718else
16719 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016720 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016722if (echo >conf$$.file) 2>/dev/null; then
16723 if ln -s conf$$.file conf$$ 2>/dev/null; then
16724 as_ln_s='ln -s'
16725 # ... but there are two gotchas:
16726 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16727 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016728 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016730 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016731 elif ln conf$$.file conf$$ 2>/dev/null; then
16732 as_ln_s=ln
16733 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016734 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016736else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016737 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16740rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016741
Matthias Kloseb9621712010-04-24 17:59:49 +000016742
16743# as_fn_mkdir_p
16744# -------------
16745# Create "$as_dir" as a directory, including parents if necessary.
16746as_fn_mkdir_p ()
16747{
16748
16749 case $as_dir in #(
16750 -*) as_dir=./$as_dir;;
16751 esac
16752 test -d "$as_dir" || eval $as_mkdir_p || {
16753 as_dirs=
16754 while :; do
16755 case $as_dir in #(
16756 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16757 *) as_qdir=$as_dir;;
16758 esac
16759 as_dirs="'$as_qdir' $as_dirs"
16760 as_dir=`$as_dirname -- "$as_dir" ||
16761$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16762 X"$as_dir" : 'X\(//\)[^/]' \| \
16763 X"$as_dir" : 'X\(//\)$' \| \
16764 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16765$as_echo X"$as_dir" |
16766 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16767 s//\1/
16768 q
16769 }
16770 /^X\(\/\/\)[^/].*/{
16771 s//\1/
16772 q
16773 }
16774 /^X\(\/\/\)$/{
16775 s//\1/
16776 q
16777 }
16778 /^X\(\/\).*/{
16779 s//\1/
16780 q
16781 }
16782 s/.*/./; q'`
16783 test -d "$as_dir" && break
16784 done
16785 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016786 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016787
16788
16789} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016790if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016791 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016792else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016793 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016794 as_mkdir_p=false
16795fi
16796
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016797
16798# as_fn_executable_p FILE
16799# -----------------------
16800# Test if FILE is an executable regular file.
16801as_fn_executable_p ()
16802{
16803 test -f "$1" && test -x "$1"
16804} # as_fn_executable_p
16805as_test_x='test -x'
16806as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016807
16808# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016809as_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 +000016810
16811# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016812as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016813
16814
Martin v. Löwis11437992002-04-12 09:54:03 +000016815exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016816## ----------------------------------- ##
16817## Main body of $CONFIG_STATUS script. ##
16818## ----------------------------------- ##
16819_ASEOF
16820test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016821
Matthias Kloseb9621712010-04-24 17:59:49 +000016822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16823# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016824# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825# values after options handling.
16826ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016827This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016828generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016829
16830 CONFIG_FILES = $CONFIG_FILES
16831 CONFIG_HEADERS = $CONFIG_HEADERS
16832 CONFIG_LINKS = $CONFIG_LINKS
16833 CONFIG_COMMANDS = $CONFIG_COMMANDS
16834 $ $0 $@
16835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016836on `(hostname || uname -n) 2>/dev/null | sed 1q`
16837"
16838
Martin v. Löwis11437992002-04-12 09:54:03 +000016839_ACEOF
16840
Matthias Kloseb9621712010-04-24 17:59:49 +000016841case $ac_config_files in *"
16842"*) set x $ac_config_files; shift; ac_config_files=$*;;
16843esac
16844
16845case $ac_config_headers in *"
16846"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16847esac
16848
16849
16850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016851# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016852config_files="$ac_config_files"
16853config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
Matthias Kloseb9621712010-04-24 17:59:49 +000016857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016858ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016859\`$as_me' instantiates files and other configuration actions
16860from templates according to the current configuration. Unless the files
16861and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016862
Matthias Kloseb9621712010-04-24 17:59:49 +000016863Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
16865 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016866 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 --config print configuration, then exit
16868 -q, --quiet, --silent
16869 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016870 -d, --debug don't remove temporary files
16871 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016872 --file=FILE[:TEMPLATE]
16873 instantiate the configuration file FILE
16874 --header=FILE[:TEMPLATE]
16875 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016876
16877Configuration files:
16878$config_files
16879
16880Configuration headers:
16881$config_headers
16882
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016883Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016886cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16887ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016888ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016889python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016890configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016891 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016892
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016893Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016894This config.status script is free software; the Free Software Foundation
16895gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896
16897ac_pwd='$ac_pwd'
16898srcdir='$srcdir'
16899INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016900MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016901test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016902_ACEOF
16903
Matthias Kloseb9621712010-04-24 17:59:49 +000016904cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16905# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016906ac_need_defaults=:
16907while test $# != 0
16908do
16909 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016910 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16912 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016913 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016915 --*=)
16916 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16917 ac_optarg=
16918 ac_shift=:
16919 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016921 ac_option=$1
16922 ac_optarg=$2
16923 ac_shift=shift
16924 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 esac
16926
Skip Montanaro6dead952003-09-25 14:50:04 +000016927 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016928 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016929 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16930 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016932 $as_echo "$ac_cs_version"; exit ;;
16933 --config | --confi | --conf | --con | --co | --c )
16934 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 debug=: ;;
16937 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016938 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016939 case $ac_optarg in
16940 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016941 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 esac
16943 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016944 ac_need_defaults=false;;
16945 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016946 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016947 case $ac_optarg in
16948 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16949 esac
16950 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016951 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016952 --he | --h)
16953 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016954 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016955Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016957 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016958 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16959 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16960 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016961
16962 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016963 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016964Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016965
Matthias Kloseb9621712010-04-24 17:59:49 +000016966 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016968
16969 esac
16970 shift
16971done
16972
Skip Montanaro6dead952003-09-25 14:50:04 +000016973ac_configure_extra_args=
16974
16975if $ac_cs_silent; then
16976 exec 6>/dev/null
16977 ac_configure_extra_args="$ac_configure_extra_args --silent"
16978fi
16979
16980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016981cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016982if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016983 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 shift
16985 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16986 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016988 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016989fi
16990
Martin v. Löwis11437992002-04-12 09:54:03 +000016991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016992cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993exec 5>>config.log
16994{
16995 echo
16996 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16997## Running $as_me. ##
16998_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016999 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
Matthias Kloseb9621712010-04-24 17:59:49 +000017006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007
17008# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017009for ac_config_target in $ac_config_targets
17010do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011 case $ac_config_target in
17012 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17013 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17014 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017015 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17016 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17018 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017019 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017020 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017021 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022
Victor Stinnere0be4232011-10-25 13:06:09 +020017023 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017024 esac
17025done
17026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027
Martin v. Löwis11437992002-04-12 09:54:03 +000017028# If the user did not use the arguments to specify the items to instantiate,
17029# then the envvar interface is used. Set only those that are not.
17030# We use the long form for the default assignment because of an extremely
17031# bizarre bug on SunOS 4.1.3.
17032if $ac_need_defaults; then
17033 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17034 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17035fi
17036
Skip Montanaro6dead952003-09-25 14:50:04 +000017037# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017039# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040# Hook for its removal unless debugging.
17041# Note that there is a small window in which the directory will not be cleaned:
17042# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017043$debug ||
17044{
Victor Stinnere0be4232011-10-25 13:06:09 +020017045 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017046 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017047 : "${ac_tmp:=$tmp}"
17048 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017050 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017051}
Martin v. Löwis11437992002-04-12 09:54:03 +000017052# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017053
Martin v. Löwis11437992002-04-12 09:54:03 +000017054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017056 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017057} ||
17058{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059 tmp=./conf$$-$RANDOM
17060 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017061} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017062ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017063
Matthias Kloseb9621712010-04-24 17:59:49 +000017064# Set up the scripts for CONFIG_FILES section.
17065# No need to generate them if there are no CONFIG_FILES.
17066# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017068
Matthias Kloseb9621712010-04-24 17:59:49 +000017069
17070ac_cr=`echo X | tr X '\015'`
17071# On cygwin, bash can eat \r inside `` if the user requested igncr.
17072# But we know of no other shell where ac_cr would be empty at this
17073# point, so we can use a bashism as a fallback.
17074if test "x$ac_cr" = x; then
17075 eval ac_cr=\$\'\\r\'
17076fi
17077ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17078if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017079 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017080else
17081 ac_cs_awk_cr=$ac_cr
17082fi
17083
Victor Stinnere0be4232011-10-25 13:06:09 +020017084echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017085_ACEOF
17086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087
Matthias Kloseb9621712010-04-24 17:59:49 +000017088{
17089 echo "cat >conf$$subs.awk <<_ACEOF" &&
17090 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17091 echo "_ACEOF"
17092} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017093 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17094ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095ac_delim='%!_!# '
17096for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017097 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017098 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099
Matthias Kloseb9621712010-04-24 17:59:49 +000017100 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17101 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102 break
17103 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017104 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 else
17106 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017107 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017108done
Matthias Kloseb9621712010-04-24 17:59:49 +000017109rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017110
Matthias Kloseb9621712010-04-24 17:59:49 +000017111cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017112cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017114sed -n '
17115h
17116s/^/S["/; s/!.*/"]=/
17117p
17118g
17119s/^[^!]*!//
17120:repl
17121t repl
17122s/'"$ac_delim"'$//
17123t delim
17124:nl
17125h
17126s/\(.\{148\}\)..*/\1/
17127t more1
17128s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17129p
17130n
17131b repl
17132:more1
17133s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17134p
17135g
17136s/.\{148\}//
17137t nl
17138:delim
17139h
17140s/\(.\{148\}\)..*/\1/
17141t more2
17142s/["\\]/\\&/g; s/^/"/; s/$/"/
17143p
17144b
17145:more2
17146s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17147p
17148g
17149s/.\{148\}//
17150t delim
17151' <conf$$subs.awk | sed '
17152/^[^""]/{
17153 N
17154 s/\n//
17155}
17156' >>$CONFIG_STATUS || ac_write_fail=1
17157rm -f conf$$subs.awk
17158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17159_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017160cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017161 for (key in S) S_is_set[key] = 1
17162 FS = ""
17163
17164}
17165{
17166 line = $ 0
17167 nfields = split(line, field, "@")
17168 substed = 0
17169 len = length(field[1])
17170 for (i = 2; i < nfields; i++) {
17171 key = field[i]
17172 keylen = length(key)
17173 if (S_is_set[key]) {
17174 value = S[key]
17175 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17176 len += length(value) + length(field[++i])
17177 substed = 1
17178 } else
17179 len += 1 + keylen
17180 }
17181
17182 print line
17183}
17184
17185_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017187cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17188if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17189 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17190else
17191 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017192fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017193 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017194_ACEOF
17195
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017196# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17197# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198# trailing colons and then remove the whole line if VPATH becomes empty
17199# (actually we leave an empty line to preserve line numbers).
17200if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017201 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17202h
17203s///
17204s/^/:/
17205s/[ ]*$/:/
17206s/:\$(srcdir):/:/g
17207s/:\${srcdir}:/:/g
17208s/:@srcdir@:/:/g
17209s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017211x
17212s/\(=[ ]*\).*/\1/
17213G
17214s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215s/^[^=]*=[ ]*$//
17216}'
17217fi
17218
Matthias Kloseb9621712010-04-24 17:59:49 +000017219cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017220fi # test -n "$CONFIG_FILES"
17221
Matthias Kloseb9621712010-04-24 17:59:49 +000017222# Set up the scripts for CONFIG_HEADERS section.
17223# No need to generate them if there are no CONFIG_HEADERS.
17224# This happens for instance with `./config.status Makefile'.
17225if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017226cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017227BEGIN {
17228_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017229
Matthias Kloseb9621712010-04-24 17:59:49 +000017230# Transform confdefs.h into an awk script `defines.awk', embedded as
17231# here-document in config.status, that substitutes the proper values into
17232# config.h.in to produce config.h.
17233
17234# Create a delimiter string that does not exist in confdefs.h, to ease
17235# handling of long lines.
17236ac_delim='%!_!# '
17237for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017238 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17239 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017240 break
17241 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017242 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017243 else
17244 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17245 fi
17246done
17247
17248# For the awk script, D is an array of macro values keyed by name,
17249# likewise P contains macro parameters if any. Preserve backslash
17250# newline sequences.
17251
17252ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17253sed -n '
17254s/.\{148\}/&'"$ac_delim"'/g
17255t rset
17256:rset
17257s/^[ ]*#[ ]*define[ ][ ]*/ /
17258t def
17259d
17260:def
17261s/\\$//
17262t bsnl
17263s/["\\]/\\&/g
17264s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17265D["\1"]=" \3"/p
17266s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17267d
17268:bsnl
17269s/["\\]/\\&/g
17270s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17271D["\1"]=" \3\\\\\\n"\\/p
17272t cont
17273s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17274t cont
17275d
17276:cont
17277n
17278s/.\{148\}/&'"$ac_delim"'/g
17279t clear
17280:clear
17281s/\\$//
17282t bsnlc
17283s/["\\]/\\&/g; s/^/"/; s/$/"/p
17284d
17285:bsnlc
17286s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17287b cont
17288' <confdefs.h | sed '
17289s/'"$ac_delim"'/"\\\
17290"/g' >>$CONFIG_STATUS || ac_write_fail=1
17291
17292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17293 for (key in D) D_is_set[key] = 1
17294 FS = ""
17295}
17296/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17297 line = \$ 0
17298 split(line, arg, " ")
17299 if (arg[1] == "#") {
17300 defundef = arg[2]
17301 mac1 = arg[3]
17302 } else {
17303 defundef = substr(arg[1], 2)
17304 mac1 = arg[2]
17305 }
17306 split(mac1, mac2, "(") #)
17307 macro = mac2[1]
17308 prefix = substr(line, 1, index(line, defundef) - 1)
17309 if (D_is_set[macro]) {
17310 # Preserve the white space surrounding the "#".
17311 print prefix "define", macro P[macro] D[macro]
17312 next
17313 } else {
17314 # Replace #undef with comments. This is necessary, for example,
17315 # in the case of _POSIX_SOURCE, which is predefined and required
17316 # on some systems where configure will not decide to define it.
17317 if (defundef == "undef") {
17318 print "/*", prefix defundef, macro, "*/"
17319 next
17320 }
17321 }
17322}
17323{ print }
17324_ACAWK
17325_ACEOF
17326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017327 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017328fi # test -n "$CONFIG_HEADERS"
17329
17330
17331eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17332shift
17333for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017334do
17335 case $ac_tag in
17336 :[FHLC]) ac_mode=$ac_tag; continue;;
17337 esac
17338 case $ac_mode$ac_tag in
17339 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017340 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341 :[FH]-) ac_tag=-:-;;
17342 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17343 esac
17344 ac_save_IFS=$IFS
17345 IFS=:
17346 set x $ac_tag
17347 IFS=$ac_save_IFS
17348 shift
17349 ac_file=$1
17350 shift
17351
17352 case $ac_mode in
17353 :L) ac_source=$1;;
17354 :[FH])
17355 ac_file_inputs=
17356 for ac_f
17357 do
17358 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017359 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 *) # Look for the file first in the build tree, then in the source tree
17361 # (if the path is not absolute). The absolute path cannot be DOS-style,
17362 # because $ac_f cannot contain `:'.
17363 test -f "$ac_f" ||
17364 case $ac_f in
17365 [\\/$]*) false;;
17366 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17367 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017368 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017370 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17371 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 done
17373
17374 # Let's still pretend it is `configure' which instantiates (i.e., don't
17375 # use $as_me), people would be surprised to read:
17376 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 configure_input='Generated from '`
17378 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17379 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 if test x"$ac_file" != x-; then
17381 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017382 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17383$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017385 # Neutralize special characters interpreted by sed in replacement strings.
17386 case $configure_input in #(
17387 *\&* | *\|* | *\\* )
17388 ac_sed_conf_input=`$as_echo "$configure_input" |
17389 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17390 *) ac_sed_conf_input=$configure_input;;
17391 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392
17393 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017394 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17395 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 esac
17397 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017398 esac
17399
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017400 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017401$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017402 X"$ac_file" : 'X\(//\)[^/]' \| \
17403 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017405$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17407 s//\1/
17408 q
17409 }
17410 /^X\(\/\/\)[^/].*/{
17411 s//\1/
17412 q
17413 }
17414 /^X\(\/\/\)$/{
17415 s//\1/
17416 q
17417 }
17418 /^X\(\/\).*/{
17419 s//\1/
17420 q
17421 }
17422 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 ac_builddir=.
17425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426case "$ac_dir" in
17427.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17428*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017431 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 case $ac_top_builddir_sub in
17433 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17434 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17435 esac ;;
17436esac
17437ac_abs_top_builddir=$ac_pwd
17438ac_abs_builddir=$ac_pwd$ac_dir_suffix
17439# for backward compatibility:
17440ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017441
17442case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017443 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017444 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445 ac_top_srcdir=$ac_top_builddir_sub
17446 ac_abs_top_srcdir=$ac_pwd ;;
17447 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 ac_top_srcdir=$srcdir
17450 ac_abs_top_srcdir=$srcdir ;;
17451 *) # Relative name.
17452 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17453 ac_top_srcdir=$ac_top_build_prefix$srcdir
17454 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017455esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017457
Martin v. Löwis11437992002-04-12 09:54:03 +000017458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459 case $ac_mode in
17460 :F)
17461 #
17462 # CONFIG_FILE
17463 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017464
17465 case $INSTALL in
17466 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017469 ac_MKDIR_P=$MKDIR_P
17470 case $MKDIR_P in
17471 [\\/$]* | ?:[\\/]* ) ;;
17472 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17473 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017474_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475
Matthias Kloseb9621712010-04-24 17:59:49 +000017476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477# If the template does not know about datarootdir, expand it.
17478# FIXME: This hack should be removed a few years after 2.60.
17479ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017480ac_sed_dataroot='
17481/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482 p
17483 q
17484}
17485/@datadir@/p
17486/@docdir@/p
17487/@infodir@/p
17488/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017489/@mandir@/p'
17490case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017491*datarootdir*) ac_datarootdir_seen=yes;;
17492*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17494$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017497 ac_datarootdir_hack='
17498 s&@datadir@&$datadir&g
17499 s&@docdir@&$docdir&g
17500 s&@infodir@&$infodir&g
17501 s&@localedir@&$localedir&g
17502 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017503 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017504esac
17505_ACEOF
17506
17507# Neutralize VPATH when `$srcdir' = `.'.
17508# Shell code in configure.ac might set extrasub.
17509# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017510cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17511ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017512$extrasub
17513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017515:t
17516/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017517s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017519s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520s&@srcdir@&$ac_srcdir&;t t
17521s&@abs_srcdir@&$ac_abs_srcdir&;t t
17522s&@top_srcdir@&$ac_top_srcdir&;t t
17523s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17524s&@builddir@&$ac_builddir&;t t
17525s&@abs_builddir@&$ac_abs_builddir&;t t
17526s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17527s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017528s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017529$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017530"
Victor Stinnere0be4232011-10-25 13:06:09 +020017531eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17532 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017535 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17536 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17537 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017538 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017539which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017540$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017541which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017542
Victor Stinnere0be4232011-10-25 13:06:09 +020017543 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017544 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017545 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17546 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017547 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017548 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549 ;;
17550 :H)
17551 #
17552 # CONFIG_HEADER
17553 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017555 {
17556 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017557 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17558 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017559 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017560 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17562$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017564 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017565 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017566 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017567 fi
17568 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017570 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017571 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017572 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575
17576 esac
17577
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017578
17579 case $ac_file$ac_mode in
17580 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17581
17582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583done # for ac_tag
17584
Guido van Rossum627b2d71993-12-24 10:39:16 +000017585
Matthias Kloseb9621712010-04-24 17:59:49 +000017586as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017587_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017588ac_clean_files=$ac_clean_files_save
17589
Matthias Kloseb9621712010-04-24 17:59:49 +000017590test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017591 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017592
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
17594# configure is writing to config.log, and then calls config.status.
17595# config.status does its own redirection, appending to config.log.
17596# Unfortunately, on DOS this fails, as config.log is still kept open
17597# by configure, so config.status won't be able to write to it; its
17598# output is simply discarded. So we exec the FD to /dev/null,
17599# effectively closing config.log, so it can be properly (re)opened and
17600# appended to by config.status. When coming back to configure, we
17601# need to make the FD available again.
17602if test "$no_create" != yes; then
17603 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017604 ac_config_status_args=
17605 test "$silent" = yes &&
17606 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017607 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017608 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017609 exec 5>>config.log
17610 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17611 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017612 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017613fi
17614if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17616$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017617fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017618
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017619
Christian Heimes75ed8902013-11-20 01:11:18 +010017620echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017621if test ! -f Modules/Setup
17622then
17623 cp $srcdir/Modules/Setup.dist Modules/Setup
17624fi
17625
Christian Heimes75ed8902013-11-20 01:11:18 +010017626echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017627if test ! -f Modules/Setup.local
17628then
17629 echo "# Edit this file for local setup changes" >Modules/Setup.local
17630fi
17631
Christian Heimes75ed8902013-11-20 01:11:18 +010017632echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017633$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17634 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017635 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017636mv config.c Modules