blob: bb89a5a059bc34043b5a9fda66c04d5c2b608c74 [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#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://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
270$0: http://bugs.python.org/ about your system, including
271$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'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://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 Pantereac67be2016-07-28 01:28:27 +0000742PGEN_DEPENDENCY
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
Martin Panter1046d5c2016-04-23 00:58:44 +0000753cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
778localstatedir
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'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888includedir='${prefix}/include'
889oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
891infodir='${datarootdir}/info'
892htmldir='${docdir}'
893dvidir='${docdir}'
894pdfdir='${docdir}'
895psdir='${docdir}'
896libdir='${exec_prefix}/lib'
897localedir='${datarootdir}/locale'
898mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 # If the previous option needs an argument, assign it.
905 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 ac_prev=
908 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200912 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
913 *=) ac_optarg= ;;
914 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 # Accept the important Cygnus configure options, so we can diagnose typos.
918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_dashdash$ac_option in
920 --)
921 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 -bindir | --bindir | --bindi | --bind | --bin | --bi)
924 ac_prev=bindir ;;
925 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933 -cache-file | --cache-file | --cache-fil | --cache-fi \
934 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935 ac_prev=cache_file ;;
936 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 cache_file=$ac_optarg ;;
939
940 --config-cache | -C)
941 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949 | --dataroo | --dataro | --datar)
950 ac_prev=datarootdir ;;
951 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953 datarootdir=$ac_optarg ;;
954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000956 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200959 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt_orig=$ac_useropt
961 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962 case $ac_user_opts in
963 *"
964"enable_$ac_useropt"
965"*) ;;
966 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967 ac_unrecognized_sep=', ';;
968 esac
969 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970
971 -docdir | --docdir | --docdi | --doc | --do)
972 ac_prev=docdir ;;
973 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974 docdir=$ac_optarg ;;
975
976 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977 ac_prev=dvidir ;;
978 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200985 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
994 esac
995 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999 | --exec | --exe | --ex)
1000 ac_prev=exec_prefix ;;
1001 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 # Obsolete; use --with-gas.
1008 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 -help | --help | --hel | --he | -h)
1011 ac_init_help=long ;;
1012 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013 ac_init_help=recursive ;;
1014 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023 ac_prev=htmldir ;;
1024 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025 | --ht=*)
1026 htmldir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -includedir | --includedir | --includedi | --included | --include \
1029 | --includ | --inclu | --incl | --inc)
1030 ac_prev=includedir ;;
1031 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -infodir | --infodir | --infodi | --infod | --info | --inf)
1036 ac_prev=infodir ;;
1037 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libdir | --libdir | --libdi | --libd)
1041 ac_prev=libdir ;;
1042 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046 | --libexe | --libex | --libe)
1047 ac_prev=libexecdir ;;
1048 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 -localedir | --localedir | --localedi | --localed | --locale)
1053 ac_prev=localedir ;;
1054 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055 localedir=$ac_optarg ;;
1056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 ac_prev=localstatedir ;;
1060 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065 ac_prev=mandir ;;
1066 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Obsolete; use --without-fp.
1071 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 no_create=yes ;;
1076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083 | --oldin | --oldi | --old | --ol | --o)
1084 ac_prev=oldincludedir ;;
1085 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091 ac_prev=prefix ;;
1092 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096 | --program-pre | --program-pr | --program-p)
1097 ac_prev=program_prefix ;;
1098 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103 | --program-suf | --program-su | --program-s)
1104 ac_prev=program_suffix ;;
1105 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-transform-name | --program-transform-name \
1110 | --program-transform-nam | --program-transform-na \
1111 | --program-transform-n | --program-transform- \
1112 | --program-transform | --program-transfor \
1113 | --program-transfo | --program-transf \
1114 | --program-trans | --program-tran \
1115 | --progr-tra | --program-tr | --program-t)
1116 ac_prev=program_transform_name ;;
1117 -program-transform-name=* | --program-transform-name=* \
1118 | --program-transform-nam=* | --program-transform-na=* \
1119 | --program-transform-n=* | --program-transform-=* \
1120 | --program-transform=* | --program-transfor=* \
1121 | --program-transfo=* | --program-transf=* \
1122 | --program-trans=* | --program-tran=* \
1123 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001126 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127 ac_prev=pdfdir ;;
1128 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129 pdfdir=$ac_optarg ;;
1130
1131 -psdir | --psdir | --psdi | --psd | --ps)
1132 ac_prev=psdir ;;
1133 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134 psdir=$ac_optarg ;;
1135
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137 | -silent | --silent | --silen | --sile | --sil)
1138 silent=yes ;;
1139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141 ac_prev=sbindir ;;
1142 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
1146 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148 | --sharedst | --shareds | --shared | --share | --shar \
1149 | --sha | --sh)
1150 ac_prev=sharedstatedir ;;
1151 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 -site | --site | --sit)
1158 ac_prev=site ;;
1159 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163 ac_prev=srcdir ;;
1164 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168 | --syscon | --sysco | --sysc | --sys | --sy)
1169 ac_prev=sysconfdir ;;
1170 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180 verbose=yes ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 -version | --version | --versio | --versi | --vers | -V)
1183 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 --x)
1218 # Obsolete; use --with-x.
1219 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222 | --x-incl | --x-inc | --x-in | --x-i)
1223 ac_prev=x_includes ;;
1224 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230 ac_prev=x_libraries ;;
1231 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 *=*)
1240 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 case $ac_envvar in #(
1243 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 export $ac_envvar ;;
1248
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001254 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
1257 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258done
1259
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263fi
1264
Matthias Kloseb9621712010-04-24 17:59:49 +00001265if test -n "$ac_unrecognized_opts"; then
1266 case $enable_option_checking in
1267 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270 esac
1271fi
1272
1273# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275 datadir sysconfdir sharedstatedir localstatedir includedir \
1276 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Xavier de Gayefd0d5932016-07-26 12:48:08 +02001277 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 # Remove trailing slashes.
1281 case $ac_val in
1282 */ )
1283 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284 eval $ac_var=\$ac_val;;
1285 esac
1286 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 [\\/$]* | ?:[\\/]* ) continue;;
1289 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001292done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Martin v. Löwis11437992002-04-12 09:54:03 +00001294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303 if test "x$build_alias" = x; then
1304 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 elif test "x$build_alias" != "x$host_alias"; then
1306 cross_compiling=yes
1307 fi
1308fi
1309
1310ac_tool_prefix=
1311test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313test "$silent" = yes && exec 6>/dev/null
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317ac_ls_di=`ls -di .` &&
1318ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001319 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324# Find the source files, if location was not specified.
1325if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 ac_confdir=`$as_dirname -- "$as_myself" ||
1329$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330 X"$as_myself" : 'X\(//\)[^/]' \| \
1331 X"$as_myself" : 'X\(//\)$' \| \
1332 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)[^/].*/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\/\)$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\).*/{
1347 s//\1/
1348 q
1349 }
1350 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353 srcdir=..
1354 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355else
1356 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358if test ! -r "$srcdir/$ac_unique_file"; then
1359 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001360 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001364 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 pwd)`
1366# When building in place, set srcdir=.
1367if test "$ac_abs_confdir" = "$ac_pwd"; then
1368 srcdir=.
1369fi
1370# Remove unnecessary trailing slashes from srcdir.
1371# Double slashes in file names in object file debugging info
1372# mess up M-x gdb in Emacs.
1373case $srcdir in
1374*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375esac
1376for ac_var in $ac_precious_vars; do
1377 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378 eval ac_env_${ac_var}_value=\$${ac_var}
1379 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382
Martin v. Löwis11437992002-04-12 09:54:03 +00001383#
1384# Report the --help message.
1385#
1386if test "$ac_init_help" = "long"; then
1387 # Omit some internal or obsolete options to make the list less imposing.
1388 # This message is too long to be a string in the A/UX 3.1 sh.
1389 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001390\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395VAR=VALUE. See below for descriptions of some of the useful variables.
1396
1397Defaults for the options are specified in brackets.
1398
1399Configuration:
1400 -h, --help display this help and exit
1401 --help=short display options specific to this package
1402 --help=recursive display the short help of all the included packages
1403 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001404 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 --cache-file=FILE cache test results in FILE [disabled]
1406 -C, --config-cache alias for \`--cache-file=config.cache'
1407 -n, --no-create do not create output files
1408 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410Installation directories:
1411 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001412 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416By default, \`make install' will install all the files in
1417\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1418an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419for instance \`--prefix=\$HOME'.
1420
1421For better control, use the options below.
1422
1423Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 --bindir=DIR user executables [EPREFIX/bin]
1425 --sbindir=DIR system admin executables [EPREFIX/sbin]
1426 --libexecdir=DIR program executables [EPREFIX/libexec]
1427 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1428 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1429 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1430 --libdir=DIR object code libraries [EPREFIX/lib]
1431 --includedir=DIR C header files [PREFIX/include]
1432 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1433 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1434 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1435 --infodir=DIR info documentation [DATAROOTDIR/info]
1436 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1437 --mandir=DIR man documentation [DATAROOTDIR/man]
1438 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1439 --htmldir=DIR html documentation [DOCDIR]
1440 --dvidir=DIR dvi documentation [DOCDIR]
1441 --pdfdir=DIR pdf documentation [DOCDIR]
1442 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443_ACEOF
1444
1445 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001446
1447System types:
1448 --build=BUILD configure for building on BUILD [guessed]
1449 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451fi
1452
1453if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001454 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001455 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 cat <<\_ACEOF
1458
1459Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1462 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001463 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001464 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --enable-framework[=INSTALLDIR]
1466 Build (MacOSX|Darwin) framework
1467 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001468 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001469 --enable-loadable-sqlite-extensions
1470 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --enable-ipv6 Enable ipv6 (with ipv4) support
1472 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001473 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476Optional Packages:
1477 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1478 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001479 --with-universal-archs=ARCH
1480 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001481 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001482 --with-framework-name=FRAMEWORK
1483 specify an alternate name of the framework built
1484 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001486 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001487 --with-cxx-main=<compiler>
1488 compile main() and link python executable with C++
1489 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with-suffix=.exe set executable suffix
1491 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001492 --with-lto Enable Link Time Optimization in PGO builds.
1493 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001494 --with-hash-algorithm=[fnv|siphash24]
1495 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001496 --with-address-sanitizer
1497 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001499 --with-system-expat build pyexpat module using an installed expat
1500 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001502 --with-system-libmpdec build _decimal module using an installed libmpdec
1503 library
Ned Deilyd819b932013-09-06 01:07:05 -07001504 --with-tcltk-includes='-I...'
1505 override search for Tcl and Tk include files
1506 --with-tcltk-libs='-L...'
1507 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001508 --with-dbmliborder=db1:db2:...
1509 order to check db backends for dbm. Valid value is a
1510 colon separated string with the backend names
1511 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-threads[=DIRECTORY]
1514 disable/enable thread support
1515 --with(out)-thread[=DIRECTORY]
1516 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001518 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001520 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-fpectl enable SIGFPE catching
1522 --with-libm=STRING math library
1523 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001524 --with(out)-computed-gotos
1525 Use computed gotos in evaluation loop (enabled by
1526 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001527 --with(out)-ensurepip=[=upgrade]
1528 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001531 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 CC C compiler command
1533 CFLAGS C compiler flags
1534 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1535 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001540 PKG_CONFIG path to pkg-config utility
1541 PKG_CONFIG_PATH
1542 directories to add to pkg-config's search path
1543 PKG_CONFIG_LIBDIR
1544 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
1546Use these variables to override the choices made by `configure' or to help
1547it to find libraries and programs with nonstandard names/locations.
1548
Georg Brandle2e15612009-05-20 18:25:10 +00001549Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
1553
1554if test "$ac_init_help" = "recursive"; then
1555 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 test -d "$ac_dir" ||
1558 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_builddir=.
1561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562case "$ac_dir" in
1563.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001565 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 case $ac_top_builddir_sub in
1569 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571 esac ;;
1572esac
1573ac_abs_top_builddir=$ac_pwd
1574ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575# for backward compatibility:
1576ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 ac_top_srcdir=$ac_top_builddir_sub
1582 ac_abs_top_srcdir=$ac_pwd ;;
1583 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 ac_top_srcdir=$srcdir
1586 ac_abs_top_srcdir=$srcdir ;;
1587 *) # Relative name.
1588 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589 ac_top_srcdir=$ac_top_build_prefix$srcdir
1590 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001591esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 cd "$ac_dir" || { ac_status=$?; continue; }
1595 # Check for guested configure.
1596 if test -f "$ac_srcdir/configure.gnu"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599 elif test -f "$ac_srcdir/configure"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001603 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 fi || ac_status=$?
1605 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 done
1607fi
1608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001610if $ac_init_version; then
1611 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001612python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001613generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001615Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616This configure script is free software; the Free Software Foundation
1617gives unlimited permission to copy, distribute and modify it.
1618_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001621
1622## ------------------------ ##
1623## Autoconf initialization. ##
1624## ------------------------ ##
1625
1626# ac_fn_c_try_compile LINENO
1627# --------------------------
1628# Try to compile conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_compile ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 rm -f conftest.$ac_objext
1633 if { { ac_try="$ac_compile"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_compile") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648 test $ac_status = 0; } && {
1649 test -z "$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 } && test -s conftest.$ac_objext; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_compile
1663
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685 test $ac_status = 0; } > conftest.i && {
1686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
1696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_cpp
1700
Matthias Kloseb9621712010-04-24 17:59:49 +00001701# ac_fn_c_try_link LINENO
1702# -----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded.
1704ac_fn_c_try_link ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 rm -f conftest.$ac_objext conftest$ac_exeext
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>conftest.err
1716 ac_status=$?
1717 if test -s conftest.err; then
1718 grep -v '^ *+' conftest.err >conftest.er1
1719 cat conftest.er1 >&5
1720 mv -f conftest.er1 conftest.err
1721 fi
1722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723 test $ac_status = 0; } && {
1724 test -z "$ac_c_werror_flag" ||
1725 test ! -s conftest.err
1726 } && test -s conftest$ac_exeext && {
1727 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001728 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 }; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=1
1736fi
1737 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1738 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1739 # interfere with the next link command; also delete a directory that is
1740 # left behind by Apple's compiler. We do this before executing the actions.
1741 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 as_fn_set_status $ac_retval
1744
1745} # ac_fn_c_try_link
1746
Matthias Kloseb9621712010-04-24 17:59:49 +00001747# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1748# -------------------------------------------------------
1749# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1750# the include files in INCLUDES and setting the cache variable VAR
1751# accordingly.
1752ac_fn_c_check_header_mongrel ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001755 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1757$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001758if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001759 $as_echo_n "(cached) " >&6
1760fi
1761eval ac_res=\$$3
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764else
1765 # Is the header compilable?
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1767$as_echo_n "checking $2 usability... " >&6; }
1768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769/* end confdefs.h. */
1770$4
1771#include <$2>
1772_ACEOF
1773if ac_fn_c_try_compile "$LINENO"; then :
1774 ac_header_compiler=yes
1775else
1776 ac_header_compiler=no
1777fi
1778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1780$as_echo "$ac_header_compiler" >&6; }
1781
1782# Is the header present?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1784$as_echo_n "checking $2 presence... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787#include <$2>
1788_ACEOF
1789if ac_fn_c_try_cpp "$LINENO"; then :
1790 ac_header_preproc=yes
1791else
1792 ac_header_preproc=no
1793fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1796$as_echo "$ac_header_preproc" >&6; }
1797
1798# So? What about this header?
1799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1800 yes:no: )
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1802$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1805 ;;
1806 no:yes:* )
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1808$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1810$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1812$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1814$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001818## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001819## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 ) | sed "s/^/$as_me: WARNING: /" >&2
1821 ;;
1822esac
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 eval "$3=\$ac_header_compiler"
1829fi
1830eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832$as_echo "$ac_res" >&6; }
1833fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001835
1836} # ac_fn_c_check_header_mongrel
1837
1838# ac_fn_c_try_run LINENO
1839# ----------------------
1840# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1841# that executables *can* be run.
1842ac_fn_c_try_run ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 if { { ac_try="$ac_link"
1846case "(($ac_try" in
1847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848 *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852 (eval "$ac_link") 2>&5
1853 ac_status=$?
1854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1855 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1856 { { case "(($ac_try" in
1857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1858 *) ac_try_echo=$ac_try;;
1859esac
1860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1861$as_echo "$ac_try_echo"; } >&5
1862 (eval "$ac_try") 2>&5
1863 ac_status=$?
1864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865 test $ac_status = 0; }; }; then :
1866 ac_retval=0
1867else
1868 $as_echo "$as_me: program exited with status $ac_status" >&5
1869 $as_echo "$as_me: failed program was:" >&5
1870sed 's/^/| /' conftest.$ac_ext >&5
1871
1872 ac_retval=$ac_status
1873fi
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_run
1879
1880# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1881# -------------------------------------------------------
1882# Tests whether HEADER exists and can be compiled using the include files in
1883# INCLUDES, setting the cache variable VAR accordingly.
1884ac_fn_c_check_header_compile ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$4
1895#include <$2>
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 eval "$3=yes"
1899else
1900 eval "$3=no"
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001908
1909} # ac_fn_c_check_header_compile
1910
Matthias Kloseb9621712010-04-24 17:59:49 +00001911# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1912# -------------------------------------------
1913# Tests whether TYPE exists after having included INCLUDES, setting cache
1914# variable VAR accordingly.
1915ac_fn_c_check_type ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof ($2))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
1943if (sizeof (($2)))
1944 return 0;
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950
1951else
1952 eval "$3=yes"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001962
1963} # ac_fn_c_check_type
1964
1965# ac_fn_c_find_uintX_t LINENO BITS VAR
1966# ------------------------------------
1967# Finds an unsigned integer type with width BITS, setting cache variable VAR
1968# accordingly.
1969ac_fn_c_find_uintX_t ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1973$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001974if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975 $as_echo_n "(cached) " >&6
1976else
1977 eval "$3=no"
1978 # Order is important - never check a type that is potentially smaller
1979 # than half of the expected target width.
1980 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1981 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
1985int
1986main ()
1987{
1988static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001989test_array [0] = 0;
1990return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 case $ac_type in #(
1998 uint$2_t) :
1999 eval "$3=yes" ;; #(
2000 *) :
2001 eval "$3=\$ac_type" ;;
2002esac
2003fi
2004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002005 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007else
2008 break
2009fi
2010 done
2011fi
2012eval ac_res=\$$3
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2014$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002015 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017} # ac_fn_c_find_uintX_t
2018
2019# ac_fn_c_find_intX_t LINENO BITS VAR
2020# -----------------------------------
2021# Finds a signed integer type with width BITS, setting cache variable VAR
2022# accordingly.
2023ac_fn_c_find_intX_t ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2027$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002028if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002029 $as_echo_n "(cached) " >&6
2030else
2031 eval "$3=no"
2032 # Order is important - never check a type that is potentially smaller
2033 # than half of the expected target width.
2034 for ac_type in int$2_t 'int' 'long int' \
2035 'long long int' 'short int' 'signed char'; do
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002039 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002040int
2041main ()
2042{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002056int
2057main ()
2058{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002059static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002060 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069
2070else
2071 case $ac_type in #(
2072 int$2_t) :
2073 eval "$3=yes" ;; #(
2074 *) :
2075 eval "$3=\$ac_type" ;;
2076esac
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002081 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002082
2083else
2084 break
2085fi
2086 done
2087fi
2088eval ac_res=\$$3
2089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2090$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093} # ac_fn_c_find_intX_t
2094
2095# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2096# --------------------------------------------
2097# Tries to find the compile-time value of EXPR in a program that includes
2098# INCLUDES, setting VAR accordingly. Returns whether the value could be
2099# computed
2100ac_fn_c_compute_int ()
2101{
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 if test "$cross_compiling" = yes; then
2104 # Depending upon the size, compute the lo and hi bounds.
2105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002112test_array [0] = 0;
2113return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_lo=0 ac_mid=0
2121 while :; do
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002129test_array [0] = 0;
2130return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid; break
2138else
2139 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2140 if test $ac_lo -le $ac_mid; then
2141 ac_lo= ac_hi=
2142 break
2143 fi
2144 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 done
2148else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002156test_array [0] = 0;
2157return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_hi=-1 ac_mid=-1
2165 while :; do
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002173test_array [0] = 0;
2174return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002175
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_lo=$ac_mid; break
2182else
2183 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2184 if test $ac_mid -le $ac_hi; then
2185 ac_lo= ac_hi=
2186 break
2187 fi
2188 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191 done
2192else
2193 ac_lo= ac_hi=
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198# Binary search between lo and hi bounds.
2199while test "x$ac_lo" != "x$ac_hi"; do
2200 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h. */
2203$4
2204int
2205main ()
2206{
2207static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002208test_array [0] = 0;
2209return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_compile "$LINENO"; then :
2216 ac_hi=$ac_mid
2217else
2218 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221done
2222case $ac_lo in #((
2223?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2224'') ac_retval=1 ;;
2225esac
2226 else
2227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h. */
2229$4
2230static long int longval () { return $2; }
2231static unsigned long int ulongval () { return $2; }
2232#include <stdio.h>
2233#include <stdlib.h>
2234int
2235main ()
2236{
2237
2238 FILE *f = fopen ("conftest.val", "w");
2239 if (! f)
2240 return 1;
2241 if (($2) < 0)
2242 {
2243 long int i = longval ();
2244 if (i != ($2))
2245 return 1;
2246 fprintf (f, "%ld", i);
2247 }
2248 else
2249 {
2250 unsigned long int i = ulongval ();
2251 if (i != ($2))
2252 return 1;
2253 fprintf (f, "%lu", i);
2254 }
2255 /* Do not output a trailing newline, as this causes \r\n confusion
2256 on some platforms. */
2257 return ferror (f) || fclose (f) != 0;
2258
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_run "$LINENO"; then :
2264 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2265else
2266 ac_retval=1
2267fi
2268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2269 conftest.$ac_objext conftest.beam conftest.$ac_ext
2270rm -f conftest.val
2271
2272 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002273 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002274 as_fn_set_status $ac_retval
2275
2276} # ac_fn_c_compute_int
2277
2278# ac_fn_c_check_func LINENO FUNC VAR
2279# ----------------------------------
2280# Tests whether FUNC exists, setting the cache variable VAR accordingly
2281ac_fn_c_check_func ()
2282{
2283 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2285$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002286if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002287 $as_echo_n "(cached) " >&6
2288else
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290/* end confdefs.h. */
2291/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2293#define $2 innocuous_$2
2294
2295/* System header to define __stub macros and hopefully few prototypes,
2296 which can conflict with char $2 (); below.
2297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2298 <limits.h> exists even on freestanding compilers. */
2299
2300#ifdef __STDC__
2301# include <limits.h>
2302#else
2303# include <assert.h>
2304#endif
2305
2306#undef $2
2307
2308/* Override any GCC internal prototype to avoid an error.
2309 Use char because int might match the return type of a GCC
2310 builtin and then its argument prototype would still apply. */
2311#ifdef __cplusplus
2312extern "C"
2313#endif
2314char $2 ();
2315/* The GNU C library defines this for functions which it implements
2316 to always fail with ENOSYS. Some functions are actually named
2317 something starting with __ and the normal name is an alias. */
2318#if defined __stub_$2 || defined __stub___$2
2319choke me
2320#endif
2321
2322int
2323main ()
2324{
2325return $2 ();
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_link "$LINENO"; then :
2331 eval "$3=yes"
2332else
2333 eval "$3=no"
2334fi
2335rm -f core conftest.err conftest.$ac_objext \
2336 conftest$ac_exeext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002342
2343} # ac_fn_c_check_func
2344
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002345# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2346# ---------------------------------------------
2347# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2348# accordingly.
2349ac_fn_c_check_decl ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 as_decl_name=`echo $2|sed 's/ *(.*//'`
2353 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2355$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2356if eval \${$3+:} false; then :
2357 $as_echo_n "(cached) " >&6
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$4
2362int
2363main ()
2364{
2365#ifndef $as_decl_name
2366#ifdef __cplusplus
2367 (void) $as_decl_use;
2368#else
2369 (void) $as_decl_name;
2370#endif
2371#endif
2372
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$3=yes"
2379else
2380 eval "$3=no"
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383fi
2384eval ac_res=\$$3
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2386$as_echo "$ac_res" >&6; }
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388
2389} # ac_fn_c_check_decl
2390
Matthias Kloseb9621712010-04-24 17:59:49 +00002391# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2392# ----------------------------------------------------
2393# Tries to find if the field MEMBER exists in type AGGR, after including
2394# INCLUDES, setting cache variable VAR accordingly.
2395ac_fn_c_check_member ()
2396{
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2399$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002400if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 $as_echo_n "(cached) " >&6
2402else
2403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2404/* end confdefs.h. */
2405$5
2406int
2407main ()
2408{
2409static $2 ac_aggr;
2410if (ac_aggr.$3)
2411return 0;
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416if ac_fn_c_try_compile "$LINENO"; then :
2417 eval "$4=yes"
2418else
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* end confdefs.h. */
2421$5
2422int
2423main ()
2424{
2425static $2 ac_aggr;
2426if (sizeof ac_aggr.$3)
2427return 0;
2428 ;
2429 return 0;
2430}
2431_ACEOF
2432if ac_fn_c_try_compile "$LINENO"; then :
2433 eval "$4=yes"
2434else
2435 eval "$4=no"
2436fi
2437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2438fi
2439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2440fi
2441eval ac_res=\$$4
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002444 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002445
2446} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002448This file contains any messages produced by compilers while
2449running configure, to aid debugging if configure makes a mistake.
2450
Yury Selivanov7aa53412015-05-30 10:57:56 -04002451It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002452generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454 $ $0 $@
2455
2456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002458{
2459cat <<_ASUNAME
2460## --------- ##
2461## Platform. ##
2462## --------- ##
2463
2464hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2465uname -m = `(uname -m) 2>/dev/null || echo unknown`
2466uname -r = `(uname -r) 2>/dev/null || echo unknown`
2467uname -s = `(uname -s) 2>/dev/null || echo unknown`
2468uname -v = `(uname -v) 2>/dev/null || echo unknown`
2469
2470/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2471/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2472
2473/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2474/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2475/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002477/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2478/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2479/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2480
2481_ASUNAME
2482
2483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 $as_echo "PATH: $as_dir"
2489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002491
2492} >&5
2493
2494cat >&5 <<_ACEOF
2495
2496
2497## ----------- ##
2498## Core tests. ##
2499## ----------- ##
2500
2501_ACEOF
2502
2503
2504# Keep a trace of the command line.
2505# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002507# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002508# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002509ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002510ac_configure_args0=
2511ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002512ac_must_keep_next=false
2513for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002514do
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 for ac_arg
2516 do
2517 case $ac_arg in
2518 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2520 | -silent | --silent | --silen | --sile | --sil)
2521 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 esac
2525 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002530 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002532 case $ac_arg in
2533 *=* | --config-cache | -C | -disable-* | --disable-* \
2534 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2535 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2536 | -with-* | --with-* | -without-* | --without-* | --x)
2537 case "$ac_configure_args0 " in
2538 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2539 esac
2540 ;;
2541 -* ) ac_must_keep_next=true ;;
2542 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 ;;
2546 esac
2547 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
Matthias Kloseb9621712010-04-24 17:59:49 +00002549{ ac_configure_args0=; unset ac_configure_args0;}
2550{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552# When interrupted or exit'd, cleanup temporary files, and complete
2553# config.log. We remove comments because anyway the quotes in there
2554# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555# WARNING: Use '\'' to represent an apostrophe within the trap.
2556# 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 +00002557trap 'exit_status=$?
2558 # Save into config.log some information that might help in debugging.
2559 {
2560 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002561
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002563## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
2566 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567(
2568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2569 eval ac_val=\$$ac_var
2570 case $ac_val in #(
2571 *${as_nl}*)
2572 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2574$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac
2576 case $ac_var in #(
2577 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2579 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 esac ;;
2581 esac
2582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 "s/'\''/'\''\\\\'\'''\''/g;
2588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2589 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002590 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002592 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac |
2594 sort
2595)
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002597
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002599## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002601 echo
2602 for ac_var in $ac_subst_vars
2603 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 eval ac_val=\$$ac_var
2605 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002609 done | sort
2610 echo
2611
2612 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002616 echo
2617 for ac_var in $ac_subst_files
2618 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_val=\$$ac_var
2620 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002624 done | sort
2625 echo
2626 fi
2627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002630## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002631## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 echo
2635 fi
2636 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 $as_echo "$as_me: caught signal $ac_signal"
2638 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 rm -f core *.core core.conftest.* &&
2641 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002644for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002646done
2647ac_signal=0
2648
2649# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
Matthias Kloseb9621712010-04-24 17:59:49 +00002652$as_echo "/* confdefs.h */" > confdefs.h
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654# Predefined preprocessor variables.
2655
2656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_NAME "$PACKAGE_NAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_VERSION "$PACKAGE_VERSION"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_STRING "$PACKAGE_STRING"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2674_ACEOF
2675
Matthias Kloseb9621712010-04-24 17:59:49 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_URL "$PACKAGE_URL"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002682# Prefer an explicitly selected file to automatically selected ones.
2683ac_site_file1=NONE
2684ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002686 # We do not want a PATH search for config.site.
2687 case $CONFIG_SITE in #((
2688 -*) ac_site_file1=./$CONFIG_SITE;;
2689 */*) ac_site_file1=$CONFIG_SITE;;
2690 *) ac_site_file1=./$CONFIG_SITE;;
2691 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 ac_site_file1=$prefix/share/config.site
2694 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695else
Matthias Kloseb9621712010-04-24 17:59:49 +00002696 ac_site_file1=$ac_default_prefix/share/config.site
2697 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002699for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700do
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 test "x$ac_site_file" = xNONE && continue
2702 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2704$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002706 . "$ac_site_file" \
2707 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2709as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002710See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711 fi
2712done
2713
2714if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 # Some versions of bash will fail to source /dev/null (special files
2716 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2717 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2719$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 esac
2724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725else
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2727$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 >$cache_file
2729fi
2730
2731# Check that the precious variables saved in the cache have kept the same
2732# value.
2733ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2736 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 case $ac_old_set,$ac_new_set in
2740 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2742$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 +00002743 ac_cache_corrupted=: ;;
2744 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 ac_cache_corrupted=: ;;
2748 ,);;
2749 *)
2750 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002751 # differences in whitespace do not lead to failure.
2752 ac_old_val_w=`echo x $ac_old_val`
2753 ac_new_val_w=`echo x $ac_new_val`
2754 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2756$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2757 ac_cache_corrupted=:
2758 else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2760$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2761 eval $ac_var=\$ac_old_val
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2764$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2766$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 fi;;
2768 esac
2769 # Pass precious variables to config.status.
2770 if test "$ac_new_set" = set; then
2771 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002772 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 *) ac_arg=$ac_var=$ac_new_val ;;
2774 esac
2775 case " $ac_configure_args " in
2776 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002777 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 esac
2779 fi
2780done
2781if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2785$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002786 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002788## -------------------- ##
2789## Main body of script. ##
2790## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791
Guido van Rossum7f43da71994-08-01 12:15:30 +00002792ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2796ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797
Guido van Rossum627b2d71993-12-24 10:39:16 +00002798
Michael W. Hudson54241132001-12-07 15:38:26 +00002799
Trent Nelson4d4ec652012-10-16 08:51:24 -04002800
Trent Nelson5595ab52012-10-17 04:47:31 -04002801if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002802 # If we're building out-of-tree, we need to make sure the following
2803 # resources get picked up before their $srcdir counterparts.
2804 # Objects/ -> typeslots.inc
2805 # Include/ -> Python-ast.h, graminit.h
2806 # Python/ -> importlib.h
2807 # (A side effect of this is that these resources will automatically be
2808 # regenerated when building out-of-tree, regardless of whether or not
2809 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2810 # off.)
2811 BASECPPFLAGS="-IObjects -IInclude -IPython"
2812else
2813 BASECPPFLAGS=""
2814fi
2815
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002816
2817
2818
2819
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002820if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821then
2822# Extract the first word of "hg", so it can be a program name with args.
2823set dummy hg; ac_word=$2
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002826if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 $as_echo_n "(cached) " >&6
2828else
2829 if test -n "$HAS_HG"; then
2830 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2831else
2832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833for as_dir in $PATH
2834do
2835 IFS=$as_save_IFS
2836 test -z "$as_dir" && as_dir=.
2837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 ac_cv_prog_HAS_HG="found"
2840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2841 break 2
2842 fi
2843done
2844 done
2845IFS=$as_save_IFS
2846
2847 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2848fi
2849fi
2850HAS_HG=$ac_cv_prog_HAS_HG
2851if test -n "$HAS_HG"; then
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2853$as_echo "$HAS_HG" >&6; }
2854else
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2856$as_echo "no" >&6; }
2857fi
2858
2859
2860else
2861HAS_HG=no-repository
2862fi
2863if test $HAS_HG = found
2864then
2865 HGVERSION="hg id -i \$(srcdir)"
2866 HGTAG="hg id -t \$(srcdir)"
2867 HGBRANCH="hg id -b \$(srcdir)"
2868else
2869 HGVERSION=""
2870 HGTAG=""
2871 HGBRANCH=""
2872fi
2873
2874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002875ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
2877
Victor Stinnerdddf4842016-06-07 11:21:42 +02002878
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002879ac_aux_dir=
2880for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2881 if test -f "$ac_dir/install-sh"; then
2882 ac_aux_dir=$ac_dir
2883 ac_install_sh="$ac_aux_dir/install-sh -c"
2884 break
2885 elif test -f "$ac_dir/install.sh"; then
2886 ac_aux_dir=$ac_dir
2887 ac_install_sh="$ac_aux_dir/install.sh -c"
2888 break
2889 elif test -f "$ac_dir/shtool"; then
2890 ac_aux_dir=$ac_dir
2891 ac_install_sh="$ac_aux_dir/shtool install -c"
2892 break
2893 fi
2894done
2895if test -z "$ac_aux_dir"; then
2896 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2897fi
2898
2899# These three variables are undocumented and unsupported,
2900# and are intended to be withdrawn in a future Autoconf release.
2901# They can cause serious problems if a builder's source tree is in a directory
2902# whose full name contains unusual characters.
2903ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2904ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2905ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2906
2907
2908# Make sure we can run config.sub.
2909$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2910 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2911
2912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2913$as_echo_n "checking build system type... " >&6; }
2914if ${ac_cv_build+:} false; then :
2915 $as_echo_n "(cached) " >&6
2916else
2917 ac_build_alias=$build_alias
2918test "x$ac_build_alias" = x &&
2919 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2920test "x$ac_build_alias" = x &&
2921 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2922ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2923 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2924
2925fi
2926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2927$as_echo "$ac_cv_build" >&6; }
2928case $ac_cv_build in
2929*-*-*) ;;
2930*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2931esac
2932build=$ac_cv_build
2933ac_save_IFS=$IFS; IFS='-'
2934set x $ac_cv_build
2935shift
2936build_cpu=$1
2937build_vendor=$2
2938shift; shift
2939# Remember, the first character of IFS is used to create $*,
2940# except with old shells:
2941build_os=$*
2942IFS=$ac_save_IFS
2943case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2944
2945
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2947$as_echo_n "checking host system type... " >&6; }
2948if ${ac_cv_host+:} false; then :
2949 $as_echo_n "(cached) " >&6
2950else
2951 if test "x$host_alias" = x; then
2952 ac_cv_host=$ac_cv_build
2953else
2954 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2955 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2956fi
2957
2958fi
2959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2960$as_echo "$ac_cv_host" >&6; }
2961case $ac_cv_host in
2962*-*-*) ;;
2963*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2964esac
2965host=$ac_cv_host
2966ac_save_IFS=$IFS; IFS='-'
2967set x $ac_cv_host
2968shift
2969host_cpu=$1
2970host_vendor=$2
2971shift; shift
2972# Remember, the first character of IFS is used to create $*,
2973# except with old shells:
2974host_os=$*
2975IFS=$ac_save_IFS
2976case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2977
2978
2979
doko@python.orga10e4a92013-01-25 18:45:12 +01002980
2981
Ned Deilyfcbc2462014-08-22 13:32:49 -07002982# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2983rm -f pybuilddir.txt
2984
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002985for ac_prog in python$PACKAGE_VERSION python3 python
2986do
2987 # Extract the first word of "$ac_prog", so it can be a program name with args.
2988set dummy $ac_prog; ac_word=$2
2989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2990$as_echo_n "checking for $ac_word... " >&6; }
2991if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2992 $as_echo_n "(cached) " >&6
2993else
2994 if test -n "$PYTHON_FOR_GEN"; then
2995 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2996else
2997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2998for as_dir in $PATH
2999do
3000 IFS=$as_save_IFS
3001 test -z "$as_dir" && as_dir=.
3002 for ac_exec_ext in '' $ac_executable_extensions; do
3003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3004 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3006 break 2
3007 fi
3008done
3009 done
3010IFS=$as_save_IFS
3011
3012fi
3013fi
3014PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3015if test -n "$PYTHON_FOR_GEN"; then
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3017$as_echo "$PYTHON_FOR_GEN" >&6; }
3018else
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020$as_echo "no" >&6; }
3021fi
3022
3023
3024 test -n "$PYTHON_FOR_GEN" && break
3025done
3026test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3027
3028if test "$PYTHON_FOR_GEN" = not-found; then
3029 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3030 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3031 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3032fi
3033
3034
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003035if test "$cross_compiling" = yes; then
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3037$as_echo_n "checking for python interpreter for cross build... " >&6; }
3038 if test -z "$PYTHON_FOR_BUILD"; then
3039 for interp in python$PACKAGE_VERSION python3 python; do
3040 which $interp >/dev/null 2>&1 || continue
3041 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3042 break
3043 fi
3044 interp=
3045 done
3046 if test x$interp = x; then
3047 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3048 fi
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3050$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003051 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 +02003052 fi
Martin Pantereac67be2016-07-28 01:28:27 +00003053 PGEN_DEPENDENCY=''
Christian Heimes954ac032012-12-12 13:10:21 +01003054elif test "$cross_compiling" = maybe; then
3055 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003056else
3057 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Pantereac67be2016-07-28 01:28:27 +00003058 PGEN_DEPENDENCY='$(PGEN)'
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003059fi
3060
3061
Martin v. Löwis11437992002-04-12 09:54:03 +00003062
Martin Pantereac67be2016-07-28 01:28:27 +00003063
Benjamin Petersond23f8222009-04-05 19:13:16 +00003064if test "$prefix" != "/"; then
3065 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3066fi
3067
3068
Martin v. Löwis11437992002-04-12 09:54:03 +00003069
3070
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003071# We don't use PACKAGE_ variables, and they cause conflicts
3072# with other autoconf-based packages that include Python.h
3073grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3074rm confdefs.h
3075mv confdefs.h.new confdefs.h
3076
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003077
Yury Selivanov7aa53412015-05-30 10:57:56 -04003078VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003079
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003080# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003081
3082SOVERSION=1.0
3083
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003084# The later defininition of _XOPEN_SOURCE disables certain features
3085# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003088
3089
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003090# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3091# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3092# them.
3093
Matthias Kloseb9621712010-04-24 17:59:49 +00003094$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003095
3096
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003097# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3098# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3099# them.
3100
Matthias Kloseb9621712010-04-24 17:59:49 +00003101$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003102
3103
Martin v. Löwisd6320502004-08-12 13:45:08 +00003104# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3105# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3106
Matthias Kloseb9621712010-04-24 17:59:49 +00003107$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003108
3109
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003110# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3111# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3112# them.
3113
Matthias Kloseb9621712010-04-24 17:59:49 +00003114$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003115
3116
3117
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003118define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003119
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003120# Arguments passed to configure.
3121
3122CONFIG_ARGS="$ac_configure_args"
3123
Matthias Kloseb9621712010-04-24 17:59:49 +00003124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3125$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003126# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003127if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003128 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 case $enableval in
3130 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003131 # Locate the best usable SDK, see Mac/README.txt for more
3132 # information
3133 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003134 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003135 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003136 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3137 if test ! -d "${enableval}"
3138 then
3139 enableval=/
3140 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003141 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003142 ;;
3143 esac
3144 case $enableval in
3145 no)
3146 UNIVERSALSDK=
3147 enable_universalsdk=
3148 ;;
3149 *)
3150 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003151 if test ! -d "${UNIVERSALSDK}"
3152 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003153 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003154 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155 ;;
3156 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003157
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003158
Thomas Wouters477c8d52006-05-27 19:21:47 +00003159else
3160
3161 UNIVERSALSDK=
3162 enable_universalsdk=
3163
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003164fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003165
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166if test -n "${UNIVERSALSDK}"
3167then
Matthias Kloseb9621712010-04-24 17:59:49 +00003168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3169$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170else
Matthias Kloseb9621712010-04-24 17:59:49 +00003171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3172$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003173fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003176
Ned Deily87adb6e2013-10-18 21:09:56 -07003177ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003178
Ned Deilycbfb9a52012-06-23 16:02:19 -07003179# For backward compatibility reasons we prefer to select '32-bit' if available,
3180# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003181UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003182if test "`uname -s`" = "Darwin"
3183then
3184 if test -n "${UNIVERSALSDK}"
3185 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003186 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003187 then
3188 UNIVERSAL_ARCHS="intel"
3189 fi
3190 fi
3191fi
3192
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003193
Matthias Kloseb9621712010-04-24 17:59:49 +00003194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3195$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196
3197# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003198if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003199 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003200 UNIVERSAL_ARCHS="$withval"
3201
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003202fi
3203
Ned Deily87adb6e2013-10-18 21:09:56 -07003204if test -n "${UNIVERSALSDK}"
3205then
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3207$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3208else
3209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3210$as_echo "no" >&6; }
3211fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003213
3214# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003215if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003216 withval=$with_framework_name;
3217 PYTHONFRAMEWORK=${withval}
3218 PYTHONFRAMEWORKDIR=${withval}.framework
3219 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3220
3221else
3222
3223 PYTHONFRAMEWORK=Python
3224 PYTHONFRAMEWORKDIR=Python.framework
3225 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3226
3227fi
3228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003229# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003230if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003232 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003233 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003234 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003235 esac
3236 case $enableval in
3237 no)
3238 PYTHONFRAMEWORK=
3239 PYTHONFRAMEWORKDIR=no-framework
3240 PYTHONFRAMEWORKPREFIX=
3241 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003242 FRAMEWORKINSTALLFIRST=
3243 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003244 FRAMEWORKALTINSTALLFIRST=
3245 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003246 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003247 if test "x${prefix}" = "xNONE"; then
3248 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3249 else
3250 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3251 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003252 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003253 ;;
3254 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003255 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003256 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003257 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003258 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003259 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3260 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003261 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003262 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003263
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003264 if test "x${prefix}" = "xNONE" ; then
3265 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003267 else
3268 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3269 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003270
3271 case "${enableval}" in
3272 /System*)
3273 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3274 if test "${prefix}" = "NONE" ; then
3275 # See below
3276 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3277 fi
3278 ;;
3279
3280 /Library*)
3281 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3282 ;;
3283
3284 */Library/Frameworks)
3285 MDIR="`dirname "${enableval}"`"
3286 MDIR="`dirname "${MDIR}"`"
3287 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3288
3289 if test "${prefix}" = "NONE"; then
3290 # User hasn't specified the
3291 # --prefix option, but wants to install
3292 # the framework in a non-default location,
3293 # ensure that the compatibility links get
3294 # installed relative to that prefix as well
3295 # instead of in /usr/local.
3296 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3297 fi
3298 ;;
3299
3300 *)
3301 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3302 ;;
3303 esac
3304
Jack Jansen127e56e2001-09-11 14:41:54 +00003305 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003306
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003307 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003308 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003309 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003310
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003311 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003312
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003313 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3314
3315 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3316
Jack Jansene578a632001-08-15 01:27:14 +00003317 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003318
Guido van Rossum563e7081996-09-10 18:20:48 +00003319else
Martin v. Löwis11437992002-04-12 09:54:03 +00003320
Jack Jansene578a632001-08-15 01:27:14 +00003321 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003322 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003323 PYTHONFRAMEWORKPREFIX=
3324 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003325 FRAMEWORKINSTALLFIRST=
3326 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003327 FRAMEWORKALTINSTALLFIRST=
3328 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003329 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003330 if test "x${prefix}" = "xNONE" ; then
3331 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3332 else
3333 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3334 fi
Jack Jansene578a632001-08-15 01:27:14 +00003335 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003336
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003337
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003338fi
3339
Thomas Wouters477c8d52006-05-27 19:21:47 +00003340
3341
Michael W. Hudson54241132001-12-07 15:38:26 +00003342
3343
3344
3345
Jack Jansene578a632001-08-15 01:27:14 +00003346
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003347
3348
3349
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003350
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003351
Ned Deilyb8f944f2013-11-21 22:42:25 -08003352
Jack Jansene578a632001-08-15 01:27:14 +00003353##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003354## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003355## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003356##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003357# Set name for machine-dependent library files
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3360$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003361if test -z "$MACHDEP"
3362then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003363 # avoid using uname for cross builds
3364 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003365 # ac_sys_system and ac_sys_release are used for setting
3366 # a lot of different things including 'define_xopen_source'
3367 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003368 case "$host" in
3369 *-*-linux*)
3370 ac_sys_system=Linux
3371 ;;
3372 *-*-cygwin*)
3373 ac_sys_system=Cygwin
3374 ;;
3375 *)
3376 # for now, limit cross builds to known configurations
3377 MACHDEP="unknown"
3378 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3379 esac
3380 ac_sys_release=
3381 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003382 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003383 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003384 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003385 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003386 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003387 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003388 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003389 fi
3390 ac_md_system=`echo $ac_sys_system |
3391 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3392 ac_md_release=`echo $ac_sys_release |
3393 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3394 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003395
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003396 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003397 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003398 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003399 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003400 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003401 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003402 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003403fi
Guido van Rossum91922671997-10-09 20:24:13 +00003404
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003405
3406if test "$cross_compiling" = yes; then
3407 case "$host" in
3408 *-*-linux*)
3409 case "$host_cpu" in
3410 arm*)
3411 _host_cpu=arm
3412 ;;
3413 *)
3414 _host_cpu=$host_cpu
3415 esac
3416 ;;
3417 *-*-cygwin*)
3418 _host_cpu=
3419 ;;
3420 *)
3421 # for now, limit cross builds to known configurations
3422 MACHDEP="unknown"
3423 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3424 esac
3425 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3426fi
3427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3429# disable features if it is defined, without any means to access these
3430# features as extensions. For these systems, we skip the definition of
3431# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3432# some feature, make sure there is no alternative way to access this
3433# feature. Also, when using wildcards, make sure you have verified the
3434# need for not defining _XOPEN_SOURCE on all systems matching the
3435# wildcard, and that the wildcard does not include future systems
3436# (which may remove their limitations).
3437case $ac_sys_system/$ac_sys_release in
3438 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3439 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003440 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003441 # In addition, Stefan Krah confirms that issue #1244610 exists through
3442 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003443 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003444 define_xopen_source=no
3445 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3446 # also defined. This can be overridden by defining _BSD_SOURCE
3447 # As this has a different meaning on Linux, only define it on OpenBSD
3448
Matthias Kloseb9621712010-04-24 17:59:49 +00003449$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003450
3451 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003452 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003453 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3454 # also defined. This can be overridden by defining _BSD_SOURCE
3455 # As this has a different meaning on Linux, only define it on OpenBSD
3456
Matthias Kloseb9621712010-04-24 17:59:49 +00003457$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003458
3459 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003460 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3461 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3462 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003463 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 +00003464 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003465 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3466 # request to enable features supported by the standard as a request
3467 # to disable features not supported by the standard. The best way
3468 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3469 # entirely and define __EXTENSIONS__ instead.
3470 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003471 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003472 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3473 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003474 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003475 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003476 define_xopen_source=no;;
3477 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003478 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003479 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003480 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003481 # On FreeBSD 4, the math functions C89 does not cover are never defined
3482 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3483 FreeBSD/4.*)
3484 define_xopen_source=no;;
3485 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3486 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3487 # identifies itself as Darwin/7.*
3488 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3489 # disables platform specific features beyond repair.
3490 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3491 # has no effect, don't bother defining them
3492 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003493 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003494 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003495 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003496 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3497 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3498 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003499 AIX/4)
3500 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003501 AIX/5)
3502 if test `uname -r` -eq 1; then
3503 define_xopen_source=no
3504 fi
3505 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003506 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3507 # defining NI_NUMERICHOST.
3508 QNX/6.3.2)
3509 define_xopen_source=no
3510 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003511
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003512esac
3513
3514if test $define_xopen_source = yes
3515then
Victor Stinner14d098d2011-09-07 22:29:43 +02003516 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003517
Victor Stinner14d098d2011-09-07 22:29:43 +02003518$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003519
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003520
3521 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3522 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3523 # several APIs are not declared. Since this is also needed in some
3524 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003525
Matthias Kloseb9621712010-04-24 17:59:49 +00003526$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003527
3528
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003529
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003530$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003531
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003532fi
3533
Christian Heimes647cd872013-12-07 23:39:33 +01003534# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3535case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003536 hp*|HP*)
3537 define_stdc_a1=yes;;
3538 *)
3539 define_stdc_a1=no;;
3540esac
3541
3542if test $define_stdc_a1 = yes
3543then
Christian Heimes647cd872013-12-07 23:39:33 +01003544
3545$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3546
Christian Heimesb02bcae2013-12-08 15:21:08 +01003547fi
Christian Heimes647cd872013-12-07 23:39:33 +01003548
Guido van Rossum91922671997-10-09 20:24:13 +00003549#
3550# SGI compilers allow the specification of the both the ABI and the
3551# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003552# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003553#
3554# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3555# thus supply support for various ABI/ISA combinations. The MACHDEP
3556# variable is also adjusted.
3557#
3558
3559if test ! -z "$SGI_ABI"
3560then
3561 CC="cc $SGI_ABI"
3562 LDFLAGS="$SGI_ABI $LDFLAGS"
3563 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3566$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003567
Jack Jansen6b08a402004-06-03 12:41:45 +00003568# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3569# it may influence the way we can build extensions, so distutils
3570# needs to check it
3571
Thomas Wouters477c8d52006-05-27 19:21:47 +00003572
Jack Jansen6b08a402004-06-03 12:41:45 +00003573CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003574EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003575
Guido van Rossum627b2d71993-12-24 10:39:16 +00003576# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003577
3578# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3579# for debug/optimization stuff. BASECFLAGS is for flags that are required
3580# just to get things to compile and link. Users are free to override OPT
3581# when running configure or make. The build should not break if they do.
3582# BASECFLAGS should generally not be messed with, however.
3583
3584# XXX shouldn't some/most/all of this code be merged with the stuff later
3585# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3587$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003589# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003592 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003593 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003594 without_gcc=yes;;
3595 yes) CC=gcc
3596 without_gcc=no;;
3597 *) CC=$withval
3598 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003599 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003600else
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003602 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003603 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003604 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003605 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003606 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607fi
3608
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3610$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003611
Zachary Ware5af85642015-12-21 12:09:17 -06003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3613$as_echo_n "checking for --with-icc... " >&6; }
3614
3615# Check whether --with-icc was given.
3616if test "${with_icc+set}" = set; then :
3617 withval=$with_icc;
3618 case $withval in
3619 no) CC=${CC:-cc}
3620 with_icc=no;;
3621 yes) CC=icc
3622 CXX=icpc
3623 with_icc=yes;;
3624 *) CC=$withval
3625 with_icc=$withval;;
3626 esac
3627else
3628
3629 with_icc=no
3630fi
3631
3632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3633$as_echo "$with_icc" >&6; }
3634
Guido van Rossum8b131c51995-03-09 14:10:13 +00003635# If the user switches compilers, we can't believe the cache
3636if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3637then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003638 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003639(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003640fi
3641
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003642# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3643# when the compiler supports them, but we don't always want -O2, and
3644# we set -g later.
3645if test -z "$CFLAGS"; then
3646 CFLAGS=
3647fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003648
3649if test "$ac_sys_system" = "Darwin"
3650then
3651 # Compiler selection on MacOSX is more complicated than
3652 # AC_PROG_CC can handle, see Mac/README.txt for more
3653 # information
3654 if test -z "${CC}"
3655 then
3656 found_gcc=
3657 found_clang=
3658 as_save_IFS=$IFS; IFS=:
3659 for as_dir in $PATH
3660 do
3661 IFS=$as_save_IFS
3662 if test -x $as_dir/gcc; then
3663 if test -z "${found_gcc}"; then
3664 found_gcc=$as_dir/gcc
3665 fi
3666 fi
3667 if test -x $as_dir/clang; then
3668 if test -z "${found_clang}"; then
3669 found_clang=$as_dir/clang
3670 fi
3671 fi
3672 done
3673 IFS=$as_save_IFS
3674
3675 if test -n "$found_gcc" -a -n "$found_clang"
3676 then
3677 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3678 then
3679 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3680$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3681 CC="$found_clang"
3682 CXX="$found_clang++"
3683 fi
3684
3685
3686 elif test -z "$found_gcc" -a -n "$found_clang"
3687 then
3688 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3689$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3690 CC="$found_clang"
3691 CXX="$found_clang++"
3692
3693 elif test -z "$found_gcc" -a -z "$found_clang"
3694 then
3695 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3696 if test -n "${found_clang}"
3697 then
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3699$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3700 CC="${found_clang}"
3701 CXX="`/usr/bin/xcrun -find clang++`"
3702
3703 # else: use default behaviour
3704 fi
3705 fi
3706 fi
3707fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003708ac_ext=c
3709ac_cpp='$CPP $CPPFLAGS'
3710ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3711ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3712ac_compiler_gnu=$ac_cv_c_compiler_gnu
3713if test -n "$ac_tool_prefix"; then
3714 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3715set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003718if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720else
3721 if test -n "$CC"; then
3722 ac_cv_prog_CC="$CC" # Let the user override the test.
3723else
Martin v. Löwis11437992002-04-12 09:54:03 +00003724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3725for as_dir in $PATH
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $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 +00003733 break 2
3734 fi
3735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
Jack Jansendd19cf82001-12-06 22:36:17 +00003739fi
3740fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003742if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3744$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003745else
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3747$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003748fi
3749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750
Martin v. Löwis11437992002-04-12 09:54:03 +00003751fi
3752if test -z "$ac_cv_prog_CC"; then
3753 ac_ct_CC=$CC
3754 # Extract the first word of "gcc", so it can be a program name with args.
3755set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3757$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003758if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
3761 if test -n "$ac_ct_CC"; then
3762 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3763else
3764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3765for as_dir in $PATH
3766do
3767 IFS=$as_save_IFS
3768 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 break 2
3774 fi
3775done
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
3779fi
3780fi
3781ac_ct_CC=$ac_cv_prog_ac_ct_CC
3782if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3784$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003785else
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3787$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 if test "x$ac_ct_CC" = x; then
3791 CC=""
3792 else
3793 case $cross_compiling:$ac_tool_warned in
3794yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3796$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797ac_tool_warned=yes ;;
3798esac
3799 CC=$ac_ct_CC
3800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
3802 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003803fi
3804
Jack Jansendd19cf82001-12-06 22:36:17 +00003805if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 if test -n "$ac_tool_prefix"; then
3807 # 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 +00003808set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3810$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003811if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003812 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003813else
3814 if test -n "$CC"; then
3815 ac_cv_prog_CC="$CC" # Let the user override the test.
3816else
Martin v. Löwis11437992002-04-12 09:54:03 +00003817as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3818for as_dir in $PATH
3819do
3820 IFS=$as_save_IFS
3821 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 $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 +00003826 break 2
3827 fi
3828done
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
3832fi
3833fi
3834CC=$ac_cv_prog_CC
3835if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3837$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003838else
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3840$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846if test -z "$CC"; then
3847 # Extract the first word of "cc", so it can be a program name with args.
3848set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3850$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003851if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003853else
3854 if test -n "$CC"; then
3855 ac_cv_prog_CC="$CC" # Let the user override the test.
3856else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003857 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003858as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3859for as_dir in $PATH
3860do
3861 IFS=$as_save_IFS
3862 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003863 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003865 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3866 ac_prog_rejected=yes
3867 continue
3868 fi
3869 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 break 2
3872 fi
3873done
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003877if test $ac_prog_rejected = yes; then
3878 # We found a bogon in the path, so make sure we never use it.
3879 set dummy $ac_cv_prog_CC
3880 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003882 # We chose a different compiler from the bogus one.
3883 # However, it has the same basename, so the bogon will be chosen
3884 # first if we set CC to just the basename; use the full file name.
3885 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003886 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003887 fi
3888fi
3889fi
3890fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003891CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003892if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3894$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003895else
Matthias Kloseb9621712010-04-24 17:59:49 +00003896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3897$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003898fi
3899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900
Martin v. Löwis11437992002-04-12 09:54:03 +00003901fi
3902if test -z "$CC"; then
3903 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003905 do
3906 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3907set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3909$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003910if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003912else
3913 if test -n "$CC"; then
3914 ac_cv_prog_CC="$CC" # Let the user override the test.
3915else
Martin v. Löwis11437992002-04-12 09:54:03 +00003916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3917for as_dir in $PATH
3918do
3919 IFS=$as_save_IFS
3920 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003922 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 $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 +00003925 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003926 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003927done
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003930
3931fi
3932fi
3933CC=$ac_cv_prog_CC
3934if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3936$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003937else
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3939$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003940fi
3941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942
Martin v. Löwis11437992002-04-12 09:54:03 +00003943 test -n "$CC" && break
3944 done
3945fi
3946if test -z "$CC"; then
3947 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003949do
3950 # Extract the first word of "$ac_prog", so it can be a program name with args.
3951set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3953$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003954if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003956else
3957 if test -n "$ac_ct_CC"; then
3958 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3959else
3960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3961for as_dir in $PATH
3962do
3963 IFS=$as_save_IFS
3964 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 $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 +00003969 break 2
3970 fi
3971done
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003973IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003974
Martin v. Löwis11437992002-04-12 09:54:03 +00003975fi
3976fi
3977ac_ct_CC=$ac_cv_prog_ac_ct_CC
3978if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3980$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003981else
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3983$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003984fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987 test -n "$ac_ct_CC" && break
3988done
Michael W. Hudson54241132001-12-07 15:38:26 +00003989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003990 if test "x$ac_ct_CC" = x; then
3991 CC=""
3992 else
3993 case $cross_compiling:$ac_tool_warned in
3994yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997ac_tool_warned=yes ;;
3998esac
3999 CC=$ac_ct_CC
4000 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004001fi
4002
4003fi
4004
4005
Matthias Kloseb9621712010-04-24 17:59:49 +00004006test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004008as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004009See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004010
4011# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004012$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4013set X $ac_compile
4014ac_compiler=$2
4015for ac_option in --version -v -V -qversion; do
4016 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
4023 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004025 if test -s conftest.err; then
4026 sed '10a\
4027... rest of stderr output deleted ...
4028 10q' conftest.err >conftest.er1
4029 cat conftest.er1 >&5
4030 fi
4031 rm -f conftest.er1 conftest.err
4032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4033 test $ac_status = 0; }
4034done
Martin v. Löwis11437992002-04-12 09:54:03 +00004035
Matthias Kloseb9621712010-04-24 17:59:49 +00004036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004037/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004038
Martin v. Löwis11437992002-04-12 09:54:03 +00004039int
4040main ()
4041{
4042
4043 ;
4044 return 0;
4045}
4046_ACEOF
4047ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004048ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004049# Try to create an executable without -o first, disregard a.out.
4050# It will help us diagnose broken compilers, and finding out an intuition
4051# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4053$as_echo_n "checking whether the C compiler works... " >&6; }
4054ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4055
4056# The possible output files:
4057ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059ac_rmfiles=
4060for ac_file in $ac_files
4061do
4062 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004064 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4065 esac
4066done
4067rm -f $ac_rmfiles
4068
Matthias Kloseb9621712010-04-24 17:59:49 +00004069if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004070case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004077 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4081# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4082# in a Makefile. We should not override ac_cv_exeext if it was cached,
4083# so that the user can short-circuit this test for compilers unknown to
4084# Autoconf.
4085for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004086do
4087 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004090 ;;
4091 [ab].out )
4092 # We found the default executable, but exeext='' is most
4093 # certainly right.
4094 break;;
4095 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004097 then :; else
4098 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4099 fi
4100 # We set ac_cv_exeext here because the later test for it is not
4101 # safe: cross compilers may not add the suffix if given an `-o'
4102 # argument, so we may need to know it at that point already.
4103 # Even if this section looks crufty: it has the advantage of
4104 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105 break;;
4106 * )
4107 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004108 esac
4109done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110test "$ac_cv_exeext" = no && ac_cv_exeext=
4111
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004112else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113 ac_file=''
4114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004115if test -z "$ac_file"; then :
4116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4117$as_echo "no" >&6; }
4118$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004119sed 's/^/| /' conftest.$ac_ext >&5
4120
Matthias Kloseb9621712010-04-24 17:59:49 +00004121{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4122$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004123as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004124See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004125else
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4127$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4130$as_echo_n "checking for C compiler default output file name... " >&6; }
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4132$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134
Matthias Kloseb9621712010-04-24 17:59:49 +00004135rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004136ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4138$as_echo_n "checking for suffix of executables... " >&6; }
4139if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004150 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4151# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4152# work properly (i.e., refer to `conftest.exe'), while it won't with
4153# `rm'.
4154for ac_file in conftest.exe conftest conftest.*; do
4155 test -f "$ac_file" || continue
4156 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004158 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4159 break;;
4160 * ) break;;
4161 esac
4162done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163else
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4165$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004166as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004167See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169rm -f conftest conftest$ac_cv_exeext
4170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4171$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004172
4173rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004174EXEEXT=$ac_cv_exeext
4175ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4177/* end confdefs.h. */
4178#include <stdio.h>
4179int
4180main ()
4181{
4182FILE *f = fopen ("conftest.out", "w");
4183 return ferror (f) || fclose (f) != 0;
4184
4185 ;
4186 return 0;
4187}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189ac_clean_files="$ac_clean_files conftest.out"
4190# Check that the compiler produces executables we can run. If not, either
4191# the compiler is broken, or we cross compile.
4192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4193$as_echo_n "checking whether we are cross compiling... " >&6; }
4194if test "$cross_compiling" != yes; then
4195 { { ac_try="$ac_link"
4196case "(($ac_try" in
4197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4198 *) ac_try_echo=$ac_try;;
4199esac
4200eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4201$as_echo "$ac_try_echo"; } >&5
4202 (eval "$ac_link") 2>&5
4203 ac_status=$?
4204 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4205 test $ac_status = 0; }
4206 if { ac_try='./conftest$ac_cv_exeext'
4207 { { case "(($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_try") 2>&5
4214 ac_status=$?
4215 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4216 test $ac_status = 0; }; }; then
4217 cross_compiling=no
4218 else
4219 if test "$cross_compiling" = maybe; then
4220 cross_compiling=yes
4221 else
4222 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4223$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004224as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004225If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004226See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 fi
4228 fi
4229fi
4230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4231$as_echo "$cross_compiling" >&6; }
4232
4233rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4234ac_clean_files=$ac_clean_files_save
4235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4236$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004237if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 $as_echo_n "(cached) " >&6
4239else
4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004241/* end confdefs.h. */
4242
4243int
4244main ()
4245{
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
4251rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004252if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253case "(($ac_try" in
4254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4255 *) ac_try_echo=$ac_try;;
4256esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4258$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004260 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004261 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4262 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 for ac_file in conftest.o conftest.obj conftest.*; do
4264 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004265 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004267 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4268 break;;
4269 esac
4270done
4271else
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004273sed 's/^/| /' conftest.$ac_ext >&5
4274
Matthias Kloseb9621712010-04-24 17:59:49 +00004275{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004277as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004278See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004279fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004280rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4283$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004284OBJEXT=$ac_cv_objext
4285ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4287$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004288if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004290else
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004293
Martin v. Löwis11437992002-04-12 09:54:03 +00004294int
4295main ()
4296{
4297#ifndef __GNUC__
4298 choke me
4299#endif
4300
4301 ;
4302 return 0;
4303}
4304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004306 ac_compiler_gnu=yes
4307else
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004311ac_cv_c_compiler_gnu=$ac_compiler_gnu
4312
4313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4315$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4316if test $ac_compiler_gnu = yes; then
4317 GCC=yes
4318else
4319 GCC=
4320fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004321ac_test_CFLAGS=${CFLAGS+set}
4322ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4324$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004325if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004327else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328 ac_save_c_werror_flag=$ac_c_werror_flag
4329 ac_c_werror_flag=yes
4330 ac_cv_prog_cc_g=no
4331 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004334
Martin v. Löwis11437992002-04-12 09:54:03 +00004335int
4336main ()
4337{
4338
4339 ;
4340 return 0;
4341}
4342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004344 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345else
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 CFLAGS=""
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004348/* end confdefs.h. */
4349
4350int
4351main ()
4352{
4353
4354 ;
4355 return 0;
4356}
4357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359
Matthias Kloseb9621712010-04-24 17:59:49 +00004360else
4361 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004362 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004364/* end confdefs.h. */
4365
4366int
4367main ()
4368{
4369
4370 ;
4371 return 0;
4372}
4373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4382 ac_c_werror_flag=$ac_save_c_werror_flag
4383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4385$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004386if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004387 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004388elif test $ac_cv_prog_cc_g = yes; then
4389 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004390 CFLAGS="-g -O2"
4391 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004392 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393 fi
4394else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004395 if test "$GCC" = yes; then
4396 CFLAGS="-O2"
4397 else
4398 CFLAGS=
4399 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4402$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004403if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004404 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004405else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004407ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004409/* end confdefs.h. */
4410#include <stdarg.h>
4411#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004412struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004413/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4414struct buf { int x; };
4415FILE * (*rcsopen) (struct buf *, struct stat *, int);
4416static char *e (p, i)
4417 char **p;
4418 int i;
4419{
4420 return p[i];
4421}
4422static char *f (char * (*g) (char **, int), char **p, ...)
4423{
4424 char *s;
4425 va_list v;
4426 va_start (v,p);
4427 s = g (p, va_arg (v,int));
4428 va_end (v);
4429 return s;
4430}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004431
4432/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4433 function prototypes and stuff, but not '\xHH' hex character constants.
4434 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004435 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004436 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4437 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004438 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004439int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004441/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4442 inside strings and character constants. */
4443#define FOO(x) 'x'
4444int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4445
Skip Montanaro6dead952003-09-25 14:50:04 +00004446int test (int i, double x);
4447struct s1 {int (*f) (int a);};
4448struct s2 {int (*f) (double a);};
4449int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4450int argc;
4451char **argv;
4452int
4453main ()
4454{
4455return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4456 ;
4457 return 0;
4458}
4459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004460for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4461 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004462do
4463 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004464 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004465 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004467rm -f core conftest.err conftest.$ac_objext
4468 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004469done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004470rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004471CC=$ac_save_CC
4472
4473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004474# AC_CACHE_VAL
4475case "x$ac_cv_prog_cc_c89" in
4476 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4478$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4481$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004483 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4485$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004486esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004487if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004488
Matthias Kloseb9621712010-04-24 17:59:49 +00004489fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004490
Martin v. Löwis11437992002-04-12 09:54:03 +00004491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004496
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004497ac_ext=c
4498ac_cpp='$CPP $CPPFLAGS'
4499ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4500ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4501ac_compiler_gnu=$ac_cv_c_compiler_gnu
4502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4503$as_echo_n "checking how to run the C preprocessor... " >&6; }
4504# On Suns, sometimes $CPP names a directory.
4505if test -n "$CPP" && test -d "$CPP"; then
4506 CPP=
4507fi
4508if test -z "$CPP"; then
4509 if ${ac_cv_prog_CPP+:} false; then :
4510 $as_echo_n "(cached) " >&6
4511else
4512 # Double quotes because CPP needs to be expanded
4513 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4514 do
4515 ac_preproc_ok=false
4516for ac_c_preproc_warn_flag in '' yes
4517do
4518 # Use a header file that comes with gcc, so configuring glibc
4519 # with a fresh cross-compiler works.
4520 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4521 # <limits.h> exists even on freestanding compilers.
4522 # On the NeXT, cc -E runs the code through the compiler's parser,
4523 # not just through cpp. "Syntax error" is here to catch this case.
4524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4525/* end confdefs.h. */
4526#ifdef __STDC__
4527# include <limits.h>
4528#else
4529# include <assert.h>
4530#endif
4531 Syntax error
4532_ACEOF
4533if ac_fn_c_try_cpp "$LINENO"; then :
4534
4535else
4536 # Broken: fails on valid input.
4537continue
4538fi
4539rm -f conftest.err conftest.i conftest.$ac_ext
4540
4541 # OK, works on sane cases. Now check whether nonexistent headers
4542 # can be detected and how.
4543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4544/* end confdefs.h. */
4545#include <ac_nonexistent.h>
4546_ACEOF
4547if ac_fn_c_try_cpp "$LINENO"; then :
4548 # Broken: success on invalid input.
4549continue
4550else
4551 # Passes both tests.
4552ac_preproc_ok=:
4553break
4554fi
4555rm -f conftest.err conftest.i conftest.$ac_ext
4556
4557done
4558# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4559rm -f conftest.i conftest.err conftest.$ac_ext
4560if $ac_preproc_ok; then :
4561 break
4562fi
4563
4564 done
4565 ac_cv_prog_CPP=$CPP
4566
4567fi
4568 CPP=$ac_cv_prog_CPP
4569else
4570 ac_cv_prog_CPP=$CPP
4571fi
4572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4573$as_echo "$CPP" >&6; }
4574ac_preproc_ok=false
4575for ac_c_preproc_warn_flag in '' yes
4576do
4577 # Use a header file that comes with gcc, so configuring glibc
4578 # with a fresh cross-compiler works.
4579 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4580 # <limits.h> exists even on freestanding compilers.
4581 # On the NeXT, cc -E runs the code through the compiler's parser,
4582 # not just through cpp. "Syntax error" is here to catch this case.
4583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4584/* end confdefs.h. */
4585#ifdef __STDC__
4586# include <limits.h>
4587#else
4588# include <assert.h>
4589#endif
4590 Syntax error
4591_ACEOF
4592if ac_fn_c_try_cpp "$LINENO"; then :
4593
4594else
4595 # Broken: fails on valid input.
4596continue
4597fi
4598rm -f conftest.err conftest.i conftest.$ac_ext
4599
4600 # OK, works on sane cases. Now check whether nonexistent headers
4601 # can be detected and how.
4602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4603/* end confdefs.h. */
4604#include <ac_nonexistent.h>
4605_ACEOF
4606if ac_fn_c_try_cpp "$LINENO"; then :
4607 # Broken: success on invalid input.
4608continue
4609else
4610 # Passes both tests.
4611ac_preproc_ok=:
4612break
4613fi
4614rm -f conftest.err conftest.i conftest.$ac_ext
4615
4616done
4617# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4618rm -f conftest.i conftest.err conftest.$ac_ext
4619if $ac_preproc_ok; then :
4620
4621else
4622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4624as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4625See \`config.log' for more details" "$LINENO" 5; }
4626fi
4627
4628ac_ext=c
4629ac_cpp='$CPP $CPPFLAGS'
4630ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4631ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4632ac_compiler_gnu=$ac_cv_c_compiler_gnu
4633
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4636if ${ac_cv_path_GREP+:} false; then :
4637 $as_echo_n "(cached) " >&6
4638else
4639 if test -z "$GREP"; then
4640 ac_path_GREP_found=false
4641 # Loop through the user's path and test for each of PROGNAME-LIST
4642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4644do
4645 IFS=$as_save_IFS
4646 test -z "$as_dir" && as_dir=.
4647 for ac_prog in grep ggrep; do
4648 for ac_exec_ext in '' $ac_executable_extensions; do
4649 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4650 as_fn_executable_p "$ac_path_GREP" || continue
4651# Check for GNU ac_path_GREP and select it if it is found.
4652 # Check for GNU $ac_path_GREP
4653case `"$ac_path_GREP" --version 2>&1` in
4654*GNU*)
4655 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4656*)
4657 ac_count=0
4658 $as_echo_n 0123456789 >"conftest.in"
4659 while :
4660 do
4661 cat "conftest.in" "conftest.in" >"conftest.tmp"
4662 mv "conftest.tmp" "conftest.in"
4663 cp "conftest.in" "conftest.nl"
4664 $as_echo 'GREP' >> "conftest.nl"
4665 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4666 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4667 as_fn_arith $ac_count + 1 && ac_count=$as_val
4668 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4669 # Best one so far, save it but keep looking for a better one
4670 ac_cv_path_GREP="$ac_path_GREP"
4671 ac_path_GREP_max=$ac_count
4672 fi
4673 # 10*(2^10) chars as input seems more than enough
4674 test $ac_count -gt 10 && break
4675 done
4676 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4677esac
4678
4679 $ac_path_GREP_found && break 3
4680 done
4681 done
4682 done
4683IFS=$as_save_IFS
4684 if test -z "$ac_cv_path_GREP"; then
4685 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4686 fi
4687else
4688 ac_cv_path_GREP=$GREP
4689fi
4690
4691fi
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4693$as_echo "$ac_cv_path_GREP" >&6; }
4694 GREP="$ac_cv_path_GREP"
4695
4696
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004697
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004698
4699
Matthias Kloseb9621712010-04-24 17:59:49 +00004700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4701$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004703# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004704if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004705 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706
4707 case $withval in
4708 no) with_cxx_main=no
4709 MAINCC='$(CC)';;
4710 yes) with_cxx_main=yes
4711 MAINCC='$(CXX)';;
4712 *) with_cxx_main=yes
4713 MAINCC=$withval
4714 if test -z "$CXX"
4715 then
4716 CXX=$withval
4717 fi;;
4718 esac
4719else
4720
4721 with_cxx_main=no
4722 MAINCC='$(CC)'
4723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004724fi
4725
Matthias Kloseb9621712010-04-24 17:59:49 +00004726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4727$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728
4729preset_cxx="$CXX"
4730if test -z "$CXX"
4731then
4732 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004733 gcc) if test -n "$ac_tool_prefix"; then
4734 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4735set dummy ${ac_tool_prefix}g++; ac_word=$2
4736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4737$as_echo_n "checking for $ac_word... " >&6; }
4738if ${ac_cv_path_CXX+:} false; then :
4739 $as_echo_n "(cached) " >&6
4740else
4741 case $CXX in
4742 [\\/]* | ?:[\\/]*)
4743 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4744 ;;
4745 *)
4746 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in notfound
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
4757done
4758 done
4759IFS=$as_save_IFS
4760
4761 ;;
4762esac
4763fi
4764CXX=$ac_cv_path_CXX
4765if test -n "$CXX"; then
4766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4767$as_echo "$CXX" >&6; }
4768else
4769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4770$as_echo "no" >&6; }
4771fi
4772
4773
4774fi
4775if test -z "$ac_cv_path_CXX"; then
4776 ac_pt_CXX=$CXX
4777 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4780$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004781if ${ac_cv_path_ac_pt_CXX+:} false; then :
4782 $as_echo_n "(cached) " >&6
4783else
4784 case $ac_pt_CXX in
4785 [\\/]* | ?:[\\/]*)
4786 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4787 ;;
4788 *)
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in notfound
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
4794 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004795 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4797 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4798 break 2
4799 fi
4800done
4801 done
4802IFS=$as_save_IFS
4803
4804 ;;
4805esac
4806fi
4807ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4808if test -n "$ac_pt_CXX"; then
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4810$as_echo "$ac_pt_CXX" >&6; }
4811else
4812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4813$as_echo "no" >&6; }
4814fi
4815
4816 if test "x$ac_pt_CXX" = x; then
4817 CXX="g++"
4818 else
4819 case $cross_compiling:$ac_tool_warned in
4820yes:)
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4822$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4823ac_tool_warned=yes ;;
4824esac
4825 CXX=$ac_pt_CXX
4826 fi
4827else
4828 CXX="$ac_cv_path_CXX"
4829fi
4830 ;;
4831 cc) if test -n "$ac_tool_prefix"; then
4832 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4833set dummy ${ac_tool_prefix}c++; ac_word=$2
4834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004836if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004837 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004838else
4839 case $CXX in
4840 [\\/]* | ?:[\\/]*)
4841 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4842 ;;
4843 *)
4844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in notfound
4846do
4847 IFS=$as_save_IFS
4848 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004851 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004853 break 2
4854 fi
4855done
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004857IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004859 ;;
4860esac
4861fi
4862CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004863if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4865$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004866else
Matthias Kloseb9621712010-04-24 17:59:49 +00004867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004869fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004870
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004871
4872fi
4873if test -z "$ac_cv_path_CXX"; then
4874 ac_pt_CXX=$CXX
4875 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004876set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4878$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004880 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004881else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004883 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004884 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 +00004885 ;;
4886 *)
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4888for as_dir in notfound
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004893 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004896 break 2
4897 fi
4898done
Matthias Kloseb9621712010-04-24 17:59:49 +00004899 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004900IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004901
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004902 ;;
4903esac
4904fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004905ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4906if test -n "$ac_pt_CXX"; then
4907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4908$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004909else
Matthias Kloseb9621712010-04-24 17:59:49 +00004910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4911$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004913
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004914 if test "x$ac_pt_CXX" = x; then
4915 CXX="c++"
4916 else
4917 case $cross_compiling:$ac_tool_warned in
4918yes:)
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4920$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4921ac_tool_warned=yes ;;
4922esac
4923 CXX=$ac_pt_CXX
4924 fi
4925else
4926 CXX="$ac_cv_path_CXX"
4927fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004928 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004929 clang|*/clang) if test -n "$ac_tool_prefix"; then
4930 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4931set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4933$as_echo_n "checking for $ac_word... " >&6; }
4934if ${ac_cv_path_CXX+:} false; then :
4935 $as_echo_n "(cached) " >&6
4936else
4937 case $CXX in
4938 [\\/]* | ?:[\\/]*)
4939 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4940 ;;
4941 *)
4942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in notfound
4944do
4945 IFS=$as_save_IFS
4946 test -z "$as_dir" && as_dir=.
4947 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004948 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004949 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4950 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4951 break 2
4952 fi
4953done
4954 done
4955IFS=$as_save_IFS
4956
Ned Deilycbfb9a52012-06-23 16:02:19 -07004957 ;;
4958esac
4959fi
4960CXX=$ac_cv_path_CXX
4961if test -n "$CXX"; then
4962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4963$as_echo "$CXX" >&6; }
4964else
4965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4966$as_echo "no" >&6; }
4967fi
4968
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004969
4970fi
4971if test -z "$ac_cv_path_CXX"; then
4972 ac_pt_CXX=$CXX
4973 # Extract the first word of "clang++", so it can be a program name with args.
4974set dummy clang++; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_ac_pt_CXX+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979else
4980 case $ac_pt_CXX in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in notfound
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004992 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997 done
4998IFS=$as_save_IFS
4999
5000 ;;
5001esac
5002fi
5003ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5004if test -n "$ac_pt_CXX"; then
5005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5006$as_echo "$ac_pt_CXX" >&6; }
5007else
5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012 if test "x$ac_pt_CXX" = x; then
5013 CXX="clang++"
5014 else
5015 case $cross_compiling:$ac_tool_warned in
5016yes:)
5017{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5018$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5019ac_tool_warned=yes ;;
5020esac
5021 CXX=$ac_pt_CXX
5022 fi
5023else
5024 CXX="$ac_cv_path_CXX"
5025fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005026 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005027 icc|*/icc) if test -n "$ac_tool_prefix"; then
5028 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5029set dummy ${ac_tool_prefix}icpc; ac_word=$2
5030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
5032if ${ac_cv_path_CXX+:} false; then :
5033 $as_echo_n "(cached) " >&6
5034else
5035 case $CXX in
5036 [\\/]* | ?:[\\/]*)
5037 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5038 ;;
5039 *)
5040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in notfound
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
5045 for ac_exec_ext in '' $ac_executable_extensions; do
5046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5047 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5049 break 2
5050 fi
5051done
5052 done
5053IFS=$as_save_IFS
5054
5055 ;;
5056esac
5057fi
5058CXX=$ac_cv_path_CXX
5059if test -n "$CXX"; then
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5061$as_echo "$CXX" >&6; }
5062else
5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5064$as_echo "no" >&6; }
5065fi
5066
5067
5068fi
5069if test -z "$ac_cv_path_CXX"; then
5070 ac_pt_CXX=$CXX
5071 # Extract the first word of "icpc", so it can be a program name with args.
5072set dummy icpc; ac_word=$2
5073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074$as_echo_n "checking for $ac_word... " >&6; }
5075if ${ac_cv_path_ac_pt_CXX+:} false; then :
5076 $as_echo_n "(cached) " >&6
5077else
5078 case $ac_pt_CXX in
5079 [\\/]* | ?:[\\/]*)
5080 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5081 ;;
5082 *)
5083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in notfound
5085do
5086 IFS=$as_save_IFS
5087 test -z "$as_dir" && as_dir=.
5088 for ac_exec_ext in '' $ac_executable_extensions; do
5089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5090 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092 break 2
5093 fi
5094done
5095 done
5096IFS=$as_save_IFS
5097
5098 ;;
5099esac
5100fi
5101ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5102if test -n "$ac_pt_CXX"; then
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5104$as_echo "$ac_pt_CXX" >&6; }
5105else
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108fi
5109
5110 if test "x$ac_pt_CXX" = x; then
5111 CXX="icpc"
5112 else
5113 case $cross_compiling:$ac_tool_warned in
5114yes:)
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5117ac_tool_warned=yes ;;
5118esac
5119 CXX=$ac_pt_CXX
5120 fi
5121else
5122 CXX="$ac_cv_path_CXX"
5123fi
5124 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125 esac
5126 if test "$CXX" = "notfound"
5127 then
5128 CXX=""
5129 fi
5130fi
5131if test -z "$CXX"
5132then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005133 if test -n "$ac_tool_prefix"; then
5134 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5135 do
5136 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5137set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5139$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005140if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005142else
5143 if test -n "$CXX"; then
5144 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5145else
5146as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5147for as_dir in $PATH
5148do
5149 IFS=$as_save_IFS
5150 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005151 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005153 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005155 break 2
5156 fi
5157done
Matthias Kloseb9621712010-04-24 17:59:49 +00005158 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005159IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005160
5161fi
5162fi
5163CXX=$ac_cv_prog_CXX
5164if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5166$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167else
Matthias Kloseb9621712010-04-24 17:59:49 +00005168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5169$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005170fi
5171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005172
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005173 test -n "$CXX" && break
5174 done
5175fi
5176if test -z "$CXX"; then
5177 ac_ct_CXX=$CXX
5178 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5179do
5180 # Extract the first word of "$ac_prog", so it can be a program name with args.
5181set dummy $ac_prog; ac_word=$2
5182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183$as_echo_n "checking for $ac_word... " >&6; }
5184if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5185 $as_echo_n "(cached) " >&6
5186else
5187 if test -n "$ac_ct_CXX"; then
5188 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5189else
5190as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193 IFS=$as_save_IFS
5194 test -z "$as_dir" && as_dir=.
5195 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005196 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005197 ac_cv_prog_ac_ct_CXX="$ac_prog"
5198 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199 break 2
5200 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005201done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005202 done
5203IFS=$as_save_IFS
5204
5205fi
5206fi
5207ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5208if test -n "$ac_ct_CXX"; then
5209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5210$as_echo "$ac_ct_CXX" >&6; }
5211else
5212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5213$as_echo "no" >&6; }
5214fi
5215
5216
5217 test -n "$ac_ct_CXX" && break
5218done
5219
5220 if test "x$ac_ct_CXX" = x; then
5221 CXX="notfound"
5222 else
5223 case $cross_compiling:$ac_tool_warned in
5224yes:)
5225{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5226$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5227ac_tool_warned=yes ;;
5228esac
5229 CXX=$ac_ct_CXX
5230 fi
5231fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005232
5233 if test "$CXX" = "notfound"
5234 then
5235 CXX=""
5236 fi
5237fi
5238if test "$preset_cxx" != "$CXX"
5239then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005240 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005241
5242 By default, distutils will build C++ extension modules with \"$CXX\".
5243 If this is not intended, then set CXX on the configure command line.
5244 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005245$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005246
5247 By default, distutils will build C++ extension modules with \"$CXX\".
5248 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005249 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005250fi
5251
5252
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005253MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5254
5255
5256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5257$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5258cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005259#undef bfin
5260#undef cris
5261#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005262#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005263#undef hppa
5264#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005266#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005267#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005268#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005269#undef unix
5270#if defined(__linux__)
5271# if defined(__x86_64__) && defined(__LP64__)
5272 x86_64-linux-gnu
5273# elif defined(__x86_64__) && defined(__ILP32__)
5274 x86_64-linux-gnux32
5275# elif defined(__i386__)
5276 i386-linux-gnu
5277# elif defined(__aarch64__) && defined(__AARCH64EL__)
5278# if defined(__ILP32__)
5279 aarch64_ilp32-linux-gnu
5280# else
5281 aarch64-linux-gnu
5282# endif
5283# elif defined(__aarch64__) && defined(__AARCH64EB__)
5284# if defined(__ILP32__)
5285 aarch64_be_ilp32-linux-gnu
5286# else
5287 aarch64_be-linux-gnu
5288# endif
5289# elif defined(__alpha__)
5290 alpha-linux-gnu
5291# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5292# if defined(__ARMEL__)
5293 arm-linux-gnueabihf
5294# else
5295 armeb-linux-gnueabihf
5296# endif
5297# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5298# if defined(__ARMEL__)
5299 arm-linux-gnueabi
5300# else
5301 armeb-linux-gnueabi
5302# endif
5303# elif defined(__hppa__)
5304 hppa-linux-gnu
5305# elif defined(__ia64__)
5306 ia64-linux-gnu
5307# elif defined(__m68k__) && !defined(__mcoldfire__)
5308 m68k-linux-gnu
5309# elif defined(__mips_hard_float) && defined(_MIPSEL)
5310# if _MIPS_SIM == _ABIO32
5311 mipsel-linux-gnu
5312# elif _MIPS_SIM == _ABIN32
5313 mips64el-linux-gnuabin32
5314# elif _MIPS_SIM == _ABI64
5315 mips64el-linux-gnuabi64
5316# else
5317# error unknown platform triplet
5318# endif
5319# elif defined(__mips_hard_float)
5320# if _MIPS_SIM == _ABIO32
5321 mips-linux-gnu
5322# elif _MIPS_SIM == _ABIN32
5323 mips64-linux-gnuabin32
5324# elif _MIPS_SIM == _ABI64
5325 mips64-linux-gnuabi64
5326# else
5327# error unknown platform triplet
5328# endif
5329# elif defined(__or1k__)
5330 or1k-linux-gnu
5331# elif defined(__powerpc__) && defined(__SPE__)
5332 powerpc-linux-gnuspe
5333# elif defined(__powerpc64__)
5334# if defined(__LITTLE_ENDIAN__)
5335 powerpc64le-linux-gnu
5336# else
5337 powerpc64-linux-gnu
5338# endif
5339# elif defined(__powerpc__)
5340 powerpc-linux-gnu
5341# elif defined(__s390x__)
5342 s390x-linux-gnu
5343# elif defined(__s390__)
5344 s390-linux-gnu
5345# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5346 sh4-linux-gnu
5347# elif defined(__sparc__) && defined(__arch64__)
5348 sparc64-linux-gnu
5349# elif defined(__sparc__)
5350 sparc-linux-gnu
5351# else
5352# error unknown platform triplet
5353# endif
5354#elif defined(__FreeBSD_kernel__)
5355# if defined(__LP64__)
5356 x86_64-kfreebsd-gnu
5357# elif defined(__i386__)
5358 i386-kfreebsd-gnu
5359# else
5360# error unknown platform triplet
5361# endif
5362#elif defined(__gnu_hurd__)
5363 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005364#elif defined(__APPLE__)
5365 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005366#else
5367# error unknown platform triplet
5368#endif
5369
5370EOF
5371
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005372if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005373 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5375$as_echo "$PLATFORM_TRIPLET" >&6; }
5376else
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5378$as_echo "none" >&6; }
5379fi
5380rm -f conftest.c conftest.out
5381
5382if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5383 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5384 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5385 fi
5386fi
5387PLATDIR=plat-$MACHDEP
5388
5389
5390
5391
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5393$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5394save_LDFLAGS="$LDFLAGS"
5395LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005396
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5398/* end confdefs.h. */
5399
5400int
5401main ()
5402{
5403
5404 ;
5405 return 0;
5406}
5407_ACEOF
5408if ac_fn_c_try_link "$LINENO"; then :
5409 NO_AS_NEEDED="-Wl,--no-as-needed"
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5411$as_echo "yes" >&6; }
5412else
5413 NO_AS_NEEDED=""
5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5415$as_echo "no" >&6; }
5416fi
5417rm -f core conftest.err conftest.$ac_objext \
5418 conftest$ac_exeext conftest.$ac_ext
5419LDFLAGS="$save_LDFLAGS"
5420
5421
5422
5423# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005424
Matthias Kloseb9621712010-04-24 17:59:49 +00005425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5426$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005427if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429else
5430 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5431 then ac_cv_path_EGREP="$GREP -E"
5432 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005433 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005434 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 # Loop through the user's path and test for each of PROGNAME-LIST
5436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5438do
5439 IFS=$as_save_IFS
5440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 for ac_prog in egrep; do
5442 for ac_exec_ext in '' $ac_executable_extensions; do
5443 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005444 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005445# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005446 # Check for GNU $ac_path_EGREP
5447case `"$ac_path_EGREP" --version 2>&1` in
5448*GNU*)
5449 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5450*)
5451 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 while :
5454 do
5455 cat "conftest.in" "conftest.in" >"conftest.tmp"
5456 mv "conftest.tmp" "conftest.in"
5457 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5460 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005461 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005462 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5463 # Best one so far, save it but keep looking for a better one
5464 ac_cv_path_EGREP="$ac_path_EGREP"
5465 ac_path_EGREP_max=$ac_count
5466 fi
5467 # 10*(2^10) chars as input seems more than enough
5468 test $ac_count -gt 10 && break
5469 done
5470 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5471esac
5472
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $ac_path_EGREP_found && break 3
5474 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005475 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005476 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005477IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005478 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005479 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 +00005480 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005481else
5482 ac_cv_path_EGREP=$EGREP
5483fi
5484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005485 fi
5486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5488$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005489 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005490
5491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5493$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005494if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005495 $as_echo_n "(cached) " >&6
5496else
5497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005498/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005499#include <stdlib.h>
5500#include <stdarg.h>
5501#include <string.h>
5502#include <float.h>
5503
5504int
5505main ()
5506{
5507
5508 ;
5509 return 0;
5510}
5511_ACEOF
5512if ac_fn_c_try_compile "$LINENO"; then :
5513 ac_cv_header_stdc=yes
5514else
5515 ac_cv_header_stdc=no
5516fi
5517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5518
5519if test $ac_cv_header_stdc = yes; then
5520 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5522/* end confdefs.h. */
5523#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005524
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005525_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005526if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005529else
Matthias Kloseb9621712010-04-24 17:59:49 +00005530 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005531fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005532rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533
Matthias Kloseb9621712010-04-24 17:59:49 +00005534fi
5535
5536if test $ac_cv_header_stdc = yes; then
5537 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5539/* end confdefs.h. */
5540#include <stdlib.h>
5541
5542_ACEOF
5543if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5544 $EGREP "free" >/dev/null 2>&1; then :
5545
5546else
5547 ac_cv_header_stdc=no
5548fi
5549rm -f conftest*
5550
5551fi
5552
5553if test $ac_cv_header_stdc = yes; then
5554 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5555 if test "$cross_compiling" = yes; then :
5556 :
5557else
5558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559/* end confdefs.h. */
5560#include <ctype.h>
5561#include <stdlib.h>
5562#if ((' ' & 0x0FF) == 0x020)
5563# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5564# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5565#else
5566# define ISLOWER(c) \
5567 (('a' <= (c) && (c) <= 'i') \
5568 || ('j' <= (c) && (c) <= 'r') \
5569 || ('s' <= (c) && (c) <= 'z'))
5570# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5571#endif
5572
5573#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5574int
5575main ()
5576{
5577 int i;
5578 for (i = 0; i < 256; i++)
5579 if (XOR (islower (i), ISLOWER (i))
5580 || toupper (i) != TOUPPER (i))
5581 return 2;
5582 return 0;
5583}
5584_ACEOF
5585if ac_fn_c_try_run "$LINENO"; then :
5586
5587else
5588 ac_cv_header_stdc=no
5589fi
5590rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5591 conftest.$ac_objext conftest.beam conftest.$ac_ext
5592fi
5593
5594fi
5595fi
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5597$as_echo "$ac_cv_header_stdc" >&6; }
5598if test $ac_cv_header_stdc = yes; then
5599
5600$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5601
5602fi
5603
5604# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5605for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5606 inttypes.h stdint.h unistd.h
5607do :
5608 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5609ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5610"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005611if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005612 cat >>confdefs.h <<_ACEOF
5613#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5614_ACEOF
5615
5616fi
5617
5618done
5619
5620
5621
5622 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 +02005623if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005624 MINIX=yes
5625else
5626 MINIX=
5627fi
5628
5629
5630 if test "$MINIX" = yes; then
5631
5632$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5633
5634
5635$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5636
5637
5638$as_echo "#define _MINIX 1" >>confdefs.h
5639
5640 fi
5641
5642
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5644$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005645if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005646 $as_echo_n "(cached) " >&6
5647else
5648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5649/* end confdefs.h. */
5650
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005651# define __EXTENSIONS__ 1
5652 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005653int
5654main ()
5655{
5656
5657 ;
5658 return 0;
5659}
5660_ACEOF
5661if ac_fn_c_try_compile "$LINENO"; then :
5662 ac_cv_safe_to_define___extensions__=yes
5663else
5664 ac_cv_safe_to_define___extensions__=no
5665fi
5666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5667fi
5668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5669$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5670 test $ac_cv_safe_to_define___extensions__ = yes &&
5671 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5672
5673 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5674
5675 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5676
5677 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5678
5679 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5680
5681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683# Check for unsupported systems
5684case $ac_sys_system/$ac_sys_release in
5685atheos*|Linux*/1*)
5686 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5687 echo See README for details.
5688 exit 1;;
5689esac
5690
5691
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5693$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694
5695# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005696if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 withval=$with_suffix;
5698 case $withval in
5699 no) EXEEXT=;;
5700 yes) EXEEXT=.exe;;
5701 *) EXEEXT=$withval;;
5702 esac
5703fi
5704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5706$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707
5708# Test whether we're running on a non-case-sensitive system, in which
5709# case we give a warning if no ext is given
5710
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5712$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713if test ! -d CaseSensitiveTestDir; then
5714mkdir CaseSensitiveTestDir
5715fi
5716
5717if test -d casesensitivetestdir
5718then
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5720$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721 BUILDEXEEXT=.exe
5722else
Matthias Kloseb9621712010-04-24 17:59:49 +00005723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725 BUILDEXEEXT=$EXEEXT
5726fi
5727rmdir CaseSensitiveTestDir
5728
5729case $MACHDEP in
5730bsdos*)
5731 case $CC in
5732 gcc) CC="$CC -D_HAVE_BSDI";;
5733 esac;;
5734esac
5735
5736case $ac_sys_system in
5737hp*|HP*)
5738 case $CC in
5739 cc|*/cc) CC="$CC -Ae";;
5740 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741esac
5742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743
Matthias Kloseb9621712010-04-24 17:59:49 +00005744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5745$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746if test -z "$LIBRARY"
5747then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005748 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5751$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# LDLIBRARY is the name of the library to link against (as opposed to the
5754# name of the library into which to insert object files). BLDLIBRARY is also
5755# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5756# is blank as the main program is not linked directly against LDLIBRARY.
5757# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5758# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5759# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5760# DLLLIBRARY is the shared (i.e., DLL) library.
5761#
5762# RUNSHARED is used to run shared python without installed libraries
5763#
5764# INSTSONAME is the name of the shared library that will be use to install
5765# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005766#
5767# LDVERSION is the shared library version number, normally the Python version
5768# with the ABI build flags appended.
5769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771
5772
5773
5774
5775
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777LDLIBRARY="$LIBRARY"
5778BLDLIBRARY='$(LDLIBRARY)'
5779INSTSONAME='$(LDLIBRARY)'
5780DLLLIBRARY=''
5781LDLIBRARYDIR=''
5782RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005783LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784
5785# LINKCC is the command that links the python executable -- default is $(CC).
5786# If CXX is set, and if it is needed to link a main function that was
5787# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5788# python might then depend on the C++ runtime
5789# This is altered for AIX in order to build the export list before
5790# linking.
5791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5793$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794if test -z "$LINKCC"
5795then
5796 LINKCC='$(PURIFY) $(MAINCC)'
5797 case $ac_sys_system in
5798 AIX*)
5799 exp_extra="\"\""
5800 if test $ac_sys_release -ge 5 -o \
5801 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5802 exp_extra="."
5803 fi
5804 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 QNX*)
5806 # qcc must be used because the other compilers do not
5807 # support -N.
5808 LINKCC=qcc;;
5809 esac
5810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5812$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813
5814# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5815# make sure we default having it set to "no": this is used by
5816# distutils.unixccompiler to know if it should add --enable-new-dtags
5817# to linker command lines, and failing to detect GNU ld simply results
5818# in the same bahaviour as before.
5819
Matthias Kloseb9621712010-04-24 17:59:49 +00005820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5821$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822ac_prog=ld
5823if test "$GCC" = yes; then
5824 ac_prog=`$CC -print-prog-name=ld`
5825fi
5826case `"$ac_prog" -V 2>&1 < /dev/null` in
5827 *GNU*)
5828 GNULD=yes;;
5829 *)
5830 GNULD=no;;
5831esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5833$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5836$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005837if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005838 $as_echo_n "(cached) " >&6
5839else
5840 ac_cv_c_inline=no
5841for ac_kw in inline __inline__ __inline; do
5842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5843/* end confdefs.h. */
5844#ifndef __cplusplus
5845typedef int foo_t;
5846static $ac_kw foo_t static_foo () {return 0; }
5847$ac_kw foo_t foo () {return 0; }
5848#endif
5849
5850_ACEOF
5851if ac_fn_c_try_compile "$LINENO"; then :
5852 ac_cv_c_inline=$ac_kw
5853fi
5854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5855 test "$ac_cv_c_inline" != no && break
5856done
5857
5858fi
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5860$as_echo "$ac_cv_c_inline" >&6; }
5861
5862case $ac_cv_c_inline in
5863 inline | yes) ;;
5864 *)
5865 case $ac_cv_c_inline in
5866 no) ac_val=;;
5867 *) ac_val=$ac_cv_c_inline;;
5868 esac
5869 cat >>confdefs.h <<_ACEOF
5870#ifndef __cplusplus
5871#define inline $ac_val
5872#endif
5873_ACEOF
5874 ;;
5875esac
5876
5877if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005878
5879$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005880
5881
5882fi
5883
5884
Matthias Kloseb9621712010-04-24 17:59:49 +00005885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5886$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005888if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 enableval=$enable_shared;
5890fi
5891
5892
5893if test -z "$enable_shared"
5894then
5895 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005896 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 enable_shared="yes";;
5898 *)
5899 enable_shared="no";;
5900 esac
5901fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5903$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904
Matthias Kloseb9621712010-04-24 17:59:49 +00005905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5906$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005908if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005909 enableval=$enable_profiling;
5910fi
5911
5912if test "x$enable_profiling" = xyes; then
5913 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005914 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916/* end confdefs.h. */
5917int main() { return 0; }
5918_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005919if ac_fn_c_try_link "$LINENO"; then :
5920
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005922 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005924rm -f core conftest.err conftest.$ac_objext \
5925 conftest$ac_exeext conftest.$ac_ext
5926 CC="$ac_save_cc"
5927else
5928 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005929fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5931$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
doko@ubuntu.comba015832012-06-30 16:52:05 +02005933if test "x$enable_profiling" = xyes; then
5934 BASECFLAGS="-pg $BASECFLAGS"
5935 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936fi
5937
Matthias Kloseb9621712010-04-24 17:59:49 +00005938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5939$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940
5941# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5942# library that we build, but we do not want to link against it (we
5943# will find it with a -framework option). For this reason there is an
5944# extra variable BLDLIBRARY against which Python and the extension
5945# modules are linked, BLDLIBRARY. This is normally the same as
5946# LDLIBRARY, but empty for MacOSX framework builds.
5947if test "$enable_framework"
5948then
5949 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005950 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 BLDLIBRARY=''
5952else
5953 BLDLIBRARY='$(LDLIBRARY)'
5954fi
5955
5956# Other platforms follow
5957if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005958 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005959
Matthias Kloseb9621712010-04-24 17:59:49 +00005960$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
5962 case $ac_sys_system in
5963 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).dll.a'
5965 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966 ;;
5967 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005968 LDLIBRARY='libpython$(LDVERSION).so'
5969 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005970 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005972 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005973 then
5974 PY3LIBRARY=libpython3.so
5975 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005977 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005978 LDLIBRARY='libpython$(LDVERSION).so'
5979 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005980 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005982 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005983 then
5984 PY3LIBRARY=libpython3.so
5985 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005986 ;;
5987 hp*|HP*)
5988 case `uname -m` in
5989 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005990 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ;;
5992 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005993 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 ;;
5995 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005996 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005997 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006000 LDLIBRARY='libpython$(LDVERSION).dylib'
6001 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006002 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006004 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006005 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006006 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006007 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008
6009 esac
6010else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006011 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 case $ac_sys_system in
6013 CYGWIN*)
6014 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006015 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 ;;
6017 esac
6018fi
6019
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006020if test "$cross_compiling" = yes; then
6021 RUNSHARED=
6022fi
6023
Matthias Kloseb9621712010-04-24 17:59:49 +00006024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6025$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026
6027if test -n "$ac_tool_prefix"; then
6028 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6029set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006032if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006033 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034else
6035 if test -n "$RANLIB"; then
6036 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6037else
6038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6039for as_dir in $PATH
6040do
6041 IFS=$as_save_IFS
6042 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 break 2
6048 fi
6049done
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051IFS=$as_save_IFS
6052
6053fi
6054fi
6055RANLIB=$ac_cv_prog_RANLIB
6056if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6058$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059else
Matthias Kloseb9621712010-04-24 17:59:49 +00006060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6061$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062fi
6063
6064
6065fi
6066if test -z "$ac_cv_prog_RANLIB"; then
6067 ac_ct_RANLIB=$RANLIB
6068 # Extract the first word of "ranlib", so it can be a program name with args.
6069set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6071$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006072if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006073 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006074else
6075 if test -n "$ac_ct_RANLIB"; then
6076 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6077else
6078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6079for as_dir in $PATH
6080do
6081 IFS=$as_save_IFS
6082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006083 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087 break 2
6088 fi
6089done
Matthias Kloseb9621712010-04-24 17:59:49 +00006090 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091IFS=$as_save_IFS
6092
6093fi
6094fi
6095ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6096if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6098$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099else
Matthias Kloseb9621712010-04-24 17:59:49 +00006100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6101$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102fi
6103
6104 if test "x$ac_ct_RANLIB" = x; then
6105 RANLIB=":"
6106 else
6107 case $cross_compiling:$ac_tool_warned in
6108yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111ac_tool_warned=yes ;;
6112esac
6113 RANLIB=$ac_ct_RANLIB
6114 fi
6115else
6116 RANLIB="$ac_cv_prog_RANLIB"
6117fi
6118
6119
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006120if test -n "$ac_tool_prefix"; then
6121 for ac_prog in ar aal
6122 do
6123 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6124set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6126$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006127if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006129else
6130 if test -n "$AR"; then
6131 ac_cv_prog_AR="$AR" # Let the user override the test.
6132else
6133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134for as_dir in $PATH
6135do
6136 IFS=$as_save_IFS
6137 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006138 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006140 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142 break 2
6143 fi
6144done
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146IFS=$as_save_IFS
6147
6148fi
6149fi
6150AR=$ac_cv_prog_AR
6151if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6153$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154else
Matthias Kloseb9621712010-04-24 17:59:49 +00006155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6156$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157fi
6158
6159
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006160 test -n "$AR" && break
6161 done
6162fi
6163if test -z "$AR"; then
6164 ac_ct_AR=$AR
6165 for ac_prog in ar aal
6166do
6167 # Extract the first word of "$ac_prog", so it can be a program name with args.
6168set dummy $ac_prog; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_prog_ac_ct_AR+:} false; then :
6172 $as_echo_n "(cached) " >&6
6173else
6174 if test -n "$ac_ct_AR"; then
6175 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6176else
6177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6178for as_dir in $PATH
6179do
6180 IFS=$as_save_IFS
6181 test -z "$as_dir" && as_dir=.
6182 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006184 ac_cv_prog_ac_ct_AR="$ac_prog"
6185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6186 break 2
6187 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006189 done
6190IFS=$as_save_IFS
6191
6192fi
6193fi
6194ac_ct_AR=$ac_cv_prog_ac_ct_AR
6195if test -n "$ac_ct_AR"; then
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6197$as_echo "$ac_ct_AR" >&6; }
6198else
6199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204 test -n "$ac_ct_AR" && break
6205done
6206
6207 if test "x$ac_ct_AR" = x; then
6208 AR="ar"
6209 else
6210 case $cross_compiling:$ac_tool_warned in
6211yes:)
6212{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6213$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6214ac_tool_warned=yes ;;
6215esac
6216 AR=$ac_ct_AR
6217 fi
6218fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219
6220
6221# tweak ARFLAGS only if the user didn't set it on the command line
6222
6223if test -z "$ARFLAGS"
6224then
6225 ARFLAGS="rc"
6226fi
6227
doko@ubuntu.com58844492012-06-30 18:25:32 +02006228if test -n "$ac_tool_prefix"; then
6229 for ac_prog in readelf
6230 do
6231 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6234$as_echo_n "checking for $ac_word... " >&6; }
6235if ${ac_cv_prog_READELF+:} false; then :
6236 $as_echo_n "(cached) " >&6
6237else
6238 if test -n "$READELF"; then
6239 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6240else
6241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6242for as_dir in $PATH
6243do
6244 IFS=$as_save_IFS
6245 test -z "$as_dir" && as_dir=.
6246 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006247 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006248 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6249 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6250 break 2
6251 fi
6252done
6253 done
6254IFS=$as_save_IFS
6255
6256fi
6257fi
6258READELF=$ac_cv_prog_READELF
6259if test -n "$READELF"; then
6260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6261$as_echo "$READELF" >&6; }
6262else
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264$as_echo "no" >&6; }
6265fi
6266
6267
6268 test -n "$READELF" && break
6269 done
6270fi
6271if test -z "$READELF"; then
6272 ac_ct_READELF=$READELF
6273 for ac_prog in readelf
6274do
6275 # Extract the first word of "$ac_prog", so it can be a program name with args.
6276set dummy $ac_prog; ac_word=$2
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6278$as_echo_n "checking for $ac_word... " >&6; }
6279if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6280 $as_echo_n "(cached) " >&6
6281else
6282 if test -n "$ac_ct_READELF"; then
6283 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6284else
6285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6286for as_dir in $PATH
6287do
6288 IFS=$as_save_IFS
6289 test -z "$as_dir" && as_dir=.
6290 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006291 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006292 ac_cv_prog_ac_ct_READELF="$ac_prog"
6293 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6294 break 2
6295 fi
6296done
6297 done
6298IFS=$as_save_IFS
6299
6300fi
6301fi
6302ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6303if test -n "$ac_ct_READELF"; then
6304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6305$as_echo "$ac_ct_READELF" >&6; }
6306else
6307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6308$as_echo "no" >&6; }
6309fi
6310
6311
6312 test -n "$ac_ct_READELF" && break
6313done
6314
6315 if test "x$ac_ct_READELF" = x; then
6316 READELF=":"
6317 else
6318 case $cross_compiling:$ac_tool_warned in
6319yes:)
6320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6322ac_tool_warned=yes ;;
6323esac
6324 READELF=$ac_ct_READELF
6325 fi
6326fi
6327
6328if test "$cross_compiling" = yes; then
6329 case "$READELF" in
6330 readelf|:)
6331 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6332 ;;
6333 esac
6334fi
6335
6336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006338case $MACHDEP in
6339bsdos*|hp*|HP*)
6340 # install -d does not work on BSDI or HP-UX
6341 if test -z "$INSTALL"
6342 then
6343 INSTALL="${srcdir}/install-sh -c"
6344 fi
6345esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006346# Find a good install program. We prefer a C program (faster),
6347# so one script is as good as another. But avoid the broken or
6348# incompatible versions:
6349# SysV /etc/install, /usr/sbin/install
6350# SunOS /usr/etc/install
6351# IRIX /sbin/install
6352# AIX /bin/install
6353# AmigaOS /C/install, which installs bootblocks on floppy discs
6354# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6355# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6356# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6357# OS/2's system install, which has a completely different semantic
6358# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006359# Reject install programs that cannot install multiple files.
6360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6361$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006363if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006364 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006365else
6366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6367for as_dir in $PATH
6368do
6369 IFS=$as_save_IFS
6370 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006371 # Account for people who put trailing slashes in PATH elements.
6372case $as_dir/ in #((
6373 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006374 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006375 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376 /usr/ucb/* ) ;;
6377 *)
6378 # OSF1 and SCO ODT 3.0 have their own names for install.
6379 # Don't use installbsd from OSF since it installs stuff as root
6380 # by default.
6381 for ac_prog in ginstall scoinst install; do
6382 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006383 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384 if test $ac_prog = install &&
6385 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6386 # AIX install. It has an incompatible calling convention.
6387 :
6388 elif test $ac_prog = install &&
6389 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6390 # program-specific install script used by HP pwplus--don't use.
6391 :
6392 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006393 rm -rf conftest.one conftest.two conftest.dir
6394 echo one > conftest.one
6395 echo two > conftest.two
6396 mkdir conftest.dir
6397 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6398 test -s conftest.one && test -s conftest.two &&
6399 test -s conftest.dir/conftest.one &&
6400 test -s conftest.dir/conftest.two
6401 then
6402 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6403 break 3
6404 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006405 fi
6406 fi
6407 done
6408 done
6409 ;;
6410esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006411
6412 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006413IFS=$as_save_IFS
6414
Matthias Kloseb9621712010-04-24 17:59:49 +00006415rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006416
6417fi
6418 if test "${ac_cv_path_install+set}" = set; then
6419 INSTALL=$ac_cv_path_install
6420 else
6421 # As a last resort, use the slow shell script. Don't cache a
6422 # value for INSTALL within a source directory, because that will
6423 # break other packages using the cache if that directory is
6424 # removed, or if the value is a relative name.
6425 INSTALL=$ac_install_sh
6426 fi
6427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6429$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006430
6431# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6432# It thinks the first close brace ends the variable substitution.
6433test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6434
6435test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6436
6437test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6438
Matthias Klose93a0ef12012-03-15 18:08:34 +01006439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6440$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6441if test -z "$MKDIR_P"; then
6442 if ${ac_cv_path_mkdir+:} false; then :
6443 $as_echo_n "(cached) " >&6
6444else
6445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6446for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6447do
6448 IFS=$as_save_IFS
6449 test -z "$as_dir" && as_dir=.
6450 for ac_prog in mkdir gmkdir; do
6451 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006452 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006453 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6454 'mkdir (GNU coreutils) '* | \
6455 'mkdir (coreutils) '* | \
6456 'mkdir (fileutils) '4.1*)
6457 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6458 break 3;;
6459 esac
6460 done
6461 done
6462 done
6463IFS=$as_save_IFS
6464
6465fi
6466
6467 test -d ./--version && rmdir ./--version
6468 if test "${ac_cv_path_mkdir+set}" = set; then
6469 MKDIR_P="$ac_cv_path_mkdir -p"
6470 else
6471 # As a last resort, use the slow shell script. Don't cache a
6472 # value for MKDIR_P within a source directory, because that will
6473 # break other packages using the cache if that directory is
6474 # removed, or if the value is a relative name.
6475 MKDIR_P="$ac_install_sh -d"
6476 fi
6477fi
6478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6479$as_echo "$MKDIR_P" >&6; }
6480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481
6482# Not every filesystem supports hard links
6483
6484if test -z "$LN" ; then
6485 case $ac_sys_system in
6486 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006487 *) LN=ln;;
6488 esac
6489fi
6490
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006491# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006492
6493ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006495# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6497$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006498
6499# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006500if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501 withval=$with_pydebug;
6502if test "$withval" != no
6503then
6504
Matthias Kloseb9621712010-04-24 17:59:49 +00006505$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506
Matthias Kloseb9621712010-04-24 17:59:49 +00006507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6508$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006510 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006511else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513fi
6514else
Matthias Kloseb9621712010-04-24 17:59:49 +00006515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6516$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006517fi
6518
6519
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006520# Enable LTO flags
6521
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6523$as_echo_n "checking for --with-lto... " >&6; }
6524
6525# Check whether --with-lto was given.
6526if test "${with_lto+set}" = set; then :
6527 withval=$with_lto;
6528if test "$withval" != no
6529then
6530 Py_LTO='true'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6532$as_echo "yes" >&6; };
6533else
6534 Py_LTO='false'
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; };
6537fi
6538else
6539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6540$as_echo "no" >&6; }
6541fi
6542
6543if test "$Py_LTO" = 'true' ; then
6544 case $CC in
6545 *clang*)
6546 # Any changes made here should be reflected in the GCC+Darwin case below
6547 LTOFLAGS="-flto"
6548 ;;
6549 *gcc*)
6550 case $ac_sys_system in
6551 Darwin*)
6552 LTOFLAGS="-flto"
6553 ;;
6554 *)
6555 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6556 ;;
6557 esac
6558 ;;
6559 esac
6560fi
6561
Brett Cannon7188a3e2015-09-18 15:13:44 -07006562# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006563
6564
6565
6566
6567
6568
Brett Cannon7188a3e2015-09-18 15:13:44 -07006569# Extract the first word of "llvm-profdata", so it can be a program name with args.
6570set dummy llvm-profdata; ac_word=$2
6571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6572$as_echo_n "checking for $ac_word... " >&6; }
6573if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6574 $as_echo_n "(cached) " >&6
6575else
6576 if test -n "$LLVM_PROF_FOUND"; then
6577 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6578else
6579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6580for as_dir in $PATH
6581do
6582 IFS=$as_save_IFS
6583 test -z "$as_dir" && as_dir=.
6584 for ac_exec_ext in '' $ac_executable_extensions; do
6585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6586 ac_cv_prog_LLVM_PROF_FOUND="found"
6587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6588 break 2
6589 fi
6590done
6591 done
6592IFS=$as_save_IFS
6593
6594 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6595fi
6596fi
6597LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6598if test -n "$LLVM_PROF_FOUND"; then
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6600$as_echo "$LLVM_PROF_FOUND" >&6; }
6601else
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6603$as_echo "no" >&6; }
6604fi
6605
6606
6607LLVM_PROF_ERR=no
6608case $CC in
6609 *clang*)
6610 # Any changes made here should be reflected in the GCC+Darwin case below
6611 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6612 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6613 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6614 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6615 if test $LLVM_PROF_FOUND = not-found
6616 then
6617 LLVM_PROF_ERR=yes
6618 fi
6619 ;;
6620 *gcc*)
6621 case $ac_sys_system in
6622 Darwin*)
6623 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6624 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6625 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6626 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6627 if test $LLVM_PROF_FOUND = not-found
6628 then
6629 LLVM_PROF_ERR=yes
6630 fi
6631 ;;
6632 *)
6633 PGO_PROF_GEN_FLAG="-fprofile-generate"
6634 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6635 LLVM_PROF_MERGER="true"
6636 LLVM_PROF_FILE=""
6637 ;;
6638 esac
6639 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006640 *icc*)
6641 PGO_PROF_GEN_FLAG="-prof-gen"
6642 PGO_PROF_USE_FLAG="-prof-use"
6643 LLVM_PROF_MERGER="true"
6644 LLVM_PROF_FILE=""
6645 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006646esac
6647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006648# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6649# merged with this chunk of code?
6650
6651# Optimizer/debugger flags
6652# ------------------------
6653# (The following bit of code is complicated enough - please keep things
6654# indented properly. Just pretend you're editing Python code. ;-)
6655
6656# There are two parallel sets of case statements below, one that checks to
6657# see if OPT was set and one that does BASECFLAGS setting based upon
6658# compiler and platform. BASECFLAGS tweaks need to be made even if the
6659# user set OPT.
6660
6661# tweak OPT based on compiler and platform, only if the user didn't set
6662# it on the command line
6663
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006664if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006665then
6666 case $GCC in
6667 yes)
6668 if test "$CC" != 'g++' ; then
6669 STRICT_PROTO="-Wstrict-prototypes"
6670 fi
6671 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6672 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6673 WRAP="-fwrapv"
6674 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006675
6676 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006677 case $CC in
6678 *clang*) WRAP="-fwrapv"
6679 ;;
6680 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682 case $ac_cv_prog_cc_g in
6683 yes)
6684 if test "$Py_DEBUG" = 'true' ; then
6685 # Optimization messes up debuggers, so turn it off for
6686 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006687 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6688 OPT="-g -Og -Wall $STRICT_PROTO"
6689 else
6690 OPT="-g -O0 -Wall $STRICT_PROTO"
6691 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692 else
6693 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6694 fi
6695 ;;
6696 *)
6697 OPT="-O3 -Wall $STRICT_PROTO"
6698 ;;
6699 esac
6700 case $ac_sys_system in
6701 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6702 ;;
6703 esac
6704 ;;
6705
6706 *)
6707 OPT="-O"
6708 ;;
6709 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710fi
6711
6712
6713
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006714
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006715# The -arch flags for universal builds on OSX
6716UNIVERSAL_ARCH_FLAGS=
6717
6718
6719# tweak BASECFLAGS based on compiler and platform
6720case $GCC in
6721yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006722 # Python doesn't violate C99 aliasing rules, but older versions of
6723 # GCC produce warnings for legal Python code. Enable
6724 # -fno-strict-aliasing on versions of GCC that support but produce
6725 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6727$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728 ac_save_cc="$CC"
6729 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006730 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006731 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006732 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006733else
Matthias Kloseb9621712010-04-24 17:59:49 +00006734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006736
Matthias Kloseb159a552010-04-25 21:00:44 +00006737
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006738int
6739main ()
6740{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006741
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006742 ;
6743 return 0;
6744}
Matthias Kloseb159a552010-04-25 21:00:44 +00006745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006747if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006748
6749 CC="$ac_save_cc -fstrict-aliasing"
6750 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006752/* end confdefs.h. */
6753
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006754 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006755int
6756main ()
6757{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006758double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006759 ;
6760 return 0;
6761}
Matthias Kloseb159a552010-04-25 21:00:44 +00006762
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006764if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006765
6766 ac_cv_no_strict_aliasing=no
6767
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768else
Matthias Kloseb159a552010-04-25 21:00:44 +00006769
6770 ac_cv_no_strict_aliasing=yes
6771
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006772fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006774
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006775else
Matthias Kloseb159a552010-04-25 21:00:44 +00006776
6777 ac_cv_no_strict_aliasing=no
6778
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006779fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006781fi
6782
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006783 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6786$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006787 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788 then
6789 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6790 fi
6791
Zachary Ware5af85642015-12-21 12:09:17 -06006792 # ICC doesn't recognize the option, but only emits a warning
6793 ## XXX does it emit an unused result warning and can it be disabled?
6794 case "$CC" in
6795 *icc*)
6796 ac_cv_disable_unused_result_warning=no
6797 ;;
6798 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6800$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6801 ac_save_cc="$CC"
6802 CC="$CC -Wunused-result -Werror"
6803 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006804 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006805 $as_echo_n "(cached) " >&6
6806else
6807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6808/* end confdefs.h. */
6809
6810
6811int
6812main ()
6813{
6814
6815 ;
6816 return 0;
6817}
6818
6819_ACEOF
6820if ac_fn_c_try_compile "$LINENO"; then :
6821
6822 ac_cv_disable_unused_result_warning=yes
6823
6824else
6825
6826 ac_cv_disable_unused_result_warning=no
6827
6828fi
6829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6830fi
6831
6832 CFLAGS="$save_CFLAGS"
6833 CC="$ac_save_cc"
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6835$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006836 ;;
6837 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006838
6839 if test $ac_cv_disable_unused_result_warning = yes
6840 then
6841 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6842 fi
6843
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6845$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6846 ac_save_cc="$CC"
6847 CC="$CC -Werror=declaration-after-statement"
6848 save_CFLAGS="$CFLAGS"
6849 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6850 $as_echo_n "(cached) " >&6
6851else
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854
6855
6856int
6857main ()
6858{
6859
6860 ;
6861 return 0;
6862}
6863
6864_ACEOF
6865if ac_fn_c_try_compile "$LINENO"; then :
6866
6867 ac_cv_declaration_after_statement_warning=yes
6868
6869else
6870
6871 ac_cv_declaration_after_statement_warning=no
6872
6873fi
6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6875fi
6876
6877 CFLAGS="$save_CFLAGS"
6878 CC="$ac_save_cc"
6879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6880$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6881
6882 if test $ac_cv_declaration_after_statement_warning = yes
6883 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006884 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006885 fi
6886
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6888$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6889 ac_save_cc="$CC"
6890 CC="$CC -Wsign-compare"
6891 save_CFLAGS="$CFLAGS"
6892 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6893 $as_echo_n "(cached) " >&6
6894else
6895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6896/* end confdefs.h. */
6897
6898
6899int
6900main ()
6901{
6902
6903 ;
6904 return 0;
6905}
6906
6907_ACEOF
6908if ac_fn_c_try_compile "$LINENO"; then :
6909
6910 ac_cv_enable_sign_compare_warning=yes
6911
6912else
6913
6914 ac_cv_enable_sign_compare_warning=no
6915
6916fi
6917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6918fi
6919
6920 CFLAGS="$save_CFLAGS"
6921 CC="$ac_save_cc"
6922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6923$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6924
6925 if test $ac_cv_enable_sign_compare_warning = yes
6926 then
6927 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6928 fi
6929
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6931$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6932 ac_save_cc="$CC"
6933 CC="$CC -Wunreachable-code"
6934 save_CFLAGS="$CFLAGS"
6935 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6936 $as_echo_n "(cached) " >&6
6937else
6938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6939/* end confdefs.h. */
6940
6941
6942int
6943main ()
6944{
6945
6946 ;
6947 return 0;
6948}
6949
6950_ACEOF
6951if ac_fn_c_try_compile "$LINENO"; then :
6952
6953 ac_cv_enable_unreachable_code_warning=yes
6954
6955else
6956
6957 ac_cv_enable_unreachable_code_warning=no
6958
6959fi
6960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6961fi
6962
6963 CFLAGS="$save_CFLAGS"
6964 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006965
6966 # Don't enable unreachable code warning in debug mode, since it usually
6967 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006968 # Issue #24324: Unfortunately, the unreachable code warning does not work
6969 # correctly on gcc and has been silently removed from the compiler.
6970 # It is supported on clang but on OS X systems gcc may be an alias
6971 # for clang. Try to determine if the compiler is not really gcc and,
6972 # if so, only then enable the warning.
6973 if test $ac_cv_enable_unreachable_code_warning = yes && \
6974 test "$Py_DEBUG" != "true" && \
6975 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006976 then
6977 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006978 else
6979 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006980 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6982$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6985 # support. Without this, treatment of subnormals doesn't follow
6986 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006987 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988 alpha*)
6989 BASECFLAGS="$BASECFLAGS -mieee"
6990 ;;
6991 esac
6992
6993 case $ac_sys_system in
6994 SCO_SV*)
6995 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6996 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006997
6998 # is there any other compiler on Darwin besides gcc?
6999 Darwin*)
7000 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7001 # used to be here, but non-Apple gcc doesn't accept them.
7002 if test "${CC}" = gcc
7003 then
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007005$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007006 case "${UNIVERSALSDK}" in
7007 */MacOSX10.4u.sdk)
7008 # Build using 10.4 SDK, force usage of gcc when the
7009 # compiler is gcc, otherwise the user will get very
7010 # confusing error messages when building on OSX 10.6
7011 CC=gcc-4.0
7012 CPP=cpp-4.0
7013 ;;
7014 esac
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007016$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007017 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018
Ned Deily87adb6e2013-10-18 21:09:56 -07007019 if test "${enable_universalsdk}"
7020 then
7021 case "$UNIVERSAL_ARCHS" in
7022 32-bit)
7023 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7024 LIPO_32BIT_FLAGS=""
7025 ARCH_RUN_32BIT=""
7026 ;;
7027 64-bit)
7028 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7029 LIPO_32BIT_FLAGS=""
7030 ARCH_RUN_32BIT="true"
7031 ;;
7032 all)
7033 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7034 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7035 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7036 ;;
7037 intel)
7038 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7039 LIPO_32BIT_FLAGS="-extract i386"
7040 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7041 ;;
7042 intel-32)
7043 UNIVERSAL_ARCH_FLAGS="-arch i386"
7044 LIPO_32BIT_FLAGS=""
7045 ARCH_RUN_32BIT=""
7046 ;;
7047 3-way)
7048 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7049 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7050 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7051 ;;
7052 *)
7053 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7054 ;;
7055 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007056
Ned Deily87adb6e2013-10-18 21:09:56 -07007057 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7058 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7059 if test "${UNIVERSALSDK}" != "/"
7060 then
7061 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7062 fi
7063 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007064
Ned Deily87adb6e2013-10-18 21:09:56 -07007065 # Calculate an appropriate deployment target for this build:
7066 # The deployment target value is used explicitly to enable certain
7067 # features are enabled (such as builtin libedit support for readline)
7068 # through the use of Apple's Availabiliy Macros and is used as a
7069 # component of the string returned by distutils.get_platform().
7070 #
7071 # Use the value from:
7072 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7073 # 2. the operating system version of the build machine if >= 10.6
7074 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7075 # below to pick either 10.3, 10.4, or 10.5 as the target.
7076 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077
Ned Deily87adb6e2013-10-18 21:09:56 -07007078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7079$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007080 cur_target_major=`sw_vers -productVersion | \
7081 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7082 cur_target_minor=`sw_vers -productVersion | \
7083 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7084 cur_target="${cur_target_major}.${cur_target_minor}"
7085 if test ${cur_target_major} -eq 10 && \
7086 test ${cur_target_minor} -ge 3 && \
7087 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007088 then
Ned Deily36820b62014-06-25 13:44:22 -07007089 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007090 cur_target=10.3
7091 if test ${enable_universalsdk}
7092 then
7093 case "$UNIVERSAL_ARCHS" in
7094 all|3-way|intel|64-bit)
7095 # These configurations were first supported in 10.5
7096 cur_target='10.5'
7097 ;;
7098 esac
7099 else
7100 if test `/usr/bin/arch` = "i386"
7101 then
7102 # 10.4 was the first release to support Intel archs
7103 cur_target="10.4"
7104 fi
7105 fi
7106 fi
7107 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007108
Ned Deily87adb6e2013-10-18 21:09:56 -07007109 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7110 # environment with a value that is the same as what we'll use
7111 # in the Makefile to ensure that we'll get the same compiler
7112 # environment during configure and build time.
7113 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7114 export MACOSX_DEPLOYMENT_TARGET
7115 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7117$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007118
Ned Deily87adb6e2013-10-18 21:09:56 -07007119 # end of Darwin* tests
7120 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007121 esac
7122 ;;
7123
7124*)
7125 case $ac_sys_system in
7126 OpenUNIX*|UnixWare*)
7127 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7128 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007129 SCO_SV*)
7130 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7131 ;;
7132 esac
7133 ;;
7134esac
7135
Zachary Ware5af85642015-12-21 12:09:17 -06007136# ICC needs -fp-model strict or floats behave badly
7137case "$CC" in
7138*icc*)
7139 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7140 ;;
7141esac
7142
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007143if test "$Py_DEBUG" = 'true'; then
7144 :
7145else
7146 OPT="-DNDEBUG $OPT"
7147fi
7148
7149if test "$ac_arch_flags"
7150then
7151 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7152fi
7153
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007154# On some compilers, pthreads are available without further options
7155# (e.g. MacOS X). On some of these systems, the compiler will not
7156# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7157# So we have to see first whether pthreads are available without
7158# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7160$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007161if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007162 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007163else
Matthias Kloseb9621712010-04-24 17:59:49 +00007164 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007165 ac_cv_pthread_is_default=no
7166else
Matthias Kloseb9621712010-04-24 17:59:49 +00007167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168/* end confdefs.h. */
7169
Stefan Krah7dba5942012-11-22 22:49:11 +01007170#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007171#include <pthread.h>
7172
7173void* routine(void* p){return NULL;}
7174
7175int main(){
7176 pthread_t p;
7177 if(pthread_create(&p,NULL,routine,NULL)!=0)
7178 return 1;
7179 (void)pthread_detach(p);
7180 return 0;
7181}
7182
7183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007184if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185
7186 ac_cv_pthread_is_default=yes
7187 ac_cv_kthread=no
7188 ac_cv_pthread=no
7189
7190else
Matthias Kloseb9621712010-04-24 17:59:49 +00007191 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007192fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7194 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007195fi
7196
7197
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198fi
7199
Matthias Kloseb9621712010-04-24 17:59:49 +00007200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7201$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007202
7203
7204if test $ac_cv_pthread_is_default = yes
7205then
7206 ac_cv_kpthread=no
7207else
7208# -Kpthread, if available, provides the right #defines
7209# and linker options to make pthread_create available
7210# Some compilers won't report that they do not support -Kpthread,
7211# so we need to run a program to see whether it really made the
7212# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7214$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007215if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217else
7218 ac_save_cc="$CC"
7219CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007220if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007221 ac_cv_kpthread=no
7222else
Matthias Kloseb9621712010-04-24 17:59:49 +00007223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007224/* end confdefs.h. */
7225
Stefan Krah7dba5942012-11-22 22:49:11 +01007226#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007227#include <pthread.h>
7228
7229void* routine(void* p){return NULL;}
7230
7231int main(){
7232 pthread_t p;
7233 if(pthread_create(&p,NULL,routine,NULL)!=0)
7234 return 1;
7235 (void)pthread_detach(p);
7236 return 0;
7237}
7238
7239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007240if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007241 ac_cv_kpthread=yes
7242else
Matthias Kloseb9621712010-04-24 17:59:49 +00007243 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7246 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247fi
7248
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249CC="$ac_save_cc"
7250fi
7251
Matthias Kloseb9621712010-04-24 17:59:49 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7253$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254fi
7255
7256if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7257then
7258# -Kthread, if available, provides the right #defines
7259# and linker options to make pthread_create available
7260# Some compilers won't report that they do not support -Kthread,
7261# so we need to run a program to see whether it really made the
7262# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7264$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007265if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267else
7268 ac_save_cc="$CC"
7269CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007270if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271 ac_cv_kthread=no
7272else
Matthias Kloseb9621712010-04-24 17:59:49 +00007273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274/* end confdefs.h. */
7275
Stefan Krah7dba5942012-11-22 22:49:11 +01007276#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277#include <pthread.h>
7278
7279void* routine(void* p){return NULL;}
7280
7281int main(){
7282 pthread_t p;
7283 if(pthread_create(&p,NULL,routine,NULL)!=0)
7284 return 1;
7285 (void)pthread_detach(p);
7286 return 0;
7287}
7288
7289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291 ac_cv_kthread=yes
7292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297fi
7298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299CC="$ac_save_cc"
7300fi
7301
Matthias Kloseb9621712010-04-24 17:59:49 +00007302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7303$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007304fi
7305
7306if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7307then
7308# -pthread, if available, provides the right #defines
7309# and linker options to make pthread_create available
7310# Some compilers won't report that they do not support -pthread,
7311# so we need to run a program to see whether it really made the
7312# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7314$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007315if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317else
7318 ac_save_cc="$CC"
7319CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007320if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321 ac_cv_pthread=no
7322else
Matthias Kloseb9621712010-04-24 17:59:49 +00007323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324/* end confdefs.h. */
7325
Stefan Krah7dba5942012-11-22 22:49:11 +01007326#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327#include <pthread.h>
7328
7329void* routine(void* p){return NULL;}
7330
7331int main(){
7332 pthread_t p;
7333 if(pthread_create(&p,NULL,routine,NULL)!=0)
7334 return 1;
7335 (void)pthread_detach(p);
7336 return 0;
7337}
7338
7339_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007340if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341 ac_cv_pthread=yes
7342else
Matthias Kloseb9621712010-04-24 17:59:49 +00007343 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007345rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7346 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347fi
7348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349CC="$ac_save_cc"
7350fi
7351
Matthias Kloseb9621712010-04-24 17:59:49 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7353$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007354fi
7355
7356# If we have set a CC compiler flag for thread support then
7357# check if it works for CXX, too.
7358ac_cv_cxx_thread=no
7359if test ! -z "$CXX"
7360then
Matthias Kloseb9621712010-04-24 17:59:49 +00007361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7362$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007363ac_save_cxx="$CXX"
7364
7365if test "$ac_cv_kpthread" = "yes"
7366then
7367 CXX="$CXX -Kpthread"
7368 ac_cv_cxx_thread=yes
7369elif test "$ac_cv_kthread" = "yes"
7370then
7371 CXX="$CXX -Kthread"
7372 ac_cv_cxx_thread=yes
7373elif test "$ac_cv_pthread" = "yes"
7374then
7375 CXX="$CXX -pthread"
7376 ac_cv_cxx_thread=yes
7377fi
7378
7379if test $ac_cv_cxx_thread = yes
7380then
7381 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7382 $CXX -c conftest.$ac_ext 2>&5
7383 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7384 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7385 then
7386 ac_cv_cxx_thread=yes
7387 else
7388 ac_cv_cxx_thread=no
7389 fi
7390 rm -fr conftest*
7391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7393$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394fi
7395CXX="$ac_save_cxx"
7396
7397
7398# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7400$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007401if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007402 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007403else
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405/* end confdefs.h. */
7406#include <stdlib.h>
7407#include <stdarg.h>
7408#include <string.h>
7409#include <float.h>
7410
7411int
7412main ()
7413{
7414
7415 ;
7416 return 0;
7417}
7418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007419if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420 ac_cv_header_stdc=yes
7421else
Matthias Kloseb9621712010-04-24 17:59:49 +00007422 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7425
7426if test $ac_cv_header_stdc = yes; then
7427 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429/* end confdefs.h. */
7430#include <string.h>
7431
7432_ACEOF
7433if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007434 $EGREP "memchr" >/dev/null 2>&1; then :
7435
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436else
7437 ac_cv_header_stdc=no
7438fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007439rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440
7441fi
7442
7443if test $ac_cv_header_stdc = yes; then
7444 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446/* end confdefs.h. */
7447#include <stdlib.h>
7448
7449_ACEOF
7450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 $EGREP "free" >/dev/null 2>&1; then :
7452
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453else
7454 ac_cv_header_stdc=no
7455fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007456rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457
7458fi
7459
7460if test $ac_cv_header_stdc = yes; then
7461 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463 :
7464else
Matthias Kloseb9621712010-04-24 17:59:49 +00007465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466/* end confdefs.h. */
7467#include <ctype.h>
7468#include <stdlib.h>
7469#if ((' ' & 0x0FF) == 0x020)
7470# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7471# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7472#else
7473# define ISLOWER(c) \
7474 (('a' <= (c) && (c) <= 'i') \
7475 || ('j' <= (c) && (c) <= 'r') \
7476 || ('s' <= (c) && (c) <= 'z'))
7477# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7478#endif
7479
7480#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7481int
7482main ()
7483{
7484 int i;
7485 for (i = 0; i < 256; i++)
7486 if (XOR (islower (i), ISLOWER (i))
7487 || toupper (i) != TOUPPER (i))
7488 return 2;
7489 return 0;
7490}
7491_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007492if ac_fn_c_try_run "$LINENO"; then :
7493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494else
Matthias Kloseb9621712010-04-24 17:59:49 +00007495 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7498 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499fi
7500
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501fi
7502fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7504$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505if test $ac_cv_header_stdc = yes; then
7506
Matthias Kloseb9621712010-04-24 17:59:49 +00007507$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508
7509fi
7510
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007511for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007512fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007513ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007514sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007515unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007516poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007517sys/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 +01007518sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007519sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007520sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007521sys/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 -07007522libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007523bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007524sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007525do :
7526 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7527ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007528if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007529 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007530#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007531_ACEOF
7532
7533fi
7534
Guido van Rossum627b2d71993-12-24 10:39:16 +00007535done
7536
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007537ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007538for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7541$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007542if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007546/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007547#include <sys/types.h>
7548#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550int
7551main ()
7552{
7553if ((DIR *) 0)
7554return 0;
7555 ;
7556 return 0;
7557}
7558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007561else
Matthias Kloseb9621712010-04-24 17:59:49 +00007562 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007566eval ac_res=\$$as_ac_Header
7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7568$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007569if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007570 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007571#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007572_ACEOF
7573
7574ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007575fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007576
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007577done
7578# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7579if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7581$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007582if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007584else
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007589/* Override any GCC internal prototype to avoid an error.
7590 Use char because int might match the return type of a GCC
7591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007592#ifdef __cplusplus
7593extern "C"
7594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007595char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007599return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 ;
7601 return 0;
7602}
7603_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604for ac_lib in '' dir; do
7605 if test -z "$ac_lib"; then
7606 ac_res="none required"
7607 else
7608 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007609 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007614rm -f core conftest.err conftest.$ac_objext \
7615 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007616 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619done
Victor Stinnere0be4232011-10-25 13:06:09 +02007620if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007622else
7623 ac_cv_search_opendir=no
7624fi
7625rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007626LIBS=$ac_func_search_save_LIBS
7627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7629$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007630ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007631if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007634fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007635
Michael W. Hudson54241132001-12-07 15:38:26 +00007636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7638$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007639if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007641else
7642 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646/* Override any GCC internal prototype to avoid an error.
7647 Use char because int might match the return type of a GCC
7648 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007649#ifdef __cplusplus
7650extern "C"
7651#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007652char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007653int
7654main ()
7655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 ;
7658 return 0;
7659}
7660_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661for ac_lib in '' x; do
7662 if test -z "$ac_lib"; then
7663 ac_res="none required"
7664 else
7665 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007666 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671rm -f core conftest.err conftest.$ac_objext \
7672 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007673 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007674 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007676done
Victor Stinnere0be4232011-10-25 13:06:09 +02007677if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679else
7680 ac_cv_search_opendir=no
7681fi
7682rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007683LIBS=$ac_func_search_save_LIBS
7684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7686$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007688if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007689 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007690
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007691fi
7692
7693fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007694
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7696$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007697if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007699else
Matthias Kloseb9621712010-04-24 17:59:49 +00007700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007701/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007702#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007703int
7704main ()
7705{
7706return makedev(0, 0);
7707 ;
7708 return 0;
7709}
7710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007712 ac_cv_header_sys_types_h_makedev=yes
7713else
Matthias Kloseb9621712010-04-24 17:59:49 +00007714 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716rm -f core conftest.err conftest.$ac_objext \
7717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007718
7719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7721$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007722
7723if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007724ac_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 +02007725if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007726
Matthias Kloseb9621712010-04-24 17:59:49 +00007727$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007728
7729fi
7730
7731
7732
7733 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 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 +02007735if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007736
Matthias Kloseb9621712010-04-24 17:59:49 +00007737$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007738
7739fi
7740
7741
7742 fi
7743fi
7744
Michael W. Hudson54241132001-12-07 15:38:26 +00007745
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007746# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7747for ac_header in net/if.h
7748do :
7749 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7750#ifdef STDC_HEADERS
7751# include <stdlib.h>
7752# include <stddef.h>
7753#else
7754# ifdef HAVE_STDLIB_H
7755# include <stdlib.h>
7756# endif
7757#endif
7758#ifdef HAVE_SYS_SOCKET_H
7759# include <sys/socket.h>
7760#endif
7761
7762"
Victor Stinnere0be4232011-10-25 13:06:09 +02007763if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007764 cat >>confdefs.h <<_ACEOF
7765#define HAVE_NET_IF_H 1
7766_ACEOF
7767
7768fi
7769
7770done
7771
7772
Martin v. Löwis11017b12006-01-14 18:12:57 +00007773# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007774for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007775do :
7776 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 +00007777#ifdef HAVE_ASM_TYPES_H
7778#include <asm/types.h>
7779#endif
7780#ifdef HAVE_SYS_SOCKET_H
7781#include <sys/socket.h>
7782#endif
7783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784"
Victor Stinnere0be4232011-10-25 13:06:09 +02007785if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007786 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007787#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007788_ACEOF
7789
7790fi
7791
7792done
7793
7794
Charles-François Natali47413c12011-10-06 19:47:44 +02007795# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007796for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007797do :
7798 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7799ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7800#ifdef HAVE_SYS_SOCKET_H
7801#include <sys/socket.h>
7802#endif
7803
7804"
7805if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7806 cat >>confdefs.h <<_ACEOF
7807#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7808_ACEOF
7809
7810fi
7811
7812done
7813
7814
Guido van Rossum627b2d71993-12-24 10:39:16 +00007815# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007816was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7818$as_echo_n "checking for clock_t in time.h... " >&6; }
7819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007820/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007821#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007822
7823_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007826 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827else
Martin v. Löwis11437992002-04-12 09:54:03 +00007828
7829
Matthias Kloseb9621712010-04-24 17:59:49 +00007830$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007831
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007832
Guido van Rossum627b2d71993-12-24 10:39:16 +00007833fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007834rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007835
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7837$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007838
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7840$as_echo_n "checking for makedev... " >&6; }
7841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007842/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007843
Jesus Cea740f53a2010-04-28 11:35:30 +00007844#if defined(MAJOR_IN_MKDEV)
7845#include <sys/mkdev.h>
7846#elif defined(MAJOR_IN_SYSMACROS)
7847#include <sys/sysmacros.h>
7848#else
7849#include <sys/types.h>
7850#endif
7851
Neal Norwitz11690112002-07-30 01:08:28 +00007852int
7853main ()
7854{
Jesus Cea740f53a2010-04-28 11:35:30 +00007855
7856 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007857 ;
7858 return 0;
7859}
Matthias Kloseb159a552010-04-25 21:00:44 +00007860
Neal Norwitz11690112002-07-30 01:08:28 +00007861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007862if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007863 ac_cv_has_makedev=yes
7864else
Matthias Kloseb9621712010-04-24 17:59:49 +00007865 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867rm -f core conftest.err conftest.$ac_objext \
7868 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7870$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007871if test "$ac_cv_has_makedev" = "yes"; then
7872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007874
7875fi
7876
Christian Heimes985ecdc2013-11-20 11:46:18 +01007877# byte swapping
7878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7879$as_echo_n "checking for le64toh... " >&6; }
7880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7881/* end confdefs.h. */
7882
7883#ifdef HAVE_ENDIAN_H
7884#include <endian.h>
7885#elif defined(HAVE_SYS_ENDIAN_H)
7886#include <sys/endian.h>
7887#endif
7888
7889int
7890main ()
7891{
7892
7893 le64toh(1)
7894 ;
7895 return 0;
7896}
7897
7898_ACEOF
7899if ac_fn_c_try_link "$LINENO"; then :
7900 ac_cv_has_le64toh=yes
7901else
7902 ac_cv_has_le64toh=no
7903fi
7904rm -f core conftest.err conftest.$ac_objext \
7905 conftest$ac_exeext conftest.$ac_ext
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7907$as_echo "$ac_cv_has_le64toh" >&6; }
7908if test "$ac_cv_has_le64toh" = "yes"; then
7909
7910$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7911
7912fi
7913
Martin v. Löwis399a6892002-10-04 10:22:02 +00007914# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7915# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7916# defined, but the compiler does not support pragma redefine_extname,
7917# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7918# structures (such as rlimit64) without declaring them. As a
7919# work-around, disable LFS on such configurations
7920
7921use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7923$as_echo_n "checking Solaris LFS bug... " >&6; }
7924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007926
7927#define _LARGEFILE_SOURCE 1
7928#define _FILE_OFFSET_BITS 64
7929#include <sys/resource.h>
7930
Martin v. Löwis399a6892002-10-04 10:22:02 +00007931int
7932main ()
7933{
7934struct rlimit foo;
7935 ;
7936 return 0;
7937}
7938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007939if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007940 sol_lfs_bug=no
7941else
Matthias Kloseb9621712010-04-24 17:59:49 +00007942 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7946$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007947if test "$sol_lfs_bug" = "yes"; then
7948 use_lfs=no
7949fi
7950
7951if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007952# Two defines needed to enable largefile support on various platforms
7953# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007954case $ac_sys_system/$ac_sys_release in
7955AIX*)
7956
7957$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7958
7959 ;;
7960esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007961
Matthias Kloseb9621712010-04-24 17:59:49 +00007962$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
7964
Matthias Kloseb9621712010-04-24 17:59:49 +00007965$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007966
Martin v. Löwis399a6892002-10-04 10:22:02 +00007967fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007968
Guido van Rossum84e7b241996-08-19 21:59:00 +00007969# Add some code to confdefs.h so that the test for off_t works on SCO
7970cat >> confdefs.h <<\EOF
7971#if defined(SCO_DS)
7972#undef _OFF_T
7973#endif
7974EOF
7975
Guido van Rossumef2255b2000-03-10 22:30:29 +00007976# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007977ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007979
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007980else
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
7982cat >>confdefs.h <<_ACEOF
7983#define mode_t int
7984_ACEOF
7985
7986fi
7987
Matthias Kloseb9621712010-04-24 17:59:49 +00007988ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007989if test "x$ac_cv_type_off_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007995_ACEOF
7996
7997fi
7998
Matthias Kloseb9621712010-04-24 17:59:49 +00007999ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008000if test "x$ac_cv_type_pid_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
8005#define pid_t int
8006_ACEOF
8007
8008fi
8009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008010
Martin v. Löwis11437992002-04-12 09:54:03 +00008011cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008012#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008013_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008018else
Martin v. Löwis11437992002-04-12 09:54:03 +00008019
8020cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008022_ACEOF
8023
8024fi
8025
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8027$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008030else
Matthias Kloseb9621712010-04-24 17:59:49 +00008031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008033#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008034
8035_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008038 ac_cv_type_uid_t=yes
8039else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040 ac_cv_type_uid_t=no
8041fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008042rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8046$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008047if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008050
8051
Matthias Kloseb9621712010-04-24 17:59:49 +00008052$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008053
8054fi
8055
Mark Dickinson983bc162012-12-02 12:11:38 +00008056
8057# There are two separate checks for each of the exact-width integer types we
8058# need. First we check whether the type is available using the usual
8059# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8060# and <stdint.h> where available). We then also use the special type checks of
8061# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8062# directly, #define's uint32_t to be a suitable type.
8063
8064ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8065if test "x$ac_cv_type_uint32_t" = xyes; then :
8066
8067$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8068
8069fi
8070
Matthias Kloseb9621712010-04-24 17:59:49 +00008071ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8072case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008073 no|yes) ;; #(
8074 *)
8075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008077
8078
8079cat >>confdefs.h <<_ACEOF
8080#define uint32_t $ac_cv_c_uint32_t
8081_ACEOF
8082;;
8083 esac
8084
Mark Dickinson983bc162012-12-02 12:11:38 +00008085
8086ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8087if test "x$ac_cv_type_uint64_t" = xyes; then :
8088
8089$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8090
8091fi
8092
Matthias Kloseb9621712010-04-24 17:59:49 +00008093ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8094case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008095 no|yes) ;; #(
8096 *)
8097
Matthias Kloseb9621712010-04-24 17:59:49 +00008098$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008099
8100
8101cat >>confdefs.h <<_ACEOF
8102#define uint64_t $ac_cv_c_uint64_t
8103_ACEOF
8104;;
8105 esac
8106
Mark Dickinson983bc162012-12-02 12:11:38 +00008107
8108ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8109if test "x$ac_cv_type_int32_t" = xyes; then :
8110
8111$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8112
8113fi
8114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8116case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008117 no|yes) ;; #(
8118 *)
8119
8120cat >>confdefs.h <<_ACEOF
8121#define int32_t $ac_cv_c_int32_t
8122_ACEOF
8123;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008124esac
8125
Mark Dickinson983bc162012-12-02 12:11:38 +00008126
8127ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8128if test "x$ac_cv_type_int64_t" = xyes; then :
8129
8130$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8131
8132fi
8133
Matthias Kloseb9621712010-04-24 17:59:49 +00008134ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8135case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008136 no|yes) ;; #(
8137 *)
8138
8139cat >>confdefs.h <<_ACEOF
8140#define int64_t $ac_cv_c_int64_t
8141_ACEOF
8142;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008143esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008144
Mark Dickinson983bc162012-12-02 12:11:38 +00008145
Matthias Kloseb9621712010-04-24 17:59:49 +00008146ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008147if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008148
Matthias Kloseb9621712010-04-24 17:59:49 +00008149$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008150
8151fi
8152
Stefan Krah1919b7e2012-03-21 18:25:23 +01008153ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8154if test "x$ac_cv_type___uint128_t" = xyes; then :
8155
8156$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8157
8158fi
8159
Jack Jansendd19cf82001-12-06 22:36:17 +00008160
Michael W. Hudson54241132001-12-07 15:38:26 +00008161# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008162# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163# The cast to long int works around a bug in the HP C Compiler
8164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8168$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 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 +00008173
Martin v. Löwis11437992002-04-12 09:54:03 +00008174else
Matthias Kloseb9621712010-04-24 17:59:49 +00008175 if test "$ac_cv_type_int" = yes; then
8176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008178as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008179See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008180 else
8181 ac_cv_sizeof_int=0
8182 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008184
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8187$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188
8189
8190
Martin v. Löwis11437992002-04-12 09:54:03 +00008191cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008192#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008193_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008194
8195
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196# The cast to long int works around a bug in the HP C Compiler
8197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8199# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8201$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008202if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008203 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008204else
Matthias Kloseb9621712010-04-24 17:59:49 +00008205 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 +00008206
Martin v. Löwis11437992002-04-12 09:54:03 +00008207else
Matthias Kloseb9621712010-04-24 17:59:49 +00008208 if test "$ac_cv_type_long" = yes; then
8209 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8210$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008211as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008212See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 else
8214 ac_cv_sizeof_long=0
8215 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008216fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008217
Martin v. Löwis11437992002-04-12 09:54:03 +00008218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8220$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221
8222
8223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008225#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008226_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008227
8228
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229# The cast to long int works around a bug in the HP C Compiler
8230# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8231# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8232# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8234$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008235if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008237else
Matthias Kloseb9621712010-04-24 17:59:49 +00008238 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 +00008239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 if test "$ac_cv_type_void_p" = yes; then
8242 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8243$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008244as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008245See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246 else
8247 ac_cv_sizeof_void_p=0
8248 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8253$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254
8255
8256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008258#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008259_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008260
8261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262# The cast to long int works around a bug in the HP C Compiler
8263# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8264# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8265# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8267$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008270else
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 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 +00008272
Martin v. Löwis11437992002-04-12 09:54:03 +00008273else
Matthias Kloseb9621712010-04-24 17:59:49 +00008274 if test "$ac_cv_type_short" = yes; then
8275 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8276$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008277as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008278See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 else
8280 ac_cv_sizeof_short=0
8281 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283
Martin v. Löwis11437992002-04-12 09:54:03 +00008284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8286$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287
8288
8289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008291#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008293
8294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295# The cast to long int works around a bug in the HP C Compiler
8296# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8297# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8298# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8300$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008301if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008303else
Matthias Kloseb9621712010-04-24 17:59:49 +00008304 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 +00008305
Martin v. Löwis11437992002-04-12 09:54:03 +00008306else
Matthias Kloseb9621712010-04-24 17:59:49 +00008307 if test "$ac_cv_type_float" = yes; then
8308 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008310as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008311See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312 else
8313 ac_cv_sizeof_float=0
8314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008316
Martin v. Löwis11437992002-04-12 09:54:03 +00008317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8319$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320
8321
8322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008324#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008325_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008326
8327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328# The cast to long int works around a bug in the HP C Compiler
8329# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8330# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8331# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8333$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008334if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008336else
Matthias Kloseb9621712010-04-24 17:59:49 +00008337 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 +00008338
Martin v. Löwis11437992002-04-12 09:54:03 +00008339else
Matthias Kloseb9621712010-04-24 17:59:49 +00008340 if test "$ac_cv_type_double" = yes; then
8341 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8342$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008343as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008344See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345 else
8346 ac_cv_sizeof_double=0
8347 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349
Martin v. Löwis11437992002-04-12 09:54:03 +00008350fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8352$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353
8354
8355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008357#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008358_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008359
8360
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361# The cast to long int works around a bug in the HP C Compiler
8362# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8363# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8364# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8366$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008367if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008369else
Matthias Kloseb9621712010-04-24 17:59:49 +00008370 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 +00008371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372else
Matthias Kloseb9621712010-04-24 17:59:49 +00008373 if test "$ac_cv_type_fpos_t" = yes; then
8374 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8375$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008376as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008377See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378 else
8379 ac_cv_sizeof_fpos_t=0
8380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008381fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008382
Martin v. Löwis11437992002-04-12 09:54:03 +00008383fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8385$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008386
8387
8388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008390#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008392
Michael W. Hudson54241132001-12-07 15:38:26 +00008393
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008394# The cast to long int works around a bug in the HP C Compiler
8395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8397# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8399$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008400if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008401 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008402else
Matthias Kloseb9621712010-04-24 17:59:49 +00008403 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 +00008404
Martin v. Löwis18e16552006-02-15 17:27:45 +00008405else
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 if test "$ac_cv_type_size_t" = yes; then
8407 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008409as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008410See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 else
8412 ac_cv_sizeof_size_t=0
8413 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008415
Martin v. Löwis18e16552006-02-15 17:27:45 +00008416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8418$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419
8420
8421
Martin v. Löwis18e16552006-02-15 17:27:45 +00008422cat >>confdefs.h <<_ACEOF
8423#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8424_ACEOF
8425
8426
Christian Heimes400adb02008-02-01 08:12:03 +00008427# The cast to long int works around a bug in the HP C Compiler
8428# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8429# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8430# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8432$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008433if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008434 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008435else
Matthias Kloseb9621712010-04-24 17:59:49 +00008436 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 +00008437
Christian Heimes400adb02008-02-01 08:12:03 +00008438else
Matthias Kloseb9621712010-04-24 17:59:49 +00008439 if test "$ac_cv_type_pid_t" = yes; then
8440 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8441$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008442as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008443See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008444 else
8445 ac_cv_sizeof_pid_t=0
8446 fi
8447fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008448
Christian Heimes400adb02008-02-01 08:12:03 +00008449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8451$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008452
8453
8454
8455cat >>confdefs.h <<_ACEOF
8456#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8457_ACEOF
8458
8459
Michael W. Hudson54241132001-12-07 15:38:26 +00008460
Matthias Kloseb9621712010-04-24 17:59:49 +00008461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8462$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008463have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008465/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467int
8468main ()
8469{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008470long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 ;
8472 return 0;
8473}
8474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008475if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008476
8477
Matthias Kloseb9621712010-04-24 17:59:49 +00008478$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008480 have_long_long=yes
8481
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8485$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008486if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487# The cast to long int works around a bug in the HP C Compiler
8488# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8489# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8490# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8492$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008493if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008494 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008495else
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 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 +00008497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498else
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 if test "$ac_cv_type_long_long" = yes; then
8500 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008502as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008503See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504 else
8505 ac_cv_sizeof_long_long=0
8506 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008508
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8511$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512
8513
8514
Martin v. Löwis11437992002-04-12 09:54:03 +00008515cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008516#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008517_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008518
Michael W. Hudson54241132001-12-07 15:38:26 +00008519
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008520fi
8521
Matthias Kloseb9621712010-04-24 17:59:49 +00008522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8523$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008524have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008526/* end confdefs.h. */
8527
8528int
8529main ()
8530{
8531long double x; x = (long double)0;
8532 ;
8533 return 0;
8534}
8535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008536if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008537
8538
Matthias Kloseb9621712010-04-24 17:59:49 +00008539$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008540
8541 have_long_double=yes
8542
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008543fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8546$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008547if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008548# The cast to long int works around a bug in the HP C Compiler
8549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8551# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8553$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008554if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008556else
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 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 +00008558
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008559else
Matthias Kloseb9621712010-04-24 17:59:49 +00008560 if test "$ac_cv_type_long_double" = yes; then
8561 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008563as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008564See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008565 else
8566 ac_cv_sizeof_long_double=0
8567 fi
8568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008569
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8572$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008573
8574
8575
8576cat >>confdefs.h <<_ACEOF
8577#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8578_ACEOF
8579
8580
8581fi
8582
8583
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8585$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008586have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008588/* end confdefs.h. */
8589
8590int
8591main ()
8592{
8593_Bool x; x = (_Bool)0;
8594 ;
8595 return 0;
8596}
8597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008598if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008599
8600
Matthias Kloseb9621712010-04-24 17:59:49 +00008601$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008602
8603 have_c99_bool=yes
8604
Thomas Woutersb2137042007-02-01 18:02:27 +00008605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8608$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008609if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610# The cast to long int works around a bug in the HP C Compiler
8611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8615$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008616if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 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 +00008620
Thomas Woutersb2137042007-02-01 18:02:27 +00008621else
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 if test "$ac_cv_type__Bool" = yes; then
8623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008625as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008626See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 else
8628 ac_cv_sizeof__Bool=0
8629 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631
Thomas Woutersb2137042007-02-01 18:02:27 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8634$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635
8636
8637
Thomas Woutersb2137042007-02-01 18:02:27 +00008638cat >>confdefs.h <<_ACEOF
8639#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8640_ACEOF
8641
8642
8643fi
8644
Matthias Kloseb9621712010-04-24 17:59:49 +00008645ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008646 #include <stdint.h>
8647 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008648 #ifdef HAVE_INTTYPES_H
8649 #include <inttypes.h>
8650 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008651"
Victor Stinnere0be4232011-10-25 13:06:09 +02008652if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008653
8654cat >>confdefs.h <<_ACEOF
8655#define HAVE_UINTPTR_T 1
8656_ACEOF
8657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658# The cast to long int works around a bug in the HP C Compiler
8659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8661# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8663$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008664if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008666else
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 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 +00008668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669else
Matthias Kloseb9621712010-04-24 17:59:49 +00008670 if test "$ac_cv_type_uintptr_t" = yes; then
8671 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008673as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008674See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675 else
8676 ac_cv_sizeof_uintptr_t=0
8677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008679
Martin v. Löwis11437992002-04-12 09:54:03 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8682$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683
8684
8685
Martin v. Löwis11437992002-04-12 09:54:03 +00008686cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008687#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008688_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008689
Michael W. Hudson54241132001-12-07 15:38:26 +00008690
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008691fi
8692
Thomas Wouters89f507f2006-12-13 04:49:30 +00008693
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008694# The cast to long int works around a bug in the HP C Compiler
8695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8697# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8699$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008700if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008701 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008702else
Matthias Kloseb9621712010-04-24 17:59:49 +00008703 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008704#ifdef HAVE_SYS_TYPES_H
8705#include <sys/types.h>
8706#endif
8707
Matthias Kloseb9621712010-04-24 17:59:49 +00008708"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008709
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if test "$ac_cv_type_off_t" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008714as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008715See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008716 else
8717 ac_cv_sizeof_off_t=0
8718 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8723$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008724
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008725
8726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008728#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008729_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008730
Michael W. Hudson54241132001-12-07 15:38:26 +00008731
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008732
Matthias Kloseb9621712010-04-24 17:59:49 +00008733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8734$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008735if test "$have_long_long" = yes
8736then
8737if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008738 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008739
Matthias Kloseb9621712010-04-24 17:59:49 +00008740$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008741
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8743$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008744else
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8746$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008747fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8750$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008751fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008752
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008753# The cast to long int works around a bug in the HP C Compiler
8754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8758$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008763#ifdef HAVE_SYS_TYPES_H
8764#include <sys/types.h>
8765#endif
8766#ifdef HAVE_TIME_H
8767#include <time.h>
8768#endif
8769
Matthias Kloseb9621712010-04-24 17:59:49 +00008770"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008771
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772else
Matthias Kloseb9621712010-04-24 17:59:49 +00008773 if test "$ac_cv_type_time_t" = yes; then
8774 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8775$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008776as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008777See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008778 else
8779 ac_cv_sizeof_time_t=0
8780 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008782
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8785$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008786
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008787
8788
Martin v. Löwis11437992002-04-12 09:54:03 +00008789cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008790#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008791_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008792
Michael W. Hudson54241132001-12-07 15:38:26 +00008793
8794
Trent Mick635f6fb2000-08-23 21:33:05 +00008795# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008796ac_save_cc="$CC"
8797if test "$ac_cv_kpthread" = "yes"
8798then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008799elif test "$ac_cv_kthread" = "yes"
8800then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008801elif test "$ac_cv_pthread" = "yes"
8802then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008803fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804
Matthias Kloseb9621712010-04-24 17:59:49 +00008805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8806$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008807have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008810
8811 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008812int
8813main ()
8814{
Guido van Rossum12580492000-09-24 16:47:19 +00008815pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 ;
8817 return 0;
8818}
Matthias Kloseb159a552010-04-25 21:00:44 +00008819
Martin v. Löwis11437992002-04-12 09:54:03 +00008820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008821if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008822 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8826$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008827if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008828 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008829# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8830# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8831# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8833$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008834if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008835 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008838#ifdef HAVE_PTHREAD_H
8839#include <pthread.h>
8840#endif
8841
Matthias Kloseb9621712010-04-24 17:59:49 +00008842"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008843
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008844else
Matthias Kloseb9621712010-04-24 17:59:49 +00008845 if test "$ac_cv_type_pthread_t" = yes; then
8846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8847$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008848as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008849See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850 else
8851 ac_cv_sizeof_pthread_t=0
8852 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008853fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008854
Trent Mick635f6fb2000-08-23 21:33:05 +00008855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8857$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008858
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859
8860
Martin v. Löwis11437992002-04-12 09:54:03 +00008861cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008862#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008863_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008864
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008865
Trent Mick635f6fb2000-08-23 21:33:05 +00008866fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008867CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008868
Michael W. Hudson54241132001-12-07 15:38:26 +00008869
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008870case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008871 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008872 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8873 ;;
8874 Darwin/*)
8875 OTHER_LIBTOOL_OPT=""
8876 ;;
8877esac
8878
8879
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008880
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008881case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008882 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008883 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8884 if test "${enable_universalsdk}"; then
8885 :
8886 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008887 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008888 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008889 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008890 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008891 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008892 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008893 if test ${gcc_version} '<' 4.0
8894 then
8895 LIBTOOL_CRUFT="-lcc_dynamic"
8896 else
8897 LIBTOOL_CRUFT=""
8898 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008900 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008901else
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008903/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008904
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008905 #include <unistd.h>
8906 int main(int argc, char*argv[])
8907 {
8908 if (sizeof(long) == 4) {
8909 return 0;
8910 } else {
8911 return 1;
8912 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008913 }
8914
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008916if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008917 ac_osx_32bit=yes
8918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008923fi
8924
8925
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008926 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008927 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008928 i386)
8929 MACOSX_DEFAULT_ARCH="i386"
8930 ;;
8931 ppc)
8932 MACOSX_DEFAULT_ARCH="ppc"
8933 ;;
8934 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008935 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008936 ;;
8937 esac
8938 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008939 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008940 i386)
8941 MACOSX_DEFAULT_ARCH="x86_64"
8942 ;;
8943 ppc)
8944 MACOSX_DEFAULT_ARCH="ppc64"
8945 ;;
8946 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008947 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008948 ;;
8949 esac
8950
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008951 fi
8952
8953 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008955 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008956esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8958$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008959if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008960then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008961 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008963 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008964
Matthias Kloseb9621712010-04-24 17:59:49 +00008965$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008966
Matthias Kloseb9621712010-04-24 17:59:49 +00008967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8968$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008969 if test $enable_shared = "yes"
8970 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008971 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 +00008972 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008973else
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008976fi
8977
Matthias Kloseb9621712010-04-24 17:59:49 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8979$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008980case $ac_sys_system/$ac_sys_release in
8981 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008982
Matthias Kloseb9621712010-04-24 17:59:49 +00008983$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008984
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8986$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008987 ;;
8988 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8990$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008991 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008992esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008993
Guido van Rossum0a516c91994-09-12 10:58:40 +00008994# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008995
Michael W. Hudson54241132001-12-07 15:38:26 +00008996
8997
8998
8999
Benjamin Peterson99f03762010-04-11 22:15:28 +00009000
Thomas Wouters477c8d52006-05-27 19:21:47 +00009001
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009002# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9003# -- usually .so, .sl on HP-UX, .dll on Cygwin
9004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9005$as_echo_n "checking the extension of shared libraries... " >&6; }
9006if test -z "$SHLIB_SUFFIX"; then
9007 case $ac_sys_system in
9008 hp*|HP*)
9009 case `uname -m` in
9010 ia64) SHLIB_SUFFIX=.so;;
9011 *) SHLIB_SUFFIX=.sl;;
9012 esac
9013 ;;
9014 CYGWIN*) SHLIB_SUFFIX=.dll;;
9015 *) SHLIB_SUFFIX=.so;;
9016 esac
9017fi
9018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9019$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009020
Guido van Rossum0a516c91994-09-12 10:58:40 +00009021# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009022# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009023# (Shared libraries in this instance are shared modules to be loaded into
9024# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9026$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009027if test -z "$LDSHARED"
9028then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009029 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009030 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009031 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009032 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009033 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009034 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009035 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009037 if test "$GCC" = "yes" ; then
9038 LDSHARED='$(CC) -shared'
9039 LDCXXSHARED='$(CXX) -shared'
9040 else
9041 LDSHARED='$(CC) -G'
9042 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009043 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009044 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009045 if test "$GCC" = "yes" ; then
9046 LDSHARED='$(CC) -shared'
9047 LDCXXSHARED='$(CXX) -shared'
9048 else
9049 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009050 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009051 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009052 LDSHARED='$(CC) -bundle'
9053 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009054 if test "$enable_framework" ; then
9055 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009056 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9057 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009058 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009059 else
9060 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009061 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009062 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009063 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009064 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009065 LDSHARED='$(CC) -bundle'
9066 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009067 if test "$enable_framework" ; then
9068 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009069 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9070 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009071 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009072 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009073 # No framework, use the Python app as bundle-loader
9074 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009075 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009076 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009077 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009078 Darwin/*)
9079 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9080 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009081
Ned Deily36820b62014-06-25 13:44:22 -07009082 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9083 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9084 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9085 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9086 if test ${dep_target_major} -eq 10 && \
9087 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009088 then
Ned Deily36820b62014-06-25 13:44:22 -07009089 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009090 LDSHARED='$(CC) -bundle'
9091 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009092 if test "$enable_framework" ; then
9093 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009094 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9095 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009096 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009097 else
9098 # No framework, use the Python app as bundle-loader
9099 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9100 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009101 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009102 fi
Ned Deily36820b62014-06-25 13:44:22 -07009103 else
9104 # building for OS X 10.3 and later
9105 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9106 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9107 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009108 fi
9109 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009110 Linux*|GNU*|QNX*)
9111 LDSHARED='$(CC) -shared'
9112 LDCXXSHARED='$(CXX) -shared';;
9113 BSD/OS*/4*)
9114 LDSHARED="gcc -shared"
9115 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009116 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009117 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009118 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009119 LDSHARED='$(CC) -shared'
9120 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009121 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009122 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009123 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009124 OpenBSD*)
9125 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9126 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009127 LDSHARED='$(CC) -shared $(CCSHARED)'
9128 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009129 else
9130 case `uname -r` in
9131 [01].* | 2.[0-7] | 2.[0-7].*)
9132 LDSHARED="ld -Bshareable ${LDFLAGS}"
9133 ;;
9134 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009135 LDSHARED='$(CC) -shared $(CCSHARED)'
9136 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009137 ;;
9138 esac
9139 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009141 LDSHARED='$(CC) -shared'
9142 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009143 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009144 if test "$GCC" = "yes" ; then
9145 LDSHARED='$(CC) -shared'
9146 LDCXXSHARED='$(CXX) -shared'
9147 else
9148 LDSHARED='$(CC) -G'
9149 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009150 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 SCO_SV*)
9152 LDSHARED='$(CC) -Wl,-G,-Bexport'
9153 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9154 CYGWIN*)
9155 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9156 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009157 *) LDSHARED="ld";;
9158 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009159fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9161$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009162LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009163BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009164# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009165# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9167$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009168if test -z "$CCSHARED"
9169then
Guido van Rossum07397971997-04-29 21:49:50 +00009170 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009171 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009172 then CCSHARED="-fPIC";
9173 elif test `uname -p` = sparc;
9174 then CCSHARED="-xcode=pic32";
9175 else CCSHARED="-Kpic";
9176 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009177 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009178 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009179 else CCSHARED="+z";
9180 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009181 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009182 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009183 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009184 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009185 if test "$GCC" = "yes"
9186 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009187 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009188 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009189 SCO_SV*)
9190 if test "$GCC" = "yes"
9191 then CCSHARED="-fPIC"
9192 else CCSHARED="-Kpic -belf"
9193 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009194 IRIX*/6*) case $CC in
9195 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009196 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009197 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009199fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9201$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009202# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009203# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9205$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009206if test -z "$LINKFORSHARED"
9207then
Guido van Rossum07397971997-04-29 21:49:50 +00009208 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009209 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009210 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009211 LINKFORSHARED="-Wl,-E -Wl,+s";;
9212# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009213 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009214 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009215 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009216 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009217 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009218
9219 # Issue #18075: the default maximum stack size (8MBytes) is too
9220 # small for the default recursion limit. Increase the stack size
9221 # to ensure that tests don't crash
9222 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9223
Jack Jansene578a632001-08-15 01:27:14 +00009224 if test "$enable_framework"
9225 then
Jack Jansenda49e192005-01-07 13:08:22 +00009226 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009227 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009228 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009229 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009230 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009231 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009232 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009233 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9234 then
9235 LINKFORSHARED="-Wl,--export-dynamic"
9236 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009237 SunOS/5*) case $CC in
9238 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009239 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009240 then
9241 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009242 fi;;
9243 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009244 CYGWIN*)
9245 if test $enable_shared = "no"
9246 then
9247 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9248 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009249 QNX*)
9250 # -Wl,-E causes the symbols to be added to the dynamic
9251 # symbol table so that they can be found when a module
9252 # is loaded. -N 2048K causes the stack size to be set
9253 # to 2048 kilobytes so that the stack doesn't overflow
9254 # when running test_compile.py.
9255 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9259$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009260
Michael W. Hudson54241132001-12-07 15:38:26 +00009261
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9264$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009265if test ! "$LIBRARY" = "$LDLIBRARY"
9266then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009267 case $ac_sys_system in
9268 CYGWIN*)
9269 # Cygwin needs CCSHARED when building extension DLLs
9270 # but not when building the interpreter DLL.
9271 CFLAGSFORSHARED='';;
9272 *)
9273 CFLAGSFORSHARED='$(CCSHARED)'
9274 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9277$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009278
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009279# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9280# library (with --enable-shared).
9281# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009282# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9283# if it is not required, since it creates a dependency of the shared library
9284# to LIBS. This, in turn, means that applications linking the shared libpython
9285# don't need to link LIBS explicitly. The default should be only changed
9286# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009287
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9289$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009290case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009291 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009292 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009293esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9295$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009296
9297
Guido van Rossum627b2d71993-12-24 10:39:16 +00009298# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9300$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009301if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009302 $as_echo_n "(cached) " >&6
9303else
9304 ac_check_lib_save_LIBS=$LIBS
9305LIBS="-lsendfile $LIBS"
9306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9307/* end confdefs.h. */
9308
9309/* Override any GCC internal prototype to avoid an error.
9310 Use char because int might match the return type of a GCC
9311 builtin and then its argument prototype would still apply. */
9312#ifdef __cplusplus
9313extern "C"
9314#endif
9315char sendfile ();
9316int
9317main ()
9318{
9319return sendfile ();
9320 ;
9321 return 0;
9322}
9323_ACEOF
9324if ac_fn_c_try_link "$LINENO"; then :
9325 ac_cv_lib_sendfile_sendfile=yes
9326else
9327 ac_cv_lib_sendfile_sendfile=no
9328fi
9329rm -f core conftest.err conftest.$ac_objext \
9330 conftest$ac_exeext conftest.$ac_ext
9331LIBS=$ac_check_lib_save_LIBS
9332fi
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9334$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009335if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009336 cat >>confdefs.h <<_ACEOF
9337#define HAVE_LIBSENDFILE 1
9338_ACEOF
9339
9340 LIBS="-lsendfile $LIBS"
9341
9342fi
9343
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9345$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009346if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009348else
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009350LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009354/* Override any GCC internal prototype to avoid an error.
9355 Use char because int might match the return type of a GCC
9356 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357#ifdef __cplusplus
9358extern "C"
9359#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009360char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009361int
9362main ()
9363{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 ;
9366 return 0;
9367}
9368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009369if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009371else
Matthias Kloseb9621712010-04-24 17:59:49 +00009372 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374rm -f core conftest.err conftest.$ac_objext \
9375 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009376LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9379$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009380if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 cat >>confdefs.h <<_ACEOF
9382#define HAVE_LIBDL 1
9383_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009384
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009385 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009387fi
9388 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9390$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009391if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009392 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009393else
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009395LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399/* Override any GCC internal prototype to avoid an error.
9400 Use char because int might match the return type of a GCC
9401 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009402#ifdef __cplusplus
9403extern "C"
9404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009405char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009406int
9407main ()
9408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009409return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009410 ;
9411 return 0;
9412}
9413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009414if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009416else
Matthias Kloseb9621712010-04-24 17:59:49 +00009417 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009419rm -f core conftest.err conftest.$ac_objext \
9420 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009421LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9424$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009425if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 cat >>confdefs.h <<_ACEOF
9427#define HAVE_LIBDLD 1
9428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009429
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009430 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432fi
9433 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009434
Georg Brandlb1441c72009-01-03 22:33:39 +00009435# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009436if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9438$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009439if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009440 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009441else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009442 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446/* Override any GCC internal prototype to avoid an error.
9447 Use char because int might match the return type of a GCC
9448 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009449#ifdef __cplusplus
9450extern "C"
9451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009452char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009453int
9454main ()
9455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ;
9458 return 0;
9459}
9460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009461for ac_lib in '' pthread rt posix4; do
9462 if test -z "$ac_lib"; then
9463 ac_res="none required"
9464 else
9465 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009466 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009469 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009471rm -f core conftest.err conftest.$ac_objext \
9472 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009473 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009474 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009476done
Victor Stinnere0be4232011-10-25 13:06:09 +02009477if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009479else
9480 ac_cv_search_sem_init=no
9481fi
9482rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009483LIBS=$ac_func_search_save_LIBS
9484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9486$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009487ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009488if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009489 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009490
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009491fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009492 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009493 # posix4 on Solaris 2.6
9494 # pthread (first!) on Linux
9495fi
9496
Martin v. Löwis19d17342003-06-14 21:03:05 +00009497# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9499$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009500if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009501 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009502else
9503 ac_check_lib_save_LIBS=$LIBS
9504LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009506/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508/* Override any GCC internal prototype to avoid an error.
9509 Use char because int might match the return type of a GCC
9510 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009511#ifdef __cplusplus
9512extern "C"
9513#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009514char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009515int
9516main ()
9517{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009519 ;
9520 return 0;
9521}
9522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009523if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009524 ac_cv_lib_intl_textdomain=yes
9525else
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528rm -f core conftest.err conftest.$ac_objext \
9529 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009530LIBS=$ac_check_lib_save_LIBS
9531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9533$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009534if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009535
Matthias Kloseb9621712010-04-24 17:59:49 +00009536$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009537
Brett Cannonc6d936e2009-06-07 20:09:53 +00009538 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009539fi
9540
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009541
9542# checks for system dependent C++ extensions support
9543case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9545$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009548
Georg Brandl59e87bd2011-02-15 19:48:59 +00009549 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009553loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ;
9555 return 0;
9556}
Matthias Kloseb159a552010-04-25 21:00:44 +00009557
Martin v. Löwis11437992002-04-12 09:54:03 +00009558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009559if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009560
Matthias Kloseb159a552010-04-25 21:00:44 +00009561
Matthias Kloseb9621712010-04-24 17:59:49 +00009562$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009563
Matthias Kloseb159a552010-04-25 21:00:44 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009565$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009566
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009567else
Matthias Kloseb159a552010-04-25 21:00:44 +00009568
9569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009570$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009571
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009573rm -f core conftest.err conftest.$ac_objext \
9574 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009575 *) ;;
9576esac
9577
Christian Heimes985ecdc2013-11-20 11:46:18 +01009578# check for systems that require aligned memory access
9579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9580$as_echo_n "checking aligned memory access is required... " >&6; }
9581if test "$cross_compiling" = yes; then :
9582 aligned_required=yes
9583else
9584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9585/* end confdefs.h. */
9586
9587int main()
9588{
9589 char s[16];
9590 int i, *p1, *p2;
9591 for (i=0; i < 16; i++)
9592 s[i] = i;
9593 p1 = (int*)(s+1);
9594 p2 = (int*)(s+2);
9595 if (*p1 == *p2)
9596 return 1;
9597 return 0;
9598}
9599
9600_ACEOF
9601if ac_fn_c_try_run "$LINENO"; then :
9602 aligned_required=no
9603else
9604 aligned_required=yes
9605fi
9606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9607 conftest.$ac_objext conftest.beam conftest.$ac_ext
9608fi
9609
9610
9611if test "$aligned_required" = yes ; then
9612
9613$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9614
9615fi
9616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9617$as_echo "$aligned_required" >&6; }
9618
9619
9620# str, bytes and memoryview hash algorithm
9621
9622
9623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9624$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9625
9626# Check whether --with-hash_algorithm was given.
9627if test "${with_hash_algorithm+set}" = set; then :
9628 withval=$with_hash_algorithm;
9629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9630$as_echo "$withval" >&6; }
9631case "$withval" in
9632 siphash24)
9633 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9634
9635 ;;
9636 fnv)
9637 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9638
9639 ;;
9640 *)
9641 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9642 ;;
9643esac
9644
9645else
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9647$as_echo "default" >&6; }
9648fi
9649
9650
Charles-François Natalid30b0222014-05-08 23:08:51 +01009651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9652$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9653
9654# Check whether --with-address_sanitizer was given.
9655if test "${with_address_sanitizer+set}" = set; then :
9656 withval=$with_address_sanitizer;
9657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9658$as_echo "$withval" >&6; }
9659BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9660LDFLAGS="-fsanitize=address $LDFLAGS"
9661
9662else
9663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664$as_echo "no" >&6; }
9665fi
9666
9667
Guido van Rossum70c7f481998-03-26 18:44:10 +00009668# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9670$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009671if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009672 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009673else
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009675LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009676cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009677/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009678
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679/* Override any GCC internal prototype to avoid an error.
9680 Use char because int might match the return type of a GCC
9681 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009682#ifdef __cplusplus
9683extern "C"
9684#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009685char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009686int
9687main ()
9688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009689return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009690 ;
9691 return 0;
9692}
9693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009694if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009696else
Matthias Kloseb9621712010-04-24 17:59:49 +00009697 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009699rm -f core conftest.err conftest.$ac_objext \
9700 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009701LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9704$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009705if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009706 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009707fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009708 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9710$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009711if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009712 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009713else
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009715LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719/* Override any GCC internal prototype to avoid an error.
9720 Use char because int might match the return type of a GCC
9721 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009722#ifdef __cplusplus
9723extern "C"
9724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009725char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009726int
9727main ()
9728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 ;
9731 return 0;
9732}
9733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009736else
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009739rm -f core conftest.err conftest.$ac_objext \
9740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009741LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9744$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009745if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009746 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009747fi
9748 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009749
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9751$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009753# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009754if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009755 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9757$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009758LIBS="$withval $LIBS"
9759
9760else
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9762$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763fi
9764
Guido van Rossum7f43da71994-08-01 12:15:30 +00009765
Victor Stinner8291b5e2015-03-20 16:03:14 +01009766
9767
9768
9769
9770
9771
9772
9773if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9774 if test -n "$ac_tool_prefix"; then
9775 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9776set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9778$as_echo_n "checking for $ac_word... " >&6; }
9779if ${ac_cv_path_PKG_CONFIG+:} false; then :
9780 $as_echo_n "(cached) " >&6
9781else
9782 case $PKG_CONFIG in
9783 [\\/]* | ?:[\\/]*)
9784 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9785 ;;
9786 *)
9787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9788for as_dir in $PATH
9789do
9790 IFS=$as_save_IFS
9791 test -z "$as_dir" && as_dir=.
9792 for ac_exec_ext in '' $ac_executable_extensions; do
9793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9794 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9796 break 2
9797 fi
9798done
9799 done
9800IFS=$as_save_IFS
9801
9802 ;;
9803esac
9804fi
9805PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9806if test -n "$PKG_CONFIG"; then
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9808$as_echo "$PKG_CONFIG" >&6; }
9809else
9810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811$as_echo "no" >&6; }
9812fi
9813
9814
9815fi
9816if test -z "$ac_cv_path_PKG_CONFIG"; then
9817 ac_pt_PKG_CONFIG=$PKG_CONFIG
9818 # Extract the first word of "pkg-config", so it can be a program name with args.
9819set dummy pkg-config; ac_word=$2
9820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9821$as_echo_n "checking for $ac_word... " >&6; }
9822if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9823 $as_echo_n "(cached) " >&6
9824else
9825 case $ac_pt_PKG_CONFIG in
9826 [\\/]* | ?:[\\/]*)
9827 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9828 ;;
9829 *)
9830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9831for as_dir in $PATH
9832do
9833 IFS=$as_save_IFS
9834 test -z "$as_dir" && as_dir=.
9835 for ac_exec_ext in '' $ac_executable_extensions; do
9836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9837 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9839 break 2
9840 fi
9841done
9842 done
9843IFS=$as_save_IFS
9844
9845 ;;
9846esac
9847fi
9848ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9849if test -n "$ac_pt_PKG_CONFIG"; then
9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9851$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9852else
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9854$as_echo "no" >&6; }
9855fi
9856
9857 if test "x$ac_pt_PKG_CONFIG" = x; then
9858 PKG_CONFIG=""
9859 else
9860 case $cross_compiling:$ac_tool_warned in
9861yes:)
9862{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9863$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9864ac_tool_warned=yes ;;
9865esac
9866 PKG_CONFIG=$ac_pt_PKG_CONFIG
9867 fi
9868else
9869 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9870fi
9871
9872fi
9873if test -n "$PKG_CONFIG"; then
9874 _pkg_min_version=0.9.0
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9876$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9877 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9879$as_echo "yes" >&6; }
9880 else
9881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9882$as_echo "no" >&6; }
9883 PKG_CONFIG=""
9884 fi
9885fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009886
9887# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9889$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009890
9891# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009893 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009894else
9895 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009896fi
9897
9898
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9900$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009901
9902# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9904$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009905
9906# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009907if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009908 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009909else
9910 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009911fi
9912
9913
9914if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009915 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9916else
9917 LIBFFI_INCLUDEDIR=""
9918fi
9919
9920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9922$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009923
Stefan Krah60187b52012-03-23 19:06:27 +01009924# Check for use of the system libmpdec library
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9926$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9927
9928# Check whether --with-system_libmpdec was given.
9929if test "${with_system_libmpdec+set}" = set; then :
9930 withval=$with_system_libmpdec;
9931else
9932 with_system_libmpdec="no"
9933fi
9934
9935
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9937$as_echo "$with_system_libmpdec" >&6; }
9938
Benjamin Peterson076ed002010-10-31 17:11:02 +00009939# Check for support for loadable sqlite extensions
9940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9941$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9942# Check whether --enable-loadable-sqlite-extensions was given.
9943if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9944 enableval=$enable_loadable_sqlite_extensions;
9945else
9946 enable_loadable_sqlite_extensions="no"
9947fi
9948
9949
9950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9951$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9952
Ned Deilyd819b932013-09-06 01:07:05 -07009953# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9954
9955
9956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9957$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9958
9959# Check whether --with-tcltk-includes was given.
9960if test "${with_tcltk_includes+set}" = set; then :
9961 withval=$with_tcltk_includes;
9962else
9963 with_tcltk_includes="default"
9964fi
9965
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9967$as_echo "$with_tcltk_includes" >&6; }
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9969$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9970
9971# Check whether --with-tcltk-libs was given.
9972if test "${with_tcltk_libs+set}" = set; then :
9973 withval=$with_tcltk_libs;
9974else
9975 with_tcltk_libs="default"
9976fi
9977
9978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9979$as_echo "$with_tcltk_libs" >&6; }
9980if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9981then
9982 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9983 then
9984 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9985 fi
9986 TCLTK_INCLUDES=""
9987 TCLTK_LIBS=""
9988else
9989 TCLTK_INCLUDES="$with_tcltk_includes"
9990 TCLTK_LIBS="$with_tcltk_libs"
9991fi
9992
Matthias Klose55708cc2009-04-30 08:06:49 +00009993# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9995$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009996
9997# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009998if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009999 withval=$with_dbmliborder;
10000if test x$with_dbmliborder = xyes
10001then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010002as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010003else
10004 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10005 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10006 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010007 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010008 fi
10009 done
10010fi
10011fi
10012
Matthias Kloseb9621712010-04-24 17:59:49 +000010013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10014$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010015
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010016# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010017
10018
Matthias Kloseb9621712010-04-24 17:59:49 +000010019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10020$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010023if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 withval=$with_signal_module;
10025fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010026
10027
10028if test -z "$with_signal_module"
10029then with_signal_module="yes"
10030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10032$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010033
10034if test "${with_signal_module}" = "yes"; then
10035 USE_SIGNAL_MODULE=""
10036 SIGNAL_OBJS=""
10037else
10038 USE_SIGNAL_MODULE="#"
10039 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10040fi
10041
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010042# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010043
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010044USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010045
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046
Martin v. Löwis11437992002-04-12 09:54:03 +000010047
10048# Templates for things AC_DEFINEd more than once.
10049# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010050
10051
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Matthias Kloseb9621712010-04-24 17:59:49 +000010053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10054$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010057if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058 withval=$with_threads;
10059fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010060
10061
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010062# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010065if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010066 withval=$with_thread; with_threads=$with_thread
10067fi
10068
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010069
10070if test -z "$with_threads"
10071then with_threads="yes"
10072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10074$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010075
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010076
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010077if test "$with_threads" = "no"
10078then
10079 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010080elif test "$ac_cv_pthread_is_default" = yes
10081then
Matthias Kloseb9621712010-04-24 17:59:49 +000010082 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010083
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010084 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010085 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010086
10087 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010089elif test "$ac_cv_kpthread" = "yes"
10090then
10091 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010092 if test "$ac_cv_cxx_thread" = "yes"; then
10093 CXX="$CXX -Kpthread"
10094 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010097 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010098 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010099elif test "$ac_cv_kthread" = "yes"
10100then
10101 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010102 if test "$ac_cv_cxx_thread" = "yes"; then
10103 CXX="$CXX -Kthread"
10104 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010106
10107 posix_threads=yes
10108 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010109elif test "$ac_cv_pthread" = "yes"
10110then
10111 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010112 if test "$ac_cv_cxx_thread" = "yes"; then
10113 CXX="$CXX -pthread"
10114 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010116
10117 posix_threads=yes
10118 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010119else
10120 if test ! -z "$with_threads" -a -d "$with_threads"
10121 then LDFLAGS="$LDFLAGS -L$with_threads"
10122 fi
10123 if test ! -z "$withval" -a -d "$withval"
10124 then LDFLAGS="$LDFLAGS -L$withval"
10125 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010126
10127 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010128 # define _POSIX_THREADS in unistd.h. Some apparently don't
10129 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10131$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010133/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010134
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010135#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010136#ifdef _POSIX_THREADS
10137yes
10138#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010139
10140_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010143 unistd_defines_pthreads=yes
10144else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010145 unistd_defines_pthreads=no
10146fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010147rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010148
Matthias Kloseb9621712010-04-24 17:59:49 +000010149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10150$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010151
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010153
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010154 # Just looking for pthread_create in libpthread is not enough:
10155 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10156 # So we really have to include pthread.h, and then link.
10157 _libs=$LIBS
10158 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10160$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010163
10164#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010165#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010166
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010167void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010168int
10169main ()
10170{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010171
10172pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010173 ;
10174 return 0;
10175}
10176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010177if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010178
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10180$as_echo "yes" >&6; }
10181 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010182
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010183 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010184 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010185else
Martin v. Löwis11437992002-04-12 09:54:03 +000010186
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010187 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010189if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010190 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010191
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010192 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010193 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010194else
Guido van Rossumad678af1998-10-02 14:42:15 +000010195
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10197$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010198if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010200else
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010202LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206/* Override any GCC internal prototype to avoid an error.
10207 Use char because int might match the return type of a GCC
10208 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010209#ifdef __cplusplus
10210extern "C"
10211#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010212char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010213int
10214main ()
10215{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010216return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010217 ;
10218 return 0;
10219}
10220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010221if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010223else
Matthias Kloseb9621712010-04-24 17:59:49 +000010224 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226rm -f core conftest.err conftest.$ac_objext \
10227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010228LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010229fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10231$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010232if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010233 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010235 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010236 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010237 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010238else
Greg Steinadf63d62000-07-05 10:38:09 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10241$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010242if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010243 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010244else
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010246LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010250/* Override any GCC internal prototype to avoid an error.
10251 Use char because int might match the return type of a GCC
10252 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010253#ifdef __cplusplus
10254extern "C"
10255#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010256char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010257int
10258main ()
10259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010260return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ;
10262 return 0;
10263}
10264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010265if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010267else
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270rm -f core conftest.err conftest.$ac_objext \
10271 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010272LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10275$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010276if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010278
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010279 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010280 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010281 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010282else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010283
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10285$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010286if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010287 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010288else
Martin v. Löwis11437992002-04-12 09:54:03 +000010289 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010290LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294/* Override any GCC internal prototype to avoid an error.
10295 Use char because int might match the return type of a GCC
10296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010297#ifdef __cplusplus
10298extern "C"
10299#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010300char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010301int
10302main ()
10303{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ;
10306 return 0;
10307}
10308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010309if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010311else
Matthias Kloseb9621712010-04-24 17:59:49 +000010312 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314rm -f core conftest.err conftest.$ac_objext \
10315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010316LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10319$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010320if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010321 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010323 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010324 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010325 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010326else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010327
Matthias Kloseb9621712010-04-24 17:59:49 +000010328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10329$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010330if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010331 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010332else
Martin v. Löwis11437992002-04-12 09:54:03 +000010333 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010334LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338/* Override any GCC internal prototype to avoid an error.
10339 Use char because int might match the return type of a GCC
10340 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341#ifdef __cplusplus
10342extern "C"
10343#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010344char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345int
10346main ()
10347{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ;
10350 return 0;
10351}
10352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358rm -f core conftest.err conftest.$ac_objext \
10359 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010360LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10363$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010364if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010366
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010367 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010368 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010369 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010370else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010371
Martin v. Löwis130fb172001-07-19 11:00:41 +000010372 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010373fi
10374
Guido van Rossum627b2d71993-12-24 10:39:16 +000010375
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010376fi
10377
Guido van Rossum0be3e491997-05-22 20:33:33 +000010378fi
10379
Guido van Rossum49545951997-12-02 19:28:29 +000010380fi
10381
Guido van Rossumb93a8621998-05-07 13:27:32 +000010382fi
10383
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010385rm -f core conftest.err conftest.$ac_objext \
10386 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10389$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010390if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010392else
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010394LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398/* Override any GCC internal prototype to avoid an error.
10399 Use char because int might match the return type of a GCC
10400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010401#ifdef __cplusplus
10402extern "C"
10403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010404char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010405int
10406main ()
10407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010409 ;
10410 return 0;
10411}
10412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010414 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010415else
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010418rm -f core conftest.err conftest.$ac_objext \
10419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010420LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010421fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10423$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010424if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010425 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010426
Martin v. Löwis130fb172001-07-19 11:00:41 +000010427 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010428 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010429 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010430fi
10431
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010432
Neal Norwitza978ab02002-11-02 16:58:05 +000010433 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10435$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010436if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010437 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010438else
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010440LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444/* Override any GCC internal prototype to avoid an error.
10445 Use char because int might match the return type of a GCC
10446 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010447#ifdef __cplusplus
10448extern "C"
10449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010450char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010451int
10452main ()
10453{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010454return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010455 ;
10456 return 0;
10457}
10458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010461else
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010464rm -f core conftest.err conftest.$ac_objext \
10465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010466LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10469$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010470if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010472
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010473 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010474 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010475 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010476fi
10477
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010478 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010479fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010480
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010481if test "$posix_threads" = "yes"; then
10482 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010485
10486 fi
10487
10488 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10489 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010490 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010492
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010493 ;;
10494 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010496
10497 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010498 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010499$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010500
10501 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010502 esac
10503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10505$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010506 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010507 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010508else
Matthias Kloseb9621712010-04-24 17:59:49 +000010509 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010510 ac_cv_pthread_system_supported=no
10511else
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010513/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010514
10515 #include <stdio.h>
10516 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010517 void *foo(void *parm) {
10518 return NULL;
10519 }
10520 main() {
10521 pthread_attr_t attr;
10522 pthread_t id;
10523 if (pthread_attr_init(&attr)) exit(-1);
10524 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10525 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10526 exit(0);
10527 }
10528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010529if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010530 ac_cv_pthread_system_supported=yes
10531else
Matthias Kloseb9621712010-04-24 17:59:49 +000010532 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010533fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010536fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538
Guido van Rossum627b2d71993-12-24 10:39:16 +000010539fi
10540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10542$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010543 if test "$ac_cv_pthread_system_supported" = "yes"; then
10544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546
10547 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 for ac_func in pthread_sigmask
10549do :
10550 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010551if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010554_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010555 case $ac_sys_system in
10556 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010557
Matthias Kloseb9621712010-04-24 17:59:49 +000010558$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010559
10560 ;;
10561 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010562fi
10563done
10564
Christian Heimesf77b4b22013-08-21 13:26:05 +020010565 for ac_func in pthread_atfork
10566do :
10567 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10568if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10569 cat >>confdefs.h <<_ACEOF
10570#define HAVE_PTHREAD_ATFORK 1
10571_ACEOF
10572
10573fi
10574done
10575
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010576fi
10577
10578
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010579# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
Matthias Kloseb9621712010-04-24 17:59:49 +000010581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10582$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010584if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010585 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010586 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10588$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010589 ipv6=no
10590 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10592$as_echo "yes" >&6; }
10593 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594
10595 ipv6=yes
10596 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598else
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010601/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010602 /* AF_INET6 available check */
10603#include <sys/types.h>
10604#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010605int
10606main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010607{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010608int domain = AF_INET6;
10609 ;
10610 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010611}
Martin v. Löwis11437992002-04-12 09:54:03 +000010612_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010613if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010614
Matthias Kloseb9621712010-04-24 17:59:49 +000010615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10616$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010618
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619else
Matthias Kloseb159a552010-04-25 21:00:44 +000010620
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10622$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010623 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010624
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010628if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10630$as_echo_n "checking if RFC2553 API is available... " >&6; }
10631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010632/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010633
10634 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010635#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010636int
10637main ()
10638{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010639struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010640 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ;
10642 return 0;
10643}
Matthias Kloseb159a552010-04-25 21:00:44 +000010644
Martin v. Löwis11437992002-04-12 09:54:03 +000010645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010646if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010647
10648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010649$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010650 ipv6=yes
10651
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010652else
Matthias Kloseb159a552010-04-25 21:00:44 +000010653
10654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010655$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010656 ipv6=no
10657
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010660fi
10661
10662if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010663 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010664
10665fi
10666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667fi
10668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669
10670ipv6type=unknown
10671ipv6lib=none
10672ipv6trylibc=no
10673
10674if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10676$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010677 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10678 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010679 case $i in
10680 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010684#include <netinet/in.h>
10685#ifdef IPV6_INRIA_VERSION
10686yes
10687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010688_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010691 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010692fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010693rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010694
10695 ;;
10696 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010698/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010699
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700#include <netinet/in.h>
10701#ifdef __KAME__
10702yes
10703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010704_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707 ipv6type=$i;
10708 ipv6lib=inet6
10709 ipv6libdir=/usr/local/v6/lib
10710 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010711fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010712rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010713
10714 ;;
10715 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010718
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719#include <features.h>
10720#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10721yes
10722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010723_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726 ipv6type=$i;
10727 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010729rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730
10731 ;;
10732 linux-inet6)
10733 if test -d /usr/inet6; then
10734 ipv6type=$i
10735 ipv6lib=inet6
10736 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010737 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738 fi
10739 ;;
10740 solaris)
10741 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010742 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743 ipv6type=$i
10744 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010745 fi
10746 fi
10747 ;;
10748 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010751
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752#include <sys/param.h>
10753#ifdef _TOSHIBA_INET6
10754yes
10755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010756_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010758 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759 ipv6type=$i;
10760 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010761 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010762fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010763rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010764
10765 ;;
10766 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010769
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010770#include </usr/local/v6/include/sys/v6config.h>
10771#ifdef __V6D__
10772yes
10773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010774_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777 ipv6type=$i;
10778 ipv6lib=v6;
10779 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010780 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010782rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783
10784 ;;
10785 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010787/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010788
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789#include <sys/param.h>
10790#ifdef _ZETA_MINAMI_INET6
10791yes
10792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010793_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796 ipv6type=$i;
10797 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010798 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010799fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010800rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801
10802 ;;
10803 esac
10804 if test "$ipv6type" != "unknown"; then
10805 break
10806 fi
10807 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10809$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010810fi
10811
10812if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10813 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10814 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10815 echo "using lib$ipv6lib"
10816 else
10817 if test $ipv6trylibc = "yes"; then
10818 echo "using libc"
10819 else
10820 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10821 echo "You need to fetch lib$ipv6lib.a from appropriate"
10822 echo 'ipv6 kit and compile beforehand.'
10823 exit 1
10824 fi
10825 fi
10826fi
10827
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10829$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10831/* end confdefs.h. */
10832 /* CAN_RAW_FD_FRAMES available check */
10833#include <linux/can/raw.h>
10834int
10835main ()
10836{
10837int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10838 ;
10839 return 0;
10840}
10841_ACEOF
10842if ac_fn_c_try_compile "$LINENO"; then :
10843
10844
10845$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10846
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10848$as_echo "yes" >&6; }
10849
10850else
10851
10852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854
10855fi
10856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10857
Matthias Kloseb9621712010-04-24 17:59:49 +000010858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10859$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010861/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010862
10863 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010864int
10865main ()
10866{
10867FSIORefNum fRef = 0
10868 ;
10869 return 0;
10870}
Matthias Kloseb159a552010-04-25 21:00:44 +000010871
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010873if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010874
Matthias Kloseb159a552010-04-25 21:00:44 +000010875
Matthias Kloseb9621712010-04-24 17:59:49 +000010876$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10879$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010880
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010881else
Matthias Kloseb159a552010-04-25 21:00:44 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10884$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010885
10886fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10888
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010889# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10891$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010893# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010894if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895 withval=$with_doc_strings;
10896fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010897
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010898
10899if test -z "$with_doc_strings"
10900then with_doc_strings="yes"
10901fi
10902if test "$with_doc_strings" != "no"
10903then
10904
Matthias Kloseb9621712010-04-24 17:59:49 +000010905$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010906
10907fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10909$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010910
Antoine Pitrou042b1282010-08-13 21:15:58 +000010911# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10913$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010915# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010916if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010917 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010918if test "$withval" != no
10919then
10920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10924$as_echo "yes" >&6; }
10925else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010927fi
10928else
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10930$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931fi
10932
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010933
10934# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10936$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010939if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940 withval=$with_pymalloc;
10941fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010942
Neil Schemenauera35c6882001-02-27 04:45:05 +000010943
Neil Schemenauer16c22972002-03-22 15:34:49 +000010944if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010945then
10946 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010947fi
10948if test "$with_pymalloc" != "no"
10949then
Martin v. Löwis11437992002-04-12 09:54:03 +000010950
Matthias Kloseb9621712010-04-24 17:59:49 +000010951$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010952
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010953 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10956$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010957
Benjamin Peterson05159c42009-12-03 03:01:27 +000010958# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10960$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010961
10962# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010963if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010964 withval=$with_valgrind;
10965else
10966 with_valgrind=no
10967fi
10968
Matthias Kloseb9621712010-04-24 17:59:49 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10970$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010971if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 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 +020010973if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010974
Matthias Kloseb9621712010-04-24 17:59:49 +000010975$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010976
10977else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010978 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010979
10980fi
10981
10982
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010983 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010984fi
10985
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010986# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010987
Guido van Rossum98935bf2001-09-05 19:13:16 +000010988DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010989
Guido van Rossume97ee181999-12-20 21:27:22 +000010990# the dlopen() function means we might want to use dynload_shlib.o. some
10991# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010992for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010993do :
10994 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010995if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010997#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010998_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010999
Guido van Rossume97ee181999-12-20 21:27:22 +000011000fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011001done
Guido van Rossume97ee181999-12-20 21:27:22 +000011002
Michael W. Hudson54241132001-12-07 15:38:26 +000011003
Guido van Rossume97ee181999-12-20 21:27:22 +000011004# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11005# loading of modules.
11006
Matthias Kloseb9621712010-04-24 17:59:49 +000011007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11008$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011009if test -z "$DYNLOADFILE"
11010then
11011 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011012 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11013 if test "$ac_cv_func_dlopen" = yes
11014 then DYNLOADFILE="dynload_shlib.o"
11015 else DYNLOADFILE="dynload_aix.o"
11016 fi
11017 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011018 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011019 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11020 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011021 *)
11022 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11023 # out any dynamic loading
11024 if test "$ac_cv_func_dlopen" = yes
11025 then DYNLOADFILE="dynload_shlib.o"
11026 else DYNLOADFILE="dynload_stub.o"
11027 fi
11028 ;;
11029 esac
11030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11032$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011033if test "$DYNLOADFILE" != "dynload_stub.o"
11034then
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
Matthias Kloseb9621712010-04-24 17:59:49 +000011036$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011037
11038fi
11039
Neil Schemenauer4e425612001-06-19 15:44:15 +000011040# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11041
Michael W. Hudson54241132001-12-07 15:38:26 +000011042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11044$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011045if test -z "$MACHDEP_OBJS"
11046then
Jack Jansene578a632001-08-15 01:27:14 +000011047 MACHDEP_OBJS=$extra_machdep_objs
11048else
11049 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011050fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011051if test -z "$MACHDEP_OBJS"; then
11052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11053$as_echo "none" >&6; }
11054else
11055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11056$as_echo "$MACHDEP_OBJS" >&6; }
11057fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011058
Guido van Rossum627b2d71993-12-24 10:39:16 +000011059# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011060for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011061 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011062 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011063 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011064 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011065 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011066 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011067 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11068 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011069 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011070 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011071 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011072 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011073 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011074 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011075 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11076 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011077 sigaction sigaltstack siginterrupt sigpending sigrelse \
11078 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011079 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011080 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011081 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011082do :
11083 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11084ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011085if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011087#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011088_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011089
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011090fi
11091done
11092
Michael W. Hudson54241132001-12-07 15:38:26 +000011093
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011094ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11095 #include <dirent.h>
11096"
11097if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11098
11099$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11100
11101fi
11102
11103
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011104# For some functions, having a definition is not sufficient, since
11105# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11107$as_echo_n "checking for chroot... " >&6; }
11108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011110#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011111int
11112main ()
11113{
11114void *x=chroot
11115 ;
11116 return 0;
11117}
11118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011120
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011122
Matthias Kloseb159a552010-04-25 21:00:44 +000011123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011124$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011125else
Matthias Kloseb9621712010-04-24 17:59:49 +000011126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11127$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011128
11129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11132$as_echo_n "checking for link... " >&6; }
11133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011134/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011135#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011136int
11137main ()
11138{
11139void *x=link
11140 ;
11141 return 0;
11142}
11143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011145
Matthias Kloseb9621712010-04-24 17:59:49 +000011146$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011147
Matthias Kloseb159a552010-04-25 21:00:44 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011149$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011150else
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011153
11154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11157$as_echo_n "checking for symlink... " >&6; }
11158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011159/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011160#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011161int
11162main ()
11163{
11164void *x=symlink
11165 ;
11166 return 0;
11167}
11168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172
Matthias Kloseb159a552010-04-25 21:00:44 +000011173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175else
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11177$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178
11179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11182$as_echo_n "checking for fchdir... " >&6; }
11183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011185#include <unistd.h>
11186int
11187main ()
11188{
11189void *x=fchdir
11190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011197
Matthias Kloseb159a552010-04-25 21:00:44 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011203
11204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11207$as_echo_n "checking for fsync... " >&6; }
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011210#include <unistd.h>
11211int
11212main ()
11213{
11214void *x=fsync
11215 ;
11216 return 0;
11217}
11218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011222
Matthias Kloseb159a552010-04-25 21:00:44 +000011223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011228
11229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11232$as_echo_n "checking for fdatasync... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011235#include <unistd.h>
11236int
11237main ()
11238{
11239void *x=fdatasync
11240 ;
11241 return 0;
11242}
11243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011247
Matthias Kloseb159a552010-04-25 21:00:44 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11252$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011253
11254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11257$as_echo_n "checking for epoll... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011259/* end confdefs.h. */
11260#include <sys/epoll.h>
11261int
11262main ()
11263{
11264void *x=epoll_create
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011278
11279fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11282$as_echo_n "checking for epoll_create1... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11284/* end confdefs.h. */
11285#include <sys/epoll.h>
11286int
11287main ()
11288{
11289void *x=epoll_create1
11290 ;
11291 return 0;
11292}
11293_ACEOF
11294if ac_fn_c_try_compile "$LINENO"; then :
11295
11296$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11297
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11299$as_echo "yes" >&6; }
11300else
11301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
11303
11304fi
11305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11307$as_echo_n "checking for kqueue... " >&6; }
11308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011309/* end confdefs.h. */
11310
11311#include <sys/types.h>
11312#include <sys/event.h>
11313
11314int
11315main ()
11316{
11317int x=kqueue()
11318 ;
11319 return 0;
11320}
11321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011323
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011325
Matthias Kloseb159a552010-04-25 21:00:44 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011327$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011328else
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11330$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011331
11332fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11335$as_echo_n "checking for prlimit... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11337/* end confdefs.h. */
11338
11339#include <sys/time.h>
11340#include <sys/resource.h>
11341
11342int
11343main ()
11344{
11345void *x=prlimit
11346 ;
11347 return 0;
11348}
11349_ACEOF
11350if ac_fn_c_try_compile "$LINENO"; then :
11351
11352$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11353
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11355$as_echo "yes" >&6; }
11356else
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11358$as_echo "no" >&6; }
11359
11360fi
11361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362
Martin v. Löwisd5843682002-11-21 20:41:28 +000011363# On some systems (eg. FreeBSD 5), we would find a definition of the
11364# functions ctermid_r, setgroups in the library, but no prototype
11365# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11366# address to avoid compiler warnings and potential miscompilations
11367# because of the missing prototypes.
11368
Matthias Kloseb9621712010-04-24 17:59:49 +000011369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11370$as_echo_n "checking for ctermid_r... " >&6; }
11371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011372/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011373
Martin v. Löwisd5843682002-11-21 20:41:28 +000011374#include <stdio.h>
11375
Martin v. Löwisd5843682002-11-21 20:41:28 +000011376int
11377main ()
11378{
11379void* p = ctermid_r
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011385
Matthias Kloseb9621712010-04-24 17:59:49 +000011386$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387
Matthias Kloseb159a552010-04-25 21:00:44 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011389$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390else
Matthias Kloseb9621712010-04-24 17:59:49 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393
11394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11396
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11398$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011399if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011400 $as_echo_n "(cached) " >&6
11401else
11402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011404#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011405int
11406main ()
11407{
11408void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011409
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011410 ;
11411 return 0;
11412}
11413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011414if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011415 ac_cv_flock_decl=yes
11416else
11417 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011418
11419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011421
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011422fi
11423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11424$as_echo "$ac_cv_flock_decl" >&6; }
11425if test "x${ac_cv_flock_decl}" = xyes; then
11426 for ac_func in flock
11427do :
11428 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011429if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011430 cat >>confdefs.h <<_ACEOF
11431#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011432_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011433
Antoine Pitroua3000072010-09-07 14:52:42 +000011434else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011436$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011437if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011438 $as_echo_n "(cached) " >&6
11439else
11440 ac_check_lib_save_LIBS=$LIBS
11441LIBS="-lbsd $LIBS"
11442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11443/* end confdefs.h. */
11444
11445/* Override any GCC internal prototype to avoid an error.
11446 Use char because int might match the return type of a GCC
11447 builtin and then its argument prototype would still apply. */
11448#ifdef __cplusplus
11449extern "C"
11450#endif
11451char flock ();
11452int
11453main ()
11454{
11455return flock ();
11456 ;
11457 return 0;
11458}
11459_ACEOF
11460if ac_fn_c_try_link "$LINENO"; then :
11461 ac_cv_lib_bsd_flock=yes
11462else
11463 ac_cv_lib_bsd_flock=no
11464fi
11465rm -f core conftest.err conftest.$ac_objext \
11466 conftest$ac_exeext conftest.$ac_ext
11467LIBS=$ac_check_lib_save_LIBS
11468fi
11469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11470$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011471if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011472 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011473
11474
11475$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11476
11477
11478fi
11479
11480
11481fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011482done
11483
Antoine Pitroua3000072010-09-07 14:52:42 +000011484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485
Matthias Kloseb9621712010-04-24 17:59:49 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11487$as_echo_n "checking for getpagesize... " >&6; }
11488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011489/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011490
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011491#include <unistd.h>
11492
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011493int
11494main ()
11495{
11496void* p = getpagesize
11497 ;
11498 return 0;
11499}
11500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011502
Matthias Kloseb9621712010-04-24 17:59:49 +000011503$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011504
Matthias Kloseb159a552010-04-25 21:00:44 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011506$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011507else
Matthias Kloseb9621712010-04-24 17:59:49 +000011508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11509$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011510
11511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011513
Victor Stinner984890f2011-11-24 13:53:38 +010011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11515$as_echo_n "checking for broken unsetenv... " >&6; }
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517/* end confdefs.h. */
11518
11519#include <stdlib.h>
11520
11521int
11522main ()
11523{
11524int res = unsetenv("DUMMY")
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529if ac_fn_c_try_compile "$LINENO"; then :
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531$as_echo "no" >&6; }
11532else
11533
11534$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11535
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11537$as_echo "yes" >&6; }
11538
11539fi
11540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011542for ac_prog in true
11543do
11544 # Extract the first word of "$ac_prog", so it can be a program name with args.
11545set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11547$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011548if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011550else
11551 if test -n "$TRUE"; then
11552 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11553else
11554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11555for as_dir in $PATH
11556do
11557 IFS=$as_save_IFS
11558 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011561 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 $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 +000011563 break 2
11564 fi
11565done
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011567IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011568
11569fi
11570fi
11571TRUE=$ac_cv_prog_TRUE
11572if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11574$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011575else
Matthias Kloseb9621712010-04-24 17:59:49 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11577$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011578fi
11579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011580
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581 test -n "$TRUE" && break
11582done
11583test -n "$TRUE" || TRUE="/bin/true"
11584
11585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11587$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011588if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011589 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011590else
11591 ac_check_lib_save_LIBS=$LIBS
11592LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011594/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011596/* Override any GCC internal prototype to avoid an error.
11597 Use char because int might match the return type of a GCC
11598 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011599#ifdef __cplusplus
11600extern "C"
11601#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011602char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011603int
11604main ()
11605{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011607 ;
11608 return 0;
11609}
11610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011611if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011612 ac_cv_lib_c_inet_aton=yes
11613else
Matthias Kloseb9621712010-04-24 17:59:49 +000011614 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616rm -f core conftest.err conftest.$ac_objext \
11617 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011618LIBS=$ac_check_lib_save_LIBS
11619fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11621$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011622if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011623 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011624else
Matthias Kloseb9621712010-04-24 17:59:49 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11626$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011627if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011629else
11630 ac_check_lib_save_LIBS=$LIBS
11631LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635/* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011638#ifdef __cplusplus
11639extern "C"
11640#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011642int
11643main ()
11644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646 ;
11647 return 0;
11648}
11649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651 ac_cv_lib_resolv_inet_aton=yes
11652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657LIBS=$ac_check_lib_save_LIBS
11658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11660$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011661if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011662 cat >>confdefs.h <<_ACEOF
11663#define HAVE_LIBRESOLV 1
11664_ACEOF
11665
11666 LIBS="-lresolv $LIBS"
11667
11668fi
11669
11670
11671fi
11672
11673
Christian Heimesd0764e22007-12-04 15:00:33 +000011674# On Tru64, chflags seems to be present, but calling it will
11675# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11677$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011678if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011682 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011683else
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011685/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011686
Christian Heimesd0764e22007-12-04 15:00:33 +000011687#include <sys/stat.h>
11688#include <unistd.h>
11689int main(int argc, char*argv[])
11690{
11691 if(chflags(argv[0], 0) != 0)
11692 return 1;
11693 return 0;
11694}
Ned Deily3eb67d52011-06-28 00:00:28 -070011695
Christian Heimesd0764e22007-12-04 15:00:33 +000011696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011697if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011698 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011699else
Matthias Kloseb9621712010-04-24 17:59:49 +000011700 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11703 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011704fi
11705
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011706
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011707fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11709$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011710if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011711 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011712if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011713 ac_cv_have_chflags="yes"
11714else
11715 ac_cv_have_chflags="no"
11716fi
11717
11718fi
11719if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011722
11723fi
11724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11726$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011727if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011728 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011729else
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011731 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011734/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011735
Christian Heimesd0764e22007-12-04 15:00:33 +000011736#include <sys/stat.h>
11737#include <unistd.h>
11738int main(int argc, char*argv[])
11739{
11740 if(lchflags(argv[0], 0) != 0)
11741 return 1;
11742 return 0;
11743}
Ned Deily3eb67d52011-06-28 00:00:28 -070011744
Christian Heimesd0764e22007-12-04 15:00:33 +000011745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011746if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011747 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011748else
Matthias Kloseb9621712010-04-24 17:59:49 +000011749 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011753fi
11754
11755
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11758$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011759if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011760 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011761if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011762 ac_cv_have_lchflags="yes"
11763else
11764 ac_cv_have_lchflags="no"
11765fi
11766
11767fi
11768if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011769
Matthias Kloseb9621712010-04-24 17:59:49 +000011770$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011771
11772fi
11773
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011774case $ac_sys_system/$ac_sys_release in
11775Darwin/*)
11776 _CUR_CFLAGS="${CFLAGS}"
11777 _CUR_LDFLAGS="${LDFLAGS}"
11778 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11779 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11780 ;;
11781esac
11782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11784$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011785if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011786 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011787else
11788 ac_check_lib_save_LIBS=$LIBS
11789LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011791/* end confdefs.h. */
11792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793/* Override any GCC internal prototype to avoid an error.
11794 Use char because int might match the return type of a GCC
11795 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011796#ifdef __cplusplus
11797extern "C"
11798#endif
11799char inflateCopy ();
11800int
11801main ()
11802{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011804 ;
11805 return 0;
11806}
11807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011808if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011809 ac_cv_lib_z_inflateCopy=yes
11810else
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813rm -f core conftest.err conftest.$ac_objext \
11814 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011815LIBS=$ac_check_lib_save_LIBS
11816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11818$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011819if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011822
11823fi
11824
11825
11826case $ac_sys_system/$ac_sys_release in
11827Darwin/*)
11828 CFLAGS="${_CUR_CFLAGS}"
11829 LDFLAGS="${_CUR_LDFLAGS}"
11830 ;;
11831esac
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11834$as_echo_n "checking for hstrerror... " >&6; }
11835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011836/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011837
Martin v. Löwise9416172003-05-03 10:12:45 +000011838#include <netdb.h>
11839
Martin v. Löwise9416172003-05-03 10:12:45 +000011840int
11841main ()
11842{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011843void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011844 ;
11845 return 0;
11846}
11847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011851
Matthias Kloseb159a552010-04-25 21:00:44 +000011852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011853$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11856$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011857
11858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011859rm -f core conftest.err conftest.$ac_objext \
11860 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861
Matthias Kloseb9621712010-04-24 17:59:49 +000011862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11863$as_echo_n "checking for inet_aton... " >&6; }
11864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011865/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011866
Martin v. Löwis86d66262006-02-17 08:40:11 +000011867#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011868#include <sys/socket.h>
11869#include <netinet/in.h>
11870#include <arpa/inet.h>
11871
Martin v. Löwise9416172003-05-03 10:12:45 +000011872int
11873main ()
11874{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011875void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011881
Matthias Kloseb9621712010-04-24 17:59:49 +000011882$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011883
Matthias Kloseb159a552010-04-25 21:00:44 +000011884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011885$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011886else
Matthias Kloseb9621712010-04-24 17:59:49 +000011887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11888$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011889
11890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011891rm -f core conftest.err conftest.$ac_objext \
11892 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011893
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11895$as_echo_n "checking for inet_pton... " >&6; }
11896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011897/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011898
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011899#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011900#include <sys/socket.h>
11901#include <netinet/in.h>
11902#include <arpa/inet.h>
11903
Martin v. Löwise9416172003-05-03 10:12:45 +000011904int
11905main ()
11906{
11907void* p = inet_pton
11908 ;
11909 return 0;
11910}
11911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011912if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011913
Matthias Kloseb9621712010-04-24 17:59:49 +000011914$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011915
Matthias Kloseb159a552010-04-25 21:00:44 +000011916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011917$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011918else
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11920$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011921
11922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011924
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011925# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11927$as_echo_n "checking for setgroups... " >&6; }
11928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011929/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011930
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011931#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011932#ifdef HAVE_GRP_H
11933#include <grp.h>
11934#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011935
Martin v. Löwisd5843682002-11-21 20:41:28 +000011936int
11937main ()
11938{
11939void* p = setgroups
11940 ;
11941 return 0;
11942}
11943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011944if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011945
Matthias Kloseb9621712010-04-24 17:59:49 +000011946$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011947
Matthias Kloseb159a552010-04-25 21:00:44 +000011948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011949$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011950else
Matthias Kloseb9621712010-04-24 17:59:49 +000011951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11952$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011953
11954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011956
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011957# check for openpty and forkpty
11958
11959for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011960do :
11961 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011962if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011963 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011965_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011966
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011967else
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11969$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011970if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011971 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011972else
Martin v. Löwis11437992002-04-12 09:54:03 +000011973 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011974LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011977
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978/* Override any GCC internal prototype to avoid an error.
11979 Use char because int might match the return type of a GCC
11980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011981#ifdef __cplusplus
11982extern "C"
11983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011984char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011985int
11986main ()
11987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011988return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011989 ;
11990 return 0;
11991}
11992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011994 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011995else
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998rm -f core conftest.err conftest.$ac_objext \
11999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012000LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12003$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012004if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012006 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12009$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012010if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012012else
12013 ac_check_lib_save_LIBS=$LIBS
12014LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012015cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012016/* end confdefs.h. */
12017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012018/* Override any GCC internal prototype to avoid an error.
12019 Use char because int might match the return type of a GCC
12020 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012021#ifdef __cplusplus
12022extern "C"
12023#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012024char openpty ();
12025int
12026main ()
12027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012034 ac_cv_lib_bsd_openpty=yes
12035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012038rm -f core conftest.err conftest.$ac_objext \
12039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012040LIBS=$ac_check_lib_save_LIBS
12041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12043$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012044if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012045 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012046 LIBS="$LIBS -lbsd"
12047fi
12048
12049
12050fi
12051
Fred Drake8cef4cf2000-06-28 16:40:38 +000012052
12053fi
12054done
12055
12056for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012057do :
12058 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012061#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012062_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012063
Fred Drake8cef4cf2000-06-28 16:40:38 +000012064else
Matthias Kloseb9621712010-04-24 17:59:49 +000012065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12066$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012067if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012069else
Martin v. Löwis11437992002-04-12 09:54:03 +000012070 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012071LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075/* Override any GCC internal prototype to avoid an error.
12076 Use char because int might match the return type of a GCC
12077 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012078#ifdef __cplusplus
12079extern "C"
12080#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012081char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012082int
12083main ()
12084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012085return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012091 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012092else
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095rm -f core conftest.err conftest.$ac_objext \
12096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012097LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12100$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012104else
Matthias Kloseb9621712010-04-24 17:59:49 +000012105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12106$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012107if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012109else
12110 ac_check_lib_save_LIBS=$LIBS
12111LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012113/* end confdefs.h. */
12114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012115/* Override any GCC internal prototype to avoid an error.
12116 Use char because int might match the return type of a GCC
12117 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012118#ifdef __cplusplus
12119extern "C"
12120#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012121char forkpty ();
12122int
12123main ()
12124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012126 ;
12127 return 0;
12128}
12129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012131 ac_cv_lib_bsd_forkpty=yes
12132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012135rm -f core conftest.err conftest.$ac_objext \
12136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012137LIBS=$ac_check_lib_save_LIBS
12138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12140$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012141if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012143 LIBS="$LIBS -lbsd"
12144fi
12145
12146
12147fi
12148
Fred Drake8cef4cf2000-06-28 16:40:38 +000012149
12150fi
12151done
12152
Jack Jansendd19cf82001-12-06 22:36:17 +000012153
Christian Heimesb186d002008-03-18 15:15:01 +000012154# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012155for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012156do :
12157 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012159 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012160#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012161_ACEOF
12162
12163fi
12164done
12165
12166
Michael W. Hudson54241132001-12-07 15:38:26 +000012167# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012168for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012169do :
12170 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12171ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012172if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012174#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012175_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012176
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012177fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012178done
12179
Michael W. Hudson54241132001-12-07 15:38:26 +000012180
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012181ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012183 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012184
Martin v. Löwis1142de32002-03-29 16:28:31 +000012185else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012187 *" dup2.$ac_objext "* ) ;;
12188 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012189 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012190esac
12191
Martin v. Löwis1142de32002-03-29 16:28:31 +000012192fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012193
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012194ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012196 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12197
12198else
12199 case " $LIBOBJS " in
12200 *" strdup.$ac_objext "* ) ;;
12201 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12202 ;;
12203esac
12204
12205fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012206
12207
12208for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012209do :
12210 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012211if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012216/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012218int
12219main ()
12220{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012221getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 ;
12223 return 0;
12224}
12225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012227
Matthias Kloseb9621712010-04-24 17:59:49 +000012228$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012229
Guido van Rossum627b2d71993-12-24 10:39:16 +000012230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012232
Guido van Rossum627b2d71993-12-24 10:39:16 +000012233fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012234done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012235
Jack Jansen150753c2003-03-29 22:07:47 +000012236for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012237do :
12238 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012239if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012240 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012241#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012244/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012245#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012246int
12247main ()
12248{
12249setpgrp(0,0);
12250 ;
12251 return 0;
12252}
12253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012257
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012260
12261fi
12262done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012263
Thomas Wouters3a584202000-08-05 23:28:51 +000012264for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012265do :
12266 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012267if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012269#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012273#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012274int
12275main ()
12276{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ;
12279 return 0;
12280}
12281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282if ac_fn_c_try_compile "$LINENO"; then :
12283
Guido van Rossum627b2d71993-12-24 10:39:16 +000012284else
Skip Montanaro6dead952003-09-25 14:50:04 +000012285
Matthias Kloseb9621712010-04-24 17:59:49 +000012286$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012287
Martin v. Löwis11437992002-04-12 09:54:03 +000012288
Guido van Rossum627b2d71993-12-24 10:39:16 +000012289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012291
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012292fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012293done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012294
Michael W. Hudson54241132001-12-07 15:38:26 +000012295
Victor Stinnere0be4232011-10-25 13:06:09 +020012296for ac_func in clock_gettime
12297do :
12298 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12299if test "x$ac_cv_func_clock_gettime" = xyes; then :
12300 cat >>confdefs.h <<_ACEOF
12301#define HAVE_CLOCK_GETTIME 1
12302_ACEOF
12303
12304else
12305
12306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12307$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12308if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12309 $as_echo_n "(cached) " >&6
12310else
12311 ac_check_lib_save_LIBS=$LIBS
12312LIBS="-lrt $LIBS"
12313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12314/* end confdefs.h. */
12315
12316/* Override any GCC internal prototype to avoid an error.
12317 Use char because int might match the return type of a GCC
12318 builtin and then its argument prototype would still apply. */
12319#ifdef __cplusplus
12320extern "C"
12321#endif
12322char clock_gettime ();
12323int
12324main ()
12325{
12326return clock_gettime ();
12327 ;
12328 return 0;
12329}
12330_ACEOF
12331if ac_fn_c_try_link "$LINENO"; then :
12332 ac_cv_lib_rt_clock_gettime=yes
12333else
12334 ac_cv_lib_rt_clock_gettime=no
12335fi
12336rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext conftest.$ac_ext
12338LIBS=$ac_check_lib_save_LIBS
12339fi
12340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12341$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12342if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12343
Victor Stinner7efb8332014-08-29 15:41:08 +020012344 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012345 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12346
12347
12348$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12349
12350
12351fi
12352
12353
12354fi
12355done
12356
12357
12358for ac_func in clock_getres
12359do :
12360 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12361if test "x$ac_cv_func_clock_getres" = xyes; then :
12362 cat >>confdefs.h <<_ACEOF
12363#define HAVE_CLOCK_GETRES 1
12364_ACEOF
12365
12366else
12367
12368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12369$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12370if ${ac_cv_lib_rt_clock_getres+:} false; then :
12371 $as_echo_n "(cached) " >&6
12372else
12373 ac_check_lib_save_LIBS=$LIBS
12374LIBS="-lrt $LIBS"
12375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12376/* end confdefs.h. */
12377
12378/* Override any GCC internal prototype to avoid an error.
12379 Use char because int might match the return type of a GCC
12380 builtin and then its argument prototype would still apply. */
12381#ifdef __cplusplus
12382extern "C"
12383#endif
12384char clock_getres ();
12385int
12386main ()
12387{
12388return clock_getres ();
12389 ;
12390 return 0;
12391}
12392_ACEOF
12393if ac_fn_c_try_link "$LINENO"; then :
12394 ac_cv_lib_rt_clock_getres=yes
12395else
12396 ac_cv_lib_rt_clock_getres=no
12397fi
12398rm -f core conftest.err conftest.$ac_objext \
12399 conftest$ac_exeext conftest.$ac_ext
12400LIBS=$ac_check_lib_save_LIBS
12401fi
12402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12403$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12404if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12405
12406 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12407
12408
12409fi
12410
12411
12412fi
12413done
12414
12415
Matthias Kloseb9621712010-04-24 17:59:49 +000012416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12417$as_echo_n "checking for major... " >&6; }
12418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012419/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012420
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012421#if defined(MAJOR_IN_MKDEV)
12422#include <sys/mkdev.h>
12423#elif defined(MAJOR_IN_SYSMACROS)
12424#include <sys/sysmacros.h>
12425#else
12426#include <sys/types.h>
12427#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012428
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012429int
12430main ()
12431{
12432
12433 makedev(major(0),minor(0));
12434
12435 ;
12436 return 0;
12437}
12438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012440
12441
Matthias Kloseb9621712010-04-24 17:59:49 +000012442$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012443
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12445$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012446
12447else
Skip Montanaro6dead952003-09-25 14:50:04 +000012448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12450$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012451
12452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012453rm -f core conftest.err conftest.$ac_objext \
12454 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012455
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012456# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012457# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12459$as_echo_n "checking for getaddrinfo... " >&6; }
12460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012462
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012463#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012464#include <sys/socket.h>
12465#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012466#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468int
12469main ()
12470{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012471getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 ;
12473 return 0;
12474}
12475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012477 have_getaddrinfo=yes
12478else
Matthias Kloseb9621712010-04-24 17:59:49 +000012479 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012480fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012481rm -f core conftest.err conftest.$ac_objext \
12482 conftest$ac_exeext conftest.$ac_ext
12483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12484$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012485if test $have_getaddrinfo = yes
12486then
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12488$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012489 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012491else
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012493
12494if test "${enable_ipv6+set}" = set; then
12495 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12496else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012497 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012498fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012499else
Matthias Kloseb9621712010-04-24 17:59:49 +000012500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012501/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012502
Stefan Krah19c21392012-11-22 23:47:32 +010012503#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012504#include <sys/types.h>
12505#include <netdb.h>
12506#include <string.h>
12507#include <sys/socket.h>
12508#include <netinet/in.h>
12509
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012510int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012511{
12512 int passive, gaierr, inet4 = 0, inet6 = 0;
12513 struct addrinfo hints, *ai, *aitop;
12514 char straddr[INET6_ADDRSTRLEN], strport[16];
12515
12516 for (passive = 0; passive <= 1; passive++) {
12517 memset(&hints, 0, sizeof(hints));
12518 hints.ai_family = AF_UNSPEC;
12519 hints.ai_flags = passive ? AI_PASSIVE : 0;
12520 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012521 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012522 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12523 (void)gai_strerror(gaierr);
12524 goto bad;
12525 }
12526 for (ai = aitop; ai; ai = ai->ai_next) {
12527 if (ai->ai_addr == NULL ||
12528 ai->ai_addrlen == 0 ||
12529 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12530 straddr, sizeof(straddr), strport, sizeof(strport),
12531 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12532 goto bad;
12533 }
12534 switch (ai->ai_family) {
12535 case AF_INET:
12536 if (strcmp(strport, "54321") != 0) {
12537 goto bad;
12538 }
12539 if (passive) {
12540 if (strcmp(straddr, "0.0.0.0") != 0) {
12541 goto bad;
12542 }
12543 } else {
12544 if (strcmp(straddr, "127.0.0.1") != 0) {
12545 goto bad;
12546 }
12547 }
12548 inet4++;
12549 break;
12550 case AF_INET6:
12551 if (strcmp(strport, "54321") != 0) {
12552 goto bad;
12553 }
12554 if (passive) {
12555 if (strcmp(straddr, "::") != 0) {
12556 goto bad;
12557 }
12558 } else {
12559 if (strcmp(straddr, "::1") != 0) {
12560 goto bad;
12561 }
12562 }
12563 inet6++;
12564 break;
12565 case AF_UNSPEC:
12566 goto bad;
12567 break;
12568 default:
12569 /* another family support? */
12570 break;
12571 }
12572 }
12573 }
12574
12575 if (!(inet4 == 0 || inet4 == 2))
12576 goto bad;
12577 if (!(inet6 == 0 || inet6 == 2))
12578 goto bad;
12579
12580 if (aitop)
12581 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012582 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012583
12584 bad:
12585 if (aitop)
12586 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012587 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012588}
12589
Martin v. Löwis11437992002-04-12 09:54:03 +000012590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012591if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012592 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012593else
Matthias Kloseb9621712010-04-24 17:59:49 +000012594 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12597 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012600fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012601
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12605$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12606
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012607if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012608then
12609 if test $ipv6 = yes
12610 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012611 echo 'Fatal: You must get working getaddrinfo() function.'
12612 echo ' or you can specify "--disable-ipv6"'.
12613 exit 1
12614 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012615else
Martin v. Löwis11437992002-04-12 09:54:03 +000012616
Matthias Kloseb9621712010-04-24 17:59:49 +000012617$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012618
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012619fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012620
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012621for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012622do :
12623 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012624if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012626#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012627_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012628
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012629fi
12630done
12631
Michael W. Hudson54241132001-12-07 15:38:26 +000012632
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12635$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012636if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012637 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012638else
Matthias Kloseb9621712010-04-24 17:59:49 +000012639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012640/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012641#include <sys/types.h>
12642#include <sys/time.h>
12643#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
Martin v. Löwis11437992002-04-12 09:54:03 +000012645int
12646main ()
12647{
12648if ((struct tm *) 0)
12649return 0;
12650 ;
12651 return 0;
12652}
12653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012654if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012656else
Matthias Kloseb9621712010-04-24 17:59:49 +000012657 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12662$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012663if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012666
12667fi
12668
Matthias Kloseb9621712010-04-24 17:59:49 +000012669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12670$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012671if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012672 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012673else
Matthias Kloseb9621712010-04-24 17:59:49 +000012674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676#include <sys/types.h>
12677#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679int
12680main ()
12681{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012682struct tm tm;
12683 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012685 ;
12686 return 0;
12687}
12688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690 ac_cv_struct_tm=time.h
12691else
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12697$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012698if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012701
12702fi
12703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704ac_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 +000012705#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012706
Matthias Kloseb9621712010-04-24 17:59:49 +000012707"
Victor Stinnere0be4232011-10-25 13:06:09 +020012708if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
12710cat >>confdefs.h <<_ACEOF
12711#define HAVE_STRUCT_TM_TM_ZONE 1
12712_ACEOF
12713
12714
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012716
Martin v. Löwis11437992002-04-12 09:54:03 +000012717if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720
12721else
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12723"
Victor Stinnere0be4232011-10-25 13:06:09 +020012724if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726else
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728fi
12729
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012731#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732_ACEOF
12733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12735$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012736if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012737 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738else
Matthias Kloseb9621712010-04-24 17:59:49 +000012739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012741#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742#if !HAVE_DECL_TZNAME
12743extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Martin v. Löwis11437992002-04-12 09:54:03 +000012746int
12747main ()
12748{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012750 ;
12751 return 0;
12752}
12753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012754if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755 ac_cv_var_tzname=yes
12756else
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012759rm -f core conftest.err conftest.$ac_objext \
12760 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12763$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012764 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012765
Matthias Kloseb9621712010-04-24 17:59:49 +000012766$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012767
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012768 fi
12769fi
12770
Matthias Kloseb9621712010-04-24 17:59:49 +000012771ac_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 +020012772if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012773
12774cat >>confdefs.h <<_ACEOF
12775#define HAVE_STRUCT_STAT_ST_RDEV 1
12776_ACEOF
12777
12778
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012779fi
12780
Matthias Kloseb9621712010-04-24 17:59:49 +000012781ac_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 +020012782if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012783
Martin v. Löwis11437992002-04-12 09:54:03 +000012784cat >>confdefs.h <<_ACEOF
12785#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12786_ACEOF
12787
12788
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012789fi
12790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791ac_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 +020012792if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012793
12794cat >>confdefs.h <<_ACEOF
12795#define HAVE_STRUCT_STAT_ST_FLAGS 1
12796_ACEOF
12797
12798
12799fi
12800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801ac_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 +020012802if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012803
12804cat >>confdefs.h <<_ACEOF
12805#define HAVE_STRUCT_STAT_ST_GEN 1
12806_ACEOF
12807
12808
12809fi
12810
Matthias Kloseb9621712010-04-24 17:59:49 +000012811ac_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 +020012812if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012813
12814cat >>confdefs.h <<_ACEOF
12815#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12816_ACEOF
12817
12818
12819fi
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821ac_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 +020012822if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012823
Martin v. Löwis11437992002-04-12 09:54:03 +000012824cat >>confdefs.h <<_ACEOF
12825#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12826_ACEOF
12827
12828
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012829fi
12830
Michael W. Hudson54241132001-12-07 15:38:26 +000012831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12833$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012834if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836else
Matthias Kloseb159a552010-04-25 21:00:44 +000012837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012839/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012840#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012841int
12842main ()
12843{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 ;
12846 return 0;
12847}
12848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012849if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012850 ac_cv_header_time_altzone=yes
12851else
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012853fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012856fi
12857
Matthias Kloseb9621712010-04-24 17:59:49 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12859$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012860if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012863
12864fi
12865
Guido van Rossumda88dad1995-01-26 00:46:29 +000012866was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12868$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012870/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012871
12872#include <sys/types.h>
12873#include <sys/select.h>
12874#include <sys/time.h>
12875
Martin v. Löwis11437992002-04-12 09:54:03 +000012876int
12877main ()
12878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012879;
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 ;
12881 return 0;
12882}
12883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012885
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012888
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012889 was_it_defined=yes
12890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12894$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012895
Matthias Kloseb9621712010-04-24 17:59:49 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12897$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012898if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012899 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012900else
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012902/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012903#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012904int
12905main ()
12906{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012907struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 ;
12909 return 0;
12910}
12911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012912if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012913 ac_cv_struct_addrinfo=yes
12914else
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012916fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12918fi
12919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12921$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012925
12926fi
12927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12929$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012930if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012931 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012932else
Matthias Kloseb9621712010-04-24 17:59:49 +000012933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012935
12936# include <sys/types.h>
12937# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012938int
12939main ()
12940{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012941struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012942 ;
12943 return 0;
12944}
12945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012947 ac_cv_struct_sockaddr_storage=yes
12948else
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12952fi
12953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12955$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012956if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012959
12960fi
12961
Guido van Rossum627b2d71993-12-24 10:39:16 +000012962# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12965$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012966if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012971$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012972int
12973main ()
12974{
12975static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012976test_array [0] = 0;
12977return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012978
12979 ;
12980 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012981}
Martin v. Löwis11437992002-04-12 09:54:03 +000012982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012983if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012984 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012985else
Matthias Kloseb9621712010-04-24 17:59:49 +000012986 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12991$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012994
12995fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12998$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012999if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013000 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013001else
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013003/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005int
13006main ()
13007{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013008
Martin v. Löwis11437992002-04-12 09:54:03 +000013009#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013010 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013012 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013013 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014 char const *const *pcpcc;
13015 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 /* NEC SVR4.0.2 mips cc rejects this. */
13017 struct point {int x, y;};
13018 static struct point const zero = {0,0};
13019 /* AIX XL C 1.02.0.0 rejects this.
13020 It does not let you subtract one const X* pointer from another in
13021 an arm of an if-expression whose if-part is not a constant
13022 expression */
13023 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013025 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026 ++pcpcc;
13027 ppc = (char**) pcpcc;
13028 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013029 { /* SCO 3.2v4 cc rejects this sort of thing. */
13030 char tx;
13031 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013033
Martin v. Löwis11437992002-04-12 09:54:03 +000013034 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013035 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 }
13037 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13038 int x[] = {25, 17};
13039 const int *foo = &x[0];
13040 ++foo;
13041 }
13042 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13043 typedef const int *iptr;
13044 iptr p = 0;
13045 ++p;
13046 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013047 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013049 struct s { int j; const int *ap[3]; } bx;
13050 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 }
13052 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13053 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013056 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013057#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013058
Martin v. Löwis11437992002-04-12 09:54:03 +000013059 ;
13060 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013061}
Martin v. Löwis11437992002-04-12 09:54:03 +000013062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013063if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064 ac_cv_c_const=yes
13065else
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13071$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075
13076fi
13077
Michael W. Hudson54241132001-12-07 15:38:26 +000013078
Guido van Rossumda88dad1995-01-26 00:46:29 +000013079works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13081$as_echo_n "checking for working volatile... " >&6; }
13082cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013083/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013084
Martin v. Löwis11437992002-04-12 09:54:03 +000013085int
13086main ()
13087{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013088volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013089 ;
13090 return 0;
13091}
13092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013093if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013094 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013095else
Skip Montanaro6dead952003-09-25 14:50:04 +000013096
Matthias Kloseb9621712010-04-24 17:59:49 +000013097$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013098
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013099
Guido van Rossum627b2d71993-12-24 10:39:16 +000013100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13103$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013104
Guido van Rossumda88dad1995-01-26 00:46:29 +000013105works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13107$as_echo_n "checking for working signed char... " >&6; }
13108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111int
13112main ()
13113{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013114signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013115 ;
13116 return 0;
13117}
13118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013120 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013121else
Skip Montanaro6dead952003-09-25 14:50:04 +000013122
Matthias Kloseb9621712010-04-24 17:59:49 +000013123$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013124
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013125
Guido van Rossum7f43da71994-08-01 12:15:30 +000013126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13129$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013130
Guido van Rossumda88dad1995-01-26 00:46:29 +000013131have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13133$as_echo_n "checking for prototypes... " >&6; }
13134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013135/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013136int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013137int
13138main ()
13139{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013140return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013141 ;
13142 return 0;
13143}
13144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013146
Matthias Kloseb9621712010-04-24 17:59:49 +000013147$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
Matthias Kloseb159a552010-04-25 21:00:44 +000013149 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13153$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154
Guido van Rossumda88dad1995-01-26 00:46:29 +000013155works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13157$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013159/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013160
13161#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013162int foo(int x, ...) {
13163 va_list va;
13164 va_start(va, x);
13165 va_arg(va, int);
13166 va_arg(va, char *);
13167 va_arg(va, double);
13168 return 0;
13169}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013170
Martin v. Löwis11437992002-04-12 09:54:03 +000013171int
13172main ()
13173{
Guido van Rossum90eea071996-08-30 20:58:57 +000013174return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013175 ;
13176 return 0;
13177}
13178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
13181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013183
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013184 works=yes
13185
Guido van Rossum627b2d71993-12-24 10:39:16 +000013186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13189$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190
Martin v. Löwisd6320502004-08-12 13:45:08 +000013191# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13193$as_echo_n "checking for socketpair... " >&6; }
13194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013195/* end confdefs.h. */
13196
13197#include <sys/types.h>
13198#include <sys/socket.h>
13199
13200int
13201main ()
13202{
13203void *x=socketpair
13204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013211
Matthias Kloseb159a552010-04-25 21:00:44 +000013212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013213$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013214else
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13216$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013217
13218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013220
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13223$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226#include <sys/types.h>
13227#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013228int
13229main ()
13230{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231struct sockaddr x;
13232x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ;
13234 return 0;
13235}
13236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013237if ac_fn_c_try_compile "$LINENO"; then :
13238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13239$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013240
Matthias Kloseb9621712010-04-24 17:59:49 +000013241$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242
13243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13245$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013246
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249
Guido van Rossumda88dad1995-01-26 00:46:29 +000013250va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13252$as_echo_n "checking whether va_list is an array... " >&6; }
13253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255
13256#ifdef HAVE_STDARG_PROTOTYPES
13257#include <stdarg.h>
13258#else
13259#include <varargs.h>
13260#endif
13261
Martin v. Löwis11437992002-04-12 09:54:03 +000013262int
13263main ()
13264{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013265va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013266 ;
13267 return 0;
13268}
13269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013270if ac_fn_c_try_compile "$LINENO"; then :
13271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272else
Skip Montanaro6dead952003-09-25 14:50:04 +000013273
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
Guido van Rossumda88dad1995-01-26 00:46:29 +000013277 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13282$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013284# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013285
13286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013288if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13293$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013294 OLD_CFLAGS=$CFLAGS
13295 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013297/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013298
13299# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Martin v. Löwis11437992002-04-12 09:54:03 +000013301int
13302main ()
13303{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013304
13305 char *name;
13306 struct hostent *he, *res;
13307 char buffer[2048];
13308 int buflen = 2048;
13309 int h_errnop;
13310
13311 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
13313 ;
13314 return 0;
13315}
13316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013318
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013320
Martin v. Löwis11437992002-04-12 09:54:03 +000013321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13325$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013327else
Skip Montanaro6dead952003-09-25 14:50:04 +000013328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13330$as_echo "no" >&6; }
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13332$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013335
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013336# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338int
13339main ()
13340{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013341
13342 char *name;
13343 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013344 char buffer[2048];
13345 int buflen = 2048;
13346 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013347
Matthias Kloseb159a552010-04-25 21:00:44 +000013348 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
13350 ;
13351 return 0;
13352}
13353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013354if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013357
Martin v. Löwis11437992002-04-12 09:54:03 +000013358
Matthias Kloseb159a552010-04-25 21:00:44 +000013359$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013360
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13362$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013363
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013364else
Skip Montanaro6dead952003-09-25 14:50:04 +000013365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13367$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13369$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13371/* end confdefs.h. */
13372
13373# include <netdb.h>
13374
13375int
13376main ()
13377{
13378
13379 char *name;
13380 struct hostent *he;
13381 struct hostent_data data;
13382
13383 (void) gethostbyname_r(name, he, &data);
13384
13385 ;
13386 return 0;
13387}
13388_ACEOF
13389if ac_fn_c_try_compile "$LINENO"; then :
13390
13391 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13392
13393
13394$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13395
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13397$as_echo "yes" >&6; }
13398
13399else
13400
13401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13402$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013410fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013412 CFLAGS=$OLD_CFLAGS
13413
13414else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 for ac_func in gethostbyname
13417do :
13418 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013419if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013421#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013422_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013425done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426
Michael W. Hudson54241132001-12-07 15:38:26 +000013427
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013428fi
13429
Michael W. Hudson54241132001-12-07 15:38:26 +000013430
13431
13432
13433
13434
13435
Guido van Rossum627b2d71993-12-24 10:39:16 +000013436# checks for system services
13437# (none yet)
13438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013439# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013440ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013441if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013442
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013443else
Matthias Kloseb9621712010-04-24 17:59:49 +000013444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13445$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013446if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013447 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013448else
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013450LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013454/* Override any GCC internal prototype to avoid an error.
13455 Use char because int might match the return type of a GCC
13456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013457#ifdef __cplusplus
13458extern "C"
13459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013460char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013464return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013465 ;
13466 return 0;
13467}
13468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013469if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013471else
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013474rm -f core conftest.err conftest.$ac_objext \
13475 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013476LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13479$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013480if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 cat >>confdefs.h <<_ACEOF
13482#define HAVE_LIBIEEE 1
13483_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013484
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013485 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013486
Guido van Rossum627b2d71993-12-24 10:39:16 +000013487fi
13488
Michael W. Hudson54241132001-12-07 15:38:26 +000013489
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013490fi
13491
Michael W. Hudson54241132001-12-07 15:38:26 +000013492
Guido van Rossum7f253911997-05-09 02:42:48 +000013493# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13495$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013500if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013501then
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13506$as_echo "yes" >&6; }
13507else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013509fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13512$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013513fi
13514
Guido van Rossum7f253911997-05-09 02:42:48 +000013515
Guido van Rossum7f43da71994-08-01 12:15:30 +000013516# check for --with-libm=...
13517
Guido van Rossum563e7081996-09-10 18:20:48 +000013518case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013519Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013520*) LIBM=-lm
13521esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13523$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013528if test "$withval" = no
13529then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13531$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013532elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013533then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13535$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013536else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013537fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13540$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541fi
13542
Guido van Rossum7f43da71994-08-01 12:15:30 +000013543
13544# check for --with-libc=...
13545
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13547$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013549# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013550if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013551 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013552if test "$withval" = no
13553then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13555$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013556elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013557then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13559$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013560else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013561fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013562else
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13564$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565fi
13566
Guido van Rossum7f43da71994-08-01 12:15:30 +000013567
Stefan Krah1919b7e2012-03-21 18:25:23 +010013568# **************************************
13569# * Check for gcc x64 inline assembler *
13570# **************************************
13571
13572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13573$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13575/* end confdefs.h. */
13576
13577int
13578main ()
13579{
13580
13581 __asm__ __volatile__ ("movq %rcx, %rax");
13582
13583 ;
13584 return 0;
13585}
13586_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013587if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013588 have_gcc_asm_for_x64=yes
13589else
13590 have_gcc_asm_for_x64=no
13591fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013592rm -f core conftest.err conftest.$ac_objext \
13593 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13595$as_echo "$have_gcc_asm_for_x64" >&6; }
13596if test "$have_gcc_asm_for_x64" = yes
13597then
13598
13599$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13600
13601fi
13602
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013603# **************************************************
13604# * Check for various properties of floating point *
13605# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13608$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013609if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013611else
13612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013614 ac_cv_little_endian_double=no
13615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013617/* end confdefs.h. */
13618
13619#include <string.h>
13620int main() {
13621 double x = 9006104071832581.0;
13622 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13623 return 0;
13624 else
13625 return 1;
13626}
13627
13628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013629if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013630 ac_cv_little_endian_double=yes
13631else
Matthias Kloseb9621712010-04-24 17:59:49 +000013632 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013634rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13635 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013636fi
13637
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013638fi
13639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13641$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013642if test "$ac_cv_little_endian_double" = yes
13643then
13644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013646
13647fi
13648
Matthias Kloseb9621712010-04-24 17:59:49 +000013649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13650$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013651if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013653else
13654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013656 ac_cv_big_endian_double=no
13657else
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013659/* end confdefs.h. */
13660
13661#include <string.h>
13662int main() {
13663 double x = 9006104071832581.0;
13664 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13665 return 0;
13666 else
13667 return 1;
13668}
13669
13670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013671if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013672 ac_cv_big_endian_double=yes
13673else
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013675fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13677 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013678fi
13679
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680fi
13681
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13683$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013684if test "$ac_cv_big_endian_double" = yes
13685then
13686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013688
13689fi
13690
13691# Some ARM platforms use a mixed-endian representation for doubles.
13692# While Python doesn't currently have full support for these platforms
13693# (see e.g., issue 1762561), we can at least make sure that float <-> string
13694# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13696$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013697if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013699else
13700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013702 ac_cv_mixed_endian_double=no
13703else
Matthias Kloseb9621712010-04-24 17:59:49 +000013704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013705/* end confdefs.h. */
13706
13707#include <string.h>
13708int main() {
13709 double x = 9006104071832581.0;
13710 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13711 return 0;
13712 else
13713 return 1;
13714}
13715
13716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013718 ac_cv_mixed_endian_double=yes
13719else
Matthias Kloseb9621712010-04-24 17:59:49 +000013720 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013724fi
13725
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013726fi
13727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13729$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013730if test "$ac_cv_mixed_endian_double" = yes
13731then
13732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013734
13735fi
13736
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013737# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013738# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013739# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013740# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013741# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013742# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013743
13744# This inline assembler syntax may also work for suncc and icc,
13745# so we try it on all platforms.
13746
Matthias Kloseb9621712010-04-24 17:59:49 +000013747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13748$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013750/* end confdefs.h. */
13751
13752int
13753main ()
13754{
13755
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013756 unsigned short cw;
13757 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13758 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013759
13760 ;
13761 return 0;
13762}
13763_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013764if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765 have_gcc_asm_for_x87=yes
13766else
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013768fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013769rm -f core conftest.err conftest.$ac_objext \
13770 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13772$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013773if test "$have_gcc_asm_for_x87" = yes
13774then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013778fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013779
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13781$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783/* end confdefs.h. */
13784
13785int
13786main ()
13787{
13788
13789 unsigned int fpcr;
13790 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13791 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13792
13793 ;
13794 return 0;
13795}
13796_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013797if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013798 have_gcc_asm_for_mc68881=yes
13799else
13800 have_gcc_asm_for_mc68881=no
13801fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013802rm -f core conftest.err conftest.$ac_objext \
13803 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13805$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13806if test "$have_gcc_asm_for_mc68881" = yes
13807then
13808
13809$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13810
13811fi
13812
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013813# Detect whether system arithmetic is subject to x87-style double
13814# rounding issues. The result of this test has little meaning on non
13815# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13816# mode is round-to-nearest and double rounding issues are present, and
13817# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13819$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013820# $BASECFLAGS may affect the result
13821ac_save_cc="$CC"
13822CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013823if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013824 ac_cv_x87_double_rounding=no
13825else
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013827/* end confdefs.h. */
13828
13829#include <stdlib.h>
13830#include <math.h>
13831int main() {
13832 volatile double x, y, z;
13833 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13834 x = 0.99999999999999989; /* 1-2**-53 */
13835 y = 1./x;
13836 if (y != 1.)
13837 exit(0);
13838 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13839 x = 1e16;
13840 y = 2.99999;
13841 z = x + y;
13842 if (z != 1e16+4.)
13843 exit(0);
13844 /* both tests show evidence of double rounding */
13845 exit(1);
13846}
13847
13848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013850 ac_cv_x87_double_rounding=no
13851else
Matthias Kloseb9621712010-04-24 17:59:49 +000013852 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013856fi
13857
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013858CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13860$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013861if test "$ac_cv_x87_double_rounding" = yes
13862then
13863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013865
13866fi
13867
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013868# ************************************
13869# * Check for mathematical functions *
13870# ************************************
13871
13872LIBS_SAVE=$LIBS
13873LIBS="$LIBS $LIBM"
13874
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013875for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13876do :
13877 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13878ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013879if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013880 cat >>confdefs.h <<_ACEOF
13881#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13882_ACEOF
13883
13884fi
13885done
13886
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013887for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013888do :
13889 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13890ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013891if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013892 cat >>confdefs.h <<_ACEOF
13893#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13894_ACEOF
13895
13896fi
13897done
13898
13899ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13900"
Victor Stinnere0be4232011-10-25 13:06:09 +020013901if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013902 ac_have_decl=1
13903else
13904 ac_have_decl=0
13905fi
13906
13907cat >>confdefs.h <<_ACEOF
13908#define HAVE_DECL_ISINF $ac_have_decl
13909_ACEOF
13910ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13911"
Victor Stinnere0be4232011-10-25 13:06:09 +020013912if test "x$ac_cv_have_decl_isnan" = 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_ISNAN $ac_have_decl
13920_ACEOF
13921ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13922"
Victor Stinnere0be4232011-10-25 13:06:09 +020013923if test "x$ac_cv_have_decl_isfinite" = 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_ISFINITE $ac_have_decl
13931_ACEOF
13932
13933
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013934# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13935# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13937$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013938if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013940else
13941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013943 ac_cv_tanh_preserves_zero_sign=no
13944else
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013946/* end confdefs.h. */
13947
13948#include <math.h>
13949#include <stdlib.h>
13950int main() {
13951 /* return 0 if either negative zeros don't exist
13952 on this platform or if negative zeros exist
13953 and tanh(-0.) == -0. */
13954 if (atan2(0., -1.) == atan2(-0., -1.) ||
13955 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13956 else exit(1);
13957}
13958
13959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013960if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013961 ac_cv_tanh_preserves_zero_sign=yes
13962else
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013967fi
13968
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013969fi
13970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13972$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013973if test "$ac_cv_tanh_preserves_zero_sign" = yes
13974then
13975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013977
13978fi
13979
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013980if test "$ac_cv_func_log1p" = yes
13981then
13982 # On some versions of AIX, log1p(-0.) returns 0. instead of
13983 # -0. See issue #9920.
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13985$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013986 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013987 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013988else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013989
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013990 if test "$cross_compiling" = yes; then :
13991 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013992else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013995
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013996 #include <math.h>
13997 #include <stdlib.h>
13998 int main() {
13999 /* Fail if the signs of log1p(-0.) and -0. can be
14000 distinguished. */
14001 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14002 return 0;
14003 else
14004 return 1;
14005 }
14006
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014007_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014008if ac_fn_c_try_run "$LINENO"; then :
14009 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014010else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014011 ac_cv_log1p_drops_zero_sign=yes
14012fi
14013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014015fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014016
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014017fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014018
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14020$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14021fi
14022if test "$ac_cv_log1p_drops_zero_sign" = yes
14023then
14024
14025$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14026
14027fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014028
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014029LIBS=$LIBS_SAVE
14030
Mark Dickinsona614f042009-11-28 12:48:43 +000014031# For multiprocessing module, check that sem_open
14032# actually works. For FreeBSD versions <= 7.2,
14033# the kernel module that provides POSIX semaphores
14034# isn't loaded by default, so an attempt to call
14035# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14037$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014038if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014039 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014040else
Matthias Kloseb9621712010-04-24 17:59:49 +000014041 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014042 ac_cv_posix_semaphores_enabled=yes
14043else
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014045/* end confdefs.h. */
14046
14047#include <unistd.h>
14048#include <fcntl.h>
14049#include <stdio.h>
14050#include <semaphore.h>
14051#include <sys/stat.h>
14052
14053int main(void) {
14054 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14055 if (a == SEM_FAILED) {
14056 perror("sem_open");
14057 return 1;
14058 }
14059 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014060 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014061 return 0;
14062}
14063
14064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014065if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014066 ac_cv_posix_semaphores_enabled=yes
14067else
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014070rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14071 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014072fi
14073
14074
Mark Dickinsona614f042009-11-28 12:48:43 +000014075fi
14076
Matthias Kloseb9621712010-04-24 17:59:49 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14078$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014079if test $ac_cv_posix_semaphores_enabled = no
14080then
14081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014083
14084fi
14085
Mark Dickinson10683072009-04-18 21:18:19 +000014086# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14088$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014089if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014090 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014091else
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014093 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014094else
Matthias Kloseb9621712010-04-24 17:59:49 +000014095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014096/* end confdefs.h. */
14097
14098#include <unistd.h>
14099#include <fcntl.h>
14100#include <stdio.h>
14101#include <semaphore.h>
14102#include <sys/stat.h>
14103
14104int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014105 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014106 int count;
14107 int res;
14108 if(a==SEM_FAILED){
14109 perror("sem_open");
14110 return 1;
14111
14112 }
14113 res = sem_getvalue(a, &count);
14114 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014115 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014116 return res==-1 ? 1 : 0;
14117}
14118
Mark Dickinson10683072009-04-18 21:18:19 +000014119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014120if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014121 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014122else
Matthias Kloseb9621712010-04-24 17:59:49 +000014123 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014127fi
14128
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130fi
14131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14133$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134if test $ac_cv_broken_sem_getvalue = yes
14135then
14136
Matthias Kloseb9621712010-04-24 17:59:49 +000014137$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014138
14139fi
14140
Mark Dickinsonbd792642009-03-18 20:06:12 +000014141# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14143$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014144# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014145if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014146 enableval=$enable_big_digits; case $enable_big_digits in
14147yes)
14148 enable_big_digits=30 ;;
14149no)
14150 enable_big_digits=15 ;;
1415115|30)
14152 ;;
14153*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014154 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 +000014155esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14157$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014158
14159cat >>confdefs.h <<_ACEOF
14160#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14161_ACEOF
14162
14163
14164else
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14166$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014167fi
14168
14169
Guido van Rossumef2255b2000-03-10 22:30:29 +000014170# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014171ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014172if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014173
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014176
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014177 wchar_h="yes"
14178
Guido van Rossumef2255b2000-03-10 22:30:29 +000014179else
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014181
14182fi
14183
Michael W. Hudson54241132001-12-07 15:38:26 +000014184
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014186# determine wchar_t size
14187if test "$wchar_h" = yes
14188then
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14192# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14194$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014195if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014196 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014197else
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14199"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014200
Martin v. Löwis11437992002-04-12 09:54:03 +000014201else
Matthias Kloseb9621712010-04-24 17:59:49 +000014202 if test "$ac_cv_type_wchar_t" = yes; then
14203 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014205as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014206See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014207 else
14208 ac_cv_sizeof_wchar_t=0
14209 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014211
Martin v. Löwis11437992002-04-12 09:54:03 +000014212fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14214$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014215
14216
14217
Martin v. Löwis11437992002-04-12 09:54:03 +000014218cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014219#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014220_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014221
Michael W. Hudson54241132001-12-07 15:38:26 +000014222
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014223fi
14224
Matthias Kloseb9621712010-04-24 17:59:49 +000014225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14226$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014227have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014229/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014230
14231#include <tcl.h>
14232#if TCL_UTF_MAX != 6
14233# error "NOT UCS4_TCL"
14234#endif
14235int
14236main ()
14237{
14238
14239 ;
14240 return 0;
14241}
14242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014244
14245
Matthias Kloseb9621712010-04-24 17:59:49 +000014246$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014247
14248 have_ucs4_tcl=yes
14249
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14253$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014254
Skip Montanaro6dead952003-09-25 14:50:04 +000014255# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014256if test "$wchar_h" = yes
14257then
14258 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14260$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014261 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014262 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014263else
14264
Matthias Kloseb9621712010-04-24 17:59:49 +000014265 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014266 ac_cv_wchar_t_signed=yes
14267else
Matthias Kloseb9621712010-04-24 17:59:49 +000014268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014269/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014270
14271 #include <wchar.h>
14272 int main()
14273 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014274 /* Success: exit code 0 */
14275 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014276 }
14277
14278_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014279if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014280 ac_cv_wchar_t_signed=yes
14281else
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14285 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014286fi
14287
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014288fi
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14291$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014292fi
14293
Georg Brandl52d168a2008-01-07 18:10:24 +000014294# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014295if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014296 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014297then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014298 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014299
Matthias Kloseb9621712010-04-24 17:59:49 +000014300$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014301
Georg Brandl52d168a2008-01-07 18:10:24 +000014302else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014303 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014304fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14306$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014307
14308# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14310$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014311if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014312 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 ac_cv_c_bigendian=unknown
14315 # See if we're dealing with a universal compiler.
14316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14317/* end confdefs.h. */
14318#ifndef __APPLE_CC__
14319 not a universal capable compiler
14320 #endif
14321 typedef int dummy;
14322
Skip Montanaro6dead952003-09-25 14:50:04 +000014323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if ac_fn_c_try_compile "$LINENO"; then :
14325
14326 # Check for potential -arch flags. It is not universal unless
14327 # there are at least two -arch flags with different values.
14328 ac_arch=
14329 ac_prev=
14330 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14331 if test -n "$ac_prev"; then
14332 case $ac_word in
14333 i?86 | x86_64 | ppc | ppc64)
14334 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14335 ac_arch=$ac_word
14336 else
14337 ac_cv_c_bigendian=universal
14338 break
14339 fi
14340 ;;
14341 esac
14342 ac_prev=
14343 elif test "x$ac_word" = "x-arch"; then
14344 ac_prev=arch
14345 fi
14346 done
14347fi
14348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14349 if test $ac_cv_c_bigendian = unknown; then
14350 # See if sys/param.h defines the BYTE_ORDER macro.
14351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014352/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014353#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014355
Martin v. Löwis11437992002-04-12 09:54:03 +000014356int
14357main ()
14358{
Matthias Kloseb9621712010-04-24 17:59:49 +000014359#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14360 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14361 && LITTLE_ENDIAN)
14362 bogus endian macros
14363 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014364
14365 ;
14366 return 0;
14367}
14368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014370 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014372/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014373#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014374 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014375
Martin v. Löwis11437992002-04-12 09:54:03 +000014376int
14377main ()
14378{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014379#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 not big endian
14381 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
14383 ;
14384 return 0;
14385}
14386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014387if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014388 ac_cv_c_bigendian=yes
14389else
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014391fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014393fi
14394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14395 fi
14396 if test $ac_cv_c_bigendian = unknown; then
14397 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014399/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014400#include <limits.h>
14401
Martin v. Löwis11437992002-04-12 09:54:03 +000014402int
14403main ()
14404{
Matthias Kloseb9621712010-04-24 17:59:49 +000014405#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14406 bogus endian macros
14407 #endif
14408
Martin v. Löwis11437992002-04-12 09:54:03 +000014409 ;
14410 return 0;
14411}
14412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014413if ac_fn_c_try_compile "$LINENO"; then :
14414 # It does; now see whether it defined to _BIG_ENDIAN or not.
14415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14416/* end confdefs.h. */
14417#include <limits.h>
14418
14419int
14420main ()
14421{
14422#ifndef _BIG_ENDIAN
14423 not big endian
14424 #endif
14425
14426 ;
14427 return 0;
14428}
14429_ACEOF
14430if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014431 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014432else
Matthias Kloseb9621712010-04-24 17:59:49 +000014433 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14436fi
14437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14438 fi
14439 if test $ac_cv_c_bigendian = unknown; then
14440 # Compile a test program.
14441 if test "$cross_compiling" = yes; then :
14442 # Try to guess by grepping values from an object file.
14443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14444/* end confdefs.h. */
14445short int ascii_mm[] =
14446 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14447 short int ascii_ii[] =
14448 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14449 int use_ascii (int i) {
14450 return ascii_mm[i] + ascii_ii[i];
14451 }
14452 short int ebcdic_ii[] =
14453 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14454 short int ebcdic_mm[] =
14455 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14456 int use_ebcdic (int i) {
14457 return ebcdic_mm[i] + ebcdic_ii[i];
14458 }
14459 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461int
14462main ()
14463{
14464return use_ascii (foo) == use_ebcdic (foo);
14465 ;
14466 return 0;
14467}
14468_ACEOF
14469if ac_fn_c_try_compile "$LINENO"; then :
14470 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14471 ac_cv_c_bigendian=yes
14472 fi
14473 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14474 if test "$ac_cv_c_bigendian" = unknown; then
14475 ac_cv_c_bigendian=no
14476 else
14477 # finding both strings is unlikely to happen, but who knows?
14478 ac_cv_c_bigendian=unknown
14479 fi
14480 fi
14481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014483else
Matthias Kloseb9621712010-04-24 17:59:49 +000014484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014485/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014487int
14488main ()
14489{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 /* Are we little or big endian? From Harbison&Steele. */
14492 union
14493 {
14494 long int l;
14495 char c[sizeof (long int)];
14496 } u;
14497 u.l = 1;
14498 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499
14500 ;
14501 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014502}
Martin v. Löwis11437992002-04-12 09:54:03 +000014503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014504if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014505 ac_cv_c_bigendian=no
14506else
Matthias Kloseb9621712010-04-24 17:59:49 +000014507 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014508fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014509rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14510 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014512
Matthias Kloseb9621712010-04-24 17:59:49 +000014513 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14516$as_echo "$ac_cv_c_bigendian" >&6; }
14517 case $ac_cv_c_bigendian in #(
14518 yes)
14519 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14520;; #(
14521 no)
14522 ;; #(
14523 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014524
Matthias Kloseb9621712010-04-24 17:59:49 +000014525$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 ;; #(
14528 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014529 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014530 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014532
Michael W. Hudson54241132001-12-07 15:38:26 +000014533
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014534# ABI version string for Python extension modules. This appears between the
14535# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14536# from the following attributes which affect the ABI of this Python build (in
14537# this order):
14538#
14539# * The Python implementation (always 'cpython-' for us)
14540# * The major and minor version numbers
14541# * --with-pydebug (adds a 'd')
14542# * --with-pymalloc (adds a 'm')
14543# * --with-wide-unicode (adds a 'u')
14544#
14545# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014546# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14547# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014548
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14550$as_echo_n "checking ABIFLAGS... " >&6; }
14551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14552$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14554$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014555SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14557$as_echo "$SOABI" >&6; }
14558
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014559
14560case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014561 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014562 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14563 *)
14564 EXT_SUFFIX=${SHLIB_SUFFIX};;
14565esac
14566
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14568$as_echo_n "checking LDVERSION... " >&6; }
14569LDVERSION='$(VERSION)$(ABIFLAGS)'
14570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14571$as_echo "$LDVERSION" >&6; }
14572
doko@python.org87421192013-01-26 11:39:31 +010014573
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014574LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014575
14576
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014577# Check whether right shifting a negative integer extends the sign bit
14578# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14580$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014581if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014583else
Martin v. Löwis11437992002-04-12 09:54:03 +000014584
Matthias Kloseb9621712010-04-24 17:59:49 +000014585if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014586 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014587else
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014589/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014590
14591int main()
14592{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014593 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014594}
14595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014597if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014598 ac_cv_rshift_extends_sign=yes
14599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14603 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014604fi
14605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606fi
14607
Matthias Kloseb9621712010-04-24 17:59:49 +000014608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14609$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014610if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014611then
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Matthias Kloseb9621712010-04-24 17:59:49 +000014613$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014614
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014615fi
14616
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014617# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14619$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014620if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014622else
Martin v. Löwis11437992002-04-12 09:54:03 +000014623
Matthias Kloseb9621712010-04-24 17:59:49 +000014624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014625/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014626#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014627int
14628main ()
14629{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014630
14631 FILE *f = fopen("/dev/null", "r");
14632 flockfile(f);
14633 getc_unlocked(f);
14634 funlockfile(f);
14635
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 ;
14637 return 0;
14638}
14639_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014640if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014641 ac_cv_have_getc_unlocked=yes
14642else
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 ac_cv_have_getc_unlocked=no
14644fi
14645rm -f core conftest.err conftest.$ac_objext \
14646 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014648
Matthias Kloseb9621712010-04-24 17:59:49 +000014649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14650$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014651if test "$ac_cv_have_getc_unlocked" = yes
14652then
Martin v. Löwis11437992002-04-12 09:54:03 +000014653
Matthias Kloseb9621712010-04-24 17:59:49 +000014654$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014655
14656fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014657
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014658# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014659# save the value of LIBS so we don't actually link Python with readline
14660LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014661
Gregory P. Smith18820942008-09-07 06:24:49 +000014662# On some systems we need to link readline to a termcap compatible
14663# library. NOTE: Keep the precedence of listed libraries synchronised
14664# with setup.py.
14665py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14667$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014668for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014669 if test -z "$py_libtermcap"; then
14670 READLINE_LIBS="-lreadline"
14671 else
14672 READLINE_LIBS="-lreadline -l$py_libtermcap"
14673 fi
14674 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014676/* end confdefs.h. */
14677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678/* Override any GCC internal prototype to avoid an error.
14679 Use char because int might match the return type of a GCC
14680 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014681#ifdef __cplusplus
14682extern "C"
14683#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014684char readline ();
14685int
14686main ()
14687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014688return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014689 ;
14690 return 0;
14691}
14692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014693if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014694 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014696rm -f core conftest.err conftest.$ac_objext \
14697 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014698 if test $py_cv_lib_readline = yes; then
14699 break
14700 fi
14701done
14702# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14703#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014704if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14706$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014707else
Matthias Kloseb9621712010-04-24 17:59:49 +000014708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14709$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014712
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014713fi
14714
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014715# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14717$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014718if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014720else
14721 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014722LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014724/* end confdefs.h. */
14725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726/* Override any GCC internal prototype to avoid an error.
14727 Use char because int might match the return type of a GCC
14728 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014729#ifdef __cplusplus
14730extern "C"
14731#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014732char rl_callback_handler_install ();
14733int
14734main ()
14735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014736return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014737 ;
14738 return 0;
14739}
14740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014741if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014742 ac_cv_lib_readline_rl_callback_handler_install=yes
14743else
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014746rm -f core conftest.err conftest.$ac_objext \
14747 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748LIBS=$ac_check_lib_save_LIBS
14749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14751$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014752if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014753
Matthias Kloseb9621712010-04-24 17:59:49 +000014754$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014755
14756fi
14757
14758
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014759# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014761/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014762#include <readline/readline.h>
14763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014764if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014765 have_readline=yes
14766else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014767 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014768
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014769fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014770rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014771if test $have_readline = yes
14772then
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014775#include <readline/readline.h>
14776
14777_ACEOF
14778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014780
Matthias Kloseb9621712010-04-24 17:59:49 +000014781$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014782
14783fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014784rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014787/* end confdefs.h. */
14788#include <readline/readline.h>
14789
14790_ACEOF
14791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014795
14796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014797rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014798
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014799fi
14800
Martin v. Löwis0daad592001-09-30 21:09:59 +000014801# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14803$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014804if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014806else
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014808LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014812/* Override any GCC internal prototype to avoid an error.
14813 Use char because int might match the return type of a GCC
14814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014815#ifdef __cplusplus
14816extern "C"
14817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014818char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014819int
14820main ()
14821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014823 ;
14824 return 0;
14825}
14826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014829else
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832rm -f core conftest.err conftest.$ac_objext \
14833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014834LIBS=$ac_check_lib_save_LIBS
14835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14837$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014838if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014841
Martin v. Löwis0daad592001-09-30 21:09:59 +000014842fi
14843
Michael W. Hudson54241132001-12-07 15:38:26 +000014844
Thomas Wouters89d996e2007-09-08 17:39:28 +000014845# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14847$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014848if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014849 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014850else
14851 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014852LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014854/* end confdefs.h. */
14855
14856/* Override any GCC internal prototype to avoid an error.
14857 Use char because int might match the return type of a GCC
14858 builtin and then its argument prototype would still apply. */
14859#ifdef __cplusplus
14860extern "C"
14861#endif
14862char rl_completion_display_matches_hook ();
14863int
14864main ()
14865{
14866return rl_completion_display_matches_hook ();
14867 ;
14868 return 0;
14869}
14870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014871if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014872 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14873else
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014876rm -f core conftest.err conftest.$ac_objext \
14877 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014878LIBS=$ac_check_lib_save_LIBS
14879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14881$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014882if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014883
Matthias Kloseb9621712010-04-24 17:59:49 +000014884$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014885
14886fi
14887
14888
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014889# also in 4.0, but not in editline
14890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14891$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14892if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14893 $as_echo_n "(cached) " >&6
14894else
14895 ac_check_lib_save_LIBS=$LIBS
14896LIBS="-lreadline $READLINE_LIBS $LIBS"
14897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14898/* end confdefs.h. */
14899
14900/* Override any GCC internal prototype to avoid an error.
14901 Use char because int might match the return type of a GCC
14902 builtin and then its argument prototype would still apply. */
14903#ifdef __cplusplus
14904extern "C"
14905#endif
14906char rl_resize_terminal ();
14907int
14908main ()
14909{
14910return rl_resize_terminal ();
14911 ;
14912 return 0;
14913}
14914_ACEOF
14915if ac_fn_c_try_link "$LINENO"; then :
14916 ac_cv_lib_readline_rl_resize_terminal=yes
14917else
14918 ac_cv_lib_readline_rl_resize_terminal=no
14919fi
14920rm -f core conftest.err conftest.$ac_objext \
14921 conftest$ac_exeext conftest.$ac_ext
14922LIBS=$ac_check_lib_save_LIBS
14923fi
14924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14925$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14926if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14927
14928$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14929
14930fi
14931
14932
Martin v. Löwis0daad592001-09-30 21:09:59 +000014933# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14935$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014936if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014938else
Martin v. Löwis11437992002-04-12 09:54:03 +000014939 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014940LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014943
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944/* Override any GCC internal prototype to avoid an error.
14945 Use char because int might match the return type of a GCC
14946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014947#ifdef __cplusplus
14948extern "C"
14949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014950char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014951int
14952main ()
14953{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ;
14956 return 0;
14957}
14958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014961else
Matthias Kloseb9621712010-04-24 17:59:49 +000014962 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014964rm -f core conftest.err conftest.$ac_objext \
14965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014966LIBS=$ac_check_lib_save_LIBS
14967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14969$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014970if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014971
Matthias Kloseb9621712010-04-24 17:59:49 +000014972$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014973
Guido van Rossum353ae582001-07-10 16:45:32 +000014974fi
14975
Jack Jansendd19cf82001-12-06 22:36:17 +000014976
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014977# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014979/* end confdefs.h. */
14980#include <readline/readline.h>
14981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014982if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983 have_readline=yes
14984else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014985 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014986
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014987fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014988rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014989if test $have_readline = yes
14990then
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014992/* end confdefs.h. */
14993#include <readline/readline.h>
14994
14995_ACEOF
14996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014997 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015000
15001fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015002rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015003
15004fi
15005
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15007$as_echo_n "checking for append_history in -lreadline... " >&6; }
15008if ${ac_cv_lib_readline_append_history+:} false; then :
15009 $as_echo_n "(cached) " >&6
15010else
15011 ac_check_lib_save_LIBS=$LIBS
15012LIBS="-lreadline $READLINE_LIBS $LIBS"
15013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15014/* end confdefs.h. */
15015
15016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
15019#ifdef __cplusplus
15020extern "C"
15021#endif
15022char append_history ();
15023int
15024main ()
15025{
15026return append_history ();
15027 ;
15028 return 0;
15029}
15030_ACEOF
15031if ac_fn_c_try_link "$LINENO"; then :
15032 ac_cv_lib_readline_append_history=yes
15033else
15034 ac_cv_lib_readline_append_history=no
15035fi
15036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
15038LIBS=$ac_check_lib_save_LIBS
15039fi
15040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15041$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15042if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15043
15044$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15045
15046fi
15047
15048
Martin v. Löwis82bca632006-02-10 20:49:30 +000015049# End of readline checks: restore LIBS
15050LIBS=$LIBS_no_readline
15051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15053$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015054if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015059 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015060else
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015063
15064int main()
15065{
15066 int val1 = nice(1);
15067 if (val1 != -1 && val1 == nice(2))
15068 exit(0);
15069 exit(1);
15070}
15071
Martin v. Löwis11437992002-04-12 09:54:03 +000015072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015073if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015074 ac_cv_broken_nice=yes
15075else
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015080fi
15081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082fi
15083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15085$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015086if test "$ac_cv_broken_nice" = yes
15087then
Martin v. Löwis11437992002-04-12 09:54:03 +000015088
Matthias Kloseb9621712010-04-24 17:59:49 +000015089$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015090
15091fi
15092
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15094$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015095if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015097else
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015099 ac_cv_broken_poll=no
15100else
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015102/* end confdefs.h. */
15103
15104#include <poll.h>
15105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015106int main()
15107{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015108 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015109 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015110
15111 close (42);
15112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015113 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015114 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015115 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015116 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015117 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015118 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015119 return 1;
15120}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015121
15122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015123if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015124 ac_cv_broken_poll=yes
15125else
Matthias Kloseb9621712010-04-24 17:59:49 +000015126 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015131
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015132fi
15133
Matthias Kloseb9621712010-04-24 17:59:49 +000015134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15135$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015136if test "$ac_cv_broken_poll" = yes
15137then
15138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015140
15141fi
15142
Brett Cannon43802422005-02-10 20:48:03 +000015143# 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 +000015144# (which is not required by ISO C or UNIX spec) and/or if we support
15145# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015146ac_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 +000015147#include <$ac_cv_struct_tm>
15148
Matthias Kloseb9621712010-04-24 17:59:49 +000015149"
Victor Stinnere0be4232011-10-25 13:06:09 +020015150if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015151
15152cat >>confdefs.h <<_ACEOF
15153#define HAVE_STRUCT_TM_TM_ZONE 1
15154_ACEOF
15155
15156
15157fi
15158
15159if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15160
Matthias Kloseb9621712010-04-24 17:59:49 +000015161$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015162
15163else
Matthias Kloseb9621712010-04-24 17:59:49 +000015164 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15165"
Victor Stinnere0be4232011-10-25 13:06:09 +020015166if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168else
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170fi
15171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015173#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174_ACEOF
15175
Matthias Kloseb9621712010-04-24 17:59:49 +000015176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15177$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015178if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015179 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180else
Matthias Kloseb9621712010-04-24 17:59:49 +000015181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015182/* end confdefs.h. */
15183#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015184#if !HAVE_DECL_TZNAME
15185extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015186#endif
15187
15188int
15189main ()
15190{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015192 ;
15193 return 0;
15194}
15195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015196if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015197 ac_cv_var_tzname=yes
15198else
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015201rm -f core conftest.err conftest.$ac_objext \
15202 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15205$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015206 if test $ac_cv_var_tzname = yes; then
15207
Matthias Kloseb9621712010-04-24 17:59:49 +000015208$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015209
15210 fi
15211fi
15212
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015213
Martin v. Löwis1d459062005-03-14 21:23:33 +000015214# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15216$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015217if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015219else
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015222 ac_cv_working_tzset=no
15223else
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015225/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015226
15227#include <stdlib.h>
15228#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015229#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015230
15231#if HAVE_TZNAME
15232extern char *tzname[];
15233#endif
15234
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015235int main()
15236{
Brett Cannon18367812003-09-19 00:59:16 +000015237 /* Note that we need to ensure that not only does tzset(3)
15238 do 'something' with localtime, but it works as documented
15239 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015240 This includes making sure that tzname is set properly if
15241 tm->tm_zone does not exist since it is the alternative way
15242 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015243
15244 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015245 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015246 */
15247
Martin v. Löwis1d459062005-03-14 21:23:33 +000015248 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015249 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15250
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015251 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015252 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015253 if (localtime(&groundhogday)->tm_hour != 0)
15254 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015255#if HAVE_TZNAME
15256 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15257 if (strcmp(tzname[0], "UTC") ||
15258 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15259 exit(1);
15260#endif
Brett Cannon18367812003-09-19 00:59:16 +000015261
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015262 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015263 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015264 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015265 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015266#if HAVE_TZNAME
15267 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15268 exit(1);
15269#endif
Brett Cannon18367812003-09-19 00:59:16 +000015270
15271 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15272 tzset();
15273 if (localtime(&groundhogday)->tm_hour != 11)
15274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015275#if HAVE_TZNAME
15276 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15277 exit(1);
15278#endif
15279
15280#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015281 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15282 exit(1);
15283 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015285#endif
Brett Cannon18367812003-09-19 00:59:16 +000015286
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015287 exit(0);
15288}
15289
15290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015291if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015292 ac_cv_working_tzset=yes
15293else
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15297 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015298fi
15299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300fi
15301
Matthias Kloseb9621712010-04-24 17:59:49 +000015302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15303$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015304if test "$ac_cv_working_tzset" = yes
15305then
15306
Matthias Kloseb9621712010-04-24 17:59:49 +000015307$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015308
15309fi
15310
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015311# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15313$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015314if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015315 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015316else
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015318/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015319#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015320int
15321main ()
15322{
15323
15324struct stat st;
15325st.st_mtim.tv_nsec = 1;
15326
15327 ;
15328 return 0;
15329}
15330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015332 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015333else
Matthias Kloseb9621712010-04-24 17:59:49 +000015334 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15337fi
15338
Matthias Kloseb9621712010-04-24 17:59:49 +000015339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15340$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015341if test "$ac_cv_stat_tv_nsec" = yes
15342then
15343
Matthias Kloseb9621712010-04-24 17:59:49 +000015344$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015345
15346fi
15347
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015348# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15350$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015351if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015353else
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015355/* end confdefs.h. */
15356#include <sys/stat.h>
15357int
15358main ()
15359{
15360
15361struct stat st;
15362st.st_mtimespec.tv_nsec = 1;
15363
15364 ;
15365 return 0;
15366}
15367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015369 ac_cv_stat_tv_nsec2=yes
15370else
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15374fi
15375
Matthias Kloseb9621712010-04-24 17:59:49 +000015376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15377$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015378if test "$ac_cv_stat_tv_nsec2" = yes
15379then
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015382
15383fi
15384
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015385# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015386ac_save_cppflags="$CPPFLAGS"
15387CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015388
15389for ac_header in curses.h ncurses.h
15390do :
15391 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15392ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15393if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15394 cat >>confdefs.h <<_ACEOF
15395#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15396_ACEOF
15397
15398fi
15399
15400done
15401
15402
15403# On Solaris, term.h requires curses.h
15404for ac_header in term.h
15405do :
15406 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15407#ifdef HAVE_CURSES_H
15408#include <curses.h>
15409#endif
15410
15411"
15412if test "x$ac_cv_header_term_h" = xyes; then :
15413 cat >>confdefs.h <<_ACEOF
15414#define HAVE_TERM_H 1
15415_ACEOF
15416
15417fi
15418
15419done
15420
15421
Jack Jansen666b1e72001-10-31 12:11:48 +000015422# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15424$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015425if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015426 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015427else
Matthias Kloseb9621712010-04-24 17:59:49 +000015428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015429/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015430#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015431int
15432main ()
15433{
Jack Jansen666b1e72001-10-31 12:11:48 +000015434
15435 int rtn;
15436 rtn = mvwdelch(0,0,0);
15437
Martin v. Löwis11437992002-04-12 09:54:03 +000015438 ;
15439 return 0;
15440}
15441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015442if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015443 ac_cv_mvwdelch_is_expression=yes
15444else
Matthias Kloseb9621712010-04-24 17:59:49 +000015445 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15448fi
15449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15451$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015452
15453if test "$ac_cv_mvwdelch_is_expression" = yes
15454then
Martin v. Löwis11437992002-04-12 09:54:03 +000015455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015457
15458fi
15459
Matthias Kloseb9621712010-04-24 17:59:49 +000015460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15461$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015462if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015463 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015464else
Matthias Kloseb9621712010-04-24 17:59:49 +000015465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015466/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015467#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015468int
15469main ()
15470{
Jack Jansen666b1e72001-10-31 12:11:48 +000015471
15472 WINDOW *w;
15473 w->_flags = 0;
15474
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 ;
15476 return 0;
15477}
15478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015479if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015480 ac_cv_window_has_flags=yes
15481else
Matthias Kloseb9621712010-04-24 17:59:49 +000015482 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15485fi
15486
Matthias Kloseb9621712010-04-24 17:59:49 +000015487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15488$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015489
Jack Jansen666b1e72001-10-31 12:11:48 +000015490
15491if test "$ac_cv_window_has_flags" = yes
15492then
Martin v. Löwis11437992002-04-12 09:54:03 +000015493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015495
15496fi
15497
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15499$as_echo_n "checking for is_term_resized... " >&6; }
15500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015501/* end confdefs.h. */
15502#include <curses.h>
15503int
15504main ()
15505{
15506void *x=is_term_resized
15507 ;
15508 return 0;
15509}
15510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015512
Matthias Kloseb9621712010-04-24 17:59:49 +000015513$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015514
Matthias Kloseb159a552010-04-25 21:00:44 +000015515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015516$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015517else
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15519$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015520
15521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15523
Matthias Kloseb9621712010-04-24 17:59:49 +000015524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15525$as_echo_n "checking for resize_term... " >&6; }
15526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015527/* end confdefs.h. */
15528#include <curses.h>
15529int
15530main ()
15531{
15532void *x=resize_term
15533 ;
15534 return 0;
15535}
15536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015537if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015540
Matthias Kloseb159a552010-04-25 21:00:44 +000015541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015542$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015543else
Matthias Kloseb9621712010-04-24 17:59:49 +000015544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15545$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015546
15547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15551$as_echo_n "checking for resizeterm... " >&6; }
15552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015553/* end confdefs.h. */
15554#include <curses.h>
15555int
15556main ()
15557{
15558void *x=resizeterm
15559 ;
15560 return 0;
15561}
15562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015563if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015566
Matthias Kloseb159a552010-04-25 21:00:44 +000015567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015568$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015569else
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15571$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015572
15573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015575# last curses configure check
15576CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15579$as_echo "$as_me: checking for device files" >&6;}
15580
15581if test "x$cross_compiling" = xyes; then
15582 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15584$as_echo_n "checking for /dev/ptmx... " >&6; }
15585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15586$as_echo "not set" >&6; }
15587 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15588 fi
15589 if test "${ac_cv_file__dev_ptc+set}" != set; then
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15591$as_echo_n "checking for /dev/ptc... " >&6; }
15592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15593$as_echo "not set" >&6; }
15594 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15595 fi
15596fi
15597
Matthias Kloseb9621712010-04-24 17:59:49 +000015598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15599$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015600if ${ac_cv_file__dev_ptmx+:} false; then :
15601 $as_echo_n "(cached) " >&6
15602else
15603 test "$cross_compiling" = yes &&
15604 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15605if test -r "/dev/ptmx"; then
15606 ac_cv_file__dev_ptmx=yes
15607else
15608 ac_cv_file__dev_ptmx=no
15609fi
15610fi
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15612$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15613if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015614
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015615fi
15616
15617if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015618
Matthias Kloseb9621712010-04-24 17:59:49 +000015619$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015620
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15623$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015624if ${ac_cv_file__dev_ptc+:} false; then :
15625 $as_echo_n "(cached) " >&6
15626else
15627 test "$cross_compiling" = yes &&
15628 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15629if test -r "/dev/ptc"; then
15630 ac_cv_file__dev_ptc=yes
15631else
15632 ac_cv_file__dev_ptc=no
15633fi
15634fi
15635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15636$as_echo "$ac_cv_file__dev_ptc" >&6; }
15637if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015638
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015639fi
15640
15641if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015644
Neal Norwitz865400f2003-03-21 01:42:58 +000015645fi
15646
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015647if test "$have_long_long" = yes
15648then
Matthias Kloseb9621712010-04-24 17:59:49 +000015649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15650$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015653else
Matthias Kloseb9621712010-04-24 17:59:49 +000015654 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015655 ac_cv_have_long_long_format="cross -- assuming no"
15656 if test x$GCC = xyes; then
15657 save_CFLAGS=$CFLAGS
15658 CFLAGS="$CFLAGS -Werror -Wformat"
15659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15660/* end confdefs.h. */
15661
15662 #include <stdio.h>
15663 #include <stddef.h>
15664
15665int
15666main ()
15667{
15668
15669 char *buffer;
15670 sprintf(buffer, "%lld", (long long)123);
15671 sprintf(buffer, "%lld", (long long)-123);
15672 sprintf(buffer, "%llu", (unsigned long long)123);
15673
15674 ;
15675 return 0;
15676}
15677_ACEOF
15678if ac_fn_c_try_compile "$LINENO"; then :
15679 ac_cv_have_long_long_format=yes
15680
15681fi
15682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15683 CFLAGS=$save_CFLAGS
15684 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015687/* end confdefs.h. */
15688
15689 #include <stdio.h>
15690 #include <stddef.h>
15691 #include <string.h>
15692
15693 #ifdef HAVE_SYS_TYPES_H
15694 #include <sys/types.h>
15695 #endif
15696
15697 int main()
15698 {
15699 char buffer[256];
15700
15701 if (sprintf(buffer, "%lld", (long long)123) < 0)
15702 return 1;
15703 if (strcmp(buffer, "123"))
15704 return 1;
15705
15706 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15707 return 1;
15708 if (strcmp(buffer, "-123"))
15709 return 1;
15710
15711 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15712 return 1;
15713 if (strcmp(buffer, "123"))
15714 return 1;
15715
15716 return 0;
15717 }
15718
15719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015720if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015721 ac_cv_have_long_long_format=yes
15722else
Matthias Kloseb9621712010-04-24 17:59:49 +000015723 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015727fi
15728
15729
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015730fi
15731
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15733$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015734fi
15735
Mark Dickinson89d7d412009-12-31 20:50:59 +000015736if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015737then
15738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015740
15741fi
15742
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015743if test $ac_sys_system = Darwin
15744then
15745 LIBS="$LIBS -framework CoreFoundation"
15746fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15749$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015750if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015752else
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015754 ac_cv_have_size_t_format="cross -- assuming yes"
15755
Thomas Wouters477c8d52006-05-27 19:21:47 +000015756else
Matthias Kloseb9621712010-04-24 17:59:49 +000015757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015758/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015759
Thomas Wouters477c8d52006-05-27 19:21:47 +000015760#include <stdio.h>
15761#include <stddef.h>
15762#include <string.h>
15763
Christian Heimes2c181612007-12-17 20:04:13 +000015764#ifdef HAVE_SYS_TYPES_H
15765#include <sys/types.h>
15766#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015767
15768#ifdef HAVE_SSIZE_T
15769typedef ssize_t Py_ssize_t;
15770#elif SIZEOF_VOID_P == SIZEOF_LONG
15771typedef long Py_ssize_t;
15772#else
15773typedef int Py_ssize_t;
15774#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015775
Christian Heimes2c181612007-12-17 20:04:13 +000015776int main()
15777{
15778 char buffer[256];
15779
Thomas Wouters477c8d52006-05-27 19:21:47 +000015780 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15781 return 1;
15782
Thomas Wouters89f507f2006-12-13 04:49:30 +000015783 if (strcmp(buffer, "123"))
15784 return 1;
15785
15786 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15787 return 1;
15788
15789 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015790 return 1;
15791
15792 return 0;
15793}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015794
Thomas Wouters477c8d52006-05-27 19:21:47 +000015795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015796if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015797 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015798else
Matthias Kloseb9621712010-04-24 17:59:49 +000015799 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015803fi
15804
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15807$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015808if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015809
Matthias Kloseb9621712010-04-24 17:59:49 +000015810$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015811
15812fi
15813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015815#ifdef HAVE_SYS_TYPES_H
15816#include <sys/types.h>
15817#endif
15818#ifdef HAVE_SYS_SOCKET_H
15819#include <sys/socket.h>
15820#endif
15821
Matthias Kloseb9621712010-04-24 17:59:49 +000015822"
Victor Stinnere0be4232011-10-25 13:06:09 +020015823if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015824
Martin v. Löwis11437992002-04-12 09:54:03 +000015825else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015826
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015828
15829fi
15830
Michael W. Hudson54241132001-12-07 15:38:26 +000015831
Matthias Kloseb9621712010-04-24 17:59:49 +000015832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15833$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015834if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015836else
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015838 ac_cv_broken_mbstowcs=no
15839else
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015841/* end confdefs.h. */
15842
Stefan Krah19c21392012-11-22 23:47:32 +010015843#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015844#include<stdlib.h>
15845int main() {
15846 size_t len = -1;
15847 const char *str = "text";
15848 len = mbstowcs(NULL, str, 0);
15849 return (len != 4);
15850}
15851
15852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015853if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015854 ac_cv_broken_mbstowcs=no
15855else
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15859 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015860fi
15861
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015862fi
15863
Matthias Kloseb9621712010-04-24 17:59:49 +000015864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15865$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015866if test "$ac_cv_broken_mbstowcs" = yes
15867then
15868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015870
15871fi
15872
Antoine Pitroub52ec782009-01-25 16:34:23 +000015873# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15875$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015876
15877# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015878if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015879 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015880if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015881then
15882
Matthias Kloseb9621712010-04-24 17:59:49 +000015883$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15886$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015887fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015888if test "$withval" = no
15889then
15890
15891$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15892
Matthias Kloseb9621712010-04-24 17:59:49 +000015893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15894$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015895fi
15896
Antoine Pitrou042b1282010-08-13 21:15:58 +000015897else
15898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15899$as_echo "no value specified" >&6; }
15900fi
15901
Antoine Pitroub52ec782009-01-25 16:34:23 +000015902
Matthias Kloseb17289e2012-03-15 19:51:34 +010015903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15904$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15905if ${ac_cv_computed_gotos+:} false; then :
15906 $as_echo_n "(cached) " >&6
15907else
15908 if test "$cross_compiling" = yes; then :
15909 if test "${with_computed_gotos+set}" = set; then
15910 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15911 else
15912 ac_cv_computed_gotos=no
15913 fi
15914else
15915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15916/* end confdefs.h. */
15917
15918int main(int argc, char **argv)
15919{
15920 static void *targets[1] = { &&LABEL1 };
15921 goto LABEL2;
15922LABEL1:
15923 return 0;
15924LABEL2:
15925 goto *targets[0];
15926 return 1;
15927}
15928
15929_ACEOF
15930if ac_fn_c_try_run "$LINENO"; then :
15931 ac_cv_computed_gotos=yes
15932else
15933 ac_cv_computed_gotos=no
15934fi
15935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15936 conftest.$ac_objext conftest.beam conftest.$ac_ext
15937fi
15938
15939fi
15940
15941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15942$as_echo "$ac_cv_computed_gotos" >&6; }
15943case "$ac_cv_computed_gotos" in yes*)
15944
15945$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15946
15947esac
15948
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015949case $ac_sys_system in
15950AIX*)
15951
15952$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15953 ;;
15954esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015955
Michael W. Hudson54241132001-12-07 15:38:26 +000015956
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015957
15958
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015959for h in `(cd $srcdir;echo Python/thread_*.h)`
15960do
15961 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15962done
15963
Michael W. Hudson54241132001-12-07 15:38:26 +000015964
Ned Deily0db50cf2014-07-25 12:41:31 -070015965SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15967$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015968for dir in $SRCDIRS; do
15969 if test ! -d $dir; then
15970 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015971 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015972done
Matthias Kloseb9621712010-04-24 17:59:49 +000015973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15974$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015975
Stefan Krah1919b7e2012-03-21 18:25:23 +010015976# Availability of -O2:
15977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15978$as_echo_n "checking for -O2... " >&6; }
15979saved_cflags="$CFLAGS"
15980CFLAGS="-O2"
15981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15982/* end confdefs.h. */
15983
15984int
15985main ()
15986{
15987
15988
15989 ;
15990 return 0;
15991}
15992_ACEOF
15993if ac_fn_c_try_compile "$LINENO"; then :
15994 have_O2=yes
15995else
15996 have_O2=no
15997fi
15998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16000$as_echo "$have_O2" >&6; }
16001CFLAGS="$saved_cflags"
16002
16003# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16004# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16006$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16007saved_cflags="$CFLAGS"
16008CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16009if test "$have_O2" = no; then
16010 CFLAGS=""
16011fi
16012if test "$cross_compiling" = yes; then :
16013 have_glibc_memmove_bug=undefined
16014else
16015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16016/* end confdefs.h. */
16017
16018#include <stdio.h>
16019#include <stdlib.h>
16020#include <string.h>
16021void foo(void *p, void *q) { memmove(p, q, 19); }
16022int main() {
16023 char a[32] = "123456789000000000";
16024 foo(&a[9], a);
16025 if (strcmp(a, "123456789123456789000000000") != 0)
16026 return 1;
16027 foo(a, &a[9]);
16028 if (strcmp(a, "123456789000000000") != 0)
16029 return 1;
16030 return 0;
16031}
16032
16033_ACEOF
16034if ac_fn_c_try_run "$LINENO"; then :
16035 have_glibc_memmove_bug=no
16036else
16037 have_glibc_memmove_bug=yes
16038fi
16039rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16040 conftest.$ac_objext conftest.beam conftest.$ac_ext
16041fi
16042
16043CFLAGS="$saved_cflags"
16044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16045$as_echo "$have_glibc_memmove_bug" >&6; }
16046if test "$have_glibc_memmove_bug" = yes; then
16047
16048$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16049
16050fi
16051
16052if test "$have_gcc_asm_for_x87" = yes; then
16053 # Some versions of gcc miscompile inline asm:
16054 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16055 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16056 case $CC in
16057 *gcc*)
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16059$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16060 saved_cflags="$CFLAGS"
16061 CFLAGS="-O2"
16062 if test "$cross_compiling" = yes; then :
16063 have_ipa_pure_const_bug=undefined
16064else
16065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16066/* end confdefs.h. */
16067
16068 __attribute__((noinline)) int
16069 foo(int *p) {
16070 int r;
16071 asm ( "movl \$6, (%1)\n\t"
16072 "xorl %0, %0\n\t"
16073 : "=r" (r) : "r" (p) : "memory"
16074 );
16075 return r;
16076 }
16077 int main() {
16078 int p = 8;
16079 if ((foo(&p) ? : p) != 6)
16080 return 1;
16081 return 0;
16082 }
16083
16084_ACEOF
16085if ac_fn_c_try_run "$LINENO"; then :
16086 have_ipa_pure_const_bug=no
16087else
16088 have_ipa_pure_const_bug=yes
16089fi
16090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16091 conftest.$ac_objext conftest.beam conftest.$ac_ext
16092fi
16093
16094 CFLAGS="$saved_cflags"
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16096$as_echo "$have_ipa_pure_const_bug" >&6; }
16097 if test "$have_ipa_pure_const_bug" = yes; then
16098
16099$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16100
16101 fi
16102 ;;
16103 esac
16104fi
16105
Victor Stinner4f5366e2015-01-09 02:13:19 +010016106# Check for stdatomic.h
16107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16108$as_echo_n "checking for stdatomic.h... " >&6; }
16109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110/* end confdefs.h. */
16111
16112
16113 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016114 atomic_int value = ATOMIC_VAR_INIT(1);
16115 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016116 int main() {
16117 int loaded_value = atomic_load(&value);
16118 return 0;
16119 }
16120
16121
16122_ACEOF
16123if ac_fn_c_try_link "$LINENO"; then :
16124 have_stdatomic_h=yes
16125else
16126 have_stdatomic_h=no
16127fi
16128rm -f core conftest.err conftest.$ac_objext \
16129 conftest$ac_exeext conftest.$ac_ext
16130
16131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16132$as_echo "$have_stdatomic_h" >&6; }
16133
16134if test "$have_stdatomic_h" = yes; then
16135
16136$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16137
16138fi
16139
16140# Check for GCC >= 4.7 __atomic builtins
16141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16142$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16144/* end confdefs.h. */
16145
16146
16147 volatile int val = 1;
16148 int main() {
16149 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16150 return 0;
16151 }
16152
16153
16154_ACEOF
16155if ac_fn_c_try_link "$LINENO"; then :
16156 have_builtin_atomic=yes
16157else
16158 have_builtin_atomic=no
16159fi
16160rm -f core conftest.err conftest.$ac_objext \
16161 conftest$ac_exeext conftest.$ac_ext
16162
16163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16164$as_echo "$have_builtin_atomic" >&6; }
16165
16166if test "$have_builtin_atomic" = yes; then
16167
16168$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16169
16170fi
16171
Ned Deily322f5ba2013-11-21 23:01:59 -080016172# ensurepip option
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16174$as_echo_n "checking for ensurepip... " >&6; }
16175
16176# Check whether --with-ensurepip was given.
16177if test "${with_ensurepip+set}" = set; then :
16178 withval=$with_ensurepip;
16179else
16180 with_ensurepip=upgrade
16181fi
16182
16183case $with_ensurepip in #(
16184 yes|upgrade) :
16185 ENSUREPIP=upgrade ;; #(
16186 install) :
16187 ENSUREPIP=install ;; #(
16188 no) :
16189 ENSUREPIP=no ;; #(
16190 *) :
16191 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16192esac
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16194$as_echo "$ENSUREPIP" >&6; }
16195
16196
Victor Stinner35a97c02015-03-08 02:59:09 +010016197# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16199$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201/* end confdefs.h. */
16202
16203
16204 #include <dirent.h>
16205
16206 int main() {
16207 struct dirent entry;
16208 return entry.d_type == DT_UNKNOWN;
16209 }
16210
16211
16212_ACEOF
16213if ac_fn_c_try_link "$LINENO"; then :
16214 have_dirent_d_type=yes
16215else
16216 have_dirent_d_type=no
16217fi
16218rm -f core conftest.err conftest.$ac_objext \
16219 conftest$ac_exeext conftest.$ac_ext
16220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16221$as_echo "$have_dirent_d_type" >&6; }
16222
16223if test "$have_dirent_d_type" = yes; then
16224
16225$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16226
16227fi
16228
Victor Stinner9eb57c52015-03-19 22:21:49 +010016229# check if the Linux getrandom() syscall is available
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16231$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h. */
16234
16235
Victor Stinner1b80b242016-04-12 22:34:58 +020016236 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016237 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016238 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016239
16240 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016241 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016242 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016243 const int flags = GRND_NONBLOCK;
16244 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016245 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016246 return 0;
16247 }
16248
16249
16250_ACEOF
16251if ac_fn_c_try_link "$LINENO"; then :
16252 have_getrandom_syscall=yes
16253else
16254 have_getrandom_syscall=no
16255fi
16256rm -f core conftest.err conftest.$ac_objext \
16257 conftest$ac_exeext conftest.$ac_ext
16258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16259$as_echo "$have_getrandom_syscall" >&6; }
16260
16261if test "$have_getrandom_syscall" = yes; then
16262
16263$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16264
16265fi
16266
Victor Stinnerbae2d622015-10-01 09:47:30 +020016267# check if the getrandom() function is available
16268# the test was written for the Solaris function of <sys/random.h>
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16270$as_echo_n "checking for the getrandom() function... " >&6; }
16271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272/* end confdefs.h. */
16273
16274
16275 #include <sys/random.h>
16276
16277 int main() {
16278 char buffer[1];
16279 const size_t buflen = sizeof(buffer);
16280 const int flags = 0;
16281 /* ignore the result, Python checks for ENOSYS at runtime */
16282 (void)getrandom(buffer, buflen, flags);
16283 return 0;
16284 }
16285
16286
16287_ACEOF
16288if ac_fn_c_try_link "$LINENO"; then :
16289 have_getrandom=yes
16290else
16291 have_getrandom=no
16292fi
16293rm -f core conftest.err conftest.$ac_objext \
16294 conftest$ac_exeext conftest.$ac_ext
16295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16296$as_echo "$have_getrandom" >&6; }
16297
16298if test "$have_getrandom" = yes; then
16299
16300$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16301
16302fi
16303
Guido van Rossum627b2d71993-12-24 10:39:16 +000016304# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016305ac_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 +000016306
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016307ac_config_files="$ac_config_files Modules/ld_so_aix"
16308
Martin v. Löwis11437992002-04-12 09:54:03 +000016309cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016310# This file is a shell script that caches the results of configure
16311# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016312# scripts and configure runs, see configure's option --config-cache.
16313# It is not useful on other systems. If it contains results you don't
16314# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016315#
Martin v. Löwis11437992002-04-12 09:54:03 +000016316# config.status only pays attention to the cache file if you give it
16317# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016318#
Skip Montanaro6dead952003-09-25 14:50:04 +000016319# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016320# loading this file, other *unset* `ac_cv_foo' will be assigned the
16321# following values.
16322
16323_ACEOF
16324
Guido van Rossumf78abae1997-01-21 22:02:36 +000016325# The following way of writing the cache mishandles newlines in values,
16326# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016328# Ultrix sh set writes to stderr and can't be redirected directly,
16329# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330(
16331 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16332 eval ac_val=\$$ac_var
16333 case $ac_val in #(
16334 *${as_nl}*)
16335 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016336 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16337$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338 esac
16339 case $ac_var in #(
16340 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16342 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 esac ;;
16344 esac
16345 done
16346
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16349 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016350 # `set' does not quote correctly, so add quotes: double-quote
16351 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016352 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016353 "s/'/'\\\\''/g;
16354 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 *)
16357 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016358 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360 esac |
16361 sort
16362) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016365 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16368 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16370 :end' >>confcache
16371if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16372 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016373 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016374 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16375$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016376 if test ! -f "$cache_file" || test -h "$cache_file"; then
16377 cat confcache >"$cache_file"
16378 else
16379 case $cache_file in #(
16380 */* | ?:*)
16381 mv -f confcache "$cache_file"$$ &&
16382 mv -f "$cache_file"$$ "$cache_file" ;; #(
16383 *)
16384 mv -f confcache "$cache_file" ;;
16385 esac
16386 fi
16387 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016388 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016389 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16390$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016391 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016392fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016393rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016395test "x$prefix" = xNONE && prefix=$ac_default_prefix
16396# Let make expand exec_prefix.
16397test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016398
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016399DEFS=-DHAVE_CONFIG_H
16400
Skip Montanaro6dead952003-09-25 14:50:04 +000016401ac_libobjs=
16402ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016403U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016404for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16405 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016407 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16409 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016410 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16411 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016412done
16413LIBOBJS=$ac_libobjs
16414
16415LTLIBOBJS=$ac_ltlibobjs
16416
16417
Martin v. Löwis11437992002-04-12 09:54:03 +000016418
Matthias Kloseb9621712010-04-24 17:59:49 +000016419
Victor Stinnere0be4232011-10-25 13:06:09 +020016420: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016421ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016422ac_clean_files_save=$ac_clean_files
16423ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016424{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16425$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16426as_write_fail=0
16427cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428#! $SHELL
16429# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016430# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016431# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016432# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016433
Martin v. Löwis11437992002-04-12 09:54:03 +000016434debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016435ac_cs_recheck=false
16436ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016437
Matthias Kloseb9621712010-04-24 17:59:49 +000016438SHELL=\${CONFIG_SHELL-$SHELL}
16439export SHELL
16440_ASEOF
16441cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16442## -------------------- ##
16443## M4sh Initialization. ##
16444## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446# Be more Bourne compatible
16447DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016448if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016449 emulate sh
16450 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016451 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016452 # is contrary to our usage. Disable this feature.
16453 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016455else
Matthias Kloseb9621712010-04-24 17:59:49 +000016456 case `(set -o) 2>/dev/null` in #(
16457 *posix*) :
16458 set -o posix ;; #(
16459 *) :
16460 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016461esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016462fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016463
16464
Matthias Kloseb9621712010-04-24 17:59:49 +000016465as_nl='
16466'
16467export as_nl
16468# Printing a long string crashes Solaris 7 /usr/bin/printf.
16469as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16470as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16471as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16472# Prefer a ksh shell builtin over an external printf program on Solaris,
16473# but without wasting forks for bash or zsh.
16474if test -z "$BASH_VERSION$ZSH_VERSION" \
16475 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16476 as_echo='print -r --'
16477 as_echo_n='print -rn --'
16478elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16479 as_echo='printf %s\n'
16480 as_echo_n='printf %s'
16481else
16482 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16483 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16484 as_echo_n='/usr/ucb/echo -n'
16485 else
16486 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16487 as_echo_n_body='eval
16488 arg=$1;
16489 case $arg in #(
16490 *"$as_nl"*)
16491 expr "X$arg" : "X\\(.*\\)$as_nl";
16492 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16493 esac;
16494 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16495 '
16496 export as_echo_n_body
16497 as_echo_n='sh -c $as_echo_n_body as_echo'
16498 fi
16499 export as_echo_body
16500 as_echo='sh -c $as_echo_body as_echo'
16501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016502
16503# The user is always right.
16504if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016505 PATH_SEPARATOR=:
16506 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16507 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16508 PATH_SEPARATOR=';'
16509 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016510fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512
16513# IFS
16514# We need space, tab and new line, in precisely that order. Quoting is
16515# there to prevent editors from complaining about space-tab.
16516# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16517# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518IFS=" "" $as_nl"
16519
16520# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016521as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016522case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016523 *[\\/]* ) as_myself=$0 ;;
16524 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016525for as_dir in $PATH
16526do
16527 IFS=$as_save_IFS
16528 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016529 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16530 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016533 ;;
16534esac
16535# We did not find ourselves, most probably we were run as `sh COMMAND'
16536# in which case we are not to be found in the path.
16537if test "x$as_myself" = x; then
16538 as_myself=$0
16539fi
16540if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016541 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16542 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543fi
16544
Matthias Kloseb9621712010-04-24 17:59:49 +000016545# Unset variables that we do not need and which cause bugs (e.g. in
16546# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16547# suppresses any "Segmentation fault" message there. '((' could
16548# trigger a bug in pdksh 5.2.14.
16549for as_var in BASH_ENV ENV MAIL MAILPATH
16550do eval test x\${$as_var+set} = xset \
16551 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016552done
16553PS1='$ '
16554PS2='> '
16555PS4='+ '
16556
16557# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016558LC_ALL=C
16559export LC_ALL
16560LANGUAGE=C
16561export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562
Matthias Kloseb9621712010-04-24 17:59:49 +000016563# CDPATH.
16564(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16565
16566
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016567# as_fn_error STATUS ERROR [LINENO LOG_FD]
16568# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016569# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16570# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016571# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016572as_fn_error ()
16573{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016574 as_status=$1; test $as_status -eq 0 && as_status=1
16575 if test "$4"; then
16576 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16577 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016578 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016579 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016580 as_fn_exit $as_status
16581} # as_fn_error
16582
16583
16584# as_fn_set_status STATUS
16585# -----------------------
16586# Set $? to STATUS, without forking.
16587as_fn_set_status ()
16588{
16589 return $1
16590} # as_fn_set_status
16591
16592# as_fn_exit STATUS
16593# -----------------
16594# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16595as_fn_exit ()
16596{
16597 set +e
16598 as_fn_set_status $1
16599 exit $1
16600} # as_fn_exit
16601
16602# as_fn_unset VAR
16603# ---------------
16604# Portably unset VAR.
16605as_fn_unset ()
16606{
16607 { eval $1=; unset $1;}
16608}
16609as_unset=as_fn_unset
16610# as_fn_append VAR VALUE
16611# ----------------------
16612# Append the text in VALUE to the end of the definition contained in VAR. Take
16613# advantage of any shell optimizations that allow amortized linear growth over
16614# repeated appends, instead of the typical quadratic growth present in naive
16615# implementations.
16616if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16617 eval 'as_fn_append ()
16618 {
16619 eval $1+=\$2
16620 }'
16621else
16622 as_fn_append ()
16623 {
16624 eval $1=\$$1\$2
16625 }
16626fi # as_fn_append
16627
16628# as_fn_arith ARG...
16629# ------------------
16630# Perform arithmetic evaluation on the ARGs, and store the result in the
16631# global $as_val. Take advantage of shells that can avoid forks. The arguments
16632# must be portable across $(()) and expr.
16633if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16634 eval 'as_fn_arith ()
16635 {
16636 as_val=$(( $* ))
16637 }'
16638else
16639 as_fn_arith ()
16640 {
16641 as_val=`expr "$@" || test $? -eq 1`
16642 }
16643fi # as_fn_arith
16644
16645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016646if expr a : '\(a\)' >/dev/null 2>&1 &&
16647 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16648 as_expr=expr
16649else
16650 as_expr=false
16651fi
16652
16653if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16654 as_basename=basename
16655else
16656 as_basename=false
16657fi
16658
Matthias Kloseb9621712010-04-24 17:59:49 +000016659if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16660 as_dirname=dirname
16661else
16662 as_dirname=false
16663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665as_me=`$as_basename -- "$0" ||
16666$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16667 X"$0" : 'X\(//\)$' \| \
16668 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016669$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 sed '/^.*\/\([^/][^/]*\)\/*$/{
16671 s//\1/
16672 q
16673 }
16674 /^X\/\(\/\/\)$/{
16675 s//\1/
16676 q
16677 }
16678 /^X\/\(\/\).*/{
16679 s//\1/
16680 q
16681 }
16682 s/.*/./; q'`
16683
Matthias Kloseb9621712010-04-24 17:59:49 +000016684# Avoid depending upon Character Ranges.
16685as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16686as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16687as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16688as_cr_digits='0123456789'
16689as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690
16691ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016692case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016694 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016696 xy) ECHO_C='\c';;
16697 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16698 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016699 esac;;
16700*)
16701 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016702esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016703
Martin v. Löwis11437992002-04-12 09:54:03 +000016704rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016705if test -d conf$$.dir; then
16706 rm -f conf$$.dir/conf$$.file
16707else
16708 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016709 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016711if (echo >conf$$.file) 2>/dev/null; then
16712 if ln -s conf$$.file conf$$ 2>/dev/null; then
16713 as_ln_s='ln -s'
16714 # ... but there are two gotchas:
16715 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16716 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016717 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016718 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016719 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016720 elif ln conf$$.file conf$$ 2>/dev/null; then
16721 as_ln_s=ln
16722 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016723 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016724 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016725else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016726 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016728rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16729rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016730
Matthias Kloseb9621712010-04-24 17:59:49 +000016731
16732# as_fn_mkdir_p
16733# -------------
16734# Create "$as_dir" as a directory, including parents if necessary.
16735as_fn_mkdir_p ()
16736{
16737
16738 case $as_dir in #(
16739 -*) as_dir=./$as_dir;;
16740 esac
16741 test -d "$as_dir" || eval $as_mkdir_p || {
16742 as_dirs=
16743 while :; do
16744 case $as_dir in #(
16745 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16746 *) as_qdir=$as_dir;;
16747 esac
16748 as_dirs="'$as_qdir' $as_dirs"
16749 as_dir=`$as_dirname -- "$as_dir" ||
16750$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16751 X"$as_dir" : 'X\(//\)[^/]' \| \
16752 X"$as_dir" : 'X\(//\)$' \| \
16753 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16754$as_echo X"$as_dir" |
16755 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16756 s//\1/
16757 q
16758 }
16759 /^X\(\/\/\)[^/].*/{
16760 s//\1/
16761 q
16762 }
16763 /^X\(\/\/\)$/{
16764 s//\1/
16765 q
16766 }
16767 /^X\(\/\).*/{
16768 s//\1/
16769 q
16770 }
16771 s/.*/./; q'`
16772 test -d "$as_dir" && break
16773 done
16774 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016775 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016776
16777
16778} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016779if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016780 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016781else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016782 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016783 as_mkdir_p=false
16784fi
16785
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016786
16787# as_fn_executable_p FILE
16788# -----------------------
16789# Test if FILE is an executable regular file.
16790as_fn_executable_p ()
16791{
16792 test -f "$1" && test -x "$1"
16793} # as_fn_executable_p
16794as_test_x='test -x'
16795as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016796
16797# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016798as_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 +000016799
16800# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016801as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016802
16803
Martin v. Löwis11437992002-04-12 09:54:03 +000016804exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016805## ----------------------------------- ##
16806## Main body of $CONFIG_STATUS script. ##
16807## ----------------------------------- ##
16808_ASEOF
16809test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016810
Matthias Kloseb9621712010-04-24 17:59:49 +000016811cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16812# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016813# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814# values after options handling.
16815ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016816This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016817generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016818
16819 CONFIG_FILES = $CONFIG_FILES
16820 CONFIG_HEADERS = $CONFIG_HEADERS
16821 CONFIG_LINKS = $CONFIG_LINKS
16822 CONFIG_COMMANDS = $CONFIG_COMMANDS
16823 $ $0 $@
16824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825on `(hostname || uname -n) 2>/dev/null | sed 1q`
16826"
16827
Martin v. Löwis11437992002-04-12 09:54:03 +000016828_ACEOF
16829
Matthias Kloseb9621712010-04-24 17:59:49 +000016830case $ac_config_files in *"
16831"*) set x $ac_config_files; shift; ac_config_files=$*;;
16832esac
16833
16834case $ac_config_headers in *"
16835"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16836esac
16837
16838
16839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016840# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016841config_files="$ac_config_files"
16842config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016843
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016844_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016845
Matthias Kloseb9621712010-04-24 17:59:49 +000016846cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016847ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016848\`$as_me' instantiates files and other configuration actions
16849from templates according to the current configuration. Unless the files
16850and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016851
Matthias Kloseb9621712010-04-24 17:59:49 +000016852Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016853
16854 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016856 --config print configuration, then exit
16857 -q, --quiet, --silent
16858 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016859 -d, --debug don't remove temporary files
16860 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016861 --file=FILE[:TEMPLATE]
16862 instantiate the configuration file FILE
16863 --header=FILE[:TEMPLATE]
16864 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016865
16866Configuration files:
16867$config_files
16868
16869Configuration headers:
16870$config_headers
16871
Matthias Kloseb9621712010-04-24 17:59:49 +000016872Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016874_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016875cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16876ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016877ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016878python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016879configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016881
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016882Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016883This config.status script is free software; the Free Software Foundation
16884gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016885
16886ac_pwd='$ac_pwd'
16887srcdir='$srcdir'
16888INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016889MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016890test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016891_ACEOF
16892
Matthias Kloseb9621712010-04-24 17:59:49 +000016893cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16894# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016895ac_need_defaults=:
16896while test $# != 0
16897do
16898 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016899 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16901 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016902 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016904 --*=)
16905 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16906 ac_optarg=
16907 ac_shift=:
16908 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016910 ac_option=$1
16911 ac_optarg=$2
16912 ac_shift=shift
16913 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 esac
16915
Skip Montanaro6dead952003-09-25 14:50:04 +000016916 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016918 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16919 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016921 $as_echo "$ac_cs_version"; exit ;;
16922 --config | --confi | --conf | --con | --co | --c )
16923 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 debug=: ;;
16926 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016927 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016928 case $ac_optarg in
16929 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016930 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016931 esac
16932 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 ac_need_defaults=false;;
16934 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016935 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016936 case $ac_optarg in
16937 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16938 esac
16939 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 --he | --h)
16942 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016943 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016944Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016945 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016947 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16948 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16949 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016950
16951 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016952 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016953Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016954
Matthias Kloseb9621712010-04-24 17:59:49 +000016955 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016957
16958 esac
16959 shift
16960done
16961
Skip Montanaro6dead952003-09-25 14:50:04 +000016962ac_configure_extra_args=
16963
16964if $ac_cs_silent; then
16965 exec 6>/dev/null
16966 ac_configure_extra_args="$ac_configure_extra_args --silent"
16967fi
16968
16969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016970cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016971if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016972 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016973 shift
16974 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16975 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016977 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016978fi
16979
Martin v. Löwis11437992002-04-12 09:54:03 +000016980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982exec 5>>config.log
16983{
16984 echo
16985 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16986## Running $as_me. ##
16987_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016988 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016992cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016994
Matthias Kloseb9621712010-04-24 17:59:49 +000016995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996
16997# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016998for ac_config_target in $ac_config_targets
16999do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000 case $ac_config_target in
17001 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17002 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17003 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017004 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17005 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017006 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17007 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017008 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017009 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017010 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011
Victor Stinnere0be4232011-10-25 13:06:09 +020017012 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 esac
17014done
17015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016
Martin v. Löwis11437992002-04-12 09:54:03 +000017017# If the user did not use the arguments to specify the items to instantiate,
17018# then the envvar interface is used. Set only those that are not.
17019# We use the long form for the default assignment because of an extremely
17020# bizarre bug on SunOS 4.1.3.
17021if $ac_need_defaults; then
17022 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17023 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17024fi
17025
Skip Montanaro6dead952003-09-25 14:50:04 +000017026# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017027# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017028# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029# Hook for its removal unless debugging.
17030# Note that there is a small window in which the directory will not be cleaned:
17031# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017032$debug ||
17033{
Victor Stinnere0be4232011-10-25 13:06:09 +020017034 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017036 : "${ac_tmp:=$tmp}"
17037 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017038' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017039 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017040}
Martin v. Löwis11437992002-04-12 09:54:03 +000017041# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017042
Martin v. Löwis11437992002-04-12 09:54:03 +000017043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017045 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017046} ||
17047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017048 tmp=./conf$$-$RANDOM
17049 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017050} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017051ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
Matthias Kloseb9621712010-04-24 17:59:49 +000017053# Set up the scripts for CONFIG_FILES section.
17054# No need to generate them if there are no CONFIG_FILES.
17055# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017056if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017057
Matthias Kloseb9621712010-04-24 17:59:49 +000017058
17059ac_cr=`echo X | tr X '\015'`
17060# On cygwin, bash can eat \r inside `` if the user requested igncr.
17061# But we know of no other shell where ac_cr would be empty at this
17062# point, so we can use a bashism as a fallback.
17063if test "x$ac_cr" = x; then
17064 eval ac_cr=\$\'\\r\'
17065fi
17066ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17067if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017068 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017069else
17070 ac_cs_awk_cr=$ac_cr
17071fi
17072
Victor Stinnere0be4232011-10-25 13:06:09 +020017073echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017074_ACEOF
17075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017076
Matthias Kloseb9621712010-04-24 17:59:49 +000017077{
17078 echo "cat >conf$$subs.awk <<_ACEOF" &&
17079 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17080 echo "_ACEOF"
17081} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017082 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17083ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084ac_delim='%!_!# '
17085for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017086 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017087 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088
Matthias Kloseb9621712010-04-24 17:59:49 +000017089 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17090 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091 break
17092 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017093 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094 else
17095 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017096 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097done
Matthias Kloseb9621712010-04-24 17:59:49 +000017098rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099
Matthias Kloseb9621712010-04-24 17:59:49 +000017100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017101cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017103sed -n '
17104h
17105s/^/S["/; s/!.*/"]=/
17106p
17107g
17108s/^[^!]*!//
17109:repl
17110t repl
17111s/'"$ac_delim"'$//
17112t delim
17113:nl
17114h
17115s/\(.\{148\}\)..*/\1/
17116t more1
17117s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17118p
17119n
17120b repl
17121:more1
17122s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17123p
17124g
17125s/.\{148\}//
17126t nl
17127:delim
17128h
17129s/\(.\{148\}\)..*/\1/
17130t more2
17131s/["\\]/\\&/g; s/^/"/; s/$/"/
17132p
17133b
17134:more2
17135s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17136p
17137g
17138s/.\{148\}//
17139t delim
17140' <conf$$subs.awk | sed '
17141/^[^""]/{
17142 N
17143 s/\n//
17144}
17145' >>$CONFIG_STATUS || ac_write_fail=1
17146rm -f conf$$subs.awk
17147cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17148_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017149cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017150 for (key in S) S_is_set[key] = 1
17151 FS = ""
17152
17153}
17154{
17155 line = $ 0
17156 nfields = split(line, field, "@")
17157 substed = 0
17158 len = length(field[1])
17159 for (i = 2; i < nfields; i++) {
17160 key = field[i]
17161 keylen = length(key)
17162 if (S_is_set[key]) {
17163 value = S[key]
17164 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17165 len += length(value) + length(field[++i])
17166 substed = 1
17167 } else
17168 len += 1 + keylen
17169 }
17170
17171 print line
17172}
17173
17174_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17177if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17178 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17179else
17180 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017181fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017182 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017183_ACEOF
17184
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017185# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17186# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187# trailing colons and then remove the whole line if VPATH becomes empty
17188# (actually we leave an empty line to preserve line numbers).
17189if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017190 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17191h
17192s///
17193s/^/:/
17194s/[ ]*$/:/
17195s/:\$(srcdir):/:/g
17196s/:\${srcdir}:/:/g
17197s/:@srcdir@:/:/g
17198s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017200x
17201s/\(=[ ]*\).*/\1/
17202G
17203s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204s/^[^=]*=[ ]*$//
17205}'
17206fi
17207
Matthias Kloseb9621712010-04-24 17:59:49 +000017208cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017209fi # test -n "$CONFIG_FILES"
17210
Matthias Kloseb9621712010-04-24 17:59:49 +000017211# Set up the scripts for CONFIG_HEADERS section.
17212# No need to generate them if there are no CONFIG_HEADERS.
17213# This happens for instance with `./config.status Makefile'.
17214if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017215cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017216BEGIN {
17217_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218
Matthias Kloseb9621712010-04-24 17:59:49 +000017219# Transform confdefs.h into an awk script `defines.awk', embedded as
17220# here-document in config.status, that substitutes the proper values into
17221# config.h.in to produce config.h.
17222
17223# Create a delimiter string that does not exist in confdefs.h, to ease
17224# handling of long lines.
17225ac_delim='%!_!# '
17226for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017227 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17228 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017229 break
17230 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017231 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017232 else
17233 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17234 fi
17235done
17236
17237# For the awk script, D is an array of macro values keyed by name,
17238# likewise P contains macro parameters if any. Preserve backslash
17239# newline sequences.
17240
17241ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17242sed -n '
17243s/.\{148\}/&'"$ac_delim"'/g
17244t rset
17245:rset
17246s/^[ ]*#[ ]*define[ ][ ]*/ /
17247t def
17248d
17249:def
17250s/\\$//
17251t bsnl
17252s/["\\]/\\&/g
17253s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17254D["\1"]=" \3"/p
17255s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17256d
17257:bsnl
17258s/["\\]/\\&/g
17259s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17260D["\1"]=" \3\\\\\\n"\\/p
17261t cont
17262s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17263t cont
17264d
17265:cont
17266n
17267s/.\{148\}/&'"$ac_delim"'/g
17268t clear
17269:clear
17270s/\\$//
17271t bsnlc
17272s/["\\]/\\&/g; s/^/"/; s/$/"/p
17273d
17274:bsnlc
17275s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17276b cont
17277' <confdefs.h | sed '
17278s/'"$ac_delim"'/"\\\
17279"/g' >>$CONFIG_STATUS || ac_write_fail=1
17280
17281cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17282 for (key in D) D_is_set[key] = 1
17283 FS = ""
17284}
17285/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17286 line = \$ 0
17287 split(line, arg, " ")
17288 if (arg[1] == "#") {
17289 defundef = arg[2]
17290 mac1 = arg[3]
17291 } else {
17292 defundef = substr(arg[1], 2)
17293 mac1 = arg[2]
17294 }
17295 split(mac1, mac2, "(") #)
17296 macro = mac2[1]
17297 prefix = substr(line, 1, index(line, defundef) - 1)
17298 if (D_is_set[macro]) {
17299 # Preserve the white space surrounding the "#".
17300 print prefix "define", macro P[macro] D[macro]
17301 next
17302 } else {
17303 # Replace #undef with comments. This is necessary, for example,
17304 # in the case of _POSIX_SOURCE, which is predefined and required
17305 # on some systems where configure will not decide to define it.
17306 if (defundef == "undef") {
17307 print "/*", prefix defundef, macro, "*/"
17308 next
17309 }
17310 }
17311}
17312{ print }
17313_ACAWK
17314_ACEOF
17315cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017316 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017317fi # test -n "$CONFIG_HEADERS"
17318
17319
17320eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17321shift
17322for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323do
17324 case $ac_tag in
17325 :[FHLC]) ac_mode=$ac_tag; continue;;
17326 esac
17327 case $ac_mode$ac_tag in
17328 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017329 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330 :[FH]-) ac_tag=-:-;;
17331 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17332 esac
17333 ac_save_IFS=$IFS
17334 IFS=:
17335 set x $ac_tag
17336 IFS=$ac_save_IFS
17337 shift
17338 ac_file=$1
17339 shift
17340
17341 case $ac_mode in
17342 :L) ac_source=$1;;
17343 :[FH])
17344 ac_file_inputs=
17345 for ac_f
17346 do
17347 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017348 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 *) # Look for the file first in the build tree, then in the source tree
17350 # (if the path is not absolute). The absolute path cannot be DOS-style,
17351 # because $ac_f cannot contain `:'.
17352 test -f "$ac_f" ||
17353 case $ac_f in
17354 [\\/$]*) false;;
17355 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17356 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017357 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017358 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017359 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17360 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361 done
17362
17363 # Let's still pretend it is `configure' which instantiates (i.e., don't
17364 # use $as_me), people would be surprised to read:
17365 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017366 configure_input='Generated from '`
17367 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17368 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369 if test x"$ac_file" != x-; then
17370 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017371 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17372$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017374 # Neutralize special characters interpreted by sed in replacement strings.
17375 case $configure_input in #(
17376 *\&* | *\|* | *\\* )
17377 ac_sed_conf_input=`$as_echo "$configure_input" |
17378 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17379 *) ac_sed_conf_input=$configure_input;;
17380 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381
17382 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017383 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17384 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 esac
17386 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017387 esac
17388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017390$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017391 X"$ac_file" : 'X\(//\)[^/]' \| \
17392 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017394$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17396 s//\1/
17397 q
17398 }
17399 /^X\(\/\/\)[^/].*/{
17400 s//\1/
17401 q
17402 }
17403 /^X\(\/\/\)$/{
17404 s//\1/
17405 q
17406 }
17407 /^X\(\/\).*/{
17408 s//\1/
17409 q
17410 }
17411 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 ac_builddir=.
17414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415case "$ac_dir" in
17416.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17417*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017420 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 case $ac_top_builddir_sub in
17422 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17423 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17424 esac ;;
17425esac
17426ac_abs_top_builddir=$ac_pwd
17427ac_abs_builddir=$ac_pwd$ac_dir_suffix
17428# for backward compatibility:
17429ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017430
17431case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 ac_top_srcdir=$ac_top_builddir_sub
17435 ac_abs_top_srcdir=$ac_pwd ;;
17436 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438 ac_top_srcdir=$srcdir
17439 ac_abs_top_srcdir=$srcdir ;;
17440 *) # Relative name.
17441 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17442 ac_top_srcdir=$ac_top_build_prefix$srcdir
17443 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017444esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448 case $ac_mode in
17449 :F)
17450 #
17451 # CONFIG_FILE
17452 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017453
17454 case $INSTALL in
17455 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017456 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017458 ac_MKDIR_P=$MKDIR_P
17459 case $MKDIR_P in
17460 [\\/$]* | ?:[\\/]* ) ;;
17461 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17462 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017463_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017464
Matthias Kloseb9621712010-04-24 17:59:49 +000017465cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017466# If the template does not know about datarootdir, expand it.
17467# FIXME: This hack should be removed a few years after 2.60.
17468ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017469ac_sed_dataroot='
17470/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 p
17472 q
17473}
17474/@datadir@/p
17475/@docdir@/p
17476/@infodir@/p
17477/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017478/@mandir@/p'
17479case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480*datarootdir*) ac_datarootdir_seen=yes;;
17481*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17483$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017485cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017486 ac_datarootdir_hack='
17487 s&@datadir@&$datadir&g
17488 s&@docdir@&$docdir&g
17489 s&@infodir@&$infodir&g
17490 s&@localedir@&$localedir&g
17491 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017492 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493esac
17494_ACEOF
17495
17496# Neutralize VPATH when `$srcdir' = `.'.
17497# Shell code in configure.ac might set extrasub.
17498# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017499cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17500ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017501$extrasub
17502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017504:t
17505/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017506s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017508s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509s&@srcdir@&$ac_srcdir&;t t
17510s&@abs_srcdir@&$ac_abs_srcdir&;t t
17511s&@top_srcdir@&$ac_top_srcdir&;t t
17512s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17513s&@builddir@&$ac_builddir&;t t
17514s&@abs_builddir@&$ac_abs_builddir&;t t
17515s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17516s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017517s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017519"
Victor Stinnere0be4232011-10-25 13:06:09 +020017520eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17521 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017524 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17525 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17526 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017527 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017528which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017529$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017530which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017531
Victor Stinnere0be4232011-10-25 13:06:09 +020017532 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017534 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17535 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017536 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017537 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538 ;;
17539 :H)
17540 #
17541 # CONFIG_HEADER
17542 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017543 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017544 {
17545 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017546 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17547 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017548 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017549 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017550 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17551$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017554 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017555 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 fi
17557 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017559 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017560 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564
17565 esac
17566
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017567
17568 case $ac_file$ac_mode in
17569 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17570
17571 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572done # for ac_tag
17573
Guido van Rossum627b2d71993-12-24 10:39:16 +000017574
Matthias Kloseb9621712010-04-24 17:59:49 +000017575as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017576_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017577ac_clean_files=$ac_clean_files_save
17578
Matthias Kloseb9621712010-04-24 17:59:49 +000017579test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017580 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017581
Martin v. Löwis11437992002-04-12 09:54:03 +000017582
17583# configure is writing to config.log, and then calls config.status.
17584# config.status does its own redirection, appending to config.log.
17585# Unfortunately, on DOS this fails, as config.log is still kept open
17586# by configure, so config.status won't be able to write to it; its
17587# output is simply discarded. So we exec the FD to /dev/null,
17588# effectively closing config.log, so it can be properly (re)opened and
17589# appended to by config.status. When coming back to configure, we
17590# need to make the FD available again.
17591if test "$no_create" != yes; then
17592 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017593 ac_config_status_args=
17594 test "$silent" = yes &&
17595 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017597 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 exec 5>>config.log
17599 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17600 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017601 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017602fi
17603if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17605$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017606fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017607
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017608
Christian Heimes75ed8902013-11-20 01:11:18 +010017609echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017610if test ! -f Modules/Setup
17611then
17612 cp $srcdir/Modules/Setup.dist Modules/Setup
17613fi
17614
Christian Heimes75ed8902013-11-20 01:11:18 +010017615echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017616if test ! -f Modules/Setup.local
17617then
17618 echo "# Edit this file for local setup changes" >Modules/Setup.local
17619fi
17620
Christian Heimes75ed8902013-11-20 01:11:18 +010017621echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017622$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17623 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017624 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017625mv config.c Modules