blob: 26837342a48d62dbe09a97fa7b3964585aff990c [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 Panter43a94a72016-07-29 05:52:32 +0000742GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200743PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200744PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100745host_os
746host_vendor
747host_cpu
748host
749build_os
750build_vendor
751build_cpu
752build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500753HAS_HG
754HGBRANCH
755HGTAG
756HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400757BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000758target_alias
759host_alias
760build_alias
761LIBS
762ECHO_T
763ECHO_N
764ECHO_C
765DEFS
766mandir
767localedir
768libdir
769psdir
770pdfdir
771dvidir
772htmldir
773infodir
774docdir
775oldincludedir
776includedir
777localstatedir
778sharedstatedir
779sysconfdir
780datadir
781datarootdir
782libexecdir
783sbindir
784bindir
785program_transform_name
786prefix
787exec_prefix
788PACKAGE_URL
789PACKAGE_BUGREPORT
790PACKAGE_STRING
791PACKAGE_VERSION
792PACKAGE_TARNAME
793PACKAGE_NAME
794PATH_SEPARATOR
795SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000796ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000797ac_user_opts='
798enable_option_checking
799enable_universalsdk
800with_universal_archs
801with_framework_name
802enable_framework
803with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600804with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_cxx_main
806with_suffix
807enable_shared
808enable_profiling
809with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700810with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100811with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100812with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_libs
814with_system_expat
815with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100816with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000817enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700818with_tcltk_includes
819with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_dbmliborder
821with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_threads
823with_thread
824enable_ipv6
825with_doc_strings
826with_tsc
827with_pymalloc
828with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_fpectl
830with_libm
831with_libc
832enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800834with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000835'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836 ac_precious_vars='build_alias
837host_alias
838target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100839MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840CC
841CFLAGS
842LDFLAGS
843LIBS
844CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100845CPP
846PKG_CONFIG
847PKG_CONFIG_PATH
848PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000852ac_init_help=
853ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000854ac_unrecognized_opts=
855ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856# The variables have the same names as the options, with
857# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861no_recursion=
862prefix=NONE
863program_prefix=NONE
864program_suffix=NONE
865program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870x_includes=NONE
871x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000872
873# Installation directory options.
874# These are left unexpanded so users can "make install exec_prefix=/foo"
875# and all the variables that are supposed to be based on exec_prefix
876# by default will actually change.
877# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879bindir='${exec_prefix}/bin'
880sbindir='${exec_prefix}/sbin'
881libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882datarootdir='${prefix}/share'
883datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884sysconfdir='${prefix}/etc'
885sharedstatedir='${prefix}/com'
886localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887includedir='${prefix}/include'
888oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
890infodir='${datarootdir}/info'
891htmldir='${docdir}'
892dvidir='${docdir}'
893pdfdir='${docdir}'
894psdir='${docdir}'
895libdir='${exec_prefix}/lib'
896localedir='${datarootdir}/locale'
897mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000898
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000902do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 # If the previous option needs an argument, assign it.
904 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000905 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 ac_prev=
907 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200911 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
912 *=) ac_optarg= ;;
913 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000916 # Accept the important Cygnus configure options, so we can diagnose typos.
917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 case $ac_dashdash$ac_option in
919 --)
920 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922 -bindir | --bindir | --bindi | --bind | --bin | --bi)
923 ac_prev=bindir ;;
924 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926
927 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 -cache-file | --cache-file | --cache-fil | --cache-fi \
933 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
934 ac_prev=cache_file ;;
935 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
936 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 cache_file=$ac_optarg ;;
938
939 --config-cache | -C)
940 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000942 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
948 | --dataroo | --dataro | --datar)
949 ac_prev=datarootdir ;;
950 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
951 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
952 datarootdir=$ac_optarg ;;
953
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200958 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt_orig=$ac_useropt
960 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
961 case $ac_user_opts in
962 *"
963"enable_$ac_useropt"
964"*) ;;
965 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
966 ac_unrecognized_sep=', ';;
967 esac
968 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000969
970 -docdir | --docdir | --docdi | --doc | --do)
971 ac_prev=docdir ;;
972 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
973 docdir=$ac_optarg ;;
974
975 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
976 ac_prev=dvidir ;;
977 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
978 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000981 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200984 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 ac_useropt_orig=$ac_useropt
986 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
987 case $ac_user_opts in
988 *"
989"enable_$ac_useropt"
990"*) ;;
991 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
992 ac_unrecognized_sep=', ';;
993 esac
994 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
997 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
998 | --exec | --exe | --ex)
999 ac_prev=exec_prefix ;;
1000 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1001 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1002 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
1005 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001006 # Obsolete; use --with-gas.
1007 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 -help | --help | --hel | --he | -h)
1010 ac_init_help=long ;;
1011 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1012 ac_init_help=recursive ;;
1013 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1014 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001021 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1022 ac_prev=htmldir ;;
1023 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1024 | --ht=*)
1025 htmldir=$ac_optarg ;;
1026
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001027 -includedir | --includedir | --includedi | --included | --include \
1028 | --includ | --inclu | --incl | --inc)
1029 ac_prev=includedir ;;
1030 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1031 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -infodir | --infodir | --infodi | --infod | --info | --inf)
1035 ac_prev=infodir ;;
1036 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -libdir | --libdir | --libdi | --libd)
1040 ac_prev=libdir ;;
1041 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1045 | --libexe | --libex | --libe)
1046 ac_prev=libexecdir ;;
1047 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1048 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001051 -localedir | --localedir | --localedi | --localed | --locale)
1052 ac_prev=localedir ;;
1053 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1054 localedir=$ac_optarg ;;
1055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 ac_prev=localstatedir ;;
1059 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
1063 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1064 ac_prev=mandir ;;
1065 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 # Obsolete; use --without-fp.
1070 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 no_create=yes ;;
1075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1077 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1078 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1081 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1082 | --oldin | --oldi | --old | --ol | --o)
1083 ac_prev=oldincludedir ;;
1084 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1085 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1086 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1090 ac_prev=prefix ;;
1091 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1095 | --program-pre | --program-pr | --program-p)
1096 ac_prev=program_prefix ;;
1097 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1098 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1102 | --program-suf | --program-su | --program-s)
1103 ac_prev=program_suffix ;;
1104 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1105 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-transform-name | --program-transform-name \
1109 | --program-transform-nam | --program-transform-na \
1110 | --program-transform-n | --program-transform- \
1111 | --program-transform | --program-transfor \
1112 | --program-transfo | --program-transf \
1113 | --program-trans | --program-tran \
1114 | --progr-tra | --program-tr | --program-t)
1115 ac_prev=program_transform_name ;;
1116 -program-transform-name=* | --program-transform-name=* \
1117 | --program-transform-nam=* | --program-transform-na=* \
1118 | --program-transform-n=* | --program-transform-=* \
1119 | --program-transform=* | --program-transfor=* \
1120 | --program-transfo=* | --program-transf=* \
1121 | --program-trans=* | --program-tran=* \
1122 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001125 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1126 ac_prev=pdfdir ;;
1127 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1128 pdfdir=$ac_optarg ;;
1129
1130 -psdir | --psdir | --psdi | --psd | --ps)
1131 ac_prev=psdir ;;
1132 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1133 psdir=$ac_optarg ;;
1134
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1136 | -silent | --silent | --silen | --sile | --sil)
1137 silent=yes ;;
1138
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001139 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1140 ac_prev=sbindir ;;
1141 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1142 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144
1145 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1146 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1147 | --sharedst | --shareds | --shared | --share | --shar \
1148 | --sha | --sh)
1149 ac_prev=sharedstatedir ;;
1150 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1151 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1152 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1153 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 -site | --site | --sit)
1157 ac_prev=site ;;
1158 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1162 ac_prev=srcdir ;;
1163 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1167 | --syscon | --sysco | --sysc | --sys | --sy)
1168 ac_prev=sysconfdir ;;
1169 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1170 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1179 verbose=yes ;;
1180
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 -version | --version | --versio | --versi | --vers | -V)
1182 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001185 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001188 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt_orig=$ac_useropt
1190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1191 case $ac_user_opts in
1192 *"
1193"with_$ac_useropt"
1194"*) ;;
1195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1196 ac_unrecognized_sep=', ';;
1197 esac
1198 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001216 --x)
1217 # Obsolete; use --with-x.
1218 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
1220 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1221 | --x-incl | --x-inc | --x-in | --x-i)
1222 ac_prev=x_includes ;;
1223 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1224 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
1227 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1228 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1229 ac_prev=x_libraries ;;
1230 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1231 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001234 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1235Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236 ;;
1237
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 *=*)
1239 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1240 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001241 case $ac_envvar in #(
1242 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001243 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 export $ac_envvar ;;
1247
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001248 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001250 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001253 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254 ;;
1255
1256 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257done
1258
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001261 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262fi
1263
Matthias Kloseb9621712010-04-24 17:59:49 +00001264if test -n "$ac_unrecognized_opts"; then
1265 case $enable_option_checking in
1266 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001267 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1269 esac
1270fi
1271
1272# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001273for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1274 datadir sysconfdir sharedstatedir localstatedir includedir \
1275 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Xavier de Gayefd0d5932016-07-26 12:48:08 +02001276 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001277do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 # Remove trailing slashes.
1280 case $ac_val in
1281 */ )
1282 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1283 eval $ac_var=\$ac_val;;
1284 esac
1285 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001286 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287 [\\/$]* | ?:[\\/]* ) continue;;
1288 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001289 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001291done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Martin v. Löwis11437992002-04-12 09:54:03 +00001293# There might be people who depend on the old broken behavior: `$host'
1294# used to hold the argument of --host etc.
1295# FIXME: To remove some day.
1296build=$build_alias
1297host=$host_alias
1298target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299
Martin v. Löwis11437992002-04-12 09:54:03 +00001300# FIXME: To remove some day.
1301if test "x$host_alias" != x; then
1302 if test "x$build_alias" = x; then
1303 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001304 elif test "x$build_alias" != "x$host_alias"; then
1305 cross_compiling=yes
1306 fi
1307fi
1308
1309ac_tool_prefix=
1310test -n "$host_alias" && ac_tool_prefix=$host_alias-
1311
1312test "$silent" = yes && exec 6>/dev/null
1313
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315ac_pwd=`pwd` && test -n "$ac_pwd" &&
1316ac_ls_di=`ls -di .` &&
1317ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001318 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001320 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321
1322
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323# Find the source files, if location was not specified.
1324if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001325 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001327 ac_confdir=`$as_dirname -- "$as_myself" ||
1328$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1329 X"$as_myself" : 'X\(//\)[^/]' \| \
1330 X"$as_myself" : 'X\(//\)$' \| \
1331 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1332$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)[^/].*/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\).*/{
1346 s//\1/
1347 q
1348 }
1349 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001350 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352 srcdir=..
1353 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354else
1355 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001357if test ! -r "$srcdir/$ac_unique_file"; then
1358 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001359 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1362ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001363 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 pwd)`
1365# When building in place, set srcdir=.
1366if test "$ac_abs_confdir" = "$ac_pwd"; then
1367 srcdir=.
1368fi
1369# Remove unnecessary trailing slashes from srcdir.
1370# Double slashes in file names in object file debugging info
1371# mess up M-x gdb in Emacs.
1372case $srcdir in
1373*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1374esac
1375for ac_var in $ac_precious_vars; do
1376 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1377 eval ac_env_${ac_var}_value=\$${ac_var}
1378 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1380done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001381
Martin v. Löwis11437992002-04-12 09:54:03 +00001382#
1383# Report the --help message.
1384#
1385if test "$ac_init_help" = "long"; then
1386 # Omit some internal or obsolete options to make the list less imposing.
1387 # This message is too long to be a string in the A/UX 3.1 sh.
1388 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001389\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390
1391Usage: $0 [OPTION]... [VAR=VALUE]...
1392
1393To assign environment variables (e.g., CC, CFLAGS...), specify them as
1394VAR=VALUE. See below for descriptions of some of the useful variables.
1395
1396Defaults for the options are specified in brackets.
1397
1398Configuration:
1399 -h, --help display this help and exit
1400 --help=short display options specific to this package
1401 --help=recursive display the short help of all the included packages
1402 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001403 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 --cache-file=FILE cache test results in FILE [disabled]
1405 -C, --config-cache alias for \`--cache-file=config.cache'
1406 -n, --no-create do not create output files
1407 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1408
Martin v. Löwis11437992002-04-12 09:54:03 +00001409Installation directories:
1410 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001411 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414
1415By default, \`make install' will install all the files in
1416\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1417an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1418for instance \`--prefix=\$HOME'.
1419
1420For better control, use the options below.
1421
1422Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 --bindir=DIR user executables [EPREFIX/bin]
1424 --sbindir=DIR system admin executables [EPREFIX/sbin]
1425 --libexecdir=DIR program executables [EPREFIX/libexec]
1426 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1427 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1428 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1429 --libdir=DIR object code libraries [EPREFIX/lib]
1430 --includedir=DIR C header files [PREFIX/include]
1431 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1432 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1433 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1434 --infodir=DIR info documentation [DATAROOTDIR/info]
1435 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1436 --mandir=DIR man documentation [DATAROOTDIR/man]
1437 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1438 --htmldir=DIR html documentation [DOCDIR]
1439 --dvidir=DIR dvi documentation [DOCDIR]
1440 --pdfdir=DIR pdf documentation [DOCDIR]
1441 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001442_ACEOF
1443
1444 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001445
1446System types:
1447 --build=BUILD configure for building on BUILD [guessed]
1448 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001449_ACEOF
1450fi
1451
1452if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001453 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001454 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001455 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001456 cat <<\_ACEOF
1457
1458Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001459 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1461 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001462 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001463 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001464 --enable-framework[=INSTALLDIR]
1465 Build (MacOSX|Darwin) framework
1466 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001467 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001468 --enable-loadable-sqlite-extensions
1469 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --enable-ipv6 Enable ipv6 (with ipv4) support
1471 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001472 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
1475Optional Packages:
1476 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1477 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001478 --with-universal-archs=ARCH
1479 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001480 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001481 --with-framework-name=FRAMEWORK
1482 specify an alternate name of the framework built
1483 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001485 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001486 --with-cxx-main=<compiler>
1487 compile main() and link python executable with C++
1488 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-suffix=.exe set executable suffix
1490 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001491 --with-lto Enable Link Time Optimization in PGO builds.
1492 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001493 --with-hash-algorithm=[fnv|siphash24]
1494 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001495 --with-address-sanitizer
1496 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001498 --with-system-expat build pyexpat module using an installed expat
1499 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001500 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001501 --with-system-libmpdec build _decimal module using an installed libmpdec
1502 library
Ned Deilyd819b932013-09-06 01:07:05 -07001503 --with-tcltk-includes='-I...'
1504 override search for Tcl and Tk include files
1505 --with-tcltk-libs='-L...'
1506 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001507 --with-dbmliborder=db1:db2:...
1508 order to check db backends for dbm. Valid value is a
1509 colon separated string with the backend names
1510 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001511 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with(out)-threads[=DIRECTORY]
1513 disable/enable thread support
1514 --with(out)-thread[=DIRECTORY]
1515 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001517 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001519 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with-fpectl enable SIGFPE catching
1521 --with-libm=STRING math library
1522 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001523 --with(out)-computed-gotos
1524 Use computed gotos in evaluation loop (enabled by
1525 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001526 --with(out)-ensurepip=[=upgrade]
1527 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001528
1529Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001530 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001531 CC C compiler command
1532 CFLAGS C compiler flags
1533 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1534 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001536 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001539 PKG_CONFIG path to pkg-config utility
1540 PKG_CONFIG_PATH
1541 directories to add to pkg-config's search path
1542 PKG_CONFIG_LIBDIR
1543 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001544
1545Use these variables to override the choices made by `configure' or to help
1546it to find libraries and programs with nonstandard names/locations.
1547
Georg Brandle2e15612009-05-20 18:25:10 +00001548Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001549_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001551fi
1552
1553if test "$ac_init_help" = "recursive"; then
1554 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 test -d "$ac_dir" ||
1557 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1558 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 ac_builddir=.
1560
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561case "$ac_dir" in
1562.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1563*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001564 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 case $ac_top_builddir_sub in
1568 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1569 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1570 esac ;;
1571esac
1572ac_abs_top_builddir=$ac_pwd
1573ac_abs_builddir=$ac_pwd$ac_dir_suffix
1574# for backward compatibility:
1575ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001576
1577case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 ac_top_srcdir=$ac_top_builddir_sub
1581 ac_abs_top_srcdir=$ac_pwd ;;
1582 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 ac_top_srcdir=$srcdir
1585 ac_abs_top_srcdir=$srcdir ;;
1586 *) # Relative name.
1587 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1588 ac_top_srcdir=$ac_top_build_prefix$srcdir
1589 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001590esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 cd "$ac_dir" || { ac_status=$?; continue; }
1594 # Check for guested configure.
1595 if test -f "$ac_srcdir/configure.gnu"; then
1596 echo &&
1597 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1598 elif test -f "$ac_srcdir/configure"; then
1599 echo &&
1600 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001602 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 fi || ac_status=$?
1604 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 done
1606fi
1607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001609if $ac_init_version; then
1610 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001611python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001612generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001613
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001614Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615This configure script is free software; the Free Software Foundation
1616gives unlimited permission to copy, distribute and modify it.
1617_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001620
1621## ------------------------ ##
1622## Autoconf initialization. ##
1623## ------------------------ ##
1624
1625# ac_fn_c_try_compile LINENO
1626# --------------------------
1627# Try to compile conftest.$ac_ext, and return whether this succeeded.
1628ac_fn_c_try_compile ()
1629{
1630 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631 rm -f conftest.$ac_objext
1632 if { { ac_try="$ac_compile"
1633case "(($ac_try" in
1634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635 *) ac_try_echo=$ac_try;;
1636esac
1637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638$as_echo "$ac_try_echo"; } >&5
1639 (eval "$ac_compile") 2>conftest.err
1640 ac_status=$?
1641 if test -s conftest.err; then
1642 grep -v '^ *+' conftest.err >conftest.er1
1643 cat conftest.er1 >&5
1644 mv -f conftest.er1 conftest.err
1645 fi
1646 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647 test $ac_status = 0; } && {
1648 test -z "$ac_c_werror_flag" ||
1649 test ! -s conftest.err
1650 } && test -s conftest.$ac_objext; then :
1651 ac_retval=0
1652else
1653 $as_echo "$as_me: failed program was:" >&5
1654sed 's/^/| /' conftest.$ac_ext >&5
1655
1656 ac_retval=1
1657fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001658 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 as_fn_set_status $ac_retval
1660
1661} # ac_fn_c_try_compile
1662
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001663# ac_fn_c_try_cpp LINENO
1664# ----------------------
1665# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1666ac_fn_c_try_cpp ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669 if { { ac_try="$ac_cpp conftest.$ac_ext"
1670case "(($ac_try" in
1671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1672 *) ac_try_echo=$ac_try;;
1673esac
1674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1675$as_echo "$ac_try_echo"; } >&5
1676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1677 ac_status=$?
1678 if test -s conftest.err; then
1679 grep -v '^ *+' conftest.err >conftest.er1
1680 cat conftest.er1 >&5
1681 mv -f conftest.er1 conftest.err
1682 fi
1683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1684 test $ac_status = 0; } > conftest.i && {
1685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1686 test ! -s conftest.err
1687 }; then :
1688 ac_retval=0
1689else
1690 $as_echo "$as_me: failed program was:" >&5
1691sed 's/^/| /' conftest.$ac_ext >&5
1692
1693 ac_retval=1
1694fi
1695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1696 as_fn_set_status $ac_retval
1697
1698} # ac_fn_c_try_cpp
1699
Matthias Kloseb9621712010-04-24 17:59:49 +00001700# ac_fn_c_try_link LINENO
1701# -----------------------
1702# Try to link conftest.$ac_ext, and return whether this succeeded.
1703ac_fn_c_try_link ()
1704{
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1706 rm -f conftest.$ac_objext conftest$ac_exeext
1707 if { { ac_try="$ac_link"
1708case "(($ac_try" in
1709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1710 *) ac_try_echo=$ac_try;;
1711esac
1712eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1713$as_echo "$ac_try_echo"; } >&5
1714 (eval "$ac_link") 2>conftest.err
1715 ac_status=$?
1716 if test -s conftest.err; then
1717 grep -v '^ *+' conftest.err >conftest.er1
1718 cat conftest.er1 >&5
1719 mv -f conftest.er1 conftest.err
1720 fi
1721 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1722 test $ac_status = 0; } && {
1723 test -z "$ac_c_werror_flag" ||
1724 test ! -s conftest.err
1725 } && test -s conftest$ac_exeext && {
1726 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001727 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001728 }; then :
1729 ac_retval=0
1730else
1731 $as_echo "$as_me: failed program was:" >&5
1732sed 's/^/| /' conftest.$ac_ext >&5
1733
1734 ac_retval=1
1735fi
1736 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1737 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1738 # interfere with the next link command; also delete a directory that is
1739 # left behind by Apple's compiler. We do this before executing the actions.
1740 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001742 as_fn_set_status $ac_retval
1743
1744} # ac_fn_c_try_link
1745
Matthias Kloseb9621712010-04-24 17:59:49 +00001746# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1747# -------------------------------------------------------
1748# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1749# the include files in INCLUDES and setting the cache variable VAR
1750# accordingly.
1751ac_fn_c_check_header_mongrel ()
1752{
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1756$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001757if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001758 $as_echo_n "(cached) " >&6
1759fi
1760eval ac_res=\$$3
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1762$as_echo "$ac_res" >&6; }
1763else
1764 # Is the header compilable?
1765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1766$as_echo_n "checking $2 usability... " >&6; }
1767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1768/* end confdefs.h. */
1769$4
1770#include <$2>
1771_ACEOF
1772if ac_fn_c_try_compile "$LINENO"; then :
1773 ac_header_compiler=yes
1774else
1775 ac_header_compiler=no
1776fi
1777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1779$as_echo "$ac_header_compiler" >&6; }
1780
1781# Is the header present?
1782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1783$as_echo_n "checking $2 presence... " >&6; }
1784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1785/* end confdefs.h. */
1786#include <$2>
1787_ACEOF
1788if ac_fn_c_try_cpp "$LINENO"; then :
1789 ac_header_preproc=yes
1790else
1791 ac_header_preproc=no
1792fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001793rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1795$as_echo "$ac_header_preproc" >&6; }
1796
1797# So? What about this header?
1798case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1799 yes:no: )
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1801$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1803$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1804 ;;
1805 no:yes:* )
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1807$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1809$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1811$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1813$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1815$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001817## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001818## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001819 ) | sed "s/^/$as_me: WARNING: /" >&2
1820 ;;
1821esac
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1823$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001824if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 $as_echo_n "(cached) " >&6
1826else
1827 eval "$3=\$ac_header_compiler"
1828fi
1829eval ac_res=\$$3
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1831$as_echo "$ac_res" >&6; }
1832fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001834
1835} # ac_fn_c_check_header_mongrel
1836
1837# ac_fn_c_try_run LINENO
1838# ----------------------
1839# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1840# that executables *can* be run.
1841ac_fn_c_try_run ()
1842{
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 if { { ac_try="$ac_link"
1845case "(($ac_try" in
1846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1847 *) ac_try_echo=$ac_try;;
1848esac
1849eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1850$as_echo "$ac_try_echo"; } >&5
1851 (eval "$ac_link") 2>&5
1852 ac_status=$?
1853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1854 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1855 { { case "(($ac_try" in
1856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1857 *) ac_try_echo=$ac_try;;
1858esac
1859eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1860$as_echo "$ac_try_echo"; } >&5
1861 (eval "$ac_try") 2>&5
1862 ac_status=$?
1863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864 test $ac_status = 0; }; }; then :
1865 ac_retval=0
1866else
1867 $as_echo "$as_me: program exited with status $ac_status" >&5
1868 $as_echo "$as_me: failed program was:" >&5
1869sed 's/^/| /' conftest.$ac_ext >&5
1870
1871 ac_retval=$ac_status
1872fi
1873 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001874 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001875 as_fn_set_status $ac_retval
1876
1877} # ac_fn_c_try_run
1878
1879# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1880# -------------------------------------------------------
1881# Tests whether HEADER exists and can be compiled using the include files in
1882# INCLUDES, setting the cache variable VAR accordingly.
1883ac_fn_c_check_header_compile ()
1884{
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001888if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001889 $as_echo_n "(cached) " >&6
1890else
1891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1892/* end confdefs.h. */
1893$4
1894#include <$2>
1895_ACEOF
1896if ac_fn_c_try_compile "$LINENO"; then :
1897 eval "$3=yes"
1898else
1899 eval "$3=no"
1900fi
1901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1902fi
1903eval ac_res=\$$3
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1905$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001907
1908} # ac_fn_c_check_header_compile
1909
Matthias Kloseb9621712010-04-24 17:59:49 +00001910# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1911# -------------------------------------------
1912# Tests whether TYPE exists after having included INCLUDES, setting cache
1913# variable VAR accordingly.
1914ac_fn_c_check_type ()
1915{
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001920 $as_echo_n "(cached) " >&6
1921else
1922 eval "$3=no"
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924/* end confdefs.h. */
1925$4
1926int
1927main ()
1928{
1929if (sizeof ($2))
1930 return 0;
1931 ;
1932 return 0;
1933}
1934_ACEOF
1935if ac_fn_c_try_compile "$LINENO"; then :
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof (($2)))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949
1950else
1951 eval "$3=yes"
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954fi
1955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1956fi
1957eval ac_res=\$$3
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1959$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001960 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001961
1962} # ac_fn_c_check_type
1963
1964# ac_fn_c_find_uintX_t LINENO BITS VAR
1965# ------------------------------------
1966# Finds an unsigned integer type with width BITS, setting cache variable VAR
1967# accordingly.
1968ac_fn_c_find_uintX_t ()
1969{
1970 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1972$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001974 $as_echo_n "(cached) " >&6
1975else
1976 eval "$3=no"
1977 # Order is important - never check a type that is potentially smaller
1978 # than half of the expected target width.
1979 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1980 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982/* end confdefs.h. */
1983$ac_includes_default
1984int
1985main ()
1986{
1987static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001988test_array [0] = 0;
1989return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001990
1991 ;
1992 return 0;
1993}
1994_ACEOF
1995if ac_fn_c_try_compile "$LINENO"; then :
1996 case $ac_type in #(
1997 uint$2_t) :
1998 eval "$3=yes" ;; #(
1999 *) :
2000 eval "$3=\$ac_type" ;;
2001esac
2002fi
2003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002004 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006else
2007 break
2008fi
2009 done
2010fi
2011eval ac_res=\$$3
2012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2013$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002014 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002015
2016} # ac_fn_c_find_uintX_t
2017
2018# ac_fn_c_find_intX_t LINENO BITS VAR
2019# -----------------------------------
2020# Finds a signed integer type with width BITS, setting cache variable VAR
2021# accordingly.
2022ac_fn_c_find_intX_t ()
2023{
2024 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2026$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002027if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002028 $as_echo_n "(cached) " >&6
2029else
2030 eval "$3=no"
2031 # Order is important - never check a type that is potentially smaller
2032 # than half of the expected target width.
2033 for ac_type in int$2_t 'int' 'long int' \
2034 'long long int' 'short int' 'signed char'; do
2035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h. */
2037$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002038 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002039int
2040main ()
2041{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002042static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2052/* end confdefs.h. */
2053$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002054 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002055int
2056main ()
2057{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002058static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002059 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068
2069else
2070 case $ac_type in #(
2071 int$2_t) :
2072 eval "$3=yes" ;; #(
2073 *) :
2074 eval "$3=\$ac_type" ;;
2075esac
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002080 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002081
2082else
2083 break
2084fi
2085 done
2086fi
2087eval ac_res=\$$3
2088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2089$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002090 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002091
2092} # ac_fn_c_find_intX_t
2093
2094# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2095# --------------------------------------------
2096# Tries to find the compile-time value of EXPR in a program that includes
2097# INCLUDES, setting VAR accordingly. Returns whether the value could be
2098# computed
2099ac_fn_c_compute_int ()
2100{
2101 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2102 if test "$cross_compiling" = yes; then
2103 # Depending upon the size, compute the lo and hi bounds.
2104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h. */
2106$4
2107int
2108main ()
2109{
2110static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002111test_array [0] = 0;
2112return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002113
2114 ;
2115 return 0;
2116}
2117_ACEOF
2118if ac_fn_c_try_compile "$LINENO"; then :
2119 ac_lo=0 ac_mid=0
2120 while :; do
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124int
2125main ()
2126{
2127static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002128test_array [0] = 0;
2129return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002130
2131 ;
2132 return 0;
2133}
2134_ACEOF
2135if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=$ac_mid; break
2137else
2138 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2139 if test $ac_lo -le $ac_mid; then
2140 ac_lo= ac_hi=
2141 break
2142 fi
2143 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146 done
2147else
2148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2149/* end confdefs.h. */
2150$4
2151int
2152main ()
2153{
2154static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002155test_array [0] = 0;
2156return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002157
2158 ;
2159 return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163 ac_hi=-1 ac_mid=-1
2164 while :; do
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166/* end confdefs.h. */
2167$4
2168int
2169main ()
2170{
2171static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002172test_array [0] = 0;
2173return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002174
2175 ;
2176 return 0;
2177}
2178_ACEOF
2179if ac_fn_c_try_compile "$LINENO"; then :
2180 ac_lo=$ac_mid; break
2181else
2182 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2183 if test $ac_mid -le $ac_hi; then
2184 ac_lo= ac_hi=
2185 break
2186 fi
2187 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2188fi
2189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2190 done
2191else
2192 ac_lo= ac_hi=
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197# Binary search between lo and hi bounds.
2198while test "x$ac_lo" != "x$ac_hi"; do
2199 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2201/* end confdefs.h. */
2202$4
2203int
2204main ()
2205{
2206static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002207test_array [0] = 0;
2208return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002209
2210 ;
2211 return 0;
2212}
2213_ACEOF
2214if ac_fn_c_try_compile "$LINENO"; then :
2215 ac_hi=$ac_mid
2216else
2217 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2218fi
2219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220done
2221case $ac_lo in #((
2222?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2223'') ac_retval=1 ;;
2224esac
2225 else
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h. */
2228$4
2229static long int longval () { return $2; }
2230static unsigned long int ulongval () { return $2; }
2231#include <stdio.h>
2232#include <stdlib.h>
2233int
2234main ()
2235{
2236
2237 FILE *f = fopen ("conftest.val", "w");
2238 if (! f)
2239 return 1;
2240 if (($2) < 0)
2241 {
2242 long int i = longval ();
2243 if (i != ($2))
2244 return 1;
2245 fprintf (f, "%ld", i);
2246 }
2247 else
2248 {
2249 unsigned long int i = ulongval ();
2250 if (i != ($2))
2251 return 1;
2252 fprintf (f, "%lu", i);
2253 }
2254 /* Do not output a trailing newline, as this causes \r\n confusion
2255 on some platforms. */
2256 return ferror (f) || fclose (f) != 0;
2257
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262if ac_fn_c_try_run "$LINENO"; then :
2263 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2264else
2265 ac_retval=1
2266fi
2267rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2268 conftest.$ac_objext conftest.beam conftest.$ac_ext
2269rm -f conftest.val
2270
2271 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002272 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002273 as_fn_set_status $ac_retval
2274
2275} # ac_fn_c_compute_int
2276
2277# ac_fn_c_check_func LINENO FUNC VAR
2278# ----------------------------------
2279# Tests whether FUNC exists, setting the cache variable VAR accordingly
2280ac_fn_c_check_func ()
2281{
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2284$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002285if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 $as_echo_n "(cached) " >&6
2287else
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h. */
2290/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2292#define $2 innocuous_$2
2293
2294/* System header to define __stub macros and hopefully few prototypes,
2295 which can conflict with char $2 (); below.
2296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2297 <limits.h> exists even on freestanding compilers. */
2298
2299#ifdef __STDC__
2300# include <limits.h>
2301#else
2302# include <assert.h>
2303#endif
2304
2305#undef $2
2306
2307/* Override any GCC internal prototype to avoid an error.
2308 Use char because int might match the return type of a GCC
2309 builtin and then its argument prototype would still apply. */
2310#ifdef __cplusplus
2311extern "C"
2312#endif
2313char $2 ();
2314/* The GNU C library defines this for functions which it implements
2315 to always fail with ENOSYS. Some functions are actually named
2316 something starting with __ and the normal name is an alias. */
2317#if defined __stub_$2 || defined __stub___$2
2318choke me
2319#endif
2320
2321int
2322main ()
2323{
2324return $2 ();
2325 ;
2326 return 0;
2327}
2328_ACEOF
2329if ac_fn_c_try_link "$LINENO"; then :
2330 eval "$3=yes"
2331else
2332 eval "$3=no"
2333fi
2334rm -f core conftest.err conftest.$ac_objext \
2335 conftest$ac_exeext conftest.$ac_ext
2336fi
2337eval ac_res=\$$3
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002341
2342} # ac_fn_c_check_func
2343
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002344# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2345# ---------------------------------------------
2346# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2347# accordingly.
2348ac_fn_c_check_decl ()
2349{
2350 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351 as_decl_name=`echo $2|sed 's/ *(.*//'`
2352 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2354$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2355if eval \${$3+:} false; then :
2356 $as_echo_n "(cached) " >&6
2357else
2358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2359/* end confdefs.h. */
2360$4
2361int
2362main ()
2363{
2364#ifndef $as_decl_name
2365#ifdef __cplusplus
2366 (void) $as_decl_use;
2367#else
2368 (void) $as_decl_name;
2369#endif
2370#endif
2371
2372 ;
2373 return 0;
2374}
2375_ACEOF
2376if ac_fn_c_try_compile "$LINENO"; then :
2377 eval "$3=yes"
2378else
2379 eval "$3=no"
2380fi
2381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2382fi
2383eval ac_res=\$$3
2384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2385$as_echo "$ac_res" >&6; }
2386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387
2388} # ac_fn_c_check_decl
2389
Matthias Kloseb9621712010-04-24 17:59:49 +00002390# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2391# ----------------------------------------------------
2392# Tries to find if the field MEMBER exists in type AGGR, after including
2393# INCLUDES, setting cache variable VAR accordingly.
2394ac_fn_c_check_member ()
2395{
2396 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2398$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002399if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002400 $as_echo_n "(cached) " >&6
2401else
2402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403/* end confdefs.h. */
2404$5
2405int
2406main ()
2407{
2408static $2 ac_aggr;
2409if (ac_aggr.$3)
2410return 0;
2411 ;
2412 return 0;
2413}
2414_ACEOF
2415if ac_fn_c_try_compile "$LINENO"; then :
2416 eval "$4=yes"
2417else
2418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2419/* end confdefs.h. */
2420$5
2421int
2422main ()
2423{
2424static $2 ac_aggr;
2425if (sizeof ac_aggr.$3)
2426return 0;
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
2432 eval "$4=yes"
2433else
2434 eval "$4=no"
2435fi
2436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440eval ac_res=\$$4
2441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2442$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002443 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002444
2445} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002447This file contains any messages produced by compilers while
2448running configure, to aid debugging if configure makes a mistake.
2449
Yury Selivanov7aa53412015-05-30 10:57:56 -04002450It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002451generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453 $ $0 $@
2454
2455_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002457{
2458cat <<_ASUNAME
2459## --------- ##
2460## Platform. ##
2461## --------- ##
2462
2463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2464uname -m = `(uname -m) 2>/dev/null || echo unknown`
2465uname -r = `(uname -r) 2>/dev/null || echo unknown`
2466uname -s = `(uname -s) 2>/dev/null || echo unknown`
2467uname -v = `(uname -v) 2>/dev/null || echo unknown`
2468
2469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2471
2472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2479
2480_ASUNAME
2481
2482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2483for as_dir in $PATH
2484do
2485 IFS=$as_save_IFS
2486 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 $as_echo "PATH: $as_dir"
2488 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002490
2491} >&5
2492
2493cat >&5 <<_ACEOF
2494
2495
2496## ----------- ##
2497## Core tests. ##
2498## ----------- ##
2499
2500_ACEOF
2501
2502
2503# Keep a trace of the command line.
2504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002509ac_configure_args0=
2510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002511ac_must_keep_next=false
2512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002513do
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 for ac_arg
2515 do
2516 case $ac_arg in
2517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2519 | -silent | --silent | --silen | --sile | --sil)
2520 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002522 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 esac
2524 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002531 case $ac_arg in
2532 *=* | --config-cache | -C | -disable-* | --disable-* \
2533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2535 | -with-* | --with-* | -without-* | --without-* | --x)
2536 case "$ac_configure_args0 " in
2537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2538 esac
2539 ;;
2540 -* ) ac_must_keep_next=true ;;
2541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002543 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 ;;
2545 esac
2546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002547done
Matthias Kloseb9621712010-04-24 17:59:49 +00002548{ ac_configure_args0=; unset ac_configure_args0;}
2549{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002550
2551# When interrupted or exit'd, cleanup temporary files, and complete
2552# config.log. We remove comments because anyway the quotes in there
2553# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554# WARNING: Use '\'' to represent an apostrophe within the trap.
2555# 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 +00002556trap 'exit_status=$?
2557 # Save into config.log some information that might help in debugging.
2558 {
2559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002562## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 echo
2565 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002566(
2567 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2568 eval ac_val=\$$ac_var
2569 case $ac_val in #(
2570 *${as_nl}*)
2571 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002572 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2573$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574 esac
2575 case $ac_var in #(
2576 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002577 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2578 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579 esac ;;
2580 esac
2581 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2584 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 "s/'\''/'\''\\\\'\'''\''/g;
2587 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2588 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002589 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002591 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 esac |
2593 sort
2594)
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002596
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002598## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002600 echo
2601 for ac_var in $ac_subst_vars
2602 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 eval ac_val=\$$ac_var
2604 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002608 done | sort
2609 echo
2610
2611 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002615 echo
2616 for ac_var in $ac_subst_files
2617 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002618 eval ac_val=\$$ac_var
2619 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002623 done | sort
2624 echo
2625 fi
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002628 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002629## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002630## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 echo
2634 fi
2635 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 $as_echo "$as_me: caught signal $ac_signal"
2637 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002639 rm -f core *.core core.conftest.* &&
2640 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002643for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002645done
2646ac_signal=0
2647
2648# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002649rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002650
Matthias Kloseb9621712010-04-24 17:59:49 +00002651$as_echo "/* confdefs.h */" > confdefs.h
2652
Martin v. Löwis11437992002-04-12 09:54:03 +00002653# Predefined preprocessor variables.
2654
2655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_NAME "$PACKAGE_NAME"
2657_ACEOF
2658
Martin v. Löwis11437992002-04-12 09:54:03 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2661_ACEOF
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663cat >>confdefs.h <<_ACEOF
2664#define PACKAGE_VERSION "$PACKAGE_VERSION"
2665_ACEOF
2666
Martin v. Löwis11437992002-04-12 09:54:03 +00002667cat >>confdefs.h <<_ACEOF
2668#define PACKAGE_STRING "$PACKAGE_STRING"
2669_ACEOF
2670
Martin v. Löwis11437992002-04-12 09:54:03 +00002671cat >>confdefs.h <<_ACEOF
2672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2673_ACEOF
2674
Matthias Kloseb9621712010-04-24 17:59:49 +00002675cat >>confdefs.h <<_ACEOF
2676#define PACKAGE_URL "$PACKAGE_URL"
2677_ACEOF
2678
Martin v. Löwis11437992002-04-12 09:54:03 +00002679
2680# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002681# Prefer an explicitly selected file to automatically selected ones.
2682ac_site_file1=NONE
2683ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002685 # We do not want a PATH search for config.site.
2686 case $CONFIG_SITE in #((
2687 -*) ac_site_file1=./$CONFIG_SITE;;
2688 */*) ac_site_file1=$CONFIG_SITE;;
2689 *) ac_site_file1=./$CONFIG_SITE;;
2690 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002692 ac_site_file1=$prefix/share/config.site
2693 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002694else
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 ac_site_file1=$ac_default_prefix/share/config.site
2696 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002698for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002699do
Matthias Kloseb9621712010-04-24 17:59:49 +00002700 test "x$ac_site_file" = xNONE && continue
2701 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2702 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2703$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002705 . "$ac_site_file" \
2706 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2708as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002709See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710 fi
2711done
2712
2713if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 # Some versions of bash will fail to source /dev/null (special files
2715 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2716 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2717 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2718$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002720 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2721 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 esac
2723 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002724else
Matthias Kloseb9621712010-04-24 17:59:49 +00002725 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2726$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 >$cache_file
2728fi
2729
2730# Check that the precious variables saved in the cache have kept the same
2731# value.
2732ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2735 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002736 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2737 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 case $ac_old_set,$ac_new_set in
2739 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2741$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 +00002742 ac_cache_corrupted=: ;;
2743 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002744 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2745$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002746 ac_cache_corrupted=: ;;
2747 ,);;
2748 *)
2749 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002750 # differences in whitespace do not lead to failure.
2751 ac_old_val_w=`echo x $ac_old_val`
2752 ac_new_val_w=`echo x $ac_new_val`
2753 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2755$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2756 ac_cache_corrupted=:
2757 else
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2759$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2760 eval $ac_var=\$ac_old_val
2761 fi
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2763$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2765$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002766 fi;;
2767 esac
2768 # Pass precious variables to config.status.
2769 if test "$ac_new_set" = set; then
2770 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002771 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 *) ac_arg=$ac_var=$ac_new_val ;;
2773 esac
2774 case " $ac_configure_args " in
2775 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002776 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 esac
2778 fi
2779done
2780if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002781 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2784$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002785 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002787## -------------------- ##
2788## Main body of script. ##
2789## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002790
Guido van Rossum7f43da71994-08-01 12:15:30 +00002791ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002792ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796
Guido van Rossum627b2d71993-12-24 10:39:16 +00002797
Michael W. Hudson54241132001-12-07 15:38:26 +00002798
Trent Nelson4d4ec652012-10-16 08:51:24 -04002799
Trent Nelson5595ab52012-10-17 04:47:31 -04002800if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002801 # If we're building out-of-tree, we need to make sure the following
2802 # resources get picked up before their $srcdir counterparts.
2803 # Objects/ -> typeslots.inc
2804 # Include/ -> Python-ast.h, graminit.h
2805 # Python/ -> importlib.h
2806 # (A side effect of this is that these resources will automatically be
2807 # regenerated when building out-of-tree, regardless of whether or not
2808 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2809 # off.)
2810 BASECPPFLAGS="-IObjects -IInclude -IPython"
2811else
2812 BASECPPFLAGS=""
2813fi
2814
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002815
2816
2817
2818
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002819if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002820then
2821# Extract the first word of "hg", so it can be a program name with args.
2822set dummy hg; ac_word=$2
2823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2824$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002825if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002826 $as_echo_n "(cached) " >&6
2827else
2828 if test -n "$HAS_HG"; then
2829 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2830else
2831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2832for as_dir in $PATH
2833do
2834 IFS=$as_save_IFS
2835 test -z "$as_dir" && as_dir=.
2836 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002838 ac_cv_prog_HAS_HG="found"
2839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2840 break 2
2841 fi
2842done
2843 done
2844IFS=$as_save_IFS
2845
2846 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2847fi
2848fi
2849HAS_HG=$ac_cv_prog_HAS_HG
2850if test -n "$HAS_HG"; then
2851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2852$as_echo "$HAS_HG" >&6; }
2853else
2854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2855$as_echo "no" >&6; }
2856fi
2857
2858
2859else
2860HAS_HG=no-repository
2861fi
2862if test $HAS_HG = found
2863then
2864 HGVERSION="hg id -i \$(srcdir)"
2865 HGTAG="hg id -t \$(srcdir)"
2866 HGBRANCH="hg id -b \$(srcdir)"
2867else
2868 HGVERSION=""
2869 HGTAG=""
2870 HGBRANCH=""
2871fi
2872
2873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002874ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002875
2876
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002877ac_aux_dir=
2878for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2879 if test -f "$ac_dir/install-sh"; then
2880 ac_aux_dir=$ac_dir
2881 ac_install_sh="$ac_aux_dir/install-sh -c"
2882 break
2883 elif test -f "$ac_dir/install.sh"; then
2884 ac_aux_dir=$ac_dir
2885 ac_install_sh="$ac_aux_dir/install.sh -c"
2886 break
2887 elif test -f "$ac_dir/shtool"; then
2888 ac_aux_dir=$ac_dir
2889 ac_install_sh="$ac_aux_dir/shtool install -c"
2890 break
2891 fi
2892done
2893if test -z "$ac_aux_dir"; then
2894 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2895fi
2896
2897# These three variables are undocumented and unsupported,
2898# and are intended to be withdrawn in a future Autoconf release.
2899# They can cause serious problems if a builder's source tree is in a directory
2900# whose full name contains unusual characters.
2901ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2902ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2903ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2904
2905
2906# Make sure we can run config.sub.
2907$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2908 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2909
2910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2911$as_echo_n "checking build system type... " >&6; }
2912if ${ac_cv_build+:} false; then :
2913 $as_echo_n "(cached) " >&6
2914else
2915 ac_build_alias=$build_alias
2916test "x$ac_build_alias" = x &&
2917 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2918test "x$ac_build_alias" = x &&
2919 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2920ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2921 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2922
2923fi
2924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2925$as_echo "$ac_cv_build" >&6; }
2926case $ac_cv_build in
2927*-*-*) ;;
2928*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2929esac
2930build=$ac_cv_build
2931ac_save_IFS=$IFS; IFS='-'
2932set x $ac_cv_build
2933shift
2934build_cpu=$1
2935build_vendor=$2
2936shift; shift
2937# Remember, the first character of IFS is used to create $*,
2938# except with old shells:
2939build_os=$*
2940IFS=$ac_save_IFS
2941case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2942
2943
2944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2945$as_echo_n "checking host system type... " >&6; }
2946if ${ac_cv_host+:} false; then :
2947 $as_echo_n "(cached) " >&6
2948else
2949 if test "x$host_alias" = x; then
2950 ac_cv_host=$ac_cv_build
2951else
2952 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2953 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2954fi
2955
2956fi
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2958$as_echo "$ac_cv_host" >&6; }
2959case $ac_cv_host in
2960*-*-*) ;;
2961*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2962esac
2963host=$ac_cv_host
2964ac_save_IFS=$IFS; IFS='-'
2965set x $ac_cv_host
2966shift
2967host_cpu=$1
2968host_vendor=$2
2969shift; shift
2970# Remember, the first character of IFS is used to create $*,
2971# except with old shells:
2972host_os=$*
2973IFS=$ac_save_IFS
2974case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2975
2976
2977
doko@python.orga10e4a92013-01-25 18:45:12 +01002978
2979
Ned Deilyfcbc2462014-08-22 13:32:49 -07002980# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2981rm -f pybuilddir.txt
2982
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002983for ac_prog in python$PACKAGE_VERSION python3 python
2984do
2985 # Extract the first word of "$ac_prog", so it can be a program name with args.
2986set dummy $ac_prog; ac_word=$2
2987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2988$as_echo_n "checking for $ac_word... " >&6; }
2989if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2990 $as_echo_n "(cached) " >&6
2991else
2992 if test -n "$PYTHON_FOR_GEN"; then
2993 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2994else
2995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2996for as_dir in $PATH
2997do
2998 IFS=$as_save_IFS
2999 test -z "$as_dir" && as_dir=.
3000 for ac_exec_ext in '' $ac_executable_extensions; do
3001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3002 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3004 break 2
3005 fi
3006done
3007 done
3008IFS=$as_save_IFS
3009
3010fi
3011fi
3012PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3013if test -n "$PYTHON_FOR_GEN"; then
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3015$as_echo "$PYTHON_FOR_GEN" >&6; }
3016else
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3018$as_echo "no" >&6; }
3019fi
3020
3021
3022 test -n "$PYTHON_FOR_GEN" && break
3023done
3024test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3025
3026if test "$PYTHON_FOR_GEN" = not-found; then
3027 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3028 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3029 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3030fi
3031
3032
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003033if test "$cross_compiling" = yes; then
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3035$as_echo_n "checking for python interpreter for cross build... " >&6; }
3036 if test -z "$PYTHON_FOR_BUILD"; then
3037 for interp in python$PACKAGE_VERSION python3 python; do
3038 which $interp >/dev/null 2>&1 || continue
3039 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3040 break
3041 fi
3042 interp=
3043 done
3044 if test x$interp = x; then
3045 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3046 fi
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3048$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003049 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 +02003050 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003051 # Used to comment out stuff for rebuilding generated files
3052 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003053elif test "$cross_compiling" = maybe; then
3054 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003055else
3056 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003057 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003058fi
3059
3060
Martin v. Löwis11437992002-04-12 09:54:03 +00003061
Martin Pantereac67be2016-07-28 01:28:27 +00003062
Benjamin Petersond23f8222009-04-05 19:13:16 +00003063if test "$prefix" != "/"; then
3064 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3065fi
3066
3067
Martin v. Löwis11437992002-04-12 09:54:03 +00003068
3069
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003070# We don't use PACKAGE_ variables, and they cause conflicts
3071# with other autoconf-based packages that include Python.h
3072grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3073rm confdefs.h
3074mv confdefs.h.new confdefs.h
3075
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003076
Yury Selivanov7aa53412015-05-30 10:57:56 -04003077VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003078
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003079# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003080
3081SOVERSION=1.0
3082
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003083# The later defininition of _XOPEN_SOURCE disables certain features
3084# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003087
3088
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003089# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3090# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3091# them.
3092
Matthias Kloseb9621712010-04-24 17:59:49 +00003093$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003094
3095
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003096# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3097# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3098# them.
3099
Matthias Kloseb9621712010-04-24 17:59:49 +00003100$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003101
3102
Martin v. Löwisd6320502004-08-12 13:45:08 +00003103# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3104# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003107
3108
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003109# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3110# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3111# them.
3112
Matthias Kloseb9621712010-04-24 17:59:49 +00003113$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003114
3115
3116
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003117define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003118
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003119# Arguments passed to configure.
3120
3121CONFIG_ARGS="$ac_configure_args"
3122
Matthias Kloseb9621712010-04-24 17:59:49 +00003123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3124$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003126if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003128 case $enableval in
3129 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003130 # Locate the best usable SDK, see Mac/README.txt for more
3131 # information
3132 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003133 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003134 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003135 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3136 if test ! -d "${enableval}"
3137 then
3138 enableval=/
3139 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003140 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 ;;
3142 esac
3143 case $enableval in
3144 no)
3145 UNIVERSALSDK=
3146 enable_universalsdk=
3147 ;;
3148 *)
3149 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003150 if test ! -d "${UNIVERSALSDK}"
3151 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003152 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003153 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 ;;
3155 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003156
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003157
Thomas Wouters477c8d52006-05-27 19:21:47 +00003158else
3159
3160 UNIVERSALSDK=
3161 enable_universalsdk=
3162
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003163fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003164
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003165if test -n "${UNIVERSALSDK}"
3166then
Matthias Kloseb9621712010-04-24 17:59:49 +00003167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3168$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003169else
Matthias Kloseb9621712010-04-24 17:59:49 +00003170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3171$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003172fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003174
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003175
Ned Deily87adb6e2013-10-18 21:09:56 -07003176ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003177
Ned Deilycbfb9a52012-06-23 16:02:19 -07003178# For backward compatibility reasons we prefer to select '32-bit' if available,
3179# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003180UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003181if test "`uname -s`" = "Darwin"
3182then
3183 if test -n "${UNIVERSALSDK}"
3184 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003185 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003186 then
3187 UNIVERSAL_ARCHS="intel"
3188 fi
3189 fi
3190fi
3191
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003192
Matthias Kloseb9621712010-04-24 17:59:49 +00003193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3194$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003195
3196# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003197if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003198 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003199 UNIVERSAL_ARCHS="$withval"
3200
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003201fi
3202
Ned Deily87adb6e2013-10-18 21:09:56 -07003203if test -n "${UNIVERSALSDK}"
3204then
3205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3206$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3207else
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3209$as_echo "no" >&6; }
3210fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003212
3213# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003214if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003215 withval=$with_framework_name;
3216 PYTHONFRAMEWORK=${withval}
3217 PYTHONFRAMEWORKDIR=${withval}.framework
3218 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3219
3220else
3221
3222 PYTHONFRAMEWORK=Python
3223 PYTHONFRAMEWORKDIR=Python.framework
3224 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3225
3226fi
3227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003229if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003231 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003232 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003233 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003234 esac
3235 case $enableval in
3236 no)
3237 PYTHONFRAMEWORK=
3238 PYTHONFRAMEWORKDIR=no-framework
3239 PYTHONFRAMEWORKPREFIX=
3240 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241 FRAMEWORKINSTALLFIRST=
3242 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003243 FRAMEWORKALTINSTALLFIRST=
3244 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003246 if test "x${prefix}" = "xNONE"; then
3247 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3248 else
3249 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3250 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003251 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003252 ;;
3253 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003254 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003255 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003257 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003258 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3259 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003260 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003261 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003262
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003263 if test "x${prefix}" = "xNONE" ; then
3264 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003265
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003266 else
3267 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3268 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003269
3270 case "${enableval}" in
3271 /System*)
3272 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3273 if test "${prefix}" = "NONE" ; then
3274 # See below
3275 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3276 fi
3277 ;;
3278
3279 /Library*)
3280 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3281 ;;
3282
3283 */Library/Frameworks)
3284 MDIR="`dirname "${enableval}"`"
3285 MDIR="`dirname "${MDIR}"`"
3286 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3287
3288 if test "${prefix}" = "NONE"; then
3289 # User hasn't specified the
3290 # --prefix option, but wants to install
3291 # the framework in a non-default location,
3292 # ensure that the compatibility links get
3293 # installed relative to that prefix as well
3294 # instead of in /usr/local.
3295 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3296 fi
3297 ;;
3298
3299 *)
3300 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3301 ;;
3302 esac
3303
Jack Jansen127e56e2001-09-11 14:41:54 +00003304 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003305
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003306 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003307 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003308 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003311
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003312 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3313
3314 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3315
Jack Jansene578a632001-08-15 01:27:14 +00003316 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003317
Guido van Rossum563e7081996-09-10 18:20:48 +00003318else
Martin v. Löwis11437992002-04-12 09:54:03 +00003319
Jack Jansene578a632001-08-15 01:27:14 +00003320 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003321 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003322 PYTHONFRAMEWORKPREFIX=
3323 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324 FRAMEWORKINSTALLFIRST=
3325 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003326 FRAMEWORKALTINSTALLFIRST=
3327 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003328 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003329 if test "x${prefix}" = "xNONE" ; then
3330 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3331 else
3332 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3333 fi
Jack Jansene578a632001-08-15 01:27:14 +00003334 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003335
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337fi
3338
Thomas Wouters477c8d52006-05-27 19:21:47 +00003339
3340
Michael W. Hudson54241132001-12-07 15:38:26 +00003341
3342
3343
3344
Jack Jansene578a632001-08-15 01:27:14 +00003345
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003346
3347
3348
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003349
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003350
Ned Deilyb8f944f2013-11-21 22:42:25 -08003351
Jack Jansene578a632001-08-15 01:27:14 +00003352##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003353## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003354## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003355##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003356# Set name for machine-dependent library files
3357
Matthias Kloseb9621712010-04-24 17:59:49 +00003358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3359$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003360if test -z "$MACHDEP"
3361then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003362 # avoid using uname for cross builds
3363 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003364 # ac_sys_system and ac_sys_release are used for setting
3365 # a lot of different things including 'define_xopen_source'
3366 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003367 case "$host" in
3368 *-*-linux*)
3369 ac_sys_system=Linux
3370 ;;
3371 *-*-cygwin*)
3372 ac_sys_system=Cygwin
3373 ;;
3374 *)
3375 # for now, limit cross builds to known configurations
3376 MACHDEP="unknown"
3377 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3378 esac
3379 ac_sys_release=
3380 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003381 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003382 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003383 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003384 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003385 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003386 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003387 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003388 fi
3389 ac_md_system=`echo $ac_sys_system |
3390 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3391 ac_md_release=`echo $ac_sys_release |
3392 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3393 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003394
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003395 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003396 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003397 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003398 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003399 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003400 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003401 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003402fi
Guido van Rossum91922671997-10-09 20:24:13 +00003403
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003404
3405if test "$cross_compiling" = yes; then
3406 case "$host" in
3407 *-*-linux*)
3408 case "$host_cpu" in
3409 arm*)
3410 _host_cpu=arm
3411 ;;
3412 *)
3413 _host_cpu=$host_cpu
3414 esac
3415 ;;
3416 *-*-cygwin*)
3417 _host_cpu=
3418 ;;
3419 *)
3420 # for now, limit cross builds to known configurations
3421 MACHDEP="unknown"
3422 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3423 esac
3424 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3425fi
3426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3428# disable features if it is defined, without any means to access these
3429# features as extensions. For these systems, we skip the definition of
3430# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3431# some feature, make sure there is no alternative way to access this
3432# feature. Also, when using wildcards, make sure you have verified the
3433# need for not defining _XOPEN_SOURCE on all systems matching the
3434# wildcard, and that the wildcard does not include future systems
3435# (which may remove their limitations).
3436case $ac_sys_system/$ac_sys_release in
3437 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3438 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003439 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003440 # In addition, Stefan Krah confirms that issue #1244610 exists through
3441 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003442 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003443 define_xopen_source=no
3444 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3445 # also defined. This can be overridden by defining _BSD_SOURCE
3446 # As this has a different meaning on Linux, only define it on OpenBSD
3447
Matthias Kloseb9621712010-04-24 17:59:49 +00003448$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003449
3450 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003451 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003452 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3453 # also defined. This can be overridden by defining _BSD_SOURCE
3454 # As this has a different meaning on Linux, only define it on OpenBSD
3455
Matthias Kloseb9621712010-04-24 17:59:49 +00003456$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003457
3458 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003459 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3460 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3461 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003462 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 +00003463 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003464 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3465 # request to enable features supported by the standard as a request
3466 # to disable features not supported by the standard. The best way
3467 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3468 # entirely and define __EXTENSIONS__ instead.
3469 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003470 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003471 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3472 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003473 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003474 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003475 define_xopen_source=no;;
3476 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003477 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003478 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003479 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003480 # On FreeBSD 4, the math functions C89 does not cover are never defined
3481 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3482 FreeBSD/4.*)
3483 define_xopen_source=no;;
3484 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3485 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3486 # identifies itself as Darwin/7.*
3487 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3488 # disables platform specific features beyond repair.
3489 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3490 # has no effect, don't bother defining them
3491 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003492 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003493 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003494 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003495 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3496 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3497 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003498 AIX/4)
3499 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003500 AIX/5)
3501 if test `uname -r` -eq 1; then
3502 define_xopen_source=no
3503 fi
3504 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003505 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3506 # defining NI_NUMERICHOST.
3507 QNX/6.3.2)
3508 define_xopen_source=no
3509 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003510
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003511esac
3512
3513if test $define_xopen_source = yes
3514then
Victor Stinner14d098d2011-09-07 22:29:43 +02003515 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003516
Victor Stinner14d098d2011-09-07 22:29:43 +02003517$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003518
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003519
3520 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3521 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3522 # several APIs are not declared. Since this is also needed in some
3523 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003524
Matthias Kloseb9621712010-04-24 17:59:49 +00003525$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003526
3527
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003528
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003529$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003530
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003531fi
3532
Christian Heimes647cd872013-12-07 23:39:33 +01003533# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3534case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003535 hp*|HP*)
3536 define_stdc_a1=yes;;
3537 *)
3538 define_stdc_a1=no;;
3539esac
3540
3541if test $define_stdc_a1 = yes
3542then
Christian Heimes647cd872013-12-07 23:39:33 +01003543
3544$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3545
Christian Heimesb02bcae2013-12-08 15:21:08 +01003546fi
Christian Heimes647cd872013-12-07 23:39:33 +01003547
Guido van Rossum91922671997-10-09 20:24:13 +00003548#
3549# SGI compilers allow the specification of the both the ABI and the
3550# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003551# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003552#
3553# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3554# thus supply support for various ABI/ISA combinations. The MACHDEP
3555# variable is also adjusted.
3556#
3557
3558if test ! -z "$SGI_ABI"
3559then
3560 CC="cc $SGI_ABI"
3561 LDFLAGS="$SGI_ABI $LDFLAGS"
3562 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3565$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003566
Jack Jansen6b08a402004-06-03 12:41:45 +00003567# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3568# it may influence the way we can build extensions, so distutils
3569# needs to check it
3570
Thomas Wouters477c8d52006-05-27 19:21:47 +00003571
Jack Jansen6b08a402004-06-03 12:41:45 +00003572CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003573EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003574
Guido van Rossum627b2d71993-12-24 10:39:16 +00003575# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003576
3577# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3578# for debug/optimization stuff. BASECFLAGS is for flags that are required
3579# just to get things to compile and link. Users are free to override OPT
3580# when running configure or make. The build should not break if they do.
3581# BASECFLAGS should generally not be messed with, however.
3582
3583# XXX shouldn't some/most/all of this code be merged with the stuff later
3584# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3586$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003591 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003592 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003593 without_gcc=yes;;
3594 yes) CC=gcc
3595 without_gcc=no;;
3596 *) CC=$withval
3597 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003598 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003599else
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003601 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003602 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003603 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003604 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003605 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003606fi
3607
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3609$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003610
Zachary Ware5af85642015-12-21 12:09:17 -06003611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3612$as_echo_n "checking for --with-icc... " >&6; }
3613
3614# Check whether --with-icc was given.
3615if test "${with_icc+set}" = set; then :
3616 withval=$with_icc;
3617 case $withval in
3618 no) CC=${CC:-cc}
3619 with_icc=no;;
3620 yes) CC=icc
3621 CXX=icpc
3622 with_icc=yes;;
3623 *) CC=$withval
3624 with_icc=$withval;;
3625 esac
3626else
3627
3628 with_icc=no
3629fi
3630
3631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3632$as_echo "$with_icc" >&6; }
3633
Guido van Rossum8b131c51995-03-09 14:10:13 +00003634# If the user switches compilers, we can't believe the cache
3635if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3636then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003637 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003638(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003639fi
3640
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003641# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3642# when the compiler supports them, but we don't always want -O2, and
3643# we set -g later.
3644if test -z "$CFLAGS"; then
3645 CFLAGS=
3646fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003647
3648if test "$ac_sys_system" = "Darwin"
3649then
3650 # Compiler selection on MacOSX is more complicated than
3651 # AC_PROG_CC can handle, see Mac/README.txt for more
3652 # information
3653 if test -z "${CC}"
3654 then
3655 found_gcc=
3656 found_clang=
3657 as_save_IFS=$IFS; IFS=:
3658 for as_dir in $PATH
3659 do
3660 IFS=$as_save_IFS
3661 if test -x $as_dir/gcc; then
3662 if test -z "${found_gcc}"; then
3663 found_gcc=$as_dir/gcc
3664 fi
3665 fi
3666 if test -x $as_dir/clang; then
3667 if test -z "${found_clang}"; then
3668 found_clang=$as_dir/clang
3669 fi
3670 fi
3671 done
3672 IFS=$as_save_IFS
3673
3674 if test -n "$found_gcc" -a -n "$found_clang"
3675 then
3676 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3677 then
3678 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3679$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3680 CC="$found_clang"
3681 CXX="$found_clang++"
3682 fi
3683
3684
3685 elif test -z "$found_gcc" -a -n "$found_clang"
3686 then
3687 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3688$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3689 CC="$found_clang"
3690 CXX="$found_clang++"
3691
3692 elif test -z "$found_gcc" -a -z "$found_clang"
3693 then
3694 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3695 if test -n "${found_clang}"
3696 then
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3698$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3699 CC="${found_clang}"
3700 CXX="`/usr/bin/xcrun -find clang++`"
3701
3702 # else: use default behaviour
3703 fi
3704 fi
3705 fi
3706fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003707ac_ext=c
3708ac_cpp='$CPP $CPPFLAGS'
3709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3711ac_compiler_gnu=$ac_cv_c_compiler_gnu
3712if test -n "$ac_tool_prefix"; then
3713 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3714set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003717if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719else
3720 if test -n "$CC"; then
3721 ac_cv_prog_CC="$CC" # Let the user override the test.
3722else
Martin v. Löwis11437992002-04-12 09:54:03 +00003723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726 IFS=$as_save_IFS
3727 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $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 +00003732 break 2
3733 fi
3734done
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003737
Jack Jansendd19cf82001-12-06 22:36:17 +00003738fi
3739fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003741if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3743$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003744else
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751if test -z "$ac_cv_prog_CC"; then
3752 ac_ct_CC=$CC
3753 # Extract the first word of "gcc", so it can be a program name with args.
3754set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3756$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003757if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003759else
3760 if test -n "$ac_ct_CC"; then
3761 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3762else
3763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $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 +00003772 break 2
3773 fi
3774done
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
3778fi
3779fi
3780ac_ct_CC=$ac_cv_prog_ac_ct_CC
3781if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3783$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003784else
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789 if test "x$ac_ct_CC" = x; then
3790 CC=""
3791 else
3792 case $cross_compiling:$ac_tool_warned in
3793yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796ac_tool_warned=yes ;;
3797esac
3798 CC=$ac_ct_CC
3799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
3801 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003802fi
3803
Jack Jansendd19cf82001-12-06 22:36:17 +00003804if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 if test -n "$ac_tool_prefix"; then
3806 # 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 +00003807set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3809$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003810if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003812else
3813 if test -n "$CC"; then
3814 ac_cv_prog_CC="$CC" # Let the user override the test.
3815else
Martin v. Löwis11437992002-04-12 09:54:03 +00003816as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3817for as_dir in $PATH
3818do
3819 IFS=$as_save_IFS
3820 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003822 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003823 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $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 +00003825 break 2
3826 fi
3827done
Matthias Kloseb9621712010-04-24 17:59:49 +00003828 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
3831fi
3832fi
3833CC=$ac_cv_prog_CC
3834if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3836$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837else
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3839$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
3841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842
Martin v. Löwis11437992002-04-12 09:54:03 +00003843 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
3845if test -z "$CC"; then
3846 # Extract the first word of "cc", so it can be a program name with args.
3847set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3849$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003850if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003852else
3853 if test -n "$CC"; then
3854 ac_cv_prog_CC="$CC" # Let the user override the test.
3855else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003856 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3858for as_dir in $PATH
3859do
3860 IFS=$as_save_IFS
3861 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003862 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003863 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003864 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3865 ac_prog_rejected=yes
3866 continue
3867 fi
3868 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 $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 +00003870 break 2
3871 fi
3872done
Matthias Kloseb9621712010-04-24 17:59:49 +00003873 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003875
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003876if test $ac_prog_rejected = yes; then
3877 # We found a bogon in the path, so make sure we never use it.
3878 set dummy $ac_cv_prog_CC
3879 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003880 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003881 # We chose a different compiler from the bogus one.
3882 # However, it has the same basename, so the bogon will be chosen
3883 # first if we set CC to just the basename; use the full file name.
3884 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003885 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003886 fi
3887fi
3888fi
3889fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003890CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003891if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3893$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894else
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3896$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003897fi
3898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899
Martin v. Löwis11437992002-04-12 09:54:03 +00003900fi
3901if test -z "$CC"; then
3902 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003904 do
3905 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3906set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003909if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003911else
3912 if test -n "$CC"; then
3913 ac_cv_prog_CC="$CC" # Let the user override the test.
3914else
Martin v. Löwis11437992002-04-12 09:54:03 +00003915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3916for as_dir in $PATH
3917do
3918 IFS=$as_save_IFS
3919 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 $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 +00003924 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003926done
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003929
3930fi
3931fi
3932CC=$ac_cv_prog_CC
3933if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3935$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003936else
Matthias Kloseb9621712010-04-24 17:59:49 +00003937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003939fi
3940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 test -n "$CC" && break
3943 done
3944fi
3945if test -z "$CC"; then
3946 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003947 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003948do
3949 # Extract the first word of "$ac_prog", so it can be a program name with args.
3950set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3952$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003953if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003955else
3956 if test -n "$ac_ct_CC"; then
3957 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3958else
3959as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3960for as_dir in $PATH
3961do
3962 IFS=$as_save_IFS
3963 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003965 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 $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 +00003968 break 2
3969 fi
3970done
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003973
Martin v. Löwis11437992002-04-12 09:54:03 +00003974fi
3975fi
3976ac_ct_CC=$ac_cv_prog_ac_ct_CC
3977if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3979$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003980else
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003983fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003984
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985
Martin v. Löwis11437992002-04-12 09:54:03 +00003986 test -n "$ac_ct_CC" && break
3987done
Michael W. Hudson54241132001-12-07 15:38:26 +00003988
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003989 if test "x$ac_ct_CC" = x; then
3990 CC=""
3991 else
3992 case $cross_compiling:$ac_tool_warned in
3993yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3995$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003996ac_tool_warned=yes ;;
3997esac
3998 CC=$ac_ct_CC
3999 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004000fi
4001
4002fi
4003
4004
Matthias Kloseb9621712010-04-24 17:59:49 +00004005test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4006$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004007as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004008See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004009
4010# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004011$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4012set X $ac_compile
4013ac_compiler=$2
4014for ac_option in --version -v -V -qversion; do
4015 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
4022 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 if test -s conftest.err; then
4025 sed '10a\
4026... rest of stderr output deleted ...
4027 10q' conftest.err >conftest.er1
4028 cat conftest.er1 >&5
4029 fi
4030 rm -f conftest.er1 conftest.err
4031 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4032 test $ac_status = 0; }
4033done
Martin v. Löwis11437992002-04-12 09:54:03 +00004034
Matthias Kloseb9621712010-04-24 17:59:49 +00004035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004036/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004037
Martin v. Löwis11437992002-04-12 09:54:03 +00004038int
4039main ()
4040{
4041
4042 ;
4043 return 0;
4044}
4045_ACEOF
4046ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004047ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004048# Try to create an executable without -o first, disregard a.out.
4049# It will help us diagnose broken compilers, and finding out an intuition
4050# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4052$as_echo_n "checking whether the C compiler works... " >&6; }
4053ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4054
4055# The possible output files:
4056ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004058ac_rmfiles=
4059for ac_file in $ac_files
4060do
4061 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004063 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4064 esac
4065done
4066rm -f $ac_rmfiles
4067
Matthias Kloseb9621712010-04-24 17:59:49 +00004068if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004069case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004075 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004076 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4080# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4081# in a Makefile. We should not override ac_cv_exeext if it was cached,
4082# so that the user can short-circuit this test for compilers unknown to
4083# Autoconf.
4084for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004085do
4086 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004088 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004089 ;;
4090 [ab].out )
4091 # We found the default executable, but exeext='' is most
4092 # certainly right.
4093 break;;
4094 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004096 then :; else
4097 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4098 fi
4099 # We set ac_cv_exeext here because the later test for it is not
4100 # safe: cross compilers may not add the suffix if given an `-o'
4101 # argument, so we may need to know it at that point already.
4102 # Even if this section looks crufty: it has the advantage of
4103 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004104 break;;
4105 * )
4106 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004107 esac
4108done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109test "$ac_cv_exeext" = no && ac_cv_exeext=
4110
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004111else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112 ac_file=''
4113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004114if test -z "$ac_file"; then :
4115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4116$as_echo "no" >&6; }
4117$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004118sed 's/^/| /' conftest.$ac_ext >&5
4119
Matthias Kloseb9621712010-04-24 17:59:49 +00004120{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004122as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004123See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004124else
4125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4126$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4129$as_echo_n "checking for C compiler default output file name... " >&6; }
4130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4131$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004132ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004133
Matthias Kloseb9621712010-04-24 17:59:49 +00004134rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004135ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4137$as_echo_n "checking for suffix of executables... " >&6; }
4138if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004139case "(($ac_try" in
4140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4141 *) ac_try_echo=$ac_try;;
4142esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004143eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4144$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004145 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004146 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4148 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004149 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4150# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4151# work properly (i.e., refer to `conftest.exe'), while it won't with
4152# `rm'.
4153for ac_file in conftest.exe conftest conftest.*; do
4154 test -f "$ac_file" || continue
4155 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004157 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4158 break;;
4159 * ) break;;
4160 esac
4161done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162else
Matthias Kloseb9621712010-04-24 17:59:49 +00004163 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004165as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004166See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004168rm -f conftest conftest$ac_cv_exeext
4169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4170$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004171
4172rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173EXEEXT=$ac_cv_exeext
4174ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4176/* end confdefs.h. */
4177#include <stdio.h>
4178int
4179main ()
4180{
4181FILE *f = fopen ("conftest.out", "w");
4182 return ferror (f) || fclose (f) != 0;
4183
4184 ;
4185 return 0;
4186}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004188ac_clean_files="$ac_clean_files conftest.out"
4189# Check that the compiler produces executables we can run. If not, either
4190# the compiler is broken, or we cross compile.
4191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4192$as_echo_n "checking whether we are cross compiling... " >&6; }
4193if test "$cross_compiling" != yes; then
4194 { { ac_try="$ac_link"
4195case "(($ac_try" in
4196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4197 *) ac_try_echo=$ac_try;;
4198esac
4199eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4200$as_echo "$ac_try_echo"; } >&5
4201 (eval "$ac_link") 2>&5
4202 ac_status=$?
4203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4204 test $ac_status = 0; }
4205 if { ac_try='./conftest$ac_cv_exeext'
4206 { { case "(($ac_try" in
4207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4208 *) ac_try_echo=$ac_try;;
4209esac
4210eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4211$as_echo "$ac_try_echo"; } >&5
4212 (eval "$ac_try") 2>&5
4213 ac_status=$?
4214 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4215 test $ac_status = 0; }; }; then
4216 cross_compiling=no
4217 else
4218 if test "$cross_compiling" = maybe; then
4219 cross_compiling=yes
4220 else
4221 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004223as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004224If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004225See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004226 fi
4227 fi
4228fi
4229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4230$as_echo "$cross_compiling" >&6; }
4231
4232rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4233ac_clean_files=$ac_clean_files_save
4234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4235$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004236if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 $as_echo_n "(cached) " >&6
4238else
4239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004240/* end confdefs.h. */
4241
4242int
4243main ()
4244{
4245
4246 ;
4247 return 0;
4248}
4249_ACEOF
4250rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252case "(($ac_try" in
4253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4254 *) ac_try_echo=$ac_try;;
4255esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004256eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4257$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004259 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004260 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4261 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 for ac_file in conftest.o conftest.obj conftest.*; do
4263 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004264 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004265 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4267 break;;
4268 esac
4269done
4270else
Matthias Kloseb9621712010-04-24 17:59:49 +00004271 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004272sed 's/^/| /' conftest.$ac_ext >&5
4273
Matthias Kloseb9621712010-04-24 17:59:49 +00004274{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004276as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004277See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004278fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004279rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4282$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004283OBJEXT=$ac_cv_objext
4284ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4286$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004287if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004289else
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004292
Martin v. Löwis11437992002-04-12 09:54:03 +00004293int
4294main ()
4295{
4296#ifndef __GNUC__
4297 choke me
4298#endif
4299
4300 ;
4301 return 0;
4302}
4303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004305 ac_compiler_gnu=yes
4306else
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004310ac_cv_c_compiler_gnu=$ac_compiler_gnu
4311
4312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4314$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4315if test $ac_compiler_gnu = yes; then
4316 GCC=yes
4317else
4318 GCC=
4319fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004320ac_test_CFLAGS=${CFLAGS+set}
4321ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4323$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004324if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004325 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004326else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 ac_save_c_werror_flag=$ac_c_werror_flag
4328 ac_c_werror_flag=yes
4329 ac_cv_prog_cc_g=no
4330 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004333
Martin v. Löwis11437992002-04-12 09:54:03 +00004334int
4335main ()
4336{
4337
4338 ;
4339 return 0;
4340}
4341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004342if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004343 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004344else
Matthias Kloseb9621712010-04-24 17:59:49 +00004345 CFLAGS=""
4346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347/* end confdefs.h. */
4348
4349int
4350main ()
4351{
4352
4353 ;
4354 return 0;
4355}
4356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004357if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358
Matthias Kloseb9621712010-04-24 17:59:49 +00004359else
4360 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363/* end confdefs.h. */
4364
4365int
4366main ()
4367{
4368
4369 ;
4370 return 0;
4371}
4372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004373if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4381 ac_c_werror_flag=$ac_save_c_werror_flag
4382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4384$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004385if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004386 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004387elif test $ac_cv_prog_cc_g = yes; then
4388 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004389 CFLAGS="-g -O2"
4390 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004391 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004392 fi
4393else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004394 if test "$GCC" = yes; then
4395 CFLAGS="-O2"
4396 else
4397 CFLAGS=
4398 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004399fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4401$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004402if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004403 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004404else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004405 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004406ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004408/* end confdefs.h. */
4409#include <stdarg.h>
4410#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004411struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004412/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4413struct buf { int x; };
4414FILE * (*rcsopen) (struct buf *, struct stat *, int);
4415static char *e (p, i)
4416 char **p;
4417 int i;
4418{
4419 return p[i];
4420}
4421static char *f (char * (*g) (char **, int), char **p, ...)
4422{
4423 char *s;
4424 va_list v;
4425 va_start (v,p);
4426 s = g (p, va_arg (v,int));
4427 va_end (v);
4428 return s;
4429}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004430
4431/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4432 function prototypes and stuff, but not '\xHH' hex character constants.
4433 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004435 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4436 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004438int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004440/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4441 inside strings and character constants. */
4442#define FOO(x) 'x'
4443int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4444
Skip Montanaro6dead952003-09-25 14:50:04 +00004445int test (int i, double x);
4446struct s1 {int (*f) (int a);};
4447struct s2 {int (*f) (double a);};
4448int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4449int argc;
4450char **argv;
4451int
4452main ()
4453{
4454return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4455 ;
4456 return 0;
4457}
4458_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004459for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4460 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004461do
4462 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004463 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004464 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466rm -f core conftest.err conftest.$ac_objext
4467 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004468done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004469rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004470CC=$ac_save_CC
4471
4472fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004473# AC_CACHE_VAL
4474case "x$ac_cv_prog_cc_c89" in
4475 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4477$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004478 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4480$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4484$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004485esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004486if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004487
Matthias Kloseb9621712010-04-24 17:59:49 +00004488fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004489
Martin v. Löwis11437992002-04-12 09:54:03 +00004490ac_ext=c
4491ac_cpp='$CPP $CPPFLAGS'
4492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4494ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004495
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004496ac_ext=c
4497ac_cpp='$CPP $CPPFLAGS'
4498ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4499ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4500ac_compiler_gnu=$ac_cv_c_compiler_gnu
4501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4502$as_echo_n "checking how to run the C preprocessor... " >&6; }
4503# On Suns, sometimes $CPP names a directory.
4504if test -n "$CPP" && test -d "$CPP"; then
4505 CPP=
4506fi
4507if test -z "$CPP"; then
4508 if ${ac_cv_prog_CPP+:} false; then :
4509 $as_echo_n "(cached) " >&6
4510else
4511 # Double quotes because CPP needs to be expanded
4512 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4513 do
4514 ac_preproc_ok=false
4515for ac_c_preproc_warn_flag in '' yes
4516do
4517 # Use a header file that comes with gcc, so configuring glibc
4518 # with a fresh cross-compiler works.
4519 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4520 # <limits.h> exists even on freestanding compilers.
4521 # On the NeXT, cc -E runs the code through the compiler's parser,
4522 # not just through cpp. "Syntax error" is here to catch this case.
4523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4524/* end confdefs.h. */
4525#ifdef __STDC__
4526# include <limits.h>
4527#else
4528# include <assert.h>
4529#endif
4530 Syntax error
4531_ACEOF
4532if ac_fn_c_try_cpp "$LINENO"; then :
4533
4534else
4535 # Broken: fails on valid input.
4536continue
4537fi
4538rm -f conftest.err conftest.i conftest.$ac_ext
4539
4540 # OK, works on sane cases. Now check whether nonexistent headers
4541 # can be detected and how.
4542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4543/* end confdefs.h. */
4544#include <ac_nonexistent.h>
4545_ACEOF
4546if ac_fn_c_try_cpp "$LINENO"; then :
4547 # Broken: success on invalid input.
4548continue
4549else
4550 # Passes both tests.
4551ac_preproc_ok=:
4552break
4553fi
4554rm -f conftest.err conftest.i conftest.$ac_ext
4555
4556done
4557# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4558rm -f conftest.i conftest.err conftest.$ac_ext
4559if $ac_preproc_ok; then :
4560 break
4561fi
4562
4563 done
4564 ac_cv_prog_CPP=$CPP
4565
4566fi
4567 CPP=$ac_cv_prog_CPP
4568else
4569 ac_cv_prog_CPP=$CPP
4570fi
4571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4572$as_echo "$CPP" >&6; }
4573ac_preproc_ok=false
4574for ac_c_preproc_warn_flag in '' yes
4575do
4576 # Use a header file that comes with gcc, so configuring glibc
4577 # with a fresh cross-compiler works.
4578 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4579 # <limits.h> exists even on freestanding compilers.
4580 # On the NeXT, cc -E runs the code through the compiler's parser,
4581 # not just through cpp. "Syntax error" is here to catch this case.
4582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4583/* end confdefs.h. */
4584#ifdef __STDC__
4585# include <limits.h>
4586#else
4587# include <assert.h>
4588#endif
4589 Syntax error
4590_ACEOF
4591if ac_fn_c_try_cpp "$LINENO"; then :
4592
4593else
4594 # Broken: fails on valid input.
4595continue
4596fi
4597rm -f conftest.err conftest.i conftest.$ac_ext
4598
4599 # OK, works on sane cases. Now check whether nonexistent headers
4600 # can be detected and how.
4601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4602/* end confdefs.h. */
4603#include <ac_nonexistent.h>
4604_ACEOF
4605if ac_fn_c_try_cpp "$LINENO"; then :
4606 # Broken: success on invalid input.
4607continue
4608else
4609 # Passes both tests.
4610ac_preproc_ok=:
4611break
4612fi
4613rm -f conftest.err conftest.i conftest.$ac_ext
4614
4615done
4616# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4617rm -f conftest.i conftest.err conftest.$ac_ext
4618if $ac_preproc_ok; then :
4619
4620else
4621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4623as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4624See \`config.log' for more details" "$LINENO" 5; }
4625fi
4626
4627ac_ext=c
4628ac_cpp='$CPP $CPPFLAGS'
4629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4631ac_compiler_gnu=$ac_cv_c_compiler_gnu
4632
4633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4634$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4635if ${ac_cv_path_GREP+:} false; then :
4636 $as_echo_n "(cached) " >&6
4637else
4638 if test -z "$GREP"; then
4639 ac_path_GREP_found=false
4640 # Loop through the user's path and test for each of PROGNAME-LIST
4641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4642for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4643do
4644 IFS=$as_save_IFS
4645 test -z "$as_dir" && as_dir=.
4646 for ac_prog in grep ggrep; do
4647 for ac_exec_ext in '' $ac_executable_extensions; do
4648 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4649 as_fn_executable_p "$ac_path_GREP" || continue
4650# Check for GNU ac_path_GREP and select it if it is found.
4651 # Check for GNU $ac_path_GREP
4652case `"$ac_path_GREP" --version 2>&1` in
4653*GNU*)
4654 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4655*)
4656 ac_count=0
4657 $as_echo_n 0123456789 >"conftest.in"
4658 while :
4659 do
4660 cat "conftest.in" "conftest.in" >"conftest.tmp"
4661 mv "conftest.tmp" "conftest.in"
4662 cp "conftest.in" "conftest.nl"
4663 $as_echo 'GREP' >> "conftest.nl"
4664 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4665 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4666 as_fn_arith $ac_count + 1 && ac_count=$as_val
4667 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4668 # Best one so far, save it but keep looking for a better one
4669 ac_cv_path_GREP="$ac_path_GREP"
4670 ac_path_GREP_max=$ac_count
4671 fi
4672 # 10*(2^10) chars as input seems more than enough
4673 test $ac_count -gt 10 && break
4674 done
4675 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4676esac
4677
4678 $ac_path_GREP_found && break 3
4679 done
4680 done
4681 done
4682IFS=$as_save_IFS
4683 if test -z "$ac_cv_path_GREP"; then
4684 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4685 fi
4686else
4687 ac_cv_path_GREP=$GREP
4688fi
4689
4690fi
4691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4692$as_echo "$ac_cv_path_GREP" >&6; }
4693 GREP="$ac_cv_path_GREP"
4694
4695
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004696
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004697
4698
Matthias Kloseb9621712010-04-24 17:59:49 +00004699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4700$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004702# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004703if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004704 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004705
4706 case $withval in
4707 no) with_cxx_main=no
4708 MAINCC='$(CC)';;
4709 yes) with_cxx_main=yes
4710 MAINCC='$(CXX)';;
4711 *) with_cxx_main=yes
4712 MAINCC=$withval
4713 if test -z "$CXX"
4714 then
4715 CXX=$withval
4716 fi;;
4717 esac
4718else
4719
4720 with_cxx_main=no
4721 MAINCC='$(CC)'
4722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004723fi
4724
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4726$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004727
4728preset_cxx="$CXX"
4729if test -z "$CXX"
4730then
4731 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004732 gcc) if test -n "$ac_tool_prefix"; then
4733 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4734set dummy ${ac_tool_prefix}g++; ac_word=$2
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
4737if ${ac_cv_path_CXX+:} false; then :
4738 $as_echo_n "(cached) " >&6
4739else
4740 case $CXX in
4741 [\\/]* | ?:[\\/]*)
4742 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4743 ;;
4744 *)
4745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746for as_dir in notfound
4747do
4748 IFS=$as_save_IFS
4749 test -z "$as_dir" && as_dir=.
4750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004752 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4754 break 2
4755 fi
4756done
4757 done
4758IFS=$as_save_IFS
4759
4760 ;;
4761esac
4762fi
4763CXX=$ac_cv_path_CXX
4764if test -n "$CXX"; then
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4766$as_echo "$CXX" >&6; }
4767else
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
4770fi
4771
4772
4773fi
4774if test -z "$ac_cv_path_CXX"; then
4775 ac_pt_CXX=$CXX
4776 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780if ${ac_cv_path_ac_pt_CXX+:} false; then :
4781 $as_echo_n "(cached) " >&6
4782else
4783 case $ac_pt_CXX in
4784 [\\/]* | ?:[\\/]*)
4785 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4786 ;;
4787 *)
4788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in notfound
4790do
4791 IFS=$as_save_IFS
4792 test -z "$as_dir" && as_dir=.
4793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797 break 2
4798 fi
4799done
4800 done
4801IFS=$as_save_IFS
4802
4803 ;;
4804esac
4805fi
4806ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4807if test -n "$ac_pt_CXX"; then
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4809$as_echo "$ac_pt_CXX" >&6; }
4810else
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
4813fi
4814
4815 if test "x$ac_pt_CXX" = x; then
4816 CXX="g++"
4817 else
4818 case $cross_compiling:$ac_tool_warned in
4819yes:)
4820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4822ac_tool_warned=yes ;;
4823esac
4824 CXX=$ac_pt_CXX
4825 fi
4826else
4827 CXX="$ac_cv_path_CXX"
4828fi
4829 ;;
4830 cc) if test -n "$ac_tool_prefix"; then
4831 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4832set dummy ${ac_tool_prefix}c++; ac_word=$2
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4834$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004835if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004836 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004837else
4838 case $CXX in
4839 [\\/]* | ?:[\\/]*)
4840 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4841 ;;
4842 *)
4843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844for as_dir in notfound
4845do
4846 IFS=$as_save_IFS
4847 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004849 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852 break 2
4853 fi
4854done
Matthias Kloseb9621712010-04-24 17:59:49 +00004855 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004856IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004857
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004858 ;;
4859esac
4860fi
4861CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4864$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004865else
Matthias Kloseb9621712010-04-24 17:59:49 +00004866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004868fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004869
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004870
4871fi
4872if test -z "$ac_cv_path_CXX"; then
4873 ac_pt_CXX=$CXX
4874 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004875set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004880else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004881 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004882 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883 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 +00004884 ;;
4885 *)
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in notfound
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004895 break 2
4896 fi
4897done
Matthias Kloseb9621712010-04-24 17:59:49 +00004898 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004899IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004900
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004901 ;;
4902esac
4903fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004904ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4905if test -n "$ac_pt_CXX"; then
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4907$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004908else
Matthias Kloseb9621712010-04-24 17:59:49 +00004909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004912
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004913 if test "x$ac_pt_CXX" = x; then
4914 CXX="c++"
4915 else
4916 case $cross_compiling:$ac_tool_warned in
4917yes:)
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4920ac_tool_warned=yes ;;
4921esac
4922 CXX=$ac_pt_CXX
4923 fi
4924else
4925 CXX="$ac_cv_path_CXX"
4926fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004927 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004928 clang|*/clang) if test -n "$ac_tool_prefix"; then
4929 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4930set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4932$as_echo_n "checking for $ac_word... " >&6; }
4933if ${ac_cv_path_CXX+:} false; then :
4934 $as_echo_n "(cached) " >&6
4935else
4936 case $CXX in
4937 [\\/]* | ?:[\\/]*)
4938 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4939 ;;
4940 *)
4941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942for as_dir in notfound
4943do
4944 IFS=$as_save_IFS
4945 test -z "$as_dir" && as_dir=.
4946 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004948 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950 break 2
4951 fi
4952done
4953 done
4954IFS=$as_save_IFS
4955
Ned Deilycbfb9a52012-06-23 16:02:19 -07004956 ;;
4957esac
4958fi
4959CXX=$ac_cv_path_CXX
4960if test -n "$CXX"; then
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4962$as_echo "$CXX" >&6; }
4963else
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4965$as_echo "no" >&6; }
4966fi
4967
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004968
4969fi
4970if test -z "$ac_cv_path_CXX"; then
4971 ac_pt_CXX=$CXX
4972 # Extract the first word of "clang++", so it can be a program name with args.
4973set dummy clang++; ac_word=$2
4974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4975$as_echo_n "checking for $ac_word... " >&6; }
4976if ${ac_cv_path_ac_pt_CXX+:} false; then :
4977 $as_echo_n "(cached) " >&6
4978else
4979 case $ac_pt_CXX in
4980 [\\/]* | ?:[\\/]*)
4981 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4982 ;;
4983 *)
4984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4985for as_dir in notfound
4986do
4987 IFS=$as_save_IFS
4988 test -z "$as_dir" && as_dir=.
4989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004991 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4993 break 2
4994 fi
4995done
4996 done
4997IFS=$as_save_IFS
4998
4999 ;;
5000esac
5001fi
5002ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5003if test -n "$ac_pt_CXX"; then
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5005$as_echo "$ac_pt_CXX" >&6; }
5006else
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5008$as_echo "no" >&6; }
5009fi
5010
5011 if test "x$ac_pt_CXX" = x; then
5012 CXX="clang++"
5013 else
5014 case $cross_compiling:$ac_tool_warned in
5015yes:)
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5018ac_tool_warned=yes ;;
5019esac
5020 CXX=$ac_pt_CXX
5021 fi
5022else
5023 CXX="$ac_cv_path_CXX"
5024fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005025 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005026 icc|*/icc) if test -n "$ac_tool_prefix"; then
5027 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5028set dummy ${ac_tool_prefix}icpc; ac_word=$2
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_path_CXX+:} false; then :
5032 $as_echo_n "(cached) " >&6
5033else
5034 case $CXX in
5035 [\\/]* | ?:[\\/]*)
5036 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5037 ;;
5038 *)
5039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in notfound
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
5044 for ac_exec_ext in '' $ac_executable_extensions; do
5045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048 break 2
5049 fi
5050done
5051 done
5052IFS=$as_save_IFS
5053
5054 ;;
5055esac
5056fi
5057CXX=$ac_cv_path_CXX
5058if test -n "$CXX"; then
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5060$as_echo "$CXX" >&6; }
5061else
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
5064fi
5065
5066
5067fi
5068if test -z "$ac_cv_path_CXX"; then
5069 ac_pt_CXX=$CXX
5070 # Extract the first word of "icpc", so it can be a program name with args.
5071set dummy icpc; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_path_ac_pt_CXX+:} false; then :
5075 $as_echo_n "(cached) " >&6
5076else
5077 case $ac_pt_CXX in
5078 [\\/]* | ?:[\\/]*)
5079 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5080 ;;
5081 *)
5082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in notfound
5084do
5085 IFS=$as_save_IFS
5086 test -z "$as_dir" && as_dir=.
5087 for ac_exec_ext in '' $ac_executable_extensions; do
5088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091 break 2
5092 fi
5093done
5094 done
5095IFS=$as_save_IFS
5096
5097 ;;
5098esac
5099fi
5100ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5101if test -n "$ac_pt_CXX"; then
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5103$as_echo "$ac_pt_CXX" >&6; }
5104else
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109 if test "x$ac_pt_CXX" = x; then
5110 CXX="icpc"
5111 else
5112 case $cross_compiling:$ac_tool_warned in
5113yes:)
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5116ac_tool_warned=yes ;;
5117esac
5118 CXX=$ac_pt_CXX
5119 fi
5120else
5121 CXX="$ac_cv_path_CXX"
5122fi
5123 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124 esac
5125 if test "$CXX" = "notfound"
5126 then
5127 CXX=""
5128 fi
5129fi
5130if test -z "$CXX"
5131then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005132 if test -n "$ac_tool_prefix"; then
5133 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5134 do
5135 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5136set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5138$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005139if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005140 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005141else
5142 if test -n "$CXX"; then
5143 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5144else
5145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5146for as_dir in $PATH
5147do
5148 IFS=$as_save_IFS
5149 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005151 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005152 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154 break 2
5155 fi
5156done
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005158IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005159
5160fi
5161fi
5162CXX=$ac_cv_prog_CXX
5163if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5165$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166else
Matthias Kloseb9621712010-04-24 17:59:49 +00005167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5168$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005169fi
5170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005171
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005172 test -n "$CXX" && break
5173 done
5174fi
5175if test -z "$CXX"; then
5176 ac_ct_CXX=$CXX
5177 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5178do
5179 # Extract the first word of "$ac_prog", so it can be a program name with args.
5180set dummy $ac_prog; ac_word=$2
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5184 $as_echo_n "(cached) " >&6
5185else
5186 if test -n "$ac_ct_CXX"; then
5187 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5188else
5189as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5190for as_dir in $PATH
5191do
5192 IFS=$as_save_IFS
5193 test -z "$as_dir" && as_dir=.
5194 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005195 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005196 ac_cv_prog_ac_ct_CXX="$ac_prog"
5197 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5198 break 2
5199 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005200done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005201 done
5202IFS=$as_save_IFS
5203
5204fi
5205fi
5206ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5207if test -n "$ac_ct_CXX"; then
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5209$as_echo "$ac_ct_CXX" >&6; }
5210else
5211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5212$as_echo "no" >&6; }
5213fi
5214
5215
5216 test -n "$ac_ct_CXX" && break
5217done
5218
5219 if test "x$ac_ct_CXX" = x; then
5220 CXX="notfound"
5221 else
5222 case $cross_compiling:$ac_tool_warned in
5223yes:)
5224{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5225$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5226ac_tool_warned=yes ;;
5227esac
5228 CXX=$ac_ct_CXX
5229 fi
5230fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005231
5232 if test "$CXX" = "notfound"
5233 then
5234 CXX=""
5235 fi
5236fi
5237if test "$preset_cxx" != "$CXX"
5238then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005239 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005240
5241 By default, distutils will build C++ extension modules with \"$CXX\".
5242 If this is not intended, then set CXX on the configure command line.
5243 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005244$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005245
5246 By default, distutils will build C++ extension modules with \"$CXX\".
5247 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005248 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005249fi
5250
5251
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005252MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5253
5254
5255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5256$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5257cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005258#undef bfin
5259#undef cris
5260#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005261#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005262#undef hppa
5263#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005264#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005265#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005266#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005267#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005268#undef unix
5269#if defined(__linux__)
5270# if defined(__x86_64__) && defined(__LP64__)
5271 x86_64-linux-gnu
5272# elif defined(__x86_64__) && defined(__ILP32__)
5273 x86_64-linux-gnux32
5274# elif defined(__i386__)
5275 i386-linux-gnu
5276# elif defined(__aarch64__) && defined(__AARCH64EL__)
5277# if defined(__ILP32__)
5278 aarch64_ilp32-linux-gnu
5279# else
5280 aarch64-linux-gnu
5281# endif
5282# elif defined(__aarch64__) && defined(__AARCH64EB__)
5283# if defined(__ILP32__)
5284 aarch64_be_ilp32-linux-gnu
5285# else
5286 aarch64_be-linux-gnu
5287# endif
5288# elif defined(__alpha__)
5289 alpha-linux-gnu
5290# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5291# if defined(__ARMEL__)
5292 arm-linux-gnueabihf
5293# else
5294 armeb-linux-gnueabihf
5295# endif
5296# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5297# if defined(__ARMEL__)
5298 arm-linux-gnueabi
5299# else
5300 armeb-linux-gnueabi
5301# endif
5302# elif defined(__hppa__)
5303 hppa-linux-gnu
5304# elif defined(__ia64__)
5305 ia64-linux-gnu
5306# elif defined(__m68k__) && !defined(__mcoldfire__)
5307 m68k-linux-gnu
5308# elif defined(__mips_hard_float) && defined(_MIPSEL)
5309# if _MIPS_SIM == _ABIO32
5310 mipsel-linux-gnu
5311# elif _MIPS_SIM == _ABIN32
5312 mips64el-linux-gnuabin32
5313# elif _MIPS_SIM == _ABI64
5314 mips64el-linux-gnuabi64
5315# else
5316# error unknown platform triplet
5317# endif
5318# elif defined(__mips_hard_float)
5319# if _MIPS_SIM == _ABIO32
5320 mips-linux-gnu
5321# elif _MIPS_SIM == _ABIN32
5322 mips64-linux-gnuabin32
5323# elif _MIPS_SIM == _ABI64
5324 mips64-linux-gnuabi64
5325# else
5326# error unknown platform triplet
5327# endif
5328# elif defined(__or1k__)
5329 or1k-linux-gnu
5330# elif defined(__powerpc__) && defined(__SPE__)
5331 powerpc-linux-gnuspe
5332# elif defined(__powerpc64__)
5333# if defined(__LITTLE_ENDIAN__)
5334 powerpc64le-linux-gnu
5335# else
5336 powerpc64-linux-gnu
5337# endif
5338# elif defined(__powerpc__)
5339 powerpc-linux-gnu
5340# elif defined(__s390x__)
5341 s390x-linux-gnu
5342# elif defined(__s390__)
5343 s390-linux-gnu
5344# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5345 sh4-linux-gnu
5346# elif defined(__sparc__) && defined(__arch64__)
5347 sparc64-linux-gnu
5348# elif defined(__sparc__)
5349 sparc-linux-gnu
5350# else
5351# error unknown platform triplet
5352# endif
5353#elif defined(__FreeBSD_kernel__)
5354# if defined(__LP64__)
5355 x86_64-kfreebsd-gnu
5356# elif defined(__i386__)
5357 i386-kfreebsd-gnu
5358# else
5359# error unknown platform triplet
5360# endif
5361#elif defined(__gnu_hurd__)
5362 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005363#elif defined(__APPLE__)
5364 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005365#else
5366# error unknown platform triplet
5367#endif
5368
5369EOF
5370
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005371if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005372 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5374$as_echo "$PLATFORM_TRIPLET" >&6; }
5375else
5376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5377$as_echo "none" >&6; }
5378fi
5379rm -f conftest.c conftest.out
5380
5381if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5382 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5383 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5384 fi
5385fi
5386PLATDIR=plat-$MACHDEP
5387
5388
5389
5390
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5392$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5393save_LDFLAGS="$LDFLAGS"
5394LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005395
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397/* end confdefs.h. */
5398
5399int
5400main ()
5401{
5402
5403 ;
5404 return 0;
5405}
5406_ACEOF
5407if ac_fn_c_try_link "$LINENO"; then :
5408 NO_AS_NEEDED="-Wl,--no-as-needed"
5409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5410$as_echo "yes" >&6; }
5411else
5412 NO_AS_NEEDED=""
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5414$as_echo "no" >&6; }
5415fi
5416rm -f core conftest.err conftest.$ac_objext \
5417 conftest$ac_exeext conftest.$ac_ext
5418LDFLAGS="$save_LDFLAGS"
5419
5420
5421
5422# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423
Matthias Kloseb9621712010-04-24 17:59:49 +00005424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5425$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005426if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005427 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005428else
5429 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5430 then ac_cv_path_EGREP="$GREP -E"
5431 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005432 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005434 # Loop through the user's path and test for each of PROGNAME-LIST
5435 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005436for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5437do
5438 IFS=$as_save_IFS
5439 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005440 for ac_prog in egrep; do
5441 for ac_exec_ext in '' $ac_executable_extensions; do
5442 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005443 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005444# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 # Check for GNU $ac_path_EGREP
5446case `"$ac_path_EGREP" --version 2>&1` in
5447*GNU*)
5448 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5449*)
5450 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005452 while :
5453 do
5454 cat "conftest.in" "conftest.in" >"conftest.tmp"
5455 mv "conftest.tmp" "conftest.in"
5456 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5459 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5462 # Best one so far, save it but keep looking for a better one
5463 ac_cv_path_EGREP="$ac_path_EGREP"
5464 ac_path_EGREP_max=$ac_count
5465 fi
5466 # 10*(2^10) chars as input seems more than enough
5467 test $ac_count -gt 10 && break
5468 done
5469 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5470esac
5471
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 $ac_path_EGREP_found && break 3
5473 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005474 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005475 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005476IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005478 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 +00005479 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005480else
5481 ac_cv_path_EGREP=$EGREP
5482fi
5483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005484 fi
5485fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5487$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005488 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005489
5490
Matthias Kloseb9621712010-04-24 17:59:49 +00005491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5492$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005493if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005494 $as_echo_n "(cached) " >&6
5495else
5496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005497/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005498#include <stdlib.h>
5499#include <stdarg.h>
5500#include <string.h>
5501#include <float.h>
5502
5503int
5504main ()
5505{
5506
5507 ;
5508 return 0;
5509}
5510_ACEOF
5511if ac_fn_c_try_compile "$LINENO"; then :
5512 ac_cv_header_stdc=yes
5513else
5514 ac_cv_header_stdc=no
5515fi
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517
5518if test $ac_cv_header_stdc = yes; then
5519 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5521/* end confdefs.h. */
5522#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005523
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005524_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005525if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005526 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005527
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005528else
Matthias Kloseb9621712010-04-24 17:59:49 +00005529 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005530fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005531rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005532
Matthias Kloseb9621712010-04-24 17:59:49 +00005533fi
5534
5535if test $ac_cv_header_stdc = yes; then
5536 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5538/* end confdefs.h. */
5539#include <stdlib.h>
5540
5541_ACEOF
5542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5543 $EGREP "free" >/dev/null 2>&1; then :
5544
5545else
5546 ac_cv_header_stdc=no
5547fi
5548rm -f conftest*
5549
5550fi
5551
5552if test $ac_cv_header_stdc = yes; then
5553 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5554 if test "$cross_compiling" = yes; then :
5555 :
5556else
5557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5558/* end confdefs.h. */
5559#include <ctype.h>
5560#include <stdlib.h>
5561#if ((' ' & 0x0FF) == 0x020)
5562# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5563# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5564#else
5565# define ISLOWER(c) \
5566 (('a' <= (c) && (c) <= 'i') \
5567 || ('j' <= (c) && (c) <= 'r') \
5568 || ('s' <= (c) && (c) <= 'z'))
5569# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5570#endif
5571
5572#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5573int
5574main ()
5575{
5576 int i;
5577 for (i = 0; i < 256; i++)
5578 if (XOR (islower (i), ISLOWER (i))
5579 || toupper (i) != TOUPPER (i))
5580 return 2;
5581 return 0;
5582}
5583_ACEOF
5584if ac_fn_c_try_run "$LINENO"; then :
5585
5586else
5587 ac_cv_header_stdc=no
5588fi
5589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5590 conftest.$ac_objext conftest.beam conftest.$ac_ext
5591fi
5592
5593fi
5594fi
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5596$as_echo "$ac_cv_header_stdc" >&6; }
5597if test $ac_cv_header_stdc = yes; then
5598
5599$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5600
5601fi
5602
5603# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5604for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5605 inttypes.h stdint.h unistd.h
5606do :
5607 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5608ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5609"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005610if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005611 cat >>confdefs.h <<_ACEOF
5612#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5613_ACEOF
5614
5615fi
5616
5617done
5618
5619
5620
5621 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 +02005622if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005623 MINIX=yes
5624else
5625 MINIX=
5626fi
5627
5628
5629 if test "$MINIX" = yes; then
5630
5631$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5632
5633
5634$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5635
5636
5637$as_echo "#define _MINIX 1" >>confdefs.h
5638
5639 fi
5640
5641
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5643$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005644if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005645 $as_echo_n "(cached) " >&6
5646else
5647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5648/* end confdefs.h. */
5649
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005650# define __EXTENSIONS__ 1
5651 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005652int
5653main ()
5654{
5655
5656 ;
5657 return 0;
5658}
5659_ACEOF
5660if ac_fn_c_try_compile "$LINENO"; then :
5661 ac_cv_safe_to_define___extensions__=yes
5662else
5663 ac_cv_safe_to_define___extensions__=no
5664fi
5665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5666fi
5667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5668$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5669 test $ac_cv_safe_to_define___extensions__ = yes &&
5670 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5671
5672 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5673
5674 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5675
5676 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5677
5678 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5679
5680
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682# Check for unsupported systems
5683case $ac_sys_system/$ac_sys_release in
5684atheos*|Linux*/1*)
5685 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5686 echo See README for details.
5687 exit 1;;
5688esac
5689
5690
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5692$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
5694# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005695if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696 withval=$with_suffix;
5697 case $withval in
5698 no) EXEEXT=;;
5699 yes) EXEEXT=.exe;;
5700 *) EXEEXT=$withval;;
5701 esac
5702fi
5703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5705$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706
5707# Test whether we're running on a non-case-sensitive system, in which
5708# case we give a warning if no ext is given
5709
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5711$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712if test ! -d CaseSensitiveTestDir; then
5713mkdir CaseSensitiveTestDir
5714fi
5715
5716if test -d casesensitivetestdir
5717then
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5719$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720 BUILDEXEEXT=.exe
5721else
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5723$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005724 BUILDEXEEXT=$EXEEXT
5725fi
5726rmdir CaseSensitiveTestDir
5727
5728case $MACHDEP in
5729bsdos*)
5730 case $CC in
5731 gcc) CC="$CC -D_HAVE_BSDI";;
5732 esac;;
5733esac
5734
5735case $ac_sys_system in
5736hp*|HP*)
5737 case $CC in
5738 cc|*/cc) CC="$CC -Ae";;
5739 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740esac
5741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
Matthias Kloseb9621712010-04-24 17:59:49 +00005743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5744$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745if test -z "$LIBRARY"
5746then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005747 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5750$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751
5752# LDLIBRARY is the name of the library to link against (as opposed to the
5753# name of the library into which to insert object files). BLDLIBRARY is also
5754# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5755# is blank as the main program is not linked directly against LDLIBRARY.
5756# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5757# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5758# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5759# DLLLIBRARY is the shared (i.e., DLL) library.
5760#
5761# RUNSHARED is used to run shared python without installed libraries
5762#
5763# INSTSONAME is the name of the shared library that will be use to install
5764# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005765#
5766# LDVERSION is the shared library version number, normally the Python version
5767# with the ABI build flags appended.
5768
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770
5771
5772
5773
5774
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005776LDLIBRARY="$LIBRARY"
5777BLDLIBRARY='$(LDLIBRARY)'
5778INSTSONAME='$(LDLIBRARY)'
5779DLLLIBRARY=''
5780LDLIBRARYDIR=''
5781RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005782LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
5784# LINKCC is the command that links the python executable -- default is $(CC).
5785# If CXX is set, and if it is needed to link a main function that was
5786# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5787# python might then depend on the C++ runtime
5788# This is altered for AIX in order to build the export list before
5789# linking.
5790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5792$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793if test -z "$LINKCC"
5794then
5795 LINKCC='$(PURIFY) $(MAINCC)'
5796 case $ac_sys_system in
5797 AIX*)
5798 exp_extra="\"\""
5799 if test $ac_sys_release -ge 5 -o \
5800 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5801 exp_extra="."
5802 fi
5803 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 QNX*)
5805 # qcc must be used because the other compilers do not
5806 # support -N.
5807 LINKCC=qcc;;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5811$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
5813# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5814# make sure we default having it set to "no": this is used by
5815# distutils.unixccompiler to know if it should add --enable-new-dtags
5816# to linker command lines, and failing to detect GNU ld simply results
5817# in the same bahaviour as before.
5818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5820$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821ac_prog=ld
5822if test "$GCC" = yes; then
5823 ac_prog=`$CC -print-prog-name=ld`
5824fi
5825case `"$ac_prog" -V 2>&1 < /dev/null` in
5826 *GNU*)
5827 GNULD=yes;;
5828 *)
5829 GNULD=no;;
5830esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5832$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5835$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005836if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005837 $as_echo_n "(cached) " >&6
5838else
5839 ac_cv_c_inline=no
5840for ac_kw in inline __inline__ __inline; do
5841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5842/* end confdefs.h. */
5843#ifndef __cplusplus
5844typedef int foo_t;
5845static $ac_kw foo_t static_foo () {return 0; }
5846$ac_kw foo_t foo () {return 0; }
5847#endif
5848
5849_ACEOF
5850if ac_fn_c_try_compile "$LINENO"; then :
5851 ac_cv_c_inline=$ac_kw
5852fi
5853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5854 test "$ac_cv_c_inline" != no && break
5855done
5856
5857fi
5858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5859$as_echo "$ac_cv_c_inline" >&6; }
5860
5861case $ac_cv_c_inline in
5862 inline | yes) ;;
5863 *)
5864 case $ac_cv_c_inline in
5865 no) ac_val=;;
5866 *) ac_val=$ac_cv_c_inline;;
5867 esac
5868 cat >>confdefs.h <<_ACEOF
5869#ifndef __cplusplus
5870#define inline $ac_val
5871#endif
5872_ACEOF
5873 ;;
5874esac
5875
5876if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005877
5878$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005879
5880
5881fi
5882
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5885$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005887if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 enableval=$enable_shared;
5889fi
5890
5891
5892if test -z "$enable_shared"
5893then
5894 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005895 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 enable_shared="yes";;
5897 *)
5898 enable_shared="no";;
5899 esac
5900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5902$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903
Matthias Kloseb9621712010-04-24 17:59:49 +00005904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5905$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005907if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005908 enableval=$enable_profiling;
5909fi
5910
5911if test "x$enable_profiling" = xyes; then
5912 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005913 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915/* end confdefs.h. */
5916int main() { return 0; }
5917_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005918if ac_fn_c_try_link "$LINENO"; then :
5919
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005921 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005923rm -f core conftest.err conftest.$ac_objext \
5924 conftest$ac_exeext conftest.$ac_ext
5925 CC="$ac_save_cc"
5926else
5927 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5930$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931
doko@ubuntu.comba015832012-06-30 16:52:05 +02005932if test "x$enable_profiling" = xyes; then
5933 BASECFLAGS="-pg $BASECFLAGS"
5934 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935fi
5936
Matthias Kloseb9621712010-04-24 17:59:49 +00005937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5938$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
5940# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5941# library that we build, but we do not want to link against it (we
5942# will find it with a -framework option). For this reason there is an
5943# extra variable BLDLIBRARY against which Python and the extension
5944# modules are linked, BLDLIBRARY. This is normally the same as
5945# LDLIBRARY, but empty for MacOSX framework builds.
5946if test "$enable_framework"
5947then
5948 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005949 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 BLDLIBRARY=''
5951else
5952 BLDLIBRARY='$(LDLIBRARY)'
5953fi
5954
5955# Other platforms follow
5956if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005957 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958
Matthias Kloseb9621712010-04-24 17:59:49 +00005959$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960
5961 case $ac_sys_system in
5962 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005963 LDLIBRARY='libpython$(LDVERSION).dll.a'
5964 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965 ;;
5966 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005967 LDLIBRARY='libpython$(LDVERSION).so'
5968 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005969 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005971 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005972 then
5973 PY3LIBRARY=libpython3.so
5974 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005976 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005977 LDLIBRARY='libpython$(LDVERSION).so'
5978 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005979 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005981 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005982 then
5983 PY3LIBRARY=libpython3.so
5984 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 ;;
5986 hp*|HP*)
5987 case `uname -m` in
5988 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005989 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
5991 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005992 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 ;;
5994 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005995 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005996 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005998 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005999 LDLIBRARY='libpython$(LDVERSION).dylib'
6000 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006001 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006003 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006004 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006005 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006006 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007
6008 esac
6009else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006010 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 case $ac_sys_system in
6012 CYGWIN*)
6013 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006014 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 ;;
6016 esac
6017fi
6018
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006019if test "$cross_compiling" = yes; then
6020 RUNSHARED=
6021fi
6022
Matthias Kloseb9621712010-04-24 17:59:49 +00006023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6024$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025
6026if test -n "$ac_tool_prefix"; then
6027 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6028set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6030$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006031if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033else
6034 if test -n "$RANLIB"; then
6035 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6036else
6037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH
6039do
6040 IFS=$as_save_IFS
6041 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046 break 2
6047 fi
6048done
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050IFS=$as_save_IFS
6051
6052fi
6053fi
6054RANLIB=$ac_cv_prog_RANLIB
6055if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6057$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058else
Matthias Kloseb9621712010-04-24 17:59:49 +00006059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6060$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061fi
6062
6063
6064fi
6065if test -z "$ac_cv_prog_RANLIB"; then
6066 ac_ct_RANLIB=$RANLIB
6067 # Extract the first word of "ranlib", so it can be a program name with args.
6068set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6070$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006071if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006073else
6074 if test -n "$ac_ct_RANLIB"; then
6075 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6076else
6077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6078for as_dir in $PATH
6079do
6080 IFS=$as_save_IFS
6081 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086 break 2
6087 fi
6088done
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090IFS=$as_save_IFS
6091
6092fi
6093fi
6094ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6095if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6097$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098else
Matthias Kloseb9621712010-04-24 17:59:49 +00006099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6100$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101fi
6102
6103 if test "x$ac_ct_RANLIB" = x; then
6104 RANLIB=":"
6105 else
6106 case $cross_compiling:$ac_tool_warned in
6107yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006110ac_tool_warned=yes ;;
6111esac
6112 RANLIB=$ac_ct_RANLIB
6113 fi
6114else
6115 RANLIB="$ac_cv_prog_RANLIB"
6116fi
6117
6118
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006119if test -n "$ac_tool_prefix"; then
6120 for ac_prog in ar aal
6121 do
6122 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6125$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006126if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006127 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006128else
6129 if test -n "$AR"; then
6130 ac_cv_prog_AR="$AR" # Let the user override the test.
6131else
6132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6133for as_dir in $PATH
6134do
6135 IFS=$as_save_IFS
6136 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006139 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006141 break 2
6142 fi
6143done
Matthias Kloseb9621712010-04-24 17:59:49 +00006144 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145IFS=$as_save_IFS
6146
6147fi
6148fi
6149AR=$ac_cv_prog_AR
6150if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6152$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153else
Matthias Kloseb9621712010-04-24 17:59:49 +00006154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6155$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156fi
6157
6158
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006159 test -n "$AR" && break
6160 done
6161fi
6162if test -z "$AR"; then
6163 ac_ct_AR=$AR
6164 for ac_prog in ar aal
6165do
6166 # Extract the first word of "$ac_prog", so it can be a program name with args.
6167set dummy $ac_prog; ac_word=$2
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6169$as_echo_n "checking for $ac_word... " >&6; }
6170if ${ac_cv_prog_ac_ct_AR+:} false; then :
6171 $as_echo_n "(cached) " >&6
6172else
6173 if test -n "$ac_ct_AR"; then
6174 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6175else
6176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH
6178do
6179 IFS=$as_save_IFS
6180 test -z "$as_dir" && as_dir=.
6181 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006182 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006183 ac_cv_prog_ac_ct_AR="$ac_prog"
6184 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6185 break 2
6186 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006188 done
6189IFS=$as_save_IFS
6190
6191fi
6192fi
6193ac_ct_AR=$ac_cv_prog_ac_ct_AR
6194if test -n "$ac_ct_AR"; then
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6196$as_echo "$ac_ct_AR" >&6; }
6197else
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203 test -n "$ac_ct_AR" && break
6204done
6205
6206 if test "x$ac_ct_AR" = x; then
6207 AR="ar"
6208 else
6209 case $cross_compiling:$ac_tool_warned in
6210yes:)
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6213ac_tool_warned=yes ;;
6214esac
6215 AR=$ac_ct_AR
6216 fi
6217fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006218
6219
6220# tweak ARFLAGS only if the user didn't set it on the command line
6221
6222if test -z "$ARFLAGS"
6223then
6224 ARFLAGS="rc"
6225fi
6226
doko@ubuntu.com58844492012-06-30 18:25:32 +02006227if test -n "$ac_tool_prefix"; then
6228 for ac_prog in readelf
6229 do
6230 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6231set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6233$as_echo_n "checking for $ac_word... " >&6; }
6234if ${ac_cv_prog_READELF+:} false; then :
6235 $as_echo_n "(cached) " >&6
6236else
6237 if test -n "$READELF"; then
6238 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6239else
6240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6241for as_dir in $PATH
6242do
6243 IFS=$as_save_IFS
6244 test -z "$as_dir" && as_dir=.
6245 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006246 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006247 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6248 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6249 break 2
6250 fi
6251done
6252 done
6253IFS=$as_save_IFS
6254
6255fi
6256fi
6257READELF=$ac_cv_prog_READELF
6258if test -n "$READELF"; then
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6260$as_echo "$READELF" >&6; }
6261else
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263$as_echo "no" >&6; }
6264fi
6265
6266
6267 test -n "$READELF" && break
6268 done
6269fi
6270if test -z "$READELF"; then
6271 ac_ct_READELF=$READELF
6272 for ac_prog in readelf
6273do
6274 # Extract the first word of "$ac_prog", so it can be a program name with args.
6275set dummy $ac_prog; ac_word=$2
6276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6277$as_echo_n "checking for $ac_word... " >&6; }
6278if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6279 $as_echo_n "(cached) " >&6
6280else
6281 if test -n "$ac_ct_READELF"; then
6282 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6283else
6284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6285for as_dir in $PATH
6286do
6287 IFS=$as_save_IFS
6288 test -z "$as_dir" && as_dir=.
6289 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006290 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006291 ac_cv_prog_ac_ct_READELF="$ac_prog"
6292 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6293 break 2
6294 fi
6295done
6296 done
6297IFS=$as_save_IFS
6298
6299fi
6300fi
6301ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6302if test -n "$ac_ct_READELF"; then
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6304$as_echo "$ac_ct_READELF" >&6; }
6305else
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6307$as_echo "no" >&6; }
6308fi
6309
6310
6311 test -n "$ac_ct_READELF" && break
6312done
6313
6314 if test "x$ac_ct_READELF" = x; then
6315 READELF=":"
6316 else
6317 case $cross_compiling:$ac_tool_warned in
6318yes:)
6319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6321ac_tool_warned=yes ;;
6322esac
6323 READELF=$ac_ct_READELF
6324 fi
6325fi
6326
6327if test "$cross_compiling" = yes; then
6328 case "$READELF" in
6329 readelf|:)
6330 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6331 ;;
6332 esac
6333fi
6334
6335
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337case $MACHDEP in
6338bsdos*|hp*|HP*)
6339 # install -d does not work on BSDI or HP-UX
6340 if test -z "$INSTALL"
6341 then
6342 INSTALL="${srcdir}/install-sh -c"
6343 fi
6344esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345# Find a good install program. We prefer a C program (faster),
6346# so one script is as good as another. But avoid the broken or
6347# incompatible versions:
6348# SysV /etc/install, /usr/sbin/install
6349# SunOS /usr/etc/install
6350# IRIX /sbin/install
6351# AIX /bin/install
6352# AmigaOS /C/install, which installs bootblocks on floppy discs
6353# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6354# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6355# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6356# OS/2's system install, which has a completely different semantic
6357# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006358# Reject install programs that cannot install multiple files.
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6360$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006362if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006363 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364else
6365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6366for as_dir in $PATH
6367do
6368 IFS=$as_save_IFS
6369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006370 # Account for people who put trailing slashes in PATH elements.
6371case $as_dir/ in #((
6372 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006374 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006375 /usr/ucb/* ) ;;
6376 *)
6377 # OSF1 and SCO ODT 3.0 have their own names for install.
6378 # Don't use installbsd from OSF since it installs stuff as root
6379 # by default.
6380 for ac_prog in ginstall scoinst install; do
6381 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006382 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383 if test $ac_prog = install &&
6384 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6385 # AIX install. It has an incompatible calling convention.
6386 :
6387 elif test $ac_prog = install &&
6388 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6389 # program-specific install script used by HP pwplus--don't use.
6390 :
6391 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006392 rm -rf conftest.one conftest.two conftest.dir
6393 echo one > conftest.one
6394 echo two > conftest.two
6395 mkdir conftest.dir
6396 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6397 test -s conftest.one && test -s conftest.two &&
6398 test -s conftest.dir/conftest.one &&
6399 test -s conftest.dir/conftest.two
6400 then
6401 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6402 break 3
6403 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006404 fi
6405 fi
6406 done
6407 done
6408 ;;
6409esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006410
6411 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412IFS=$as_save_IFS
6413
Matthias Kloseb9621712010-04-24 17:59:49 +00006414rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415
6416fi
6417 if test "${ac_cv_path_install+set}" = set; then
6418 INSTALL=$ac_cv_path_install
6419 else
6420 # As a last resort, use the slow shell script. Don't cache a
6421 # value for INSTALL within a source directory, because that will
6422 # break other packages using the cache if that directory is
6423 # removed, or if the value is a relative name.
6424 INSTALL=$ac_install_sh
6425 fi
6426fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6428$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429
6430# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6431# It thinks the first close brace ends the variable substitution.
6432test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6433
6434test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6435
6436test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6437
Matthias Klose93a0ef12012-03-15 18:08:34 +01006438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6439$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6440if test -z "$MKDIR_P"; then
6441 if ${ac_cv_path_mkdir+:} false; then :
6442 $as_echo_n "(cached) " >&6
6443else
6444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6445for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6446do
6447 IFS=$as_save_IFS
6448 test -z "$as_dir" && as_dir=.
6449 for ac_prog in mkdir gmkdir; do
6450 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006451 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006452 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6453 'mkdir (GNU coreutils) '* | \
6454 'mkdir (coreutils) '* | \
6455 'mkdir (fileutils) '4.1*)
6456 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6457 break 3;;
6458 esac
6459 done
6460 done
6461 done
6462IFS=$as_save_IFS
6463
6464fi
6465
6466 test -d ./--version && rmdir ./--version
6467 if test "${ac_cv_path_mkdir+set}" = set; then
6468 MKDIR_P="$ac_cv_path_mkdir -p"
6469 else
6470 # As a last resort, use the slow shell script. Don't cache a
6471 # value for MKDIR_P within a source directory, because that will
6472 # break other packages using the cache if that directory is
6473 # removed, or if the value is a relative name.
6474 MKDIR_P="$ac_install_sh -d"
6475 fi
6476fi
6477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6478$as_echo "$MKDIR_P" >&6; }
6479
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006480
6481# Not every filesystem supports hard links
6482
6483if test -z "$LN" ; then
6484 case $ac_sys_system in
6485 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006486 *) LN=ln;;
6487 esac
6488fi
6489
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006490# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006491
6492ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6496$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497
6498# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006499if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006500 withval=$with_pydebug;
6501if test "$withval" != no
6502then
6503
Matthias Kloseb9621712010-04-24 17:59:49 +00006504$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505
Matthias Kloseb9621712010-04-24 17:59:49 +00006506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6507$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006508 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006509 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006510else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6511$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512fi
6513else
Matthias Kloseb9621712010-04-24 17:59:49 +00006514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006516fi
6517
6518
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006519# Enable LTO flags
6520
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6522$as_echo_n "checking for --with-lto... " >&6; }
6523
6524# Check whether --with-lto was given.
6525if test "${with_lto+set}" = set; then :
6526 withval=$with_lto;
6527if test "$withval" != no
6528then
6529 Py_LTO='true'
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6531$as_echo "yes" >&6; };
6532else
6533 Py_LTO='false'
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; };
6536fi
6537else
6538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6539$as_echo "no" >&6; }
6540fi
6541
6542if test "$Py_LTO" = 'true' ; then
6543 case $CC in
6544 *clang*)
6545 # Any changes made here should be reflected in the GCC+Darwin case below
6546 LTOFLAGS="-flto"
6547 ;;
6548 *gcc*)
6549 case $ac_sys_system in
6550 Darwin*)
6551 LTOFLAGS="-flto"
6552 ;;
6553 *)
6554 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6555 ;;
6556 esac
6557 ;;
6558 esac
6559fi
6560
Brett Cannon7188a3e2015-09-18 15:13:44 -07006561# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006562
6563
6564
6565
6566
6567
Brett Cannon7188a3e2015-09-18 15:13:44 -07006568# Extract the first word of "llvm-profdata", so it can be a program name with args.
6569set dummy llvm-profdata; ac_word=$2
6570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571$as_echo_n "checking for $ac_word... " >&6; }
6572if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6573 $as_echo_n "(cached) " >&6
6574else
6575 if test -n "$LLVM_PROF_FOUND"; then
6576 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6577else
6578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6579for as_dir in $PATH
6580do
6581 IFS=$as_save_IFS
6582 test -z "$as_dir" && as_dir=.
6583 for ac_exec_ext in '' $ac_executable_extensions; do
6584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6585 ac_cv_prog_LLVM_PROF_FOUND="found"
6586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6587 break 2
6588 fi
6589done
6590 done
6591IFS=$as_save_IFS
6592
6593 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6594fi
6595fi
6596LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6597if test -n "$LLVM_PROF_FOUND"; then
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6599$as_echo "$LLVM_PROF_FOUND" >&6; }
6600else
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602$as_echo "no" >&6; }
6603fi
6604
6605
6606LLVM_PROF_ERR=no
6607case $CC in
6608 *clang*)
6609 # Any changes made here should be reflected in the GCC+Darwin case below
6610 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6611 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6612 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6613 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6614 if test $LLVM_PROF_FOUND = not-found
6615 then
6616 LLVM_PROF_ERR=yes
6617 fi
6618 ;;
6619 *gcc*)
6620 case $ac_sys_system in
6621 Darwin*)
6622 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6623 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6624 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6625 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6626 if test $LLVM_PROF_FOUND = not-found
6627 then
6628 LLVM_PROF_ERR=yes
6629 fi
6630 ;;
6631 *)
6632 PGO_PROF_GEN_FLAG="-fprofile-generate"
6633 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6634 LLVM_PROF_MERGER="true"
6635 LLVM_PROF_FILE=""
6636 ;;
6637 esac
6638 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006639 *icc*)
6640 PGO_PROF_GEN_FLAG="-prof-gen"
6641 PGO_PROF_USE_FLAG="-prof-use"
6642 LLVM_PROF_MERGER="true"
6643 LLVM_PROF_FILE=""
6644 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006645esac
6646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6648# merged with this chunk of code?
6649
6650# Optimizer/debugger flags
6651# ------------------------
6652# (The following bit of code is complicated enough - please keep things
6653# indented properly. Just pretend you're editing Python code. ;-)
6654
6655# There are two parallel sets of case statements below, one that checks to
6656# see if OPT was set and one that does BASECFLAGS setting based upon
6657# compiler and platform. BASECFLAGS tweaks need to be made even if the
6658# user set OPT.
6659
6660# tweak OPT based on compiler and platform, only if the user didn't set
6661# it on the command line
6662
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006663if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664then
6665 case $GCC in
6666 yes)
6667 if test "$CC" != 'g++' ; then
6668 STRICT_PROTO="-Wstrict-prototypes"
6669 fi
6670 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6671 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6672 WRAP="-fwrapv"
6673 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006674
6675 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006676 case $CC in
6677 *clang*) WRAP="-fwrapv"
6678 ;;
6679 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006680
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681 case $ac_cv_prog_cc_g in
6682 yes)
6683 if test "$Py_DEBUG" = 'true' ; then
6684 # Optimization messes up debuggers, so turn it off for
6685 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006686 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6687 OPT="-g -Og -Wall $STRICT_PROTO"
6688 else
6689 OPT="-g -O0 -Wall $STRICT_PROTO"
6690 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691 else
6692 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6693 fi
6694 ;;
6695 *)
6696 OPT="-O3 -Wall $STRICT_PROTO"
6697 ;;
6698 esac
6699 case $ac_sys_system in
6700 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6701 ;;
6702 esac
6703 ;;
6704
6705 *)
6706 OPT="-O"
6707 ;;
6708 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709fi
6710
6711
6712
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714# The -arch flags for universal builds on OSX
6715UNIVERSAL_ARCH_FLAGS=
6716
6717
6718# tweak BASECFLAGS based on compiler and platform
6719case $GCC in
6720yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006721 # Python doesn't violate C99 aliasing rules, but older versions of
6722 # GCC produce warnings for legal Python code. Enable
6723 # -fno-strict-aliasing on versions of GCC that support but produce
6724 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6726$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 ac_save_cc="$CC"
6728 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006729 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006730 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006731 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006732else
Matthias Kloseb9621712010-04-24 17:59:49 +00006733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006735
Matthias Kloseb159a552010-04-25 21:00:44 +00006736
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006737int
6738main ()
6739{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006740
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006741 ;
6742 return 0;
6743}
Matthias Kloseb159a552010-04-25 21:00:44 +00006744
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006746if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006747
6748 CC="$ac_save_cc -fstrict-aliasing"
6749 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006751/* end confdefs.h. */
6752
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006753 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006754int
6755main ()
6756{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006757double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006758 ;
6759 return 0;
6760}
Matthias Kloseb159a552010-04-25 21:00:44 +00006761
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006763if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006764
6765 ac_cv_no_strict_aliasing=no
6766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767else
Matthias Kloseb159a552010-04-25 21:00:44 +00006768
6769 ac_cv_no_strict_aliasing=yes
6770
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006771fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006773
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006774else
Matthias Kloseb159a552010-04-25 21:00:44 +00006775
6776 ac_cv_no_strict_aliasing=no
6777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006780fi
6781
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006782 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6785$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006786 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006787 then
6788 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6789 fi
6790
Zachary Ware5af85642015-12-21 12:09:17 -06006791 # ICC doesn't recognize the option, but only emits a warning
6792 ## XXX does it emit an unused result warning and can it be disabled?
6793 case "$CC" in
6794 *icc*)
6795 ac_cv_disable_unused_result_warning=no
6796 ;;
6797 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6799$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6800 ac_save_cc="$CC"
6801 CC="$CC -Wunused-result -Werror"
6802 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006803 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006804 $as_echo_n "(cached) " >&6
6805else
6806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6807/* end confdefs.h. */
6808
6809
6810int
6811main ()
6812{
6813
6814 ;
6815 return 0;
6816}
6817
6818_ACEOF
6819if ac_fn_c_try_compile "$LINENO"; then :
6820
6821 ac_cv_disable_unused_result_warning=yes
6822
6823else
6824
6825 ac_cv_disable_unused_result_warning=no
6826
6827fi
6828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6829fi
6830
6831 CFLAGS="$save_CFLAGS"
6832 CC="$ac_save_cc"
6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6834$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006835 ;;
6836 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006837
6838 if test $ac_cv_disable_unused_result_warning = yes
6839 then
6840 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6841 fi
6842
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6844$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6845 ac_save_cc="$CC"
6846 CC="$CC -Werror=declaration-after-statement"
6847 save_CFLAGS="$CFLAGS"
6848 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6849 $as_echo_n "(cached) " >&6
6850else
6851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6852/* end confdefs.h. */
6853
6854
6855int
6856main ()
6857{
6858
6859 ;
6860 return 0;
6861}
6862
6863_ACEOF
6864if ac_fn_c_try_compile "$LINENO"; then :
6865
6866 ac_cv_declaration_after_statement_warning=yes
6867
6868else
6869
6870 ac_cv_declaration_after_statement_warning=no
6871
6872fi
6873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6874fi
6875
6876 CFLAGS="$save_CFLAGS"
6877 CC="$ac_save_cc"
6878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6879$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6880
6881 if test $ac_cv_declaration_after_statement_warning = yes
6882 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006883 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006884 fi
6885
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6887$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6888 ac_save_cc="$CC"
6889 CC="$CC -Wsign-compare"
6890 save_CFLAGS="$CFLAGS"
6891 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6892 $as_echo_n "(cached) " >&6
6893else
6894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6895/* end confdefs.h. */
6896
6897
6898int
6899main ()
6900{
6901
6902 ;
6903 return 0;
6904}
6905
6906_ACEOF
6907if ac_fn_c_try_compile "$LINENO"; then :
6908
6909 ac_cv_enable_sign_compare_warning=yes
6910
6911else
6912
6913 ac_cv_enable_sign_compare_warning=no
6914
6915fi
6916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6917fi
6918
6919 CFLAGS="$save_CFLAGS"
6920 CC="$ac_save_cc"
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6922$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6923
6924 if test $ac_cv_enable_sign_compare_warning = yes
6925 then
6926 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6927 fi
6928
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6930$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6931 ac_save_cc="$CC"
6932 CC="$CC -Wunreachable-code"
6933 save_CFLAGS="$CFLAGS"
6934 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6935 $as_echo_n "(cached) " >&6
6936else
6937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6938/* end confdefs.h. */
6939
6940
6941int
6942main ()
6943{
6944
6945 ;
6946 return 0;
6947}
6948
6949_ACEOF
6950if ac_fn_c_try_compile "$LINENO"; then :
6951
6952 ac_cv_enable_unreachable_code_warning=yes
6953
6954else
6955
6956 ac_cv_enable_unreachable_code_warning=no
6957
6958fi
6959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6960fi
6961
6962 CFLAGS="$save_CFLAGS"
6963 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006964
6965 # Don't enable unreachable code warning in debug mode, since it usually
6966 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006967 # Issue #24324: Unfortunately, the unreachable code warning does not work
6968 # correctly on gcc and has been silently removed from the compiler.
6969 # It is supported on clang but on OS X systems gcc may be an alias
6970 # for clang. Try to determine if the compiler is not really gcc and,
6971 # if so, only then enable the warning.
6972 if test $ac_cv_enable_unreachable_code_warning = yes && \
6973 test "$Py_DEBUG" != "true" && \
6974 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006975 then
6976 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006977 else
6978 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006979 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6981$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006982
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006983 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6984 # support. Without this, treatment of subnormals doesn't follow
6985 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006986 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987 alpha*)
6988 BASECFLAGS="$BASECFLAGS -mieee"
6989 ;;
6990 esac
6991
6992 case $ac_sys_system in
6993 SCO_SV*)
6994 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6995 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006996
6997 # is there any other compiler on Darwin besides gcc?
6998 Darwin*)
6999 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7000 # used to be here, but non-Apple gcc doesn't accept them.
7001 if test "${CC}" = gcc
7002 then
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007004$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007005 case "${UNIVERSALSDK}" in
7006 */MacOSX10.4u.sdk)
7007 # Build using 10.4 SDK, force usage of gcc when the
7008 # compiler is gcc, otherwise the user will get very
7009 # confusing error messages when building on OSX 10.6
7010 CC=gcc-4.0
7011 CPP=cpp-4.0
7012 ;;
7013 esac
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007015$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007016 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017
Ned Deily87adb6e2013-10-18 21:09:56 -07007018 if test "${enable_universalsdk}"
7019 then
7020 case "$UNIVERSAL_ARCHS" in
7021 32-bit)
7022 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7023 LIPO_32BIT_FLAGS=""
7024 ARCH_RUN_32BIT=""
7025 ;;
7026 64-bit)
7027 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7028 LIPO_32BIT_FLAGS=""
7029 ARCH_RUN_32BIT="true"
7030 ;;
7031 all)
7032 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7033 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7034 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7035 ;;
7036 intel)
7037 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7038 LIPO_32BIT_FLAGS="-extract i386"
7039 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7040 ;;
7041 intel-32)
7042 UNIVERSAL_ARCH_FLAGS="-arch i386"
7043 LIPO_32BIT_FLAGS=""
7044 ARCH_RUN_32BIT=""
7045 ;;
7046 3-way)
7047 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7048 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7049 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7050 ;;
7051 *)
7052 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7053 ;;
7054 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007055
Ned Deily87adb6e2013-10-18 21:09:56 -07007056 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7057 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7058 if test "${UNIVERSALSDK}" != "/"
7059 then
7060 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7061 fi
7062 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007063
Ned Deily87adb6e2013-10-18 21:09:56 -07007064 # Calculate an appropriate deployment target for this build:
7065 # The deployment target value is used explicitly to enable certain
7066 # features are enabled (such as builtin libedit support for readline)
7067 # through the use of Apple's Availabiliy Macros and is used as a
7068 # component of the string returned by distutils.get_platform().
7069 #
7070 # Use the value from:
7071 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7072 # 2. the operating system version of the build machine if >= 10.6
7073 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7074 # below to pick either 10.3, 10.4, or 10.5 as the target.
7075 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007076
Ned Deily87adb6e2013-10-18 21:09:56 -07007077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7078$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007079 cur_target_major=`sw_vers -productVersion | \
7080 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7081 cur_target_minor=`sw_vers -productVersion | \
7082 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7083 cur_target="${cur_target_major}.${cur_target_minor}"
7084 if test ${cur_target_major} -eq 10 && \
7085 test ${cur_target_minor} -ge 3 && \
7086 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007087 then
Ned Deily36820b62014-06-25 13:44:22 -07007088 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007089 cur_target=10.3
7090 if test ${enable_universalsdk}
7091 then
7092 case "$UNIVERSAL_ARCHS" in
7093 all|3-way|intel|64-bit)
7094 # These configurations were first supported in 10.5
7095 cur_target='10.5'
7096 ;;
7097 esac
7098 else
7099 if test `/usr/bin/arch` = "i386"
7100 then
7101 # 10.4 was the first release to support Intel archs
7102 cur_target="10.4"
7103 fi
7104 fi
7105 fi
7106 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007107
Ned Deily87adb6e2013-10-18 21:09:56 -07007108 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7109 # environment with a value that is the same as what we'll use
7110 # in the Makefile to ensure that we'll get the same compiler
7111 # environment during configure and build time.
7112 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7113 export MACOSX_DEPLOYMENT_TARGET
7114 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7116$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007117
Ned Deily87adb6e2013-10-18 21:09:56 -07007118 # end of Darwin* tests
7119 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007120 esac
7121 ;;
7122
7123*)
7124 case $ac_sys_system in
7125 OpenUNIX*|UnixWare*)
7126 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7127 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007128 SCO_SV*)
7129 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7130 ;;
7131 esac
7132 ;;
7133esac
7134
Zachary Ware5af85642015-12-21 12:09:17 -06007135# ICC needs -fp-model strict or floats behave badly
7136case "$CC" in
7137*icc*)
7138 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7139 ;;
7140esac
7141
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007142if test "$Py_DEBUG" = 'true'; then
7143 :
7144else
7145 OPT="-DNDEBUG $OPT"
7146fi
7147
7148if test "$ac_arch_flags"
7149then
7150 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7151fi
7152
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007153# On some compilers, pthreads are available without further options
7154# (e.g. MacOS X). On some of these systems, the compiler will not
7155# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7156# So we have to see first whether pthreads are available without
7157# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7159$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007160if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007161 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007162else
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164 ac_cv_pthread_is_default=no
7165else
Matthias Kloseb9621712010-04-24 17:59:49 +00007166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007167/* end confdefs.h. */
7168
Stefan Krah7dba5942012-11-22 22:49:11 +01007169#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007170#include <pthread.h>
7171
7172void* routine(void* p){return NULL;}
7173
7174int main(){
7175 pthread_t p;
7176 if(pthread_create(&p,NULL,routine,NULL)!=0)
7177 return 1;
7178 (void)pthread_detach(p);
7179 return 0;
7180}
7181
7182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007183if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007184
7185 ac_cv_pthread_is_default=yes
7186 ac_cv_kthread=no
7187 ac_cv_pthread=no
7188
7189else
Matthias Kloseb9621712010-04-24 17:59:49 +00007190 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7193 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194fi
7195
7196
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007197fi
7198
Matthias Kloseb9621712010-04-24 17:59:49 +00007199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7200$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201
7202
7203if test $ac_cv_pthread_is_default = yes
7204then
7205 ac_cv_kpthread=no
7206else
7207# -Kpthread, if available, provides the right #defines
7208# and linker options to make pthread_create available
7209# Some compilers won't report that they do not support -Kpthread,
7210# so we need to run a program to see whether it really made the
7211# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7213$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007214if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007215 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216else
7217 ac_save_cc="$CC"
7218CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007219if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007220 ac_cv_kpthread=no
7221else
Matthias Kloseb9621712010-04-24 17:59:49 +00007222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223/* end confdefs.h. */
7224
Stefan Krah7dba5942012-11-22 22:49:11 +01007225#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007226#include <pthread.h>
7227
7228void* routine(void* p){return NULL;}
7229
7230int main(){
7231 pthread_t p;
7232 if(pthread_create(&p,NULL,routine,NULL)!=0)
7233 return 1;
7234 (void)pthread_detach(p);
7235 return 0;
7236}
7237
7238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007239if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240 ac_cv_kpthread=yes
7241else
Matthias Kloseb9621712010-04-24 17:59:49 +00007242 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007244rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7245 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007246fi
7247
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007248CC="$ac_save_cc"
7249fi
7250
Matthias Kloseb9621712010-04-24 17:59:49 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7252$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007253fi
7254
7255if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7256then
7257# -Kthread, if available, provides the right #defines
7258# and linker options to make pthread_create available
7259# Some compilers won't report that they do not support -Kthread,
7260# so we need to run a program to see whether it really made the
7261# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7263$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007264if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007265 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266else
7267 ac_save_cc="$CC"
7268CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007269if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270 ac_cv_kthread=no
7271else
Matthias Kloseb9621712010-04-24 17:59:49 +00007272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007273/* end confdefs.h. */
7274
Stefan Krah7dba5942012-11-22 22:49:11 +01007275#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007276#include <pthread.h>
7277
7278void* routine(void* p){return NULL;}
7279
7280int main(){
7281 pthread_t p;
7282 if(pthread_create(&p,NULL,routine,NULL)!=0)
7283 return 1;
7284 (void)pthread_detach(p);
7285 return 0;
7286}
7287
7288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007289if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 ac_cv_kthread=yes
7291else
Matthias Kloseb9621712010-04-24 17:59:49 +00007292 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7295 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296fi
7297
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298CC="$ac_save_cc"
7299fi
7300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7302$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007303fi
7304
7305if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7306then
7307# -pthread, if available, provides the right #defines
7308# and linker options to make pthread_create available
7309# Some compilers won't report that they do not support -pthread,
7310# so we need to run a program to see whether it really made the
7311# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7313$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007314if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007315 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316else
7317 ac_save_cc="$CC"
7318CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007319if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320 ac_cv_pthread=no
7321else
Matthias Kloseb9621712010-04-24 17:59:49 +00007322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323/* end confdefs.h. */
7324
Stefan Krah7dba5942012-11-22 22:49:11 +01007325#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007326#include <pthread.h>
7327
7328void* routine(void* p){return NULL;}
7329
7330int main(){
7331 pthread_t p;
7332 if(pthread_create(&p,NULL,routine,NULL)!=0)
7333 return 1;
7334 (void)pthread_detach(p);
7335 return 0;
7336}
7337
7338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007339if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340 ac_cv_pthread=yes
7341else
Matthias Kloseb9621712010-04-24 17:59:49 +00007342 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346fi
7347
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007348CC="$ac_save_cc"
7349fi
7350
Matthias Kloseb9621712010-04-24 17:59:49 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7352$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007353fi
7354
7355# If we have set a CC compiler flag for thread support then
7356# check if it works for CXX, too.
7357ac_cv_cxx_thread=no
7358if test ! -z "$CXX"
7359then
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7361$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362ac_save_cxx="$CXX"
7363
7364if test "$ac_cv_kpthread" = "yes"
7365then
7366 CXX="$CXX -Kpthread"
7367 ac_cv_cxx_thread=yes
7368elif test "$ac_cv_kthread" = "yes"
7369then
7370 CXX="$CXX -Kthread"
7371 ac_cv_cxx_thread=yes
7372elif test "$ac_cv_pthread" = "yes"
7373then
7374 CXX="$CXX -pthread"
7375 ac_cv_cxx_thread=yes
7376fi
7377
7378if test $ac_cv_cxx_thread = yes
7379then
7380 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7381 $CXX -c conftest.$ac_ext 2>&5
7382 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7383 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7384 then
7385 ac_cv_cxx_thread=yes
7386 else
7387 ac_cv_cxx_thread=no
7388 fi
7389 rm -fr conftest*
7390fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7392$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007393fi
7394CXX="$ac_save_cxx"
7395
7396
7397# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7399$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007400if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007401 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404/* end confdefs.h. */
7405#include <stdlib.h>
7406#include <stdarg.h>
7407#include <string.h>
7408#include <float.h>
7409
7410int
7411main ()
7412{
7413
7414 ;
7415 return 0;
7416}
7417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007418if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419 ac_cv_header_stdc=yes
7420else
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7424
7425if test $ac_cv_header_stdc = yes; then
7426 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428/* end confdefs.h. */
7429#include <string.h>
7430
7431_ACEOF
7432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007433 $EGREP "memchr" >/dev/null 2>&1; then :
7434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435else
7436 ac_cv_header_stdc=no
7437fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007438rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439
7440fi
7441
7442if test $ac_cv_header_stdc = yes; then
7443 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007445/* end confdefs.h. */
7446#include <stdlib.h>
7447
7448_ACEOF
7449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 $EGREP "free" >/dev/null 2>&1; then :
7451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452else
7453 ac_cv_header_stdc=no
7454fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007455rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456
7457fi
7458
7459if test $ac_cv_header_stdc = yes; then
7460 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462 :
7463else
Matthias Kloseb9621712010-04-24 17:59:49 +00007464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465/* end confdefs.h. */
7466#include <ctype.h>
7467#include <stdlib.h>
7468#if ((' ' & 0x0FF) == 0x020)
7469# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7470# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7471#else
7472# define ISLOWER(c) \
7473 (('a' <= (c) && (c) <= 'i') \
7474 || ('j' <= (c) && (c) <= 'r') \
7475 || ('s' <= (c) && (c) <= 'z'))
7476# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7477#endif
7478
7479#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7480int
7481main ()
7482{
7483 int i;
7484 for (i = 0; i < 256; i++)
7485 if (XOR (islower (i), ISLOWER (i))
7486 || toupper (i) != TOUPPER (i))
7487 return 2;
7488 return 0;
7489}
7490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007491if ac_fn_c_try_run "$LINENO"; then :
7492
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493else
Matthias Kloseb9621712010-04-24 17:59:49 +00007494 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7497 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498fi
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500fi
7501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7503$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504if test $ac_cv_header_stdc = yes; then
7505
Matthias Kloseb9621712010-04-24 17:59:49 +00007506$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507
7508fi
7509
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007510for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007511fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007512ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007513sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007514unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007515poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007516sys/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 +01007517sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007518sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007519sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007520sys/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 -07007521libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007522bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007523sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007524do :
7525 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7526ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007527if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007528 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007529#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007530_ACEOF
7531
7532fi
7533
Guido van Rossum627b2d71993-12-24 10:39:16 +00007534done
7535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007536ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007537for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007538 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7540$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007541if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007543else
Matthias Kloseb9621712010-04-24 17:59:49 +00007544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007545/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007546#include <sys/types.h>
7547#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007548
Martin v. Löwis11437992002-04-12 09:54:03 +00007549int
7550main ()
7551{
7552if ((DIR *) 0)
7553return 0;
7554 ;
7555 return 0;
7556}
7557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007560else
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007565eval ac_res=\$$as_ac_Header
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7567$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007568if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007569 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007570#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007571_ACEOF
7572
7573ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007574fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007575
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007576done
7577# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7578if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7580$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007581if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007582 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007583else
Martin v. Löwis11437992002-04-12 09:54:03 +00007584 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007587
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588/* Override any GCC internal prototype to avoid an error.
7589 Use char because int might match the return type of a GCC
7590 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007591#ifdef __cplusplus
7592extern "C"
7593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007594char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 ;
7600 return 0;
7601}
7602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603for ac_lib in '' dir; do
7604 if test -z "$ac_lib"; then
7605 ac_res="none required"
7606 else
7607 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007608 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613rm -f core conftest.err conftest.$ac_objext \
7614 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007615 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007616 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618done
Victor Stinnere0be4232011-10-25 13:06:09 +02007619if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621else
7622 ac_cv_search_opendir=no
7623fi
7624rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007625LIBS=$ac_func_search_save_LIBS
7626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7628$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007630if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007631 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007632
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007634
Michael W. Hudson54241132001-12-07 15:38:26 +00007635else
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7637$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007638if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007639 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007640else
7641 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007644
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645/* Override any GCC internal prototype to avoid an error.
7646 Use char because int might match the return type of a GCC
7647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007648#ifdef __cplusplus
7649extern "C"
7650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007651char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
7654{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ;
7657 return 0;
7658}
7659_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660for ac_lib in '' x; do
7661 if test -z "$ac_lib"; then
7662 ac_res="none required"
7663 else
7664 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007665 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007670rm -f core conftest.err conftest.$ac_objext \
7671 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007672 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675done
Victor Stinnere0be4232011-10-25 13:06:09 +02007676if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678else
7679 ac_cv_search_opendir=no
7680fi
7681rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007682LIBS=$ac_func_search_save_LIBS
7683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7685$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007687if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007688 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007689
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007690fi
7691
7692fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007693
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7695$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007696if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007698else
Matthias Kloseb9621712010-04-24 17:59:49 +00007699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007700/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007701#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007702int
7703main ()
7704{
7705return makedev(0, 0);
7706 ;
7707 return 0;
7708}
7709_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007710if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007711 ac_cv_header_sys_types_h_makedev=yes
7712else
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715rm -f core conftest.err conftest.$ac_objext \
7716 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007717
7718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7720$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007721
7722if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007723ac_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 +02007724if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007725
Matthias Kloseb9621712010-04-24 17:59:49 +00007726$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007727
7728fi
7729
7730
7731
7732 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007733 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 +02007734if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007735
Matthias Kloseb9621712010-04-24 17:59:49 +00007736$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007737
7738fi
7739
7740
7741 fi
7742fi
7743
Michael W. Hudson54241132001-12-07 15:38:26 +00007744
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007745# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7746for ac_header in net/if.h
7747do :
7748 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7749#ifdef STDC_HEADERS
7750# include <stdlib.h>
7751# include <stddef.h>
7752#else
7753# ifdef HAVE_STDLIB_H
7754# include <stdlib.h>
7755# endif
7756#endif
7757#ifdef HAVE_SYS_SOCKET_H
7758# include <sys/socket.h>
7759#endif
7760
7761"
Victor Stinnere0be4232011-10-25 13:06:09 +02007762if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007763 cat >>confdefs.h <<_ACEOF
7764#define HAVE_NET_IF_H 1
7765_ACEOF
7766
7767fi
7768
7769done
7770
7771
Martin v. Löwis11017b12006-01-14 18:12:57 +00007772# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007773for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007774do :
7775 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 +00007776#ifdef HAVE_ASM_TYPES_H
7777#include <asm/types.h>
7778#endif
7779#ifdef HAVE_SYS_SOCKET_H
7780#include <sys/socket.h>
7781#endif
7782
Matthias Kloseb9621712010-04-24 17:59:49 +00007783"
Victor Stinnere0be4232011-10-25 13:06:09 +02007784if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007785 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007786#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007787_ACEOF
7788
7789fi
7790
7791done
7792
7793
Charles-François Natali47413c12011-10-06 19:47:44 +02007794# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007795for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007796do :
7797 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7798ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7799#ifdef HAVE_SYS_SOCKET_H
7800#include <sys/socket.h>
7801#endif
7802
7803"
7804if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7805 cat >>confdefs.h <<_ACEOF
7806#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7807_ACEOF
7808
7809fi
7810
7811done
7812
7813
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007815was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7817$as_echo_n "checking for clock_t in time.h... " >&6; }
7818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007819/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007821
7822_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007825 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826else
Martin v. Löwis11437992002-04-12 09:54:03 +00007827
7828
Matthias Kloseb9621712010-04-24 17:59:49 +00007829$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007830
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007831
Guido van Rossum627b2d71993-12-24 10:39:16 +00007832fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007833rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007834
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7836$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007837
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7839$as_echo_n "checking for makedev... " >&6; }
7840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007841/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007842
Jesus Cea740f53a2010-04-28 11:35:30 +00007843#if defined(MAJOR_IN_MKDEV)
7844#include <sys/mkdev.h>
7845#elif defined(MAJOR_IN_SYSMACROS)
7846#include <sys/sysmacros.h>
7847#else
7848#include <sys/types.h>
7849#endif
7850
Neal Norwitz11690112002-07-30 01:08:28 +00007851int
7852main ()
7853{
Jesus Cea740f53a2010-04-28 11:35:30 +00007854
7855 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007856 ;
7857 return 0;
7858}
Matthias Kloseb159a552010-04-25 21:00:44 +00007859
Neal Norwitz11690112002-07-30 01:08:28 +00007860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007862 ac_cv_has_makedev=yes
7863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866rm -f core conftest.err conftest.$ac_objext \
7867 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7869$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007870if test "$ac_cv_has_makedev" = "yes"; then
7871
Matthias Kloseb9621712010-04-24 17:59:49 +00007872$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007873
7874fi
7875
Christian Heimes985ecdc2013-11-20 11:46:18 +01007876# byte swapping
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7878$as_echo_n "checking for le64toh... " >&6; }
7879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7880/* end confdefs.h. */
7881
7882#ifdef HAVE_ENDIAN_H
7883#include <endian.h>
7884#elif defined(HAVE_SYS_ENDIAN_H)
7885#include <sys/endian.h>
7886#endif
7887
7888int
7889main ()
7890{
7891
7892 le64toh(1)
7893 ;
7894 return 0;
7895}
7896
7897_ACEOF
7898if ac_fn_c_try_link "$LINENO"; then :
7899 ac_cv_has_le64toh=yes
7900else
7901 ac_cv_has_le64toh=no
7902fi
7903rm -f core conftest.err conftest.$ac_objext \
7904 conftest$ac_exeext conftest.$ac_ext
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7906$as_echo "$ac_cv_has_le64toh" >&6; }
7907if test "$ac_cv_has_le64toh" = "yes"; then
7908
7909$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7910
7911fi
7912
Martin v. Löwis399a6892002-10-04 10:22:02 +00007913# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7914# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7915# defined, but the compiler does not support pragma redefine_extname,
7916# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7917# structures (such as rlimit64) without declaring them. As a
7918# work-around, disable LFS on such configurations
7919
7920use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7922$as_echo_n "checking Solaris LFS bug... " >&6; }
7923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007924/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007925
7926#define _LARGEFILE_SOURCE 1
7927#define _FILE_OFFSET_BITS 64
7928#include <sys/resource.h>
7929
Martin v. Löwis399a6892002-10-04 10:22:02 +00007930int
7931main ()
7932{
7933struct rlimit foo;
7934 ;
7935 return 0;
7936}
7937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007938if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007939 sol_lfs_bug=no
7940else
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7945$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007946if test "$sol_lfs_bug" = "yes"; then
7947 use_lfs=no
7948fi
7949
7950if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007951# Two defines needed to enable largefile support on various platforms
7952# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007953case $ac_sys_system/$ac_sys_release in
7954AIX*)
7955
7956$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7957
7958 ;;
7959esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007960
Matthias Kloseb9621712010-04-24 17:59:49 +00007961$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007962
7963
Matthias Kloseb9621712010-04-24 17:59:49 +00007964$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007965
Martin v. Löwis399a6892002-10-04 10:22:02 +00007966fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007967
Guido van Rossum84e7b241996-08-19 21:59:00 +00007968# Add some code to confdefs.h so that the test for off_t works on SCO
7969cat >> confdefs.h <<\EOF
7970#if defined(SCO_DS)
7971#undef _OFF_T
7972#endif
7973EOF
7974
Guido van Rossumef2255b2000-03-10 22:30:29 +00007975# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007976ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007977if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007978
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979else
Martin v. Löwis11437992002-04-12 09:54:03 +00007980
7981cat >>confdefs.h <<_ACEOF
7982#define mode_t int
7983_ACEOF
7984
7985fi
7986
Matthias Kloseb9621712010-04-24 17:59:49 +00007987ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007988if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007989
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007990else
Martin v. Löwis11437992002-04-12 09:54:03 +00007991
7992cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007993#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007994_ACEOF
7995
7996fi
7997
Matthias Kloseb9621712010-04-24 17:59:49 +00007998ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007999if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001else
Martin v. Löwis11437992002-04-12 09:54:03 +00008002
8003cat >>confdefs.h <<_ACEOF
8004#define pid_t int
8005_ACEOF
8006
8007fi
8008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008009
Martin v. Löwis11437992002-04-12 09:54:03 +00008010cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008011#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008012_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008016
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008017else
Martin v. Löwis11437992002-04-12 09:54:03 +00008018
8019cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008021_ACEOF
8022
8023fi
8024
Matthias Kloseb9621712010-04-24 17:59:49 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8026$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008027if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008029else
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
8034_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008037 ac_cv_type_uid_t=yes
8038else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039 ac_cv_type_uid_t=no
8040fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008041rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8045$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008046if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008049
8050
Matthias Kloseb9621712010-04-24 17:59:49 +00008051$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008052
8053fi
8054
Mark Dickinson983bc162012-12-02 12:11:38 +00008055
8056# There are two separate checks for each of the exact-width integer types we
8057# need. First we check whether the type is available using the usual
8058# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8059# and <stdint.h> where available). We then also use the special type checks of
8060# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8061# directly, #define's uint32_t to be a suitable type.
8062
8063ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8064if test "x$ac_cv_type_uint32_t" = xyes; then :
8065
8066$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8067
8068fi
8069
Matthias Kloseb9621712010-04-24 17:59:49 +00008070ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8071case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008072 no|yes) ;; #(
8073 *)
8074
Matthias Kloseb9621712010-04-24 17:59:49 +00008075$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008076
8077
8078cat >>confdefs.h <<_ACEOF
8079#define uint32_t $ac_cv_c_uint32_t
8080_ACEOF
8081;;
8082 esac
8083
Mark Dickinson983bc162012-12-02 12:11:38 +00008084
8085ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8086if test "x$ac_cv_type_uint64_t" = xyes; then :
8087
8088$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8089
8090fi
8091
Matthias Kloseb9621712010-04-24 17:59:49 +00008092ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8093case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008094 no|yes) ;; #(
8095 *)
8096
Matthias Kloseb9621712010-04-24 17:59:49 +00008097$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008098
8099
8100cat >>confdefs.h <<_ACEOF
8101#define uint64_t $ac_cv_c_uint64_t
8102_ACEOF
8103;;
8104 esac
8105
Mark Dickinson983bc162012-12-02 12:11:38 +00008106
8107ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8108if test "x$ac_cv_type_int32_t" = xyes; then :
8109
8110$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8111
8112fi
8113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8115case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008116 no|yes) ;; #(
8117 *)
8118
8119cat >>confdefs.h <<_ACEOF
8120#define int32_t $ac_cv_c_int32_t
8121_ACEOF
8122;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008123esac
8124
Mark Dickinson983bc162012-12-02 12:11:38 +00008125
8126ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8127if test "x$ac_cv_type_int64_t" = xyes; then :
8128
8129$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8130
8131fi
8132
Matthias Kloseb9621712010-04-24 17:59:49 +00008133ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8134case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008135 no|yes) ;; #(
8136 *)
8137
8138cat >>confdefs.h <<_ACEOF
8139#define int64_t $ac_cv_c_int64_t
8140_ACEOF
8141;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008142esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008143
Mark Dickinson983bc162012-12-02 12:11:38 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008146if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008149
8150fi
8151
Stefan Krah1919b7e2012-03-21 18:25:23 +01008152ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8153if test "x$ac_cv_type___uint128_t" = xyes; then :
8154
8155$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8156
8157fi
8158
Jack Jansendd19cf82001-12-06 22:36:17 +00008159
Michael W. Hudson54241132001-12-07 15:38:26 +00008160# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008161# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008162# The cast to long int works around a bug in the HP C Compiler
8163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8165# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8167$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008169 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 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 +00008172
Martin v. Löwis11437992002-04-12 09:54:03 +00008173else
Matthias Kloseb9621712010-04-24 17:59:49 +00008174 if test "$ac_cv_type_int" = yes; then
8175 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008177as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008178See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008179 else
8180 ac_cv_sizeof_int=0
8181 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008183
Martin v. Löwis11437992002-04-12 09:54:03 +00008184fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8186$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008187
8188
8189
Martin v. Löwis11437992002-04-12 09:54:03 +00008190cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008191#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008192_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008193
8194
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008195# The cast to long int works around a bug in the HP C Compiler
8196# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8197# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8198# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8200$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008201if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008202 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008203else
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 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 +00008205
Martin v. Löwis11437992002-04-12 09:54:03 +00008206else
Matthias Kloseb9621712010-04-24 17:59:49 +00008207 if test "$ac_cv_type_long" = yes; then
8208 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008210as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008211See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212 else
8213 ac_cv_sizeof_long=0
8214 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008216
Martin v. Löwis11437992002-04-12 09:54:03 +00008217fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8219$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008220
8221
8222
Martin v. Löwis11437992002-04-12 09:54:03 +00008223cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008224#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008225_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008226
8227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008228# The cast to long int works around a bug in the HP C Compiler
8229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8231# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8233$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008234if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 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 +00008238
Martin v. Löwis11437992002-04-12 09:54:03 +00008239else
Matthias Kloseb9621712010-04-24 17:59:49 +00008240 if test "$ac_cv_type_void_p" = yes; then
8241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008243as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008244See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008245 else
8246 ac_cv_sizeof_void_p=0
8247 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008248fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8252$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008253
8254
8255
Martin v. Löwis11437992002-04-12 09:54:03 +00008256cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008257#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008258_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008259
8260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261# The cast to long int works around a bug in the HP C Compiler
8262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8264# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8266$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008269else
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 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 +00008271
Martin v. Löwis11437992002-04-12 09:54:03 +00008272else
Matthias Kloseb9621712010-04-24 17:59:49 +00008273 if test "$ac_cv_type_short" = yes; then
8274 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008276as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008277See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278 else
8279 ac_cv_sizeof_short=0
8280 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008281fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008282
Martin v. Löwis11437992002-04-12 09:54:03 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8285$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008286
8287
8288
Martin v. Löwis11437992002-04-12 09:54:03 +00008289cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008290#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008291_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008292
8293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008294# The cast to long int works around a bug in the HP C Compiler
8295# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8296# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8297# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8299$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008300if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008302else
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 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 +00008304
Martin v. Löwis11437992002-04-12 09:54:03 +00008305else
Matthias Kloseb9621712010-04-24 17:59:49 +00008306 if test "$ac_cv_type_float" = yes; then
8307 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8308$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008309as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008310See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008311 else
8312 ac_cv_sizeof_float=0
8313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008315
Martin v. Löwis11437992002-04-12 09:54:03 +00008316fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8318$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008319
8320
8321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008323#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008324_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008325
8326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008327# The cast to long int works around a bug in the HP C Compiler
8328# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8329# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8330# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8332$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008333if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008334 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008335else
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 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 +00008337
Martin v. Löwis11437992002-04-12 09:54:03 +00008338else
Matthias Kloseb9621712010-04-24 17:59:49 +00008339 if test "$ac_cv_type_double" = yes; then
8340 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008342as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008343See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344 else
8345 ac_cv_sizeof_double=0
8346 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008348
Martin v. Löwis11437992002-04-12 09:54:03 +00008349fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8351$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008352
8353
8354
Martin v. Löwis11437992002-04-12 09:54:03 +00008355cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008356#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008357_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008358
8359
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008360# The cast to long int works around a bug in the HP C Compiler
8361# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8362# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8363# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8365$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008366if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008367 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 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 +00008370
Martin v. Löwis11437992002-04-12 09:54:03 +00008371else
Matthias Kloseb9621712010-04-24 17:59:49 +00008372 if test "$ac_cv_type_fpos_t" = yes; then
8373 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008375as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008376See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008377 else
8378 ac_cv_sizeof_fpos_t=0
8379 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008381
Martin v. Löwis11437992002-04-12 09:54:03 +00008382fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8384$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008385
8386
8387
Martin v. Löwis11437992002-04-12 09:54:03 +00008388cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008389#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008390_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008391
Michael W. Hudson54241132001-12-07 15:38:26 +00008392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008393# The cast to long int works around a bug in the HP C Compiler
8394# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8395# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8396# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8398$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008399if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008401else
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 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 +00008403
Martin v. Löwis18e16552006-02-15 17:27:45 +00008404else
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 if test "$ac_cv_type_size_t" = yes; then
8406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8407$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008408as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008409See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008410 else
8411 ac_cv_sizeof_size_t=0
8412 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414
Martin v. Löwis18e16552006-02-15 17:27:45 +00008415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8417$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418
8419
8420
Martin v. Löwis18e16552006-02-15 17:27:45 +00008421cat >>confdefs.h <<_ACEOF
8422#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8423_ACEOF
8424
8425
Christian Heimes400adb02008-02-01 08:12:03 +00008426# The cast to long int works around a bug in the HP C Compiler
8427# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8428# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8429# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8431$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008432if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008434else
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 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 +00008436
Christian Heimes400adb02008-02-01 08:12:03 +00008437else
Matthias Kloseb9621712010-04-24 17:59:49 +00008438 if test "$ac_cv_type_pid_t" = yes; then
8439 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008441as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008442See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008443 else
8444 ac_cv_sizeof_pid_t=0
8445 fi
8446fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008447
Christian Heimes400adb02008-02-01 08:12:03 +00008448fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8450$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008451
8452
8453
8454cat >>confdefs.h <<_ACEOF
8455#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8456_ACEOF
8457
8458
Michael W. Hudson54241132001-12-07 15:38:26 +00008459
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8461$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008462have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008464/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466int
8467main ()
8468{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008469long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 ;
8471 return 0;
8472}
8473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
8476
Matthias Kloseb9621712010-04-24 17:59:49 +00008477$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008479 have_long_long=yes
8480
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8484$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008485if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008486# The cast to long int works around a bug in the HP C Compiler
8487# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8488# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8489# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8491$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008492if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008493 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 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 +00008496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 if test "$ac_cv_type_long_long" = yes; then
8499 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8500$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008501as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008502See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503 else
8504 ac_cv_sizeof_long_long=0
8505 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8510$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511
8512
8513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008515#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008516_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008517
Michael W. Hudson54241132001-12-07 15:38:26 +00008518
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008519fi
8520
Matthias Kloseb9621712010-04-24 17:59:49 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8522$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008523have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008525/* end confdefs.h. */
8526
8527int
8528main ()
8529{
8530long double x; x = (long double)0;
8531 ;
8532 return 0;
8533}
8534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008535if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008536
8537
Matthias Kloseb9621712010-04-24 17:59:49 +00008538$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008539
8540 have_long_double=yes
8541
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008542fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8545$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008546if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008547# The cast to long int works around a bug in the HP C Compiler
8548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8552$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008553if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 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 +00008557
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008558else
Matthias Kloseb9621712010-04-24 17:59:49 +00008559 if test "$ac_cv_type_long_double" = yes; then
8560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8561$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008562as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008563See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008564 else
8565 ac_cv_sizeof_long_double=0
8566 fi
8567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8571$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008572
8573
8574
8575cat >>confdefs.h <<_ACEOF
8576#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8577_ACEOF
8578
8579
8580fi
8581
8582
Matthias Kloseb9621712010-04-24 17:59:49 +00008583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8584$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008585have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008587/* end confdefs.h. */
8588
8589int
8590main ()
8591{
8592_Bool x; x = (_Bool)0;
8593 ;
8594 return 0;
8595}
8596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008597if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008598
8599
Matthias Kloseb9621712010-04-24 17:59:49 +00008600$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008601
8602 have_c99_bool=yes
8603
Thomas Woutersb2137042007-02-01 18:02:27 +00008604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8607$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008608if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609# The cast to long int works around a bug in the HP C Compiler
8610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8612# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8614$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008615if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 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 +00008619
Thomas Woutersb2137042007-02-01 18:02:27 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 if test "$ac_cv_type__Bool" = yes; then
8622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008624as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008625See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 else
8627 ac_cv_sizeof__Bool=0
8628 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630
Thomas Woutersb2137042007-02-01 18:02:27 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8633$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634
8635
8636
Thomas Woutersb2137042007-02-01 18:02:27 +00008637cat >>confdefs.h <<_ACEOF
8638#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8639_ACEOF
8640
8641
8642fi
8643
Matthias Kloseb9621712010-04-24 17:59:49 +00008644ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008645 #include <stdint.h>
8646 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008647 #ifdef HAVE_INTTYPES_H
8648 #include <inttypes.h>
8649 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008650"
Victor Stinnere0be4232011-10-25 13:06:09 +02008651if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008652
8653cat >>confdefs.h <<_ACEOF
8654#define HAVE_UINTPTR_T 1
8655_ACEOF
8656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657# The cast to long int works around a bug in the HP C Compiler
8658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8660# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8662$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008663if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 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 +00008667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668else
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 if test "$ac_cv_type_uintptr_t" = yes; then
8670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008672as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008673See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674 else
8675 ac_cv_sizeof_uintptr_t=0
8676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8681$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682
8683
8684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008686#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008687_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008688
Michael W. Hudson54241132001-12-07 15:38:26 +00008689
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008690fi
8691
Thomas Wouters89f507f2006-12-13 04:49:30 +00008692
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008693# The cast to long int works around a bug in the HP C Compiler
8694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8696# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8698$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008699if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008700 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008703#ifdef HAVE_SYS_TYPES_H
8704#include <sys/types.h>
8705#endif
8706
Matthias Kloseb9621712010-04-24 17:59:49 +00008707"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008708
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 if test "$ac_cv_type_off_t" = yes; then
8711 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008713as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008714See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008715 else
8716 ac_cv_sizeof_off_t=0
8717 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008719
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8722$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008723
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008724
8725
Martin v. Löwis11437992002-04-12 09:54:03 +00008726cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008727#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008728_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008729
Michael W. Hudson54241132001-12-07 15:38:26 +00008730
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008731
Matthias Kloseb9621712010-04-24 17:59:49 +00008732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8733$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008734if test "$have_long_long" = yes
8735then
8736if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008737 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008738
Matthias Kloseb9621712010-04-24 17:59:49 +00008739$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008740
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8742$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8745$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008746fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8749$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008750fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008752# The cast to long int works around a bug in the HP C Compiler
8753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8757$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008762#ifdef HAVE_SYS_TYPES_H
8763#include <sys/types.h>
8764#endif
8765#ifdef HAVE_TIME_H
8766#include <time.h>
8767#endif
8768
Matthias Kloseb9621712010-04-24 17:59:49 +00008769"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008770
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008771else
Matthias Kloseb9621712010-04-24 17:59:49 +00008772 if test "$ac_cv_type_time_t" = yes; then
8773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008775as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008776See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008777 else
8778 ac_cv_sizeof_time_t=0
8779 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8784$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008786
8787
Martin v. Löwis11437992002-04-12 09:54:03 +00008788cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008789#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008790_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008791
Michael W. Hudson54241132001-12-07 15:38:26 +00008792
8793
Trent Mick635f6fb2000-08-23 21:33:05 +00008794# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008795ac_save_cc="$CC"
8796if test "$ac_cv_kpthread" = "yes"
8797then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008798elif test "$ac_cv_kthread" = "yes"
8799then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008800elif test "$ac_cv_pthread" = "yes"
8801then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008802fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803
Matthias Kloseb9621712010-04-24 17:59:49 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8805$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008806have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008809
8810 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008811int
8812main ()
8813{
Guido van Rossum12580492000-09-24 16:47:19 +00008814pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008815 ;
8816 return 0;
8817}
Matthias Kloseb159a552010-04-25 21:00:44 +00008818
Martin v. Löwis11437992002-04-12 09:54:03 +00008819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008820if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008821 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8825$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008826if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008827 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008828# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8829# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8830# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8832$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008833if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837#ifdef HAVE_PTHREAD_H
8838#include <pthread.h>
8839#endif
8840
Matthias Kloseb9621712010-04-24 17:59:49 +00008841"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008842
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008843else
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 if test "$ac_cv_type_pthread_t" = yes; then
8845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008847as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008848See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008849 else
8850 ac_cv_sizeof_pthread_t=0
8851 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008852fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008853
Trent Mick635f6fb2000-08-23 21:33:05 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8856$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858
8859
Martin v. Löwis11437992002-04-12 09:54:03 +00008860cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008861#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008862_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008863
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008864
Trent Mick635f6fb2000-08-23 21:33:05 +00008865fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008866CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008867
Michael W. Hudson54241132001-12-07 15:38:26 +00008868
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008869case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008870 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008871 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8872 ;;
8873 Darwin/*)
8874 OTHER_LIBTOOL_OPT=""
8875 ;;
8876esac
8877
8878
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008879
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008880case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008881 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008882 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8883 if test "${enable_universalsdk}"; then
8884 :
8885 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008886 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008887 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008888 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008889 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008890 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008891 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008892 if test ${gcc_version} '<' 4.0
8893 then
8894 LIBTOOL_CRUFT="-lcc_dynamic"
8895 else
8896 LIBTOOL_CRUFT=""
8897 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008899 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008900else
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008902/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008903
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008904 #include <unistd.h>
8905 int main(int argc, char*argv[])
8906 {
8907 if (sizeof(long) == 4) {
8908 return 0;
8909 } else {
8910 return 1;
8911 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008912 }
8913
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008915if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008916 ac_osx_32bit=yes
8917else
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008922fi
8923
8924
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008925 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008926 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008927 i386)
8928 MACOSX_DEFAULT_ARCH="i386"
8929 ;;
8930 ppc)
8931 MACOSX_DEFAULT_ARCH="ppc"
8932 ;;
8933 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008934 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008935 ;;
8936 esac
8937 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008938 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008939 i386)
8940 MACOSX_DEFAULT_ARCH="x86_64"
8941 ;;
8942 ppc)
8943 MACOSX_DEFAULT_ARCH="ppc64"
8944 ;;
8945 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008946 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008947 ;;
8948 esac
8949
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008950 fi
8951
8952 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008953 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008955esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8957$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008958if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008959then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008960 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008962 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008963
Matthias Kloseb9621712010-04-24 17:59:49 +00008964$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008965
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8967$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008968 if test $enable_shared = "yes"
8969 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008970 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 +00008971 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008972else
Matthias Kloseb9621712010-04-24 17:59:49 +00008973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8974$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008975fi
8976
Matthias Kloseb9621712010-04-24 17:59:49 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8978$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008979case $ac_sys_system/$ac_sys_release in
8980 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008981
Matthias Kloseb9621712010-04-24 17:59:49 +00008982$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008983
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8985$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008986 ;;
8987 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8989$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008990 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008991esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008992
Guido van Rossum0a516c91994-09-12 10:58:40 +00008993# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008994
Michael W. Hudson54241132001-12-07 15:38:26 +00008995
8996
8997
8998
Benjamin Peterson99f03762010-04-11 22:15:28 +00008999
Thomas Wouters477c8d52006-05-27 19:21:47 +00009000
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009001# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9002# -- usually .so, .sl on HP-UX, .dll on Cygwin
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9004$as_echo_n "checking the extension of shared libraries... " >&6; }
9005if test -z "$SHLIB_SUFFIX"; then
9006 case $ac_sys_system in
9007 hp*|HP*)
9008 case `uname -m` in
9009 ia64) SHLIB_SUFFIX=.so;;
9010 *) SHLIB_SUFFIX=.sl;;
9011 esac
9012 ;;
9013 CYGWIN*) SHLIB_SUFFIX=.dll;;
9014 *) SHLIB_SUFFIX=.so;;
9015 esac
9016fi
9017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9018$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009019
Guido van Rossum0a516c91994-09-12 10:58:40 +00009020# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009021# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009022# (Shared libraries in this instance are shared modules to be loaded into
9023# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9025$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009026if test -z "$LDSHARED"
9027then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009028 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009029 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009030 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009031 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009032 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009033 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009034 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009036 if test "$GCC" = "yes" ; then
9037 LDSHARED='$(CC) -shared'
9038 LDCXXSHARED='$(CXX) -shared'
9039 else
9040 LDSHARED='$(CC) -G'
9041 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009042 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009043 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009044 if test "$GCC" = "yes" ; then
9045 LDSHARED='$(CC) -shared'
9046 LDCXXSHARED='$(CXX) -shared'
9047 else
9048 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009049 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009050 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009051 LDSHARED='$(CC) -bundle'
9052 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009053 if test "$enable_framework" ; then
9054 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009055 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9056 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009057 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009058 else
9059 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009060 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009061 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009062 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009063 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009064 LDSHARED='$(CC) -bundle'
9065 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009066 if test "$enable_framework" ; then
9067 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009068 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9069 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009070 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009071 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009072 # No framework, use the Python app as bundle-loader
9073 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009074 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009075 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009076 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009077 Darwin/*)
9078 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9079 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009080
Ned Deily36820b62014-06-25 13:44:22 -07009081 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9082 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9083 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9084 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9085 if test ${dep_target_major} -eq 10 && \
9086 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009087 then
Ned Deily36820b62014-06-25 13:44:22 -07009088 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009089 LDSHARED='$(CC) -bundle'
9090 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009091 if test "$enable_framework" ; then
9092 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009093 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9094 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009095 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009096 else
9097 # No framework, use the Python app as bundle-loader
9098 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9099 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009100 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009101 fi
Ned Deily36820b62014-06-25 13:44:22 -07009102 else
9103 # building for OS X 10.3 and later
9104 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9105 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9106 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009107 fi
9108 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009109 Linux*|GNU*|QNX*)
9110 LDSHARED='$(CC) -shared'
9111 LDCXXSHARED='$(CXX) -shared';;
9112 BSD/OS*/4*)
9113 LDSHARED="gcc -shared"
9114 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009115 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009116 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009117 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009118 LDSHARED='$(CC) -shared'
9119 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009120 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009121 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009122 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009123 OpenBSD*)
9124 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9125 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009126 LDSHARED='$(CC) -shared $(CCSHARED)'
9127 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009128 else
9129 case `uname -r` in
9130 [01].* | 2.[0-7] | 2.[0-7].*)
9131 LDSHARED="ld -Bshareable ${LDFLAGS}"
9132 ;;
9133 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009134 LDSHARED='$(CC) -shared $(CCSHARED)'
9135 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009136 ;;
9137 esac
9138 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009139 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009140 LDSHARED='$(CC) -shared'
9141 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009142 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009143 if test "$GCC" = "yes" ; then
9144 LDSHARED='$(CC) -shared'
9145 LDCXXSHARED='$(CXX) -shared'
9146 else
9147 LDSHARED='$(CC) -G'
9148 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009149 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009150 SCO_SV*)
9151 LDSHARED='$(CC) -Wl,-G,-Bexport'
9152 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9153 CYGWIN*)
9154 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9155 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009156 *) LDSHARED="ld";;
9157 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009158fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9160$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009161LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009162BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009163# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009164# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9166$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009167if test -z "$CCSHARED"
9168then
Guido van Rossum07397971997-04-29 21:49:50 +00009169 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009170 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009171 then CCSHARED="-fPIC";
9172 elif test `uname -p` = sparc;
9173 then CCSHARED="-xcode=pic32";
9174 else CCSHARED="-Kpic";
9175 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009176 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009177 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009178 else CCSHARED="+z";
9179 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009180 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009181 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009182 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009183 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009184 if test "$GCC" = "yes"
9185 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009186 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009187 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009188 SCO_SV*)
9189 if test "$GCC" = "yes"
9190 then CCSHARED="-fPIC"
9191 else CCSHARED="-Kpic -belf"
9192 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009193 IRIX*/6*) case $CC in
9194 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009195 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009196 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009197 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9200$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009201# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009202# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9204$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009205if test -z "$LINKFORSHARED"
9206then
Guido van Rossum07397971997-04-29 21:49:50 +00009207 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009208 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009209 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009210 LINKFORSHARED="-Wl,-E -Wl,+s";;
9211# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009212 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009213 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009214 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009216 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009217
9218 # Issue #18075: the default maximum stack size (8MBytes) is too
9219 # small for the default recursion limit. Increase the stack size
9220 # to ensure that tests don't crash
9221 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9222
Jack Jansene578a632001-08-15 01:27:14 +00009223 if test "$enable_framework"
9224 then
Jack Jansenda49e192005-01-07 13:08:22 +00009225 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009226 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009227 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009228 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009229 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009230 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009231 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009232 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9233 then
9234 LINKFORSHARED="-Wl,--export-dynamic"
9235 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009236 SunOS/5*) case $CC in
9237 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009238 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009239 then
9240 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009241 fi;;
9242 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009243 CYGWIN*)
9244 if test $enable_shared = "no"
9245 then
9246 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9247 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009248 QNX*)
9249 # -Wl,-E causes the symbols to be added to the dynamic
9250 # symbol table so that they can be found when a module
9251 # is loaded. -N 2048K causes the stack size to be set
9252 # to 2048 kilobytes so that the stack doesn't overflow
9253 # when running test_compile.py.
9254 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009255 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9258$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009259
Michael W. Hudson54241132001-12-07 15:38:26 +00009260
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009261
Matthias Kloseb9621712010-04-24 17:59:49 +00009262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9263$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009264if test ! "$LIBRARY" = "$LDLIBRARY"
9265then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009266 case $ac_sys_system in
9267 CYGWIN*)
9268 # Cygwin needs CCSHARED when building extension DLLs
9269 # but not when building the interpreter DLL.
9270 CFLAGSFORSHARED='';;
9271 *)
9272 CFLAGSFORSHARED='$(CCSHARED)'
9273 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9276$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009277
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009278# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9279# library (with --enable-shared).
9280# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009281# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9282# if it is not required, since it creates a dependency of the shared library
9283# to LIBS. This, in turn, means that applications linking the shared libpython
9284# don't need to link LIBS explicitly. The default should be only changed
9285# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009286
Matthias Kloseb9621712010-04-24 17:59:49 +00009287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9288$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009289case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009290 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009291 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009292esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9294$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009295
9296
Guido van Rossum627b2d71993-12-24 10:39:16 +00009297# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9299$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009300if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009301 $as_echo_n "(cached) " >&6
9302else
9303 ac_check_lib_save_LIBS=$LIBS
9304LIBS="-lsendfile $LIBS"
9305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9306/* end confdefs.h. */
9307
9308/* Override any GCC internal prototype to avoid an error.
9309 Use char because int might match the return type of a GCC
9310 builtin and then its argument prototype would still apply. */
9311#ifdef __cplusplus
9312extern "C"
9313#endif
9314char sendfile ();
9315int
9316main ()
9317{
9318return sendfile ();
9319 ;
9320 return 0;
9321}
9322_ACEOF
9323if ac_fn_c_try_link "$LINENO"; then :
9324 ac_cv_lib_sendfile_sendfile=yes
9325else
9326 ac_cv_lib_sendfile_sendfile=no
9327fi
9328rm -f core conftest.err conftest.$ac_objext \
9329 conftest$ac_exeext conftest.$ac_ext
9330LIBS=$ac_check_lib_save_LIBS
9331fi
9332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9333$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009334if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009335 cat >>confdefs.h <<_ACEOF
9336#define HAVE_LIBSENDFILE 1
9337_ACEOF
9338
9339 LIBS="-lsendfile $LIBS"
9340
9341fi
9342
Matthias Kloseb9621712010-04-24 17:59:49 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9344$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009345if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009346 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009347else
Martin v. Löwis11437992002-04-12 09:54:03 +00009348 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009349LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009350cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009351/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009352
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353/* Override any GCC internal prototype to avoid an error.
9354 Use char because int might match the return type of a GCC
9355 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009356#ifdef __cplusplus
9357extern "C"
9358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009359char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009360int
9361main ()
9362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 ;
9365 return 0;
9366}
9367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009368if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009369 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009370else
Matthias Kloseb9621712010-04-24 17:59:49 +00009371 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373rm -f core conftest.err conftest.$ac_objext \
9374 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009375LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009376fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9378$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009379if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 cat >>confdefs.h <<_ACEOF
9381#define HAVE_LIBDL 1
9382_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009383
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009384 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009386fi
9387 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9389$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009390if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009392else
Martin v. Löwis11437992002-04-12 09:54:03 +00009393 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009394LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009397
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009398/* Override any GCC internal prototype to avoid an error.
9399 Use char because int might match the return type of a GCC
9400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009401#ifdef __cplusplus
9402extern "C"
9403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009404char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009405int
9406main ()
9407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009408return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ;
9410 return 0;
9411}
9412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009413if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009415else
Matthias Kloseb9621712010-04-24 17:59:49 +00009416 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009417fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009418rm -f core conftest.err conftest.$ac_objext \
9419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009420LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009421fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9423$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009424if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 cat >>confdefs.h <<_ACEOF
9426#define HAVE_LIBDLD 1
9427_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009428
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009429 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009430
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009431fi
9432 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009433
Georg Brandlb1441c72009-01-03 22:33:39 +00009434# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009435if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9437$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009438if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009440else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009441 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009445/* Override any GCC internal prototype to avoid an error.
9446 Use char because int might match the return type of a GCC
9447 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009448#ifdef __cplusplus
9449extern "C"
9450#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009451char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009452int
9453main ()
9454{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009455return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ;
9457 return 0;
9458}
9459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460for ac_lib in '' pthread rt posix4; do
9461 if test -z "$ac_lib"; then
9462 ac_res="none required"
9463 else
9464 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009465 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009466 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009468 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009470rm -f core conftest.err conftest.$ac_objext \
9471 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009472 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475done
Victor Stinnere0be4232011-10-25 13:06:09 +02009476if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009478else
9479 ac_cv_search_sem_init=no
9480fi
9481rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009482LIBS=$ac_func_search_save_LIBS
9483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9485$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009487if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009489
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009490fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009491 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009492 # posix4 on Solaris 2.6
9493 # pthread (first!) on Linux
9494fi
9495
Martin v. Löwis19d17342003-06-14 21:03:05 +00009496# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9498$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009499if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009501else
9502 ac_check_lib_save_LIBS=$LIBS
9503LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009505/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009506
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009507/* Override any GCC internal prototype to avoid an error.
9508 Use char because int might match the return type of a GCC
9509 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009510#ifdef __cplusplus
9511extern "C"
9512#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009513char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009514int
9515main ()
9516{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009518 ;
9519 return 0;
9520}
9521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009522if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009523 ac_cv_lib_intl_textdomain=yes
9524else
Matthias Kloseb9621712010-04-24 17:59:49 +00009525 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527rm -f core conftest.err conftest.$ac_objext \
9528 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009529LIBS=$ac_check_lib_save_LIBS
9530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9532$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009533if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009534
Matthias Kloseb9621712010-04-24 17:59:49 +00009535$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009536
Brett Cannonc6d936e2009-06-07 20:09:53 +00009537 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009538fi
9539
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009540
9541# checks for system dependent C++ extensions support
9542case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9544$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009547
Georg Brandl59e87bd2011-02-15 19:48:59 +00009548 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009549int
9550main ()
9551{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009552loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009553 ;
9554 return 0;
9555}
Matthias Kloseb159a552010-04-25 21:00:44 +00009556
Martin v. Löwis11437992002-04-12 09:54:03 +00009557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009558if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009559
Matthias Kloseb159a552010-04-25 21:00:44 +00009560
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
Matthias Kloseb159a552010-04-25 21:00:44 +00009563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009564$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009565
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009566else
Matthias Kloseb159a552010-04-25 21:00:44 +00009567
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009569$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009570
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572rm -f core conftest.err conftest.$ac_objext \
9573 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009574 *) ;;
9575esac
9576
Christian Heimes985ecdc2013-11-20 11:46:18 +01009577# check for systems that require aligned memory access
9578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9579$as_echo_n "checking aligned memory access is required... " >&6; }
9580if test "$cross_compiling" = yes; then :
9581 aligned_required=yes
9582else
9583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9584/* end confdefs.h. */
9585
9586int main()
9587{
9588 char s[16];
9589 int i, *p1, *p2;
9590 for (i=0; i < 16; i++)
9591 s[i] = i;
9592 p1 = (int*)(s+1);
9593 p2 = (int*)(s+2);
9594 if (*p1 == *p2)
9595 return 1;
9596 return 0;
9597}
9598
9599_ACEOF
9600if ac_fn_c_try_run "$LINENO"; then :
9601 aligned_required=no
9602else
9603 aligned_required=yes
9604fi
9605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9606 conftest.$ac_objext conftest.beam conftest.$ac_ext
9607fi
9608
9609
9610if test "$aligned_required" = yes ; then
9611
9612$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9613
9614fi
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9616$as_echo "$aligned_required" >&6; }
9617
9618
9619# str, bytes and memoryview hash algorithm
9620
9621
9622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9623$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9624
9625# Check whether --with-hash_algorithm was given.
9626if test "${with_hash_algorithm+set}" = set; then :
9627 withval=$with_hash_algorithm;
9628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9629$as_echo "$withval" >&6; }
9630case "$withval" in
9631 siphash24)
9632 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9633
9634 ;;
9635 fnv)
9636 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9637
9638 ;;
9639 *)
9640 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9641 ;;
9642esac
9643
9644else
9645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9646$as_echo "default" >&6; }
9647fi
9648
9649
Charles-François Natalid30b0222014-05-08 23:08:51 +01009650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9651$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9652
9653# Check whether --with-address_sanitizer was given.
9654if test "${with_address_sanitizer+set}" = set; then :
9655 withval=$with_address_sanitizer;
9656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9657$as_echo "$withval" >&6; }
9658BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9659LDFLAGS="-fsanitize=address $LDFLAGS"
9660
9661else
9662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9663$as_echo "no" >&6; }
9664fi
9665
9666
Guido van Rossum70c7f481998-03-26 18:44:10 +00009667# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9669$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009670if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009672else
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009674LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678/* Override any GCC internal prototype to avoid an error.
9679 Use char because int might match the return type of a GCC
9680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009681#ifdef __cplusplus
9682extern "C"
9683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009684char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009685int
9686main ()
9687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009695else
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698rm -f core conftest.err conftest.$ac_objext \
9699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009700LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9703$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009704if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009705 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009706fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009707 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9709$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009710if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718/* Override any GCC internal prototype to avoid an error.
9719 Use char because int might match the return type of a GCC
9720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721#ifdef __cplusplus
9722extern "C"
9723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009724char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ;
9730 return 0;
9731}
9732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009735else
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738rm -f core conftest.err conftest.$ac_objext \
9739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9743$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009744if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009745 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009746fi
9747 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009748
Matthias Kloseb9621712010-04-24 17:59:49 +00009749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9750$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009753if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9756$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009757LIBS="$withval $LIBS"
9758
9759else
Matthias Kloseb9621712010-04-24 17:59:49 +00009760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9761$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009762fi
9763
Guido van Rossum7f43da71994-08-01 12:15:30 +00009764
Victor Stinner8291b5e2015-03-20 16:03:14 +01009765
9766
9767
9768
9769
9770
9771
9772if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9773 if test -n "$ac_tool_prefix"; then
9774 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9775set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9777$as_echo_n "checking for $ac_word... " >&6; }
9778if ${ac_cv_path_PKG_CONFIG+:} false; then :
9779 $as_echo_n "(cached) " >&6
9780else
9781 case $PKG_CONFIG in
9782 [\\/]* | ?:[\\/]*)
9783 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9784 ;;
9785 *)
9786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787for as_dir in $PATH
9788do
9789 IFS=$as_save_IFS
9790 test -z "$as_dir" && as_dir=.
9791 for ac_exec_ext in '' $ac_executable_extensions; do
9792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9793 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9795 break 2
9796 fi
9797done
9798 done
9799IFS=$as_save_IFS
9800
9801 ;;
9802esac
9803fi
9804PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9805if test -n "$PKG_CONFIG"; then
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9807$as_echo "$PKG_CONFIG" >&6; }
9808else
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810$as_echo "no" >&6; }
9811fi
9812
9813
9814fi
9815if test -z "$ac_cv_path_PKG_CONFIG"; then
9816 ac_pt_PKG_CONFIG=$PKG_CONFIG
9817 # Extract the first word of "pkg-config", so it can be a program name with args.
9818set dummy pkg-config; ac_word=$2
9819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9820$as_echo_n "checking for $ac_word... " >&6; }
9821if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9822 $as_echo_n "(cached) " >&6
9823else
9824 case $ac_pt_PKG_CONFIG in
9825 [\\/]* | ?:[\\/]*)
9826 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9827 ;;
9828 *)
9829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9830for as_dir in $PATH
9831do
9832 IFS=$as_save_IFS
9833 test -z "$as_dir" && as_dir=.
9834 for ac_exec_ext in '' $ac_executable_extensions; do
9835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9836 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9838 break 2
9839 fi
9840done
9841 done
9842IFS=$as_save_IFS
9843
9844 ;;
9845esac
9846fi
9847ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9848if test -n "$ac_pt_PKG_CONFIG"; then
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9850$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9851else
9852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9853$as_echo "no" >&6; }
9854fi
9855
9856 if test "x$ac_pt_PKG_CONFIG" = x; then
9857 PKG_CONFIG=""
9858 else
9859 case $cross_compiling:$ac_tool_warned in
9860yes:)
9861{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9862$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9863ac_tool_warned=yes ;;
9864esac
9865 PKG_CONFIG=$ac_pt_PKG_CONFIG
9866 fi
9867else
9868 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9869fi
9870
9871fi
9872if test -n "$PKG_CONFIG"; then
9873 _pkg_min_version=0.9.0
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9875$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9876 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9878$as_echo "yes" >&6; }
9879 else
9880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9881$as_echo "no" >&6; }
9882 PKG_CONFIG=""
9883 fi
9884fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009885
9886# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9888$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009889
9890# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009891if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009892 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009893else
9894 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009895fi
9896
9897
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9899$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009900
9901# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9903$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009904
9905# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009906if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009907 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009908else
9909 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009910fi
9911
9912
9913if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009914 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9915else
9916 LIBFFI_INCLUDEDIR=""
9917fi
9918
9919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9921$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009922
Stefan Krah60187b52012-03-23 19:06:27 +01009923# Check for use of the system libmpdec library
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9925$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9926
9927# Check whether --with-system_libmpdec was given.
9928if test "${with_system_libmpdec+set}" = set; then :
9929 withval=$with_system_libmpdec;
9930else
9931 with_system_libmpdec="no"
9932fi
9933
9934
9935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9936$as_echo "$with_system_libmpdec" >&6; }
9937
Benjamin Peterson076ed002010-10-31 17:11:02 +00009938# Check for support for loadable sqlite extensions
9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9940$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9941# Check whether --enable-loadable-sqlite-extensions was given.
9942if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9943 enableval=$enable_loadable_sqlite_extensions;
9944else
9945 enable_loadable_sqlite_extensions="no"
9946fi
9947
9948
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9950$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9951
Ned Deilyd819b932013-09-06 01:07:05 -07009952# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9953
9954
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9956$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9957
9958# Check whether --with-tcltk-includes was given.
9959if test "${with_tcltk_includes+set}" = set; then :
9960 withval=$with_tcltk_includes;
9961else
9962 with_tcltk_includes="default"
9963fi
9964
9965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9966$as_echo "$with_tcltk_includes" >&6; }
9967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9968$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9969
9970# Check whether --with-tcltk-libs was given.
9971if test "${with_tcltk_libs+set}" = set; then :
9972 withval=$with_tcltk_libs;
9973else
9974 with_tcltk_libs="default"
9975fi
9976
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9978$as_echo "$with_tcltk_libs" >&6; }
9979if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9980then
9981 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9982 then
9983 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9984 fi
9985 TCLTK_INCLUDES=""
9986 TCLTK_LIBS=""
9987else
9988 TCLTK_INCLUDES="$with_tcltk_includes"
9989 TCLTK_LIBS="$with_tcltk_libs"
9990fi
9991
Matthias Klose55708cc2009-04-30 08:06:49 +00009992# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9994$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009995
9996# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009997if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009998 withval=$with_dbmliborder;
9999if test x$with_dbmliborder = xyes
10000then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010001as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010002else
10003 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10004 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10005 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010006 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010007 fi
10008 done
10009fi
10010fi
10011
Matthias Kloseb9621712010-04-24 17:59:49 +000010012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10013$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010014
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010015# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010016
10017
Matthias Kloseb9621712010-04-24 17:59:49 +000010018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10019$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010020
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010022if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010023 withval=$with_signal_module;
10024fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010025
10026
10027if test -z "$with_signal_module"
10028then with_signal_module="yes"
10029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10031$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010032
10033if test "${with_signal_module}" = "yes"; then
10034 USE_SIGNAL_MODULE=""
10035 SIGNAL_OBJS=""
10036else
10037 USE_SIGNAL_MODULE="#"
10038 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10039fi
10040
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010041# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010042
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010043USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045
Martin v. Löwis11437992002-04-12 09:54:03 +000010046
10047# Templates for things AC_DEFINEd more than once.
10048# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010049
10050
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10053$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010055# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010056if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010057 withval=$with_threads;
10058fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010059
10060
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010061# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010064if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010065 withval=$with_thread; with_threads=$with_thread
10066fi
10067
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010068
10069if test -z "$with_threads"
10070then with_threads="yes"
10071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10073$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010074
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010075
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010076if test "$with_threads" = "no"
10077then
10078 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010079elif test "$ac_cv_pthread_is_default" = yes
10080then
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010082
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010083 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010084 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010085
10086 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010087 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010088elif test "$ac_cv_kpthread" = "yes"
10089then
10090 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010091 if test "$ac_cv_cxx_thread" = "yes"; then
10092 CXX="$CXX -Kpthread"
10093 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010094 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010095
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010096 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010097 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010098elif test "$ac_cv_kthread" = "yes"
10099then
10100 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010101 if test "$ac_cv_cxx_thread" = "yes"; then
10102 CXX="$CXX -Kthread"
10103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010104 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010105
10106 posix_threads=yes
10107 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010108elif test "$ac_cv_pthread" = "yes"
10109then
10110 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010111 if test "$ac_cv_cxx_thread" = "yes"; then
10112 CXX="$CXX -pthread"
10113 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010115
10116 posix_threads=yes
10117 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010118else
10119 if test ! -z "$with_threads" -a -d "$with_threads"
10120 then LDFLAGS="$LDFLAGS -L$with_threads"
10121 fi
10122 if test ! -z "$withval" -a -d "$withval"
10123 then LDFLAGS="$LDFLAGS -L$withval"
10124 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010125
10126 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010127 # define _POSIX_THREADS in unistd.h. Some apparently don't
10128 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10130$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010132/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010133
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010134#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010135#ifdef _POSIX_THREADS
10136yes
10137#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010138
10139_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010142 unistd_defines_pthreads=yes
10143else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010144 unistd_defines_pthreads=no
10145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010146rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10149$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010150
Matthias Kloseb9621712010-04-24 17:59:49 +000010151 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010152
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010153 # Just looking for pthread_create in libpthread is not enough:
10154 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10155 # So we really have to include pthread.h, and then link.
10156 _libs=$LIBS
10157 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10159$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010162
10163#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010164#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010165
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010166void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010167int
10168main ()
10169{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010170
10171pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ;
10173 return 0;
10174}
10175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010176if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10179$as_echo "yes" >&6; }
10180 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010181
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010182 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010183 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010184else
Martin v. Löwis11437992002-04-12 09:54:03 +000010185
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010186 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010188if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010189 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010190
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010191 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010192 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010193else
Guido van Rossumad678af1998-10-02 14:42:15 +000010194
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10196$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010197if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010201LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205/* Override any GCC internal prototype to avoid an error.
10206 Use char because int might match the return type of a GCC
10207 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010208#ifdef __cplusplus
10209extern "C"
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010212int
10213main ()
10214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010216 ;
10217 return 0;
10218}
10219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010220if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010221 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010222else
Matthias Kloseb9621712010-04-24 17:59:49 +000010223 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225rm -f core conftest.err conftest.$ac_objext \
10226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010227LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010228fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10230$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010231if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010232 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010233
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010234 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010235 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010236 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010237else
Greg Steinadf63d62000-07-05 10:38:09 +000010238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10240$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010241if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010243else
Martin v. Löwis11437992002-04-12 09:54:03 +000010244 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010245LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010249/* Override any GCC internal prototype to avoid an error.
10250 Use char because int might match the return type of a GCC
10251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010252#ifdef __cplusplus
10253extern "C"
10254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010255char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256int
10257main ()
10258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010259return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010260 ;
10261 return 0;
10262}
10263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010265 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010266else
Matthias Kloseb9621712010-04-24 17:59:49 +000010267 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269rm -f core conftest.err conftest.$ac_objext \
10270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010271LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010272fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10274$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010275if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010276 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010278 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010279 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010280 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010281else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010282
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10284$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010285if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010286 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010287else
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010289LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293/* Override any GCC internal prototype to avoid an error.
10294 Use char because int might match the return type of a GCC
10295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010296#ifdef __cplusplus
10297extern "C"
10298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010299char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010300int
10301main ()
10302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010304 ;
10305 return 0;
10306}
10307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010308if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010310else
Matthias Kloseb9621712010-04-24 17:59:49 +000010311 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010313rm -f core conftest.err conftest.$ac_objext \
10314 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010315LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010316fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10318$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010319if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010321
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010322 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010323 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010324 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010325else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010326
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10328$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010329if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010330 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010331else
Martin v. Löwis11437992002-04-12 09:54:03 +000010332 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010333LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010337/* Override any GCC internal prototype to avoid an error.
10338 Use char because int might match the return type of a GCC
10339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010340#ifdef __cplusplus
10341extern "C"
10342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010343char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010344int
10345main ()
10346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010347return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 ;
10349 return 0;
10350}
10351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010354else
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357rm -f core conftest.err conftest.$ac_objext \
10358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010359LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10362$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010363if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010364 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010367 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010368 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010369else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010370
Martin v. Löwis130fb172001-07-19 11:00:41 +000010371 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010372fi
10373
Guido van Rossum627b2d71993-12-24 10:39:16 +000010374
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010375fi
10376
Guido van Rossum0be3e491997-05-22 20:33:33 +000010377fi
10378
Guido van Rossum49545951997-12-02 19:28:29 +000010379fi
10380
Guido van Rossumb93a8621998-05-07 13:27:32 +000010381fi
10382
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010384rm -f core conftest.err conftest.$ac_objext \
10385 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10388$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010389if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010390 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010391else
Martin v. Löwis11437992002-04-12 09:54:03 +000010392 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010393LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397/* Override any GCC internal prototype to avoid an error.
10398 Use char because int might match the return type of a GCC
10399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010400#ifdef __cplusplus
10401extern "C"
10402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010403char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010404int
10405main ()
10406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010407return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 ;
10409 return 0;
10410}
10411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010413 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010414else
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010417rm -f core conftest.err conftest.$ac_objext \
10418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010419LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10422$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010423if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010425
Martin v. Löwis130fb172001-07-19 11:00:41 +000010426 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010427 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010428 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010429fi
10430
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010431
Neal Norwitza978ab02002-11-02 16:58:05 +000010432 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10434$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010435if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010436 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010437else
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010439LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010443/* Override any GCC internal prototype to avoid an error.
10444 Use char because int might match the return type of a GCC
10445 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010446#ifdef __cplusplus
10447extern "C"
10448#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010449char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010450int
10451main ()
10452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ;
10455 return 0;
10456}
10457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010460else
Matthias Kloseb9621712010-04-24 17:59:49 +000010461 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010463rm -f core conftest.err conftest.$ac_objext \
10464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010465LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10468$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010469if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010471
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010472 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010473 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010474 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010475fi
10476
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010477 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010478fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010479
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010480if test "$posix_threads" = "yes"; then
10481 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010482
Matthias Kloseb9621712010-04-24 17:59:49 +000010483$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010484
10485 fi
10486
10487 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10488 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010489 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010490$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010491
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492 ;;
10493 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010495
10496 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010497 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010498$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010499
10500 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010501 esac
10502
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10504$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010505 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010509 ac_cv_pthread_system_supported=no
10510else
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010513
10514 #include <stdio.h>
10515 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010516 void *foo(void *parm) {
10517 return NULL;
10518 }
10519 main() {
10520 pthread_attr_t attr;
10521 pthread_t id;
10522 if (pthread_attr_init(&attr)) exit(-1);
10523 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10524 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10525 exit(0);
10526 }
10527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010528if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529 ac_cv_pthread_system_supported=yes
10530else
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010536
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537
Guido van Rossum627b2d71993-12-24 10:39:16 +000010538fi
10539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10541$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542 if test "$ac_cv_pthread_system_supported" = "yes"; then
10543
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010545
10546 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 for ac_func in pthread_sigmask
10548do :
10549 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010550if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010551 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010554 case $ac_sys_system in
10555 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010556
Matthias Kloseb9621712010-04-24 17:59:49 +000010557$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010558
10559 ;;
10560 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010561fi
10562done
10563
Christian Heimesf77b4b22013-08-21 13:26:05 +020010564 for ac_func in pthread_atfork
10565do :
10566 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10567if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10568 cat >>confdefs.h <<_ACEOF
10569#define HAVE_PTHREAD_ATFORK 1
10570_ACEOF
10571
10572fi
10573done
10574
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010575fi
10576
10577
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010578# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10581$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010583if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010584 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588 ipv6=no
10589 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010590 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10591$as_echo "yes" >&6; }
10592 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010593
10594 ipv6=yes
10595 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010597else
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010600/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601 /* AF_INET6 available check */
10602#include <sys/types.h>
10603#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010604int
10605main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010607int domain = AF_INET6;
10608 ;
10609 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010610}
Martin v. Löwis11437992002-04-12 09:54:03 +000010611_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010612if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10615$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010616 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010617
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010618else
Matthias Kloseb159a552010-04-25 21:00:44 +000010619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010623
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010627if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10629$as_echo_n "checking if RFC2553 API is available... " >&6; }
10630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010632
10633 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010634#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010635int
10636main ()
10637{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010638struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010639 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 ;
10641 return 0;
10642}
Matthias Kloseb159a552010-04-25 21:00:44 +000010643
Martin v. Löwis11437992002-04-12 09:54:03 +000010644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010645if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010646
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010649 ipv6=yes
10650
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010651else
Matthias Kloseb159a552010-04-25 21:00:44 +000010652
10653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010654$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010655 ipv6=no
10656
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010659fi
10660
10661if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010662 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010663
10664fi
10665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666fi
10667
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668
10669ipv6type=unknown
10670ipv6lib=none
10671ipv6trylibc=no
10672
10673if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10675$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010676 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10677 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 case $i in
10679 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010682
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683#include <netinet/in.h>
10684#ifdef IPV6_INRIA_VERSION
10685yes
10686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010687_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010690 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010692rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010693
10694 ;;
10695 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010697/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010698
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010699#include <netinet/in.h>
10700#ifdef __KAME__
10701yes
10702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010703_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010704if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010705 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706 ipv6type=$i;
10707 ipv6lib=inet6
10708 ipv6libdir=/usr/local/v6/lib
10709 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010710fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010711rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712
10713 ;;
10714 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010716/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010717
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718#include <features.h>
10719#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10720yes
10721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010722_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725 ipv6type=$i;
10726 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010727fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010728rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729
10730 ;;
10731 linux-inet6)
10732 if test -d /usr/inet6; then
10733 ipv6type=$i
10734 ipv6lib=inet6
10735 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010736 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010737 fi
10738 ;;
10739 solaris)
10740 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010741 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742 ipv6type=$i
10743 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744 fi
10745 fi
10746 ;;
10747 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010749/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010750
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751#include <sys/param.h>
10752#ifdef _TOSHIBA_INET6
10753yes
10754#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010755_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758 ipv6type=$i;
10759 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010760 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010762rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763
10764 ;;
10765 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769#include </usr/local/v6/include/sys/v6config.h>
10770#ifdef __V6D__
10771yes
10772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776 ipv6type=$i;
10777 ipv6lib=v6;
10778 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010779 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010781rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782
10783 ;;
10784 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010787
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788#include <sys/param.h>
10789#ifdef _ZETA_MINAMI_INET6
10790yes
10791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010792_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 ipv6type=$i;
10796 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010797 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010799rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800
10801 ;;
10802 esac
10803 if test "$ipv6type" != "unknown"; then
10804 break
10805 fi
10806 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10808$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809fi
10810
10811if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10812 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10813 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10814 echo "using lib$ipv6lib"
10815 else
10816 if test $ipv6trylibc = "yes"; then
10817 echo "using libc"
10818 else
10819 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10820 echo "You need to fetch lib$ipv6lib.a from appropriate"
10821 echo 'ipv6 kit and compile beforehand.'
10822 exit 1
10823 fi
10824 fi
10825fi
10826
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10828$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10830/* end confdefs.h. */
10831 /* CAN_RAW_FD_FRAMES available check */
10832#include <linux/can/raw.h>
10833int
10834main ()
10835{
10836int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841if ac_fn_c_try_compile "$LINENO"; then :
10842
10843
10844$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10845
10846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10847$as_echo "yes" >&6; }
10848
10849else
10850
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10852$as_echo "no" >&6; }
10853
10854fi
10855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10858$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010860/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010861
10862 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010863int
10864main ()
10865{
10866FSIORefNum fRef = 0
10867 ;
10868 return 0;
10869}
Matthias Kloseb159a552010-04-25 21:00:44 +000010870
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010871_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010872if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010873
Matthias Kloseb159a552010-04-25 21:00:44 +000010874
Matthias Kloseb9621712010-04-24 17:59:49 +000010875$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010876
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10878$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010879
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010880else
Matthias Kloseb159a552010-04-25 21:00:44 +000010881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10883$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010884
10885fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10887
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010888# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10890$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010891
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010892# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010893if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894 withval=$with_doc_strings;
10895fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010896
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010897
10898if test -z "$with_doc_strings"
10899then with_doc_strings="yes"
10900fi
10901if test "$with_doc_strings" != "no"
10902then
10903
Matthias Kloseb9621712010-04-24 17:59:49 +000010904$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010905
10906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10908$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010909
Antoine Pitrou042b1282010-08-13 21:15:58 +000010910# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10912$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010913
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010914# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010915if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010917if test "$withval" != no
10918then
10919
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10923$as_echo "yes" >&6; }
10924else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10925$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010926fi
10927else
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930fi
10931
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010932
10933# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10935$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010939 withval=$with_pymalloc;
10940fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010941
Neil Schemenauera35c6882001-02-27 04:45:05 +000010942
Neil Schemenauer16c22972002-03-22 15:34:49 +000010943if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010944then
10945 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010946fi
10947if test "$with_pymalloc" != "no"
10948then
Martin v. Löwis11437992002-04-12 09:54:03 +000010949
Matthias Kloseb9621712010-04-24 17:59:49 +000010950$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010951
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010952 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10955$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010956
Benjamin Peterson05159c42009-12-03 03:01:27 +000010957# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10959$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010960
10961# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010963 withval=$with_valgrind;
10964else
10965 with_valgrind=no
10966fi
10967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10969$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010970if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 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 +020010972if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010973
Matthias Kloseb9621712010-04-24 17:59:49 +000010974$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010975
10976else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010977 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010978
10979fi
10980
10981
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010982 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010983fi
10984
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010985# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010986
Guido van Rossum98935bf2001-09-05 19:13:16 +000010987DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010988
Guido van Rossume97ee181999-12-20 21:27:22 +000010989# the dlopen() function means we might want to use dynload_shlib.o. some
10990# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010991for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010992do :
10993 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010994if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010995 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010996#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010997_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010998
Guido van Rossume97ee181999-12-20 21:27:22 +000010999fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011000done
Guido van Rossume97ee181999-12-20 21:27:22 +000011001
Michael W. Hudson54241132001-12-07 15:38:26 +000011002
Guido van Rossume97ee181999-12-20 21:27:22 +000011003# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11004# loading of modules.
11005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11007$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011008if test -z "$DYNLOADFILE"
11009then
11010 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011011 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11012 if test "$ac_cv_func_dlopen" = yes
11013 then DYNLOADFILE="dynload_shlib.o"
11014 else DYNLOADFILE="dynload_aix.o"
11015 fi
11016 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011017 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011018 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11019 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011020 *)
11021 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11022 # out any dynamic loading
11023 if test "$ac_cv_func_dlopen" = yes
11024 then DYNLOADFILE="dynload_shlib.o"
11025 else DYNLOADFILE="dynload_stub.o"
11026 fi
11027 ;;
11028 esac
11029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11031$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011032if test "$DYNLOADFILE" != "dynload_stub.o"
11033then
Martin v. Löwis11437992002-04-12 09:54:03 +000011034
Matthias Kloseb9621712010-04-24 17:59:49 +000011035$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011036
11037fi
11038
Neil Schemenauer4e425612001-06-19 15:44:15 +000011039# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11040
Michael W. Hudson54241132001-12-07 15:38:26 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11043$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011044if test -z "$MACHDEP_OBJS"
11045then
Jack Jansene578a632001-08-15 01:27:14 +000011046 MACHDEP_OBJS=$extra_machdep_objs
11047else
11048 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011049fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011050if test -z "$MACHDEP_OBJS"; then
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11052$as_echo "none" >&6; }
11053else
11054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11055$as_echo "$MACHDEP_OBJS" >&6; }
11056fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011057
Guido van Rossum627b2d71993-12-24 10:39:16 +000011058# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011059for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011060 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011061 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011062 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011063 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011064 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011065 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011066 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11067 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011068 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011069 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011070 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011071 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011072 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011073 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011074 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11075 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011076 sigaction sigaltstack siginterrupt sigpending sigrelse \
11077 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011078 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011079 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011080 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011081do :
11082 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11083ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011084if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011086#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011087_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011088
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011089fi
11090done
11091
Michael W. Hudson54241132001-12-07 15:38:26 +000011092
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011093ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11094 #include <dirent.h>
11095"
11096if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11097
11098$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11099
11100fi
11101
11102
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011103# For some functions, having a definition is not sufficient, since
11104# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11106$as_echo_n "checking for chroot... " >&6; }
11107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011108/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011109#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011110int
11111main ()
11112{
11113void *x=chroot
11114 ;
11115 return 0;
11116}
11117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011119
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011121
Matthias Kloseb159a552010-04-25 21:00:44 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011124else
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11126$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011127
11128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11131$as_echo_n "checking for link... " >&6; }
11132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011134#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011135int
11136main ()
11137{
11138void *x=link
11139 ;
11140 return 0;
11141}
11142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011143if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011144
Matthias Kloseb9621712010-04-24 17:59:49 +000011145$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011146
Matthias Kloseb159a552010-04-25 21:00:44 +000011147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011148$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011149else
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11151$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011152
11153fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11156$as_echo_n "checking for symlink... " >&6; }
11157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011158/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011159#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011160int
11161main ()
11162{
11163void *x=symlink
11164 ;
11165 return 0;
11166}
11167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011168if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011169
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011171
Matthias Kloseb159a552010-04-25 21:00:44 +000011172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011173$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011174else
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011177
11178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11181$as_echo_n "checking for fchdir... " >&6; }
11182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011183/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011184#include <unistd.h>
11185int
11186main ()
11187{
11188void *x=fchdir
11189 ;
11190 return 0;
11191}
11192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011193if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011196
Matthias Kloseb159a552010-04-25 21:00:44 +000011197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011198$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011199else
Matthias Kloseb9621712010-04-24 17:59:49 +000011200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11201$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011202
11203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11206$as_echo_n "checking for fsync... " >&6; }
11207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011209#include <unistd.h>
11210int
11211main ()
11212{
11213void *x=fsync
11214 ;
11215 return 0;
11216}
11217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011219
Matthias Kloseb9621712010-04-24 17:59:49 +000011220$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011221
Matthias Kloseb159a552010-04-25 21:00:44 +000011222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011223$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011224else
Matthias Kloseb9621712010-04-24 17:59:49 +000011225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11226$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011227
11228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11231$as_echo_n "checking for fdatasync... " >&6; }
11232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011233/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011234#include <unistd.h>
11235int
11236main ()
11237{
11238void *x=fdatasync
11239 ;
11240 return 0;
11241}
11242_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011244
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011246
Matthias Kloseb159a552010-04-25 21:00:44 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011249else
Matthias Kloseb9621712010-04-24 17:59:49 +000011250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11251$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011252
11253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11256$as_echo_n "checking for epoll... " >&6; }
11257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011258/* end confdefs.h. */
11259#include <sys/epoll.h>
11260int
11261main ()
11262{
11263void *x=epoll_create
11264 ;
11265 return 0;
11266}
11267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011269
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011271
Matthias Kloseb159a552010-04-25 21:00:44 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011273$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011274else
Matthias Kloseb9621712010-04-24 17:59:49 +000011275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011277
11278fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11281$as_echo_n "checking for epoll_create1... " >&6; }
11282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11283/* end confdefs.h. */
11284#include <sys/epoll.h>
11285int
11286main ()
11287{
11288void *x=epoll_create1
11289 ;
11290 return 0;
11291}
11292_ACEOF
11293if ac_fn_c_try_compile "$LINENO"; then :
11294
11295$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11296
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11298$as_echo "yes" >&6; }
11299else
11300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11301$as_echo "no" >&6; }
11302
11303fi
11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11306$as_echo_n "checking for kqueue... " >&6; }
11307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011308/* end confdefs.h. */
11309
11310#include <sys/types.h>
11311#include <sys/event.h>
11312
11313int
11314main ()
11315{
11316int x=kqueue()
11317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011324
Matthias Kloseb159a552010-04-25 21:00:44 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011327else
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011330
11331fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11334$as_echo_n "checking for prlimit... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11336/* end confdefs.h. */
11337
11338#include <sys/time.h>
11339#include <sys/resource.h>
11340
11341int
11342main ()
11343{
11344void *x=prlimit
11345 ;
11346 return 0;
11347}
11348_ACEOF
11349if ac_fn_c_try_compile "$LINENO"; then :
11350
11351$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11352
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11354$as_echo "yes" >&6; }
11355else
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
11358
11359fi
11360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11361
Martin v. Löwisd5843682002-11-21 20:41:28 +000011362# On some systems (eg. FreeBSD 5), we would find a definition of the
11363# functions ctermid_r, setgroups in the library, but no prototype
11364# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11365# address to avoid compiler warnings and potential miscompilations
11366# because of the missing prototypes.
11367
Matthias Kloseb9621712010-04-24 17:59:49 +000011368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11369$as_echo_n "checking for ctermid_r... " >&6; }
11370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011371/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011372
Martin v. Löwisd5843682002-11-21 20:41:28 +000011373#include <stdio.h>
11374
Martin v. Löwisd5843682002-11-21 20:41:28 +000011375int
11376main ()
11377{
11378void* p = ctermid_r
11379 ;
11380 return 0;
11381}
11382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011384
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011386
Matthias Kloseb159a552010-04-25 21:00:44 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011388$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011389else
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011392
11393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11395
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11397$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011398if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011399 $as_echo_n "(cached) " >&6
11400else
11401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011403#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011404int
11405main ()
11406{
11407void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011408
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011409 ;
11410 return 0;
11411}
11412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011413if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011414 ac_cv_flock_decl=yes
11415else
11416 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011417
11418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011420
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011421fi
11422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11423$as_echo "$ac_cv_flock_decl" >&6; }
11424if test "x${ac_cv_flock_decl}" = xyes; then
11425 for ac_func in flock
11426do :
11427 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011428if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011429 cat >>confdefs.h <<_ACEOF
11430#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011431_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011432
Antoine Pitroua3000072010-09-07 14:52:42 +000011433else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011435$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011436if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011437 $as_echo_n "(cached) " >&6
11438else
11439 ac_check_lib_save_LIBS=$LIBS
11440LIBS="-lbsd $LIBS"
11441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11442/* end confdefs.h. */
11443
11444/* Override any GCC internal prototype to avoid an error.
11445 Use char because int might match the return type of a GCC
11446 builtin and then its argument prototype would still apply. */
11447#ifdef __cplusplus
11448extern "C"
11449#endif
11450char flock ();
11451int
11452main ()
11453{
11454return flock ();
11455 ;
11456 return 0;
11457}
11458_ACEOF
11459if ac_fn_c_try_link "$LINENO"; then :
11460 ac_cv_lib_bsd_flock=yes
11461else
11462 ac_cv_lib_bsd_flock=no
11463fi
11464rm -f core conftest.err conftest.$ac_objext \
11465 conftest$ac_exeext conftest.$ac_ext
11466LIBS=$ac_check_lib_save_LIBS
11467fi
11468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11469$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011470if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011471 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011472
11473
11474$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11475
11476
11477fi
11478
11479
11480fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011481done
11482
Antoine Pitroua3000072010-09-07 14:52:42 +000011483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484
Matthias Kloseb9621712010-04-24 17:59:49 +000011485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11486$as_echo_n "checking for getpagesize... " >&6; }
11487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011488/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011489
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011490#include <unistd.h>
11491
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011492int
11493main ()
11494{
11495void* p = getpagesize
11496 ;
11497 return 0;
11498}
11499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011501
Matthias Kloseb9621712010-04-24 17:59:49 +000011502$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011503
Matthias Kloseb159a552010-04-25 21:00:44 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011505$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011506else
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11508$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011509
11510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011512
Victor Stinner984890f2011-11-24 13:53:38 +010011513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11514$as_echo_n "checking for broken unsetenv... " >&6; }
11515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11516/* end confdefs.h. */
11517
11518#include <stdlib.h>
11519
11520int
11521main ()
11522{
11523int res = unsetenv("DUMMY")
11524 ;
11525 return 0;
11526}
11527_ACEOF
11528if ac_fn_c_try_compile "$LINENO"; then :
11529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11530$as_echo "no" >&6; }
11531else
11532
11533$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11534
11535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11536$as_echo "yes" >&6; }
11537
11538fi
11539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11540
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011541for ac_prog in true
11542do
11543 # Extract the first word of "$ac_prog", so it can be a program name with args.
11544set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11546$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011547if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011548 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011549else
11550 if test -n "$TRUE"; then
11551 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11552else
11553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11554for as_dir in $PATH
11555do
11556 IFS=$as_save_IFS
11557 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011560 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 $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 +000011562 break 2
11563 fi
11564done
Matthias Kloseb9621712010-04-24 17:59:49 +000011565 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011566IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011567
11568fi
11569fi
11570TRUE=$ac_cv_prog_TRUE
11571if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11573$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011574else
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011577fi
11578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011580 test -n "$TRUE" && break
11581done
11582test -n "$TRUE" || TRUE="/bin/true"
11583
11584
Matthias Kloseb9621712010-04-24 17:59:49 +000011585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11586$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011587if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011589else
11590 ac_check_lib_save_LIBS=$LIBS
11591LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011593/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595/* Override any GCC internal prototype to avoid an error.
11596 Use char because int might match the return type of a GCC
11597 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011598#ifdef __cplusplus
11599extern "C"
11600#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011601char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011602int
11603main ()
11604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011605return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011606 ;
11607 return 0;
11608}
11609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011610if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011611 ac_cv_lib_c_inet_aton=yes
11612else
Matthias Kloseb9621712010-04-24 17:59:49 +000011613 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011617LIBS=$ac_check_lib_save_LIBS
11618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11620$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011621if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011622 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11625$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011626if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011627 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011628else
11629 ac_check_lib_save_LIBS=$LIBS
11630LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011634/* Override any GCC internal prototype to avoid an error.
11635 Use char because int might match the return type of a GCC
11636 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011637#ifdef __cplusplus
11638extern "C"
11639#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011640char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641int
11642main ()
11643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011644return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645 ;
11646 return 0;
11647}
11648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011649if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011650 ac_cv_lib_resolv_inet_aton=yes
11651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011654rm -f core conftest.err conftest.$ac_objext \
11655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011656LIBS=$ac_check_lib_save_LIBS
11657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11659$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011660if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011661 cat >>confdefs.h <<_ACEOF
11662#define HAVE_LIBRESOLV 1
11663_ACEOF
11664
11665 LIBS="-lresolv $LIBS"
11666
11667fi
11668
11669
11670fi
11671
11672
Christian Heimesd0764e22007-12-04 15:00:33 +000011673# On Tru64, chflags seems to be present, but calling it will
11674# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11676$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011677if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011681 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011682else
Matthias Kloseb9621712010-04-24 17:59:49 +000011683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011684/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011685
Christian Heimesd0764e22007-12-04 15:00:33 +000011686#include <sys/stat.h>
11687#include <unistd.h>
11688int main(int argc, char*argv[])
11689{
11690 if(chflags(argv[0], 0) != 0)
11691 return 1;
11692 return 0;
11693}
Ned Deily3eb67d52011-06-28 00:00:28 -070011694
Christian Heimesd0764e22007-12-04 15:00:33 +000011695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011696if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011697 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011703fi
11704
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11708$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011709if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011710 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011711if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011712 ac_cv_have_chflags="yes"
11713else
11714 ac_cv_have_chflags="no"
11715fi
11716
11717fi
11718if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011719
Matthias Kloseb9621712010-04-24 17:59:49 +000011720$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011721
11722fi
11723
Matthias Kloseb9621712010-04-24 17:59:49 +000011724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11725$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011726if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011728else
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011730 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011731else
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011733/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011734
Christian Heimesd0764e22007-12-04 15:00:33 +000011735#include <sys/stat.h>
11736#include <unistd.h>
11737int main(int argc, char*argv[])
11738{
11739 if(lchflags(argv[0], 0) != 0)
11740 return 1;
11741 return 0;
11742}
Ned Deily3eb67d52011-06-28 00:00:28 -070011743
Christian Heimesd0764e22007-12-04 15:00:33 +000011744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011746 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11751 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011752fi
11753
11754
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11757$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011758if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011759 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011760if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011761 ac_cv_have_lchflags="yes"
11762else
11763 ac_cv_have_lchflags="no"
11764fi
11765
11766fi
11767if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011768
Matthias Kloseb9621712010-04-24 17:59:49 +000011769$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770
11771fi
11772
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011773case $ac_sys_system/$ac_sys_release in
11774Darwin/*)
11775 _CUR_CFLAGS="${CFLAGS}"
11776 _CUR_LDFLAGS="${LDFLAGS}"
11777 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11778 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11779 ;;
11780esac
11781
Matthias Kloseb9621712010-04-24 17:59:49 +000011782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11783$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011784if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011785 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011786else
11787 ac_check_lib_save_LIBS=$LIBS
11788LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011790/* end confdefs.h. */
11791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792/* Override any GCC internal prototype to avoid an error.
11793 Use char because int might match the return type of a GCC
11794 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011795#ifdef __cplusplus
11796extern "C"
11797#endif
11798char inflateCopy ();
11799int
11800main ()
11801{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011808 ac_cv_lib_z_inflateCopy=yes
11809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011812rm -f core conftest.err conftest.$ac_objext \
11813 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011814LIBS=$ac_check_lib_save_LIBS
11815fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11817$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011821
11822fi
11823
11824
11825case $ac_sys_system/$ac_sys_release in
11826Darwin/*)
11827 CFLAGS="${_CUR_CFLAGS}"
11828 LDFLAGS="${_CUR_LDFLAGS}"
11829 ;;
11830esac
11831
Matthias Kloseb9621712010-04-24 17:59:49 +000011832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11833$as_echo_n "checking for hstrerror... " >&6; }
11834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011836
Martin v. Löwise9416172003-05-03 10:12:45 +000011837#include <netdb.h>
11838
Martin v. Löwise9416172003-05-03 10:12:45 +000011839int
11840main ()
11841{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011842void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011848
Matthias Kloseb9621712010-04-24 17:59:49 +000011849$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011850
Matthias Kloseb159a552010-04-25 21:00:44 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011853else
Matthias Kloseb9621712010-04-24 17:59:49 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011856
11857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011858rm -f core conftest.err conftest.$ac_objext \
11859 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860
Matthias Kloseb9621712010-04-24 17:59:49 +000011861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11862$as_echo_n "checking for inet_aton... " >&6; }
11863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011864/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011865
Martin v. Löwis86d66262006-02-17 08:40:11 +000011866#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011867#include <sys/socket.h>
11868#include <netinet/in.h>
11869#include <arpa/inet.h>
11870
Martin v. Löwise9416172003-05-03 10:12:45 +000011871int
11872main ()
11873{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011874void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011875 ;
11876 return 0;
11877}
11878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011879if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011882
Matthias Kloseb159a552010-04-25 21:00:44 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011884$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011888
11889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011890rm -f core conftest.err conftest.$ac_objext \
11891 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11894$as_echo_n "checking for inet_pton... " >&6; }
11895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011896/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011897
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011898#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011899#include <sys/socket.h>
11900#include <netinet/in.h>
11901#include <arpa/inet.h>
11902
Martin v. Löwise9416172003-05-03 10:12:45 +000011903int
11904main ()
11905{
11906void* p = inet_pton
11907 ;
11908 return 0;
11909}
11910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011911if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011912
Matthias Kloseb9621712010-04-24 17:59:49 +000011913$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011914
Matthias Kloseb159a552010-04-25 21:00:44 +000011915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011916$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011917else
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11919$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011920
11921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011923
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011924# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11926$as_echo_n "checking for setgroups... " >&6; }
11927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011928/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011929
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011930#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011931#ifdef HAVE_GRP_H
11932#include <grp.h>
11933#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011934
Martin v. Löwisd5843682002-11-21 20:41:28 +000011935int
11936main ()
11937{
11938void* p = setgroups
11939 ;
11940 return 0;
11941}
11942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011943if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011946
Matthias Kloseb159a552010-04-25 21:00:44 +000011947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011948$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011949else
Matthias Kloseb9621712010-04-24 17:59:49 +000011950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11951$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011952
11953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011955
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011956# check for openpty and forkpty
11957
11958for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011959do :
11960 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011961if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011963#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011964_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011965
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11968$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011971else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011973LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977/* Override any GCC internal prototype to avoid an error.
11978 Use char because int might match the return type of a GCC
11979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011980#ifdef __cplusplus
11981extern "C"
11982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011983char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011984int
11985main ()
11986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011987return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011988 ;
11989 return 0;
11990}
11991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011993 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011997rm -f core conftest.err conftest.$ac_objext \
11998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011999LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12002$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012003if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012005 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12008$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012009if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012011else
12012 ac_check_lib_save_LIBS=$LIBS
12013LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012015/* end confdefs.h. */
12016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017/* Override any GCC internal prototype to avoid an error.
12018 Use char because int might match the return type of a GCC
12019 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012020#ifdef __cplusplus
12021extern "C"
12022#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012023char openpty ();
12024int
12025main ()
12026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012028 ;
12029 return 0;
12030}
12031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012033 ac_cv_lib_bsd_openpty=yes
12034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012037rm -f core conftest.err conftest.$ac_objext \
12038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012039LIBS=$ac_check_lib_save_LIBS
12040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12042$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012043if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012045 LIBS="$LIBS -lbsd"
12046fi
12047
12048
12049fi
12050
Fred Drake8cef4cf2000-06-28 16:40:38 +000012051
12052fi
12053done
12054
12055for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012056do :
12057 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012061_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012062
Fred Drake8cef4cf2000-06-28 16:40:38 +000012063else
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12065$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012066if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012067 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012068else
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012070LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012074/* Override any GCC internal prototype to avoid an error.
12075 Use char because int might match the return type of a GCC
12076 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012077#ifdef __cplusplus
12078extern "C"
12079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012080char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012081int
12082main ()
12083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012084return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012091else
Matthias Kloseb9621712010-04-24 17:59:49 +000012092 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012094rm -f core conftest.err conftest.$ac_objext \
12095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012096LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12099$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012100if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012102 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12105$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012106if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012108else
12109 ac_check_lib_save_LIBS=$LIBS
12110LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012112/* end confdefs.h. */
12113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114/* Override any GCC internal prototype to avoid an error.
12115 Use char because int might match the return type of a GCC
12116 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012117#ifdef __cplusplus
12118extern "C"
12119#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012120char forkpty ();
12121int
12122main ()
12123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012130 ac_cv_lib_bsd_forkpty=yes
12131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012134rm -f core conftest.err conftest.$ac_objext \
12135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012136LIBS=$ac_check_lib_save_LIBS
12137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12139$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012142 LIBS="$LIBS -lbsd"
12143fi
12144
12145
12146fi
12147
Fred Drake8cef4cf2000-06-28 16:40:38 +000012148
12149fi
12150done
12151
Jack Jansendd19cf82001-12-06 22:36:17 +000012152
Christian Heimesb186d002008-03-18 15:15:01 +000012153# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012154for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012155do :
12156 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012159#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012160_ACEOF
12161
12162fi
12163done
12164
12165
Michael W. Hudson54241132001-12-07 15:38:26 +000012166# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012167for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012168do :
12169 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12170ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012171if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012173#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012174_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012175
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012176fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012177done
12178
Michael W. Hudson54241132001-12-07 15:38:26 +000012179
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012180ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012182 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012183
Martin v. Löwis1142de32002-03-29 16:28:31 +000012184else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012186 *" dup2.$ac_objext "* ) ;;
12187 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012189esac
12190
Martin v. Löwis1142de32002-03-29 16:28:31 +000012191fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012192
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012193ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012194if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012195 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12196
12197else
12198 case " $LIBOBJS " in
12199 *" strdup.$ac_objext "* ) ;;
12200 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12201 ;;
12202esac
12203
12204fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012205
12206
12207for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012208do :
12209 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012210if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012212#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012215/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012217int
12218main ()
12219{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012220getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 ;
12222 return 0;
12223}
12224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012225if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012226
Matthias Kloseb9621712010-04-24 17:59:49 +000012227$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012228
Guido van Rossum627b2d71993-12-24 10:39:16 +000012229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012231
Guido van Rossum627b2d71993-12-24 10:39:16 +000012232fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012233done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012234
Jack Jansen150753c2003-03-29 22:07:47 +000012235for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012236do :
12237 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012238if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012239 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012240#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012243/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012244#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012245int
12246main ()
12247{
12248setpgrp(0,0);
12249 ;
12250 return 0;
12251}
12252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012253if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012254
Matthias Kloseb9621712010-04-24 17:59:49 +000012255$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012256
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012259
12260fi
12261done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012262
Thomas Wouters3a584202000-08-05 23:28:51 +000012263for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012264do :
12265 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012268#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012272#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012276gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 ;
12278 return 0;
12279}
12280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012281if ac_fn_c_try_compile "$LINENO"; then :
12282
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283else
Skip Montanaro6dead952003-09-25 14:50:04 +000012284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012286
Martin v. Löwis11437992002-04-12 09:54:03 +000012287
Guido van Rossum627b2d71993-12-24 10:39:16 +000012288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012290
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012292done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012293
Michael W. Hudson54241132001-12-07 15:38:26 +000012294
Victor Stinnere0be4232011-10-25 13:06:09 +020012295for ac_func in clock_gettime
12296do :
12297 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12298if test "x$ac_cv_func_clock_gettime" = xyes; then :
12299 cat >>confdefs.h <<_ACEOF
12300#define HAVE_CLOCK_GETTIME 1
12301_ACEOF
12302
12303else
12304
12305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12306$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12307if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12308 $as_echo_n "(cached) " >&6
12309else
12310 ac_check_lib_save_LIBS=$LIBS
12311LIBS="-lrt $LIBS"
12312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12313/* end confdefs.h. */
12314
12315/* Override any GCC internal prototype to avoid an error.
12316 Use char because int might match the return type of a GCC
12317 builtin and then its argument prototype would still apply. */
12318#ifdef __cplusplus
12319extern "C"
12320#endif
12321char clock_gettime ();
12322int
12323main ()
12324{
12325return clock_gettime ();
12326 ;
12327 return 0;
12328}
12329_ACEOF
12330if ac_fn_c_try_link "$LINENO"; then :
12331 ac_cv_lib_rt_clock_gettime=yes
12332else
12333 ac_cv_lib_rt_clock_gettime=no
12334fi
12335rm -f core conftest.err conftest.$ac_objext \
12336 conftest$ac_exeext conftest.$ac_ext
12337LIBS=$ac_check_lib_save_LIBS
12338fi
12339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12340$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12341if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12342
Victor Stinner7efb8332014-08-29 15:41:08 +020012343 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012344 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12345
12346
12347$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12348
12349
12350fi
12351
12352
12353fi
12354done
12355
12356
12357for ac_func in clock_getres
12358do :
12359 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12360if test "x$ac_cv_func_clock_getres" = xyes; then :
12361 cat >>confdefs.h <<_ACEOF
12362#define HAVE_CLOCK_GETRES 1
12363_ACEOF
12364
12365else
12366
12367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12368$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12369if ${ac_cv_lib_rt_clock_getres+:} false; then :
12370 $as_echo_n "(cached) " >&6
12371else
12372 ac_check_lib_save_LIBS=$LIBS
12373LIBS="-lrt $LIBS"
12374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12375/* end confdefs.h. */
12376
12377/* Override any GCC internal prototype to avoid an error.
12378 Use char because int might match the return type of a GCC
12379 builtin and then its argument prototype would still apply. */
12380#ifdef __cplusplus
12381extern "C"
12382#endif
12383char clock_getres ();
12384int
12385main ()
12386{
12387return clock_getres ();
12388 ;
12389 return 0;
12390}
12391_ACEOF
12392if ac_fn_c_try_link "$LINENO"; then :
12393 ac_cv_lib_rt_clock_getres=yes
12394else
12395 ac_cv_lib_rt_clock_getres=no
12396fi
12397rm -f core conftest.err conftest.$ac_objext \
12398 conftest$ac_exeext conftest.$ac_ext
12399LIBS=$ac_check_lib_save_LIBS
12400fi
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12402$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12403if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12404
12405 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12406
12407
12408fi
12409
12410
12411fi
12412done
12413
12414
Matthias Kloseb9621712010-04-24 17:59:49 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12416$as_echo_n "checking for major... " >&6; }
12417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012419
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012420#if defined(MAJOR_IN_MKDEV)
12421#include <sys/mkdev.h>
12422#elif defined(MAJOR_IN_SYSMACROS)
12423#include <sys/sysmacros.h>
12424#else
12425#include <sys/types.h>
12426#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012427
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012428int
12429main ()
12430{
12431
12432 makedev(major(0),minor(0));
12433
12434 ;
12435 return 0;
12436}
12437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012438if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012439
12440
Matthias Kloseb9621712010-04-24 17:59:49 +000012441$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012442
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12444$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012445
12446else
Skip Montanaro6dead952003-09-25 14:50:04 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12449$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012450
12451fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012452rm -f core conftest.err conftest.$ac_objext \
12453 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012454
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012455# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012456# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12458$as_echo_n "checking for getaddrinfo... " >&6; }
12459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012461
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012462#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012463#include <sys/socket.h>
12464#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012465#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466
Martin v. Löwis11437992002-04-12 09:54:03 +000012467int
12468main ()
12469{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012470getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012471 ;
12472 return 0;
12473}
12474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012476 have_getaddrinfo=yes
12477else
Matthias Kloseb9621712010-04-24 17:59:49 +000012478 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012479fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012480rm -f core conftest.err conftest.$ac_objext \
12481 conftest$ac_exeext conftest.$ac_ext
12482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12483$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012484if test $have_getaddrinfo = yes
12485then
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12487$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012488 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012490else
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012492
12493if test "${enable_ipv6+set}" = set; then
12494 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12495else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012496 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012497fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012498else
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012501
Stefan Krah19c21392012-11-22 23:47:32 +010012502#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012503#include <sys/types.h>
12504#include <netdb.h>
12505#include <string.h>
12506#include <sys/socket.h>
12507#include <netinet/in.h>
12508
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012509int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012510{
12511 int passive, gaierr, inet4 = 0, inet6 = 0;
12512 struct addrinfo hints, *ai, *aitop;
12513 char straddr[INET6_ADDRSTRLEN], strport[16];
12514
12515 for (passive = 0; passive <= 1; passive++) {
12516 memset(&hints, 0, sizeof(hints));
12517 hints.ai_family = AF_UNSPEC;
12518 hints.ai_flags = passive ? AI_PASSIVE : 0;
12519 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012520 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012521 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12522 (void)gai_strerror(gaierr);
12523 goto bad;
12524 }
12525 for (ai = aitop; ai; ai = ai->ai_next) {
12526 if (ai->ai_addr == NULL ||
12527 ai->ai_addrlen == 0 ||
12528 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12529 straddr, sizeof(straddr), strport, sizeof(strport),
12530 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12531 goto bad;
12532 }
12533 switch (ai->ai_family) {
12534 case AF_INET:
12535 if (strcmp(strport, "54321") != 0) {
12536 goto bad;
12537 }
12538 if (passive) {
12539 if (strcmp(straddr, "0.0.0.0") != 0) {
12540 goto bad;
12541 }
12542 } else {
12543 if (strcmp(straddr, "127.0.0.1") != 0) {
12544 goto bad;
12545 }
12546 }
12547 inet4++;
12548 break;
12549 case AF_INET6:
12550 if (strcmp(strport, "54321") != 0) {
12551 goto bad;
12552 }
12553 if (passive) {
12554 if (strcmp(straddr, "::") != 0) {
12555 goto bad;
12556 }
12557 } else {
12558 if (strcmp(straddr, "::1") != 0) {
12559 goto bad;
12560 }
12561 }
12562 inet6++;
12563 break;
12564 case AF_UNSPEC:
12565 goto bad;
12566 break;
12567 default:
12568 /* another family support? */
12569 break;
12570 }
12571 }
12572 }
12573
12574 if (!(inet4 == 0 || inet4 == 2))
12575 goto bad;
12576 if (!(inet6 == 0 || inet6 == 2))
12577 goto bad;
12578
12579 if (aitop)
12580 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012581 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012582
12583 bad:
12584 if (aitop)
12585 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012586 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012587}
12588
Martin v. Löwis11437992002-04-12 09:54:03 +000012589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012590if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012591 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012592else
Matthias Kloseb9621712010-04-24 17:59:49 +000012593 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12596 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012599fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012600
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12604$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12605
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012606if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012607then
12608 if test $ipv6 = yes
12609 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012610 echo 'Fatal: You must get working getaddrinfo() function.'
12611 echo ' or you can specify "--disable-ipv6"'.
12612 exit 1
12613 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012614else
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Matthias Kloseb9621712010-04-24 17:59:49 +000012616$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012617
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012618fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012619
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012620for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012621do :
12622 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012623if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012626_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012628fi
12629done
12630
Michael W. Hudson54241132001-12-07 15:38:26 +000012631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12634$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012635if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012636 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637else
Matthias Kloseb9621712010-04-24 17:59:49 +000012638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012639/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012640#include <sys/types.h>
12641#include <sys/time.h>
12642#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
Martin v. Löwis11437992002-04-12 09:54:03 +000012644int
12645main ()
12646{
12647if ((struct tm *) 0)
12648return 0;
12649 ;
12650 return 0;
12651}
12652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12661$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012662if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Matthias Kloseb9621712010-04-24 17:59:49 +000012664$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012665
12666fi
12667
Matthias Kloseb9621712010-04-24 17:59:49 +000012668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12669$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012670if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012671 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672else
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012675#include <sys/types.h>
12676#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Martin v. Löwis11437992002-04-12 09:54:03 +000012678int
12679main ()
12680{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681struct tm tm;
12682 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689 ac_cv_struct_tm=time.h
12690else
Matthias Kloseb9621712010-04-24 17:59:49 +000012691 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12696$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012697if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Matthias Kloseb9621712010-04-24 17:59:49 +000012699$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012700
12701fi
12702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703ac_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 +000012704#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706"
Victor Stinnere0be4232011-10-25 13:06:09 +020012707if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
12709cat >>confdefs.h <<_ACEOF
12710#define HAVE_STRUCT_TM_TM_ZONE 1
12711_ACEOF
12712
12713
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012714fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012715
Martin v. Löwis11437992002-04-12 09:54:03 +000012716if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012719
12720else
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12722"
Victor Stinnere0be4232011-10-25 13:06:09 +020012723if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725else
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727fi
12728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012729cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012730#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012731_ACEOF
12732
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12734$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012735if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012736 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737else
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012740#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012741#if !HAVE_DECL_TZNAME
12742extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012744
Martin v. Löwis11437992002-04-12 09:54:03 +000012745int
12746main ()
12747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012749 ;
12750 return 0;
12751}
12752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012753if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754 ac_cv_var_tzname=yes
12755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012758rm -f core conftest.err conftest.$ac_objext \
12759 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012760fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12762$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012763 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Matthias Kloseb9621712010-04-24 17:59:49 +000012765$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012766
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012767 fi
12768fi
12769
Matthias Kloseb9621712010-04-24 17:59:49 +000012770ac_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 +020012771if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012772
12773cat >>confdefs.h <<_ACEOF
12774#define HAVE_STRUCT_STAT_ST_RDEV 1
12775_ACEOF
12776
12777
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012778fi
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780ac_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 +020012781if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783cat >>confdefs.h <<_ACEOF
12784#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12785_ACEOF
12786
12787
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012788fi
12789
Matthias Kloseb9621712010-04-24 17:59:49 +000012790ac_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 +020012791if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012792
12793cat >>confdefs.h <<_ACEOF
12794#define HAVE_STRUCT_STAT_ST_FLAGS 1
12795_ACEOF
12796
12797
12798fi
12799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800ac_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 +020012801if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012802
12803cat >>confdefs.h <<_ACEOF
12804#define HAVE_STRUCT_STAT_ST_GEN 1
12805_ACEOF
12806
12807
12808fi
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810ac_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 +020012811if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012812
12813cat >>confdefs.h <<_ACEOF
12814#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12815_ACEOF
12816
12817
12818fi
12819
Matthias Kloseb9621712010-04-24 17:59:49 +000012820ac_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 +020012821if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012822
Martin v. Löwis11437992002-04-12 09:54:03 +000012823cat >>confdefs.h <<_ACEOF
12824#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12825_ACEOF
12826
12827
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012828fi
12829
Michael W. Hudson54241132001-12-07 15:38:26 +000012830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12832$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012833if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012835else
Matthias Kloseb159a552010-04-25 21:00:44 +000012836
Matthias Kloseb9621712010-04-24 17:59:49 +000012837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012838/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012839#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012840int
12841main ()
12842{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012843return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012844 ;
12845 return 0;
12846}
12847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012848if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012849 ac_cv_header_time_altzone=yes
12850else
Matthias Kloseb9621712010-04-24 17:59:49 +000012851 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012855fi
12856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12858$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012862
12863fi
12864
Guido van Rossumda88dad1995-01-26 00:46:29 +000012865was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12867$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012869/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012870
12871#include <sys/types.h>
12872#include <sys/select.h>
12873#include <sys/time.h>
12874
Martin v. Löwis11437992002-04-12 09:54:03 +000012875int
12876main ()
12877{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012878;
Martin v. Löwis11437992002-04-12 09:54:03 +000012879 ;
12880 return 0;
12881}
12882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
12885
Matthias Kloseb9621712010-04-24 17:59:49 +000012886$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012887
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012888 was_it_defined=yes
12889
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12893$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894
Matthias Kloseb9621712010-04-24 17:59:49 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12896$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012897if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012898 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899else
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012901/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012902#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012903int
12904main ()
12905{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012906struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 ;
12908 return 0;
12909}
12910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012911if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912 ac_cv_struct_addrinfo=yes
12913else
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12917fi
12918
Matthias Kloseb9621712010-04-24 17:59:49 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12920$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012921if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012922
Matthias Kloseb9621712010-04-24 17:59:49 +000012923$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012924
12925fi
12926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12928$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012929if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012930 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012931else
Matthias Kloseb9621712010-04-24 17:59:49 +000012932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012933/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012934
12935# include <sys/types.h>
12936# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012937int
12938main ()
12939{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012940struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012941 ;
12942 return 0;
12943}
12944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012945if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012946 ac_cv_struct_sockaddr_storage=yes
12947else
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012949fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12951fi
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12954$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012955if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012956
Matthias Kloseb9621712010-04-24 17:59:49 +000012957$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012958
12959fi
12960
Guido van Rossum627b2d71993-12-24 10:39:16 +000012961# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012962
Matthias Kloseb9621712010-04-24 17:59:49 +000012963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12964$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012965if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012966 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012970$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012971int
12972main ()
12973{
12974static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012975test_array [0] = 0;
12976return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
12978 ;
12979 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012980}
Martin v. Löwis11437992002-04-12 09:54:03 +000012981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012982if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012983 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012988fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12990$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012991if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012993
12994fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012995
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12997$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012998if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013002/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013003
Martin v. Löwis11437992002-04-12 09:54:03 +000013004int
13005main ()
13006{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013007
Martin v. Löwis11437992002-04-12 09:54:03 +000013008#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013009 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013011 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013 char const *const *pcpcc;
13014 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 /* NEC SVR4.0.2 mips cc rejects this. */
13016 struct point {int x, y;};
13017 static struct point const zero = {0,0};
13018 /* AIX XL C 1.02.0.0 rejects this.
13019 It does not let you subtract one const X* pointer from another in
13020 an arm of an if-expression whose if-part is not a constant
13021 expression */
13022 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013023 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013025 ++pcpcc;
13026 ppc = (char**) pcpcc;
13027 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013028 { /* SCO 3.2v4 cc rejects this sort of thing. */
13029 char tx;
13030 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013035 }
13036 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13037 int x[] = {25, 17};
13038 const int *foo = &x[0];
13039 ++foo;
13040 }
13041 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13042 typedef const int *iptr;
13043 iptr p = 0;
13044 ++p;
13045 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013046 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013048 struct s { int j; const int *ap[3]; } bx;
13049 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013050 }
13051 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13052 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013055 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013056#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013057
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 ;
13059 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013060}
Martin v. Löwis11437992002-04-12 09:54:03 +000013061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013062if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013063 ac_cv_c_const=yes
13064else
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13070$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013072
Matthias Kloseb9621712010-04-24 17:59:49 +000013073$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013074
13075fi
13076
Michael W. Hudson54241132001-12-07 15:38:26 +000013077
Guido van Rossumda88dad1995-01-26 00:46:29 +000013078works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13080$as_echo_n "checking for working volatile... " >&6; }
13081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013082/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013083
Martin v. Löwis11437992002-04-12 09:54:03 +000013084int
13085main ()
13086{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013087volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 ;
13089 return 0;
13090}
13091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013092if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013093 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013094else
Skip Montanaro6dead952003-09-25 14:50:04 +000013095
Matthias Kloseb9621712010-04-24 17:59:49 +000013096$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013097
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013098
Guido van Rossum627b2d71993-12-24 10:39:16 +000013099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13102$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013103
Guido van Rossumda88dad1995-01-26 00:46:29 +000013104works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13106$as_echo_n "checking for working signed char... " >&6; }
13107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013108/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013109
Martin v. Löwis11437992002-04-12 09:54:03 +000013110int
13111main ()
13112{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013113signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 ;
13115 return 0;
13116}
13117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013118if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013119 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013120else
Skip Montanaro6dead952003-09-25 14:50:04 +000013121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013123
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013124
Guido van Rossum7f43da71994-08-01 12:15:30 +000013125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13128$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013129
Guido van Rossumda88dad1995-01-26 00:46:29 +000013130have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13132$as_echo_n "checking for prototypes... " >&6; }
13133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013134/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013135int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013136int
13137main ()
13138{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013139return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 ;
13141 return 0;
13142}
13143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013144if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013145
Matthias Kloseb9621712010-04-24 17:59:49 +000013146$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013147
Matthias Kloseb159a552010-04-25 21:00:44 +000013148 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13152$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013153
Guido van Rossumda88dad1995-01-26 00:46:29 +000013154works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13156$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013158/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013159
13160#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013161int foo(int x, ...) {
13162 va_list va;
13163 va_start(va, x);
13164 va_arg(va, int);
13165 va_arg(va, char *);
13166 va_arg(va, double);
13167 return 0;
13168}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013169
Martin v. Löwis11437992002-04-12 09:54:03 +000013170int
13171main ()
13172{
Guido van Rossum90eea071996-08-30 20:58:57 +000013173return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 ;
13175 return 0;
13176}
13177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013182
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013183 works=yes
13184
Guido van Rossum627b2d71993-12-24 10:39:16 +000013185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13188$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013189
Martin v. Löwisd6320502004-08-12 13:45:08 +000013190# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13192$as_echo_n "checking for socketpair... " >&6; }
13193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013194/* end confdefs.h. */
13195
13196#include <sys/types.h>
13197#include <sys/socket.h>
13198
13199int
13200main ()
13201{
13202void *x=socketpair
13203 ;
13204 return 0;
13205}
13206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013208
Matthias Kloseb9621712010-04-24 17:59:49 +000013209$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013210
Matthias Kloseb159a552010-04-25 21:00:44 +000013211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013212$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013213else
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013216
13217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013219
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013220# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13222$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225#include <sys/types.h>
13226#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013227int
13228main ()
13229{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013230struct sockaddr x;
13231x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013232 ;
13233 return 0;
13234}
13235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236if ac_fn_c_try_compile "$LINENO"; then :
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13238$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241
13242else
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13244$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013245
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248
Guido van Rossumda88dad1995-01-26 00:46:29 +000013249va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13251$as_echo_n "checking whether va_list is an array... " >&6; }
13252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013253/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013254
13255#ifdef HAVE_STDARG_PROTOTYPES
13256#include <stdarg.h>
13257#else
13258#include <varargs.h>
13259#endif
13260
Martin v. Löwis11437992002-04-12 09:54:03 +000013261int
13262main ()
13263{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013265 ;
13266 return 0;
13267}
13268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if ac_fn_c_try_compile "$LINENO"; then :
13270
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271else
Skip Montanaro6dead952003-09-25 14:50:04 +000013272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Guido van Rossumda88dad1995-01-26 00:46:29 +000013276 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013277
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13281$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013283# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013287if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Matthias Kloseb9621712010-04-24 17:59:49 +000013289 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013290
Matthias Kloseb9621712010-04-24 17:59:49 +000013291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13292$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013293 OLD_CFLAGS=$CFLAGS
13294 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013296/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013297
13298# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Martin v. Löwis11437992002-04-12 09:54:03 +000013300int
13301main ()
13302{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013303
13304 char *name;
13305 struct hostent *he, *res;
13306 char buffer[2048];
13307 int buflen = 2048;
13308 int h_errnop;
13309
13310 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013311
13312 ;
13313 return 0;
13314}
13315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013319
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013322
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13324$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013326else
Skip Montanaro6dead952003-09-25 14:50:04 +000013327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13329$as_echo "no" >&6; }
13330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13331$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013333/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013334
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013335# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013336
Martin v. Löwis11437992002-04-12 09:54:03 +000013337int
13338main ()
13339{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013340
13341 char *name;
13342 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013343 char buffer[2048];
13344 int buflen = 2048;
13345 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013346
Matthias Kloseb159a552010-04-25 21:00:44 +000013347 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
13349 ;
13350 return 0;
13351}
13352_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013353if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013356
Martin v. Löwis11437992002-04-12 09:54:03 +000013357
Matthias Kloseb159a552010-04-25 21:00:44 +000013358$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13361$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013363else
Skip Montanaro6dead952003-09-25 14:50:04 +000013364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13366$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13368$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370/* end confdefs.h. */
13371
13372# include <netdb.h>
13373
13374int
13375main ()
13376{
13377
13378 char *name;
13379 struct hostent *he;
13380 struct hostent_data data;
13381
13382 (void) gethostbyname_r(name, he, &data);
13383
13384 ;
13385 return 0;
13386}
13387_ACEOF
13388if ac_fn_c_try_compile "$LINENO"; then :
13389
13390 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13391
13392
13393$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13394
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13396$as_echo "yes" >&6; }
13397
13398else
13399
13400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13401$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013402
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013411 CFLAGS=$OLD_CFLAGS
13412
13413else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415 for ac_func in gethostbyname
13416do :
13417 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013418if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013421_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013422
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013423fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013424done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013425
Michael W. Hudson54241132001-12-07 15:38:26 +000013426
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013427fi
13428
Michael W. Hudson54241132001-12-07 15:38:26 +000013429
13430
13431
13432
13433
13434
Guido van Rossum627b2d71993-12-24 10:39:16 +000013435# checks for system services
13436# (none yet)
13437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013438# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013439ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013440if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013441
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013442else
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13444$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013445if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013446 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013447else
Martin v. Löwis11437992002-04-12 09:54:03 +000013448 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013449LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013451/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013453/* Override any GCC internal prototype to avoid an error.
13454 Use char because int might match the return type of a GCC
13455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013456#ifdef __cplusplus
13457extern "C"
13458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013459char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013460int
13461main ()
13462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 ;
13465 return 0;
13466}
13467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013468if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013470else
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013473rm -f core conftest.err conftest.$ac_objext \
13474 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013475LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13478$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013479if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013480 cat >>confdefs.h <<_ACEOF
13481#define HAVE_LIBIEEE 1
13482_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013484 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485
Guido van Rossum627b2d71993-12-24 10:39:16 +000013486fi
13487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013489fi
13490
Michael W. Hudson54241132001-12-07 15:38:26 +000013491
Guido van Rossum7f253911997-05-09 02:42:48 +000013492# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13494$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013496# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013497if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013498 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013499if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013500then
13501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013503
Matthias Kloseb9621712010-04-24 17:59:49 +000013504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13505$as_echo "yes" >&6; }
13506else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13507$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013508fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13511$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512fi
13513
Guido van Rossum7f253911997-05-09 02:42:48 +000013514
Guido van Rossum7f43da71994-08-01 12:15:30 +000013515# check for --with-libm=...
13516
Guido van Rossum563e7081996-09-10 18:20:48 +000013517case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013518Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013519*) LIBM=-lm
13520esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13522$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013525if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013526 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013527if test "$withval" = no
13528then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13530$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013531elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013532then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13534$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013535else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013536fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13539$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540fi
13541
Guido van Rossum7f43da71994-08-01 12:15:30 +000013542
13543# check for --with-libc=...
13544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13546$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013549if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013551if test "$withval" = no
13552then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13554$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013555elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013556then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13558$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013559else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013560fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013561else
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13563$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564fi
13565
Guido van Rossum7f43da71994-08-01 12:15:30 +000013566
Stefan Krah1919b7e2012-03-21 18:25:23 +010013567# **************************************
13568# * Check for gcc x64 inline assembler *
13569# **************************************
13570
13571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13572$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13574/* end confdefs.h. */
13575
13576int
13577main ()
13578{
13579
13580 __asm__ __volatile__ ("movq %rcx, %rax");
13581
13582 ;
13583 return 0;
13584}
13585_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013586if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013587 have_gcc_asm_for_x64=yes
13588else
13589 have_gcc_asm_for_x64=no
13590fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013591rm -f core conftest.err conftest.$ac_objext \
13592 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13594$as_echo "$have_gcc_asm_for_x64" >&6; }
13595if test "$have_gcc_asm_for_x64" = yes
13596then
13597
13598$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13599
13600fi
13601
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013602# **************************************************
13603# * Check for various properties of floating point *
13604# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13607$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013608if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013610else
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613 ac_cv_little_endian_double=no
13614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013616/* end confdefs.h. */
13617
13618#include <string.h>
13619int main() {
13620 double x = 9006104071832581.0;
13621 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13622 return 0;
13623 else
13624 return 1;
13625}
13626
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629 ac_cv_little_endian_double=yes
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013635fi
13636
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013637fi
13638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13640$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013641if test "$ac_cv_little_endian_double" = yes
13642then
13643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013645
13646fi
13647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13649$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013652else
13653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655 ac_cv_big_endian_double=no
13656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013658/* end confdefs.h. */
13659
13660#include <string.h>
13661int main() {
13662 double x = 9006104071832581.0;
13663 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13664 return 0;
13665 else
13666 return 1;
13667}
13668
13669_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013670if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671 ac_cv_big_endian_double=yes
13672else
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013675rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13676 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013677fi
13678
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679fi
13680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13682$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013683if test "$ac_cv_big_endian_double" = yes
13684then
13685
Matthias Kloseb9621712010-04-24 17:59:49 +000013686$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013687
13688fi
13689
13690# Some ARM platforms use a mixed-endian representation for doubles.
13691# While Python doesn't currently have full support for these platforms
13692# (see e.g., issue 1762561), we can at least make sure that float <-> string
13693# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13695$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013696if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013697 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013698else
13699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013701 ac_cv_mixed_endian_double=no
13702else
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704/* end confdefs.h. */
13705
13706#include <string.h>
13707int main() {
13708 double x = 9006104071832581.0;
13709 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13710 return 0;
13711 else
13712 return 1;
13713}
13714
13715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013716if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013717 ac_cv_mixed_endian_double=yes
13718else
Matthias Kloseb9621712010-04-24 17:59:49 +000013719 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013723fi
13724
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013725fi
13726
Matthias Kloseb9621712010-04-24 17:59:49 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13728$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013729if test "$ac_cv_mixed_endian_double" = yes
13730then
13731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013733
13734fi
13735
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013736# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013737# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013738# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013739# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013740# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013741# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013742
13743# This inline assembler syntax may also work for suncc and icc,
13744# so we try it on all platforms.
13745
Matthias Kloseb9621712010-04-24 17:59:49 +000013746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13747$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749/* end confdefs.h. */
13750
13751int
13752main ()
13753{
13754
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013755 unsigned short cw;
13756 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13757 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013758
13759 ;
13760 return 0;
13761}
13762_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013763if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764 have_gcc_asm_for_x87=yes
13765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013768rm -f core conftest.err conftest.$ac_objext \
13769 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13771$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013772if test "$have_gcc_asm_for_x87" = yes
13773then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013778
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13780$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782/* end confdefs.h. */
13783
13784int
13785main ()
13786{
13787
13788 unsigned int fpcr;
13789 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13790 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13791
13792 ;
13793 return 0;
13794}
13795_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013796if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013797 have_gcc_asm_for_mc68881=yes
13798else
13799 have_gcc_asm_for_mc68881=no
13800fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013801rm -f core conftest.err conftest.$ac_objext \
13802 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13804$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13805if test "$have_gcc_asm_for_mc68881" = yes
13806then
13807
13808$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13809
13810fi
13811
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013812# Detect whether system arithmetic is subject to x87-style double
13813# rounding issues. The result of this test has little meaning on non
13814# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13815# mode is round-to-nearest and double rounding issues are present, and
13816# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13818$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819# $BASECFLAGS may affect the result
13820ac_save_cc="$CC"
13821CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013822if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013823 ac_cv_x87_double_rounding=no
13824else
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013826/* end confdefs.h. */
13827
13828#include <stdlib.h>
13829#include <math.h>
13830int main() {
13831 volatile double x, y, z;
13832 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13833 x = 0.99999999999999989; /* 1-2**-53 */
13834 y = 1./x;
13835 if (y != 1.)
13836 exit(0);
13837 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13838 x = 1e16;
13839 y = 2.99999;
13840 z = x + y;
13841 if (z != 1e16+4.)
13842 exit(0);
13843 /* both tests show evidence of double rounding */
13844 exit(1);
13845}
13846
13847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013848if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013849 ac_cv_x87_double_rounding=no
13850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013855fi
13856
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13859$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013860if test "$ac_cv_x87_double_rounding" = yes
13861then
13862
Matthias Kloseb9621712010-04-24 17:59:49 +000013863$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013864
13865fi
13866
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867# ************************************
13868# * Check for mathematical functions *
13869# ************************************
13870
13871LIBS_SAVE=$LIBS
13872LIBS="$LIBS $LIBM"
13873
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013874for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13875do :
13876 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13877ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013878if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013879 cat >>confdefs.h <<_ACEOF
13880#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13881_ACEOF
13882
13883fi
13884done
13885
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013886for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013887do :
13888 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13889ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013890if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013891 cat >>confdefs.h <<_ACEOF
13892#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13893_ACEOF
13894
13895fi
13896done
13897
13898ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13899"
Victor Stinnere0be4232011-10-25 13:06:09 +020013900if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013901 ac_have_decl=1
13902else
13903 ac_have_decl=0
13904fi
13905
13906cat >>confdefs.h <<_ACEOF
13907#define HAVE_DECL_ISINF $ac_have_decl
13908_ACEOF
13909ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13910"
Victor Stinnere0be4232011-10-25 13:06:09 +020013911if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013912 ac_have_decl=1
13913else
13914 ac_have_decl=0
13915fi
13916
13917cat >>confdefs.h <<_ACEOF
13918#define HAVE_DECL_ISNAN $ac_have_decl
13919_ACEOF
13920ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13921"
Victor Stinnere0be4232011-10-25 13:06:09 +020013922if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013923 ac_have_decl=1
13924else
13925 ac_have_decl=0
13926fi
13927
13928cat >>confdefs.h <<_ACEOF
13929#define HAVE_DECL_ISFINITE $ac_have_decl
13930_ACEOF
13931
13932
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013933# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13934# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13936$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013937if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013938 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013939else
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013942 ac_cv_tanh_preserves_zero_sign=no
13943else
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013945/* end confdefs.h. */
13946
13947#include <math.h>
13948#include <stdlib.h>
13949int main() {
13950 /* return 0 if either negative zeros don't exist
13951 on this platform or if negative zeros exist
13952 and tanh(-0.) == -0. */
13953 if (atan2(0., -1.) == atan2(-0., -1.) ||
13954 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13955 else exit(1);
13956}
13957
13958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013959if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013960 ac_cv_tanh_preserves_zero_sign=yes
13961else
Matthias Kloseb9621712010-04-24 17:59:49 +000013962 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013966fi
13967
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013968fi
13969
Matthias Kloseb9621712010-04-24 17:59:49 +000013970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13971$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013972if test "$ac_cv_tanh_preserves_zero_sign" = yes
13973then
13974
Matthias Kloseb9621712010-04-24 17:59:49 +000013975$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013976
13977fi
13978
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013979if test "$ac_cv_func_log1p" = yes
13980then
13981 # On some versions of AIX, log1p(-0.) returns 0. instead of
13982 # -0. See issue #9920.
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13984$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013985 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013986 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013987else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013988
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013989 if test "$cross_compiling" = yes; then :
13990 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013991else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13993/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013994
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013995 #include <math.h>
13996 #include <stdlib.h>
13997 int main() {
13998 /* Fail if the signs of log1p(-0.) and -0. can be
13999 distinguished. */
14000 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14001 return 0;
14002 else
14003 return 1;
14004 }
14005
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014006_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014007if ac_fn_c_try_run "$LINENO"; then :
14008 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014009else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014010 ac_cv_log1p_drops_zero_sign=yes
14011fi
14012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14013 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014014fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014015
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014016fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014017
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14019$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14020fi
14021if test "$ac_cv_log1p_drops_zero_sign" = yes
14022then
14023
14024$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14025
14026fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014028LIBS=$LIBS_SAVE
14029
Mark Dickinsona614f042009-11-28 12:48:43 +000014030# For multiprocessing module, check that sem_open
14031# actually works. For FreeBSD versions <= 7.2,
14032# the kernel module that provides POSIX semaphores
14033# isn't loaded by default, so an attempt to call
14034# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14036$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014037if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014039else
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014041 ac_cv_posix_semaphores_enabled=yes
14042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014044/* end confdefs.h. */
14045
14046#include <unistd.h>
14047#include <fcntl.h>
14048#include <stdio.h>
14049#include <semaphore.h>
14050#include <sys/stat.h>
14051
14052int main(void) {
14053 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14054 if (a == SEM_FAILED) {
14055 perror("sem_open");
14056 return 1;
14057 }
14058 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014059 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014060 return 0;
14061}
14062
14063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014064if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014065 ac_cv_posix_semaphores_enabled=yes
14066else
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14070 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014071fi
14072
14073
Mark Dickinsona614f042009-11-28 12:48:43 +000014074fi
14075
Matthias Kloseb9621712010-04-24 17:59:49 +000014076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14077$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014078if test $ac_cv_posix_semaphores_enabled = no
14079then
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014082
14083fi
14084
Mark Dickinson10683072009-04-18 21:18:19 +000014085# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14087$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014090else
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014092 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014093else
Matthias Kloseb9621712010-04-24 17:59:49 +000014094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014095/* end confdefs.h. */
14096
14097#include <unistd.h>
14098#include <fcntl.h>
14099#include <stdio.h>
14100#include <semaphore.h>
14101#include <sys/stat.h>
14102
14103int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014104 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014105 int count;
14106 int res;
14107 if(a==SEM_FAILED){
14108 perror("sem_open");
14109 return 1;
14110
14111 }
14112 res = sem_getvalue(a, &count);
14113 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014114 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014115 return res==-1 ? 1 : 0;
14116}
14117
Mark Dickinson10683072009-04-18 21:18:19 +000014118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014120 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014126fi
14127
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014129fi
14130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14132$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014133if test $ac_cv_broken_sem_getvalue = yes
14134then
14135
Matthias Kloseb9621712010-04-24 17:59:49 +000014136$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014137
14138fi
14139
Mark Dickinsonbd792642009-03-18 20:06:12 +000014140# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14142$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014143# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014144if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014145 enableval=$enable_big_digits; case $enable_big_digits in
14146yes)
14147 enable_big_digits=30 ;;
14148no)
14149 enable_big_digits=15 ;;
1415015|30)
14151 ;;
14152*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014153 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 +000014154esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14156$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014157
14158cat >>confdefs.h <<_ACEOF
14159#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14160_ACEOF
14161
14162
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14165$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014166fi
14167
14168
Guido van Rossumef2255b2000-03-10 22:30:29 +000014169# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014170ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014171if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014172
14173
Matthias Kloseb9621712010-04-24 17:59:49 +000014174$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014176 wchar_h="yes"
14177
Guido van Rossumef2255b2000-03-10 22:30:29 +000014178else
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014180
14181fi
14182
Michael W. Hudson54241132001-12-07 15:38:26 +000014183
Martin v. Löwis11437992002-04-12 09:54:03 +000014184
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014185# determine wchar_t size
14186if test "$wchar_h" = yes
14187then
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14190# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14191# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14193$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014194if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014196else
Matthias Kloseb9621712010-04-24 17:59:49 +000014197 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14198"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
Martin v. Löwis11437992002-04-12 09:54:03 +000014200else
Matthias Kloseb9621712010-04-24 17:59:49 +000014201 if test "$ac_cv_type_wchar_t" = yes; then
14202 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14203$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014204as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014205See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206 else
14207 ac_cv_sizeof_wchar_t=0
14208 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014210
Martin v. Löwis11437992002-04-12 09:54:03 +000014211fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14213$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014214
14215
14216
Martin v. Löwis11437992002-04-12 09:54:03 +000014217cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014218#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014219_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014220
Michael W. Hudson54241132001-12-07 15:38:26 +000014221
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014222fi
14223
Matthias Kloseb9621712010-04-24 17:59:49 +000014224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14225$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014226have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014228/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014229
14230#include <tcl.h>
14231#if TCL_UTF_MAX != 6
14232# error "NOT UCS4_TCL"
14233#endif
14234int
14235main ()
14236{
14237
14238 ;
14239 return 0;
14240}
14241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014242if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014243
14244
Matthias Kloseb9621712010-04-24 17:59:49 +000014245$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014246
14247 have_ucs4_tcl=yes
14248
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014249fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14252$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014253
Skip Montanaro6dead952003-09-25 14:50:04 +000014254# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014255if test "$wchar_h" = yes
14256then
14257 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14259$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014260 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014262else
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014265 ac_cv_wchar_t_signed=yes
14266else
Matthias Kloseb9621712010-04-24 17:59:49 +000014267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014268/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014269
14270 #include <wchar.h>
14271 int main()
14272 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014273 /* Success: exit code 0 */
14274 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014275 }
14276
14277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014278if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014279 ac_cv_wchar_t_signed=yes
14280else
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014283rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14284 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014285fi
14286
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014287fi
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14290$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291fi
14292
Georg Brandl52d168a2008-01-07 18:10:24 +000014293# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014294if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014295 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014296then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014297 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
Georg Brandl52d168a2008-01-07 18:10:24 +000014301else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014302 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014303fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14305$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014306
14307# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14309$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014310if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014311 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014312else
Matthias Kloseb9621712010-04-24 17:59:49 +000014313 ac_cv_c_bigendian=unknown
14314 # See if we're dealing with a universal compiler.
14315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14316/* end confdefs.h. */
14317#ifndef __APPLE_CC__
14318 not a universal capable compiler
14319 #endif
14320 typedef int dummy;
14321
Skip Montanaro6dead952003-09-25 14:50:04 +000014322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014323if ac_fn_c_try_compile "$LINENO"; then :
14324
14325 # Check for potential -arch flags. It is not universal unless
14326 # there are at least two -arch flags with different values.
14327 ac_arch=
14328 ac_prev=
14329 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14330 if test -n "$ac_prev"; then
14331 case $ac_word in
14332 i?86 | x86_64 | ppc | ppc64)
14333 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14334 ac_arch=$ac_word
14335 else
14336 ac_cv_c_bigendian=universal
14337 break
14338 fi
14339 ;;
14340 esac
14341 ac_prev=
14342 elif test "x$ac_word" = "x-arch"; then
14343 ac_prev=arch
14344 fi
14345 done
14346fi
14347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14348 if test $ac_cv_c_bigendian = unknown; then
14349 # See if sys/param.h defines the BYTE_ORDER macro.
14350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014351/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014352#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014353 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014354
Martin v. Löwis11437992002-04-12 09:54:03 +000014355int
14356main ()
14357{
Matthias Kloseb9621712010-04-24 17:59:49 +000014358#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14359 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14360 && LITTLE_ENDIAN)
14361 bogus endian macros
14362 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014363
14364 ;
14365 return 0;
14366}
14367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014368if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014369 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014371/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014372#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014374
Martin v. Löwis11437992002-04-12 09:54:03 +000014375int
14376main ()
14377{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014378#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 not big endian
14380 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014381
14382 ;
14383 return 0;
14384}
14385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014386if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014387 ac_cv_c_bigendian=yes
14388else
Matthias Kloseb9621712010-04-24 17:59:49 +000014389 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014392fi
14393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394 fi
14395 if test $ac_cv_c_bigendian = unknown; then
14396 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014398/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014399#include <limits.h>
14400
Martin v. Löwis11437992002-04-12 09:54:03 +000014401int
14402main ()
14403{
Matthias Kloseb9621712010-04-24 17:59:49 +000014404#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14405 bogus endian macros
14406 #endif
14407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408 ;
14409 return 0;
14410}
14411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014412if ac_fn_c_try_compile "$LINENO"; then :
14413 # It does; now see whether it defined to _BIG_ENDIAN or not.
14414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14415/* end confdefs.h. */
14416#include <limits.h>
14417
14418int
14419main ()
14420{
14421#ifndef _BIG_ENDIAN
14422 not big endian
14423 #endif
14424
14425 ;
14426 return 0;
14427}
14428_ACEOF
14429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014431else
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014433fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14435fi
14436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14437 fi
14438 if test $ac_cv_c_bigendian = unknown; then
14439 # Compile a test program.
14440 if test "$cross_compiling" = yes; then :
14441 # Try to guess by grepping values from an object file.
14442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14443/* end confdefs.h. */
14444short int ascii_mm[] =
14445 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14446 short int ascii_ii[] =
14447 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14448 int use_ascii (int i) {
14449 return ascii_mm[i] + ascii_ii[i];
14450 }
14451 short int ebcdic_ii[] =
14452 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14453 short int ebcdic_mm[] =
14454 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14455 int use_ebcdic (int i) {
14456 return ebcdic_mm[i] + ebcdic_ii[i];
14457 }
14458 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459
Matthias Kloseb9621712010-04-24 17:59:49 +000014460int
14461main ()
14462{
14463return use_ascii (foo) == use_ebcdic (foo);
14464 ;
14465 return 0;
14466}
14467_ACEOF
14468if ac_fn_c_try_compile "$LINENO"; then :
14469 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14470 ac_cv_c_bigendian=yes
14471 fi
14472 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14473 if test "$ac_cv_c_bigendian" = unknown; then
14474 ac_cv_c_bigendian=no
14475 else
14476 # finding both strings is unlikely to happen, but who knows?
14477 ac_cv_c_bigendian=unknown
14478 fi
14479 fi
14480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014482else
Matthias Kloseb9621712010-04-24 17:59:49 +000014483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014484/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014486int
14487main ()
14488{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 /* Are we little or big endian? From Harbison&Steele. */
14491 union
14492 {
14493 long int l;
14494 char c[sizeof (long int)];
14495 } u;
14496 u.l = 1;
14497 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014498
14499 ;
14500 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014501}
Martin v. Löwis11437992002-04-12 09:54:03 +000014502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014503if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014504 ac_cv_c_bigendian=no
14505else
Matthias Kloseb9621712010-04-24 17:59:49 +000014506 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014507fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014510fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511
Matthias Kloseb9621712010-04-24 17:59:49 +000014512 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14515$as_echo "$ac_cv_c_bigendian" >&6; }
14516 case $ac_cv_c_bigendian in #(
14517 yes)
14518 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14519;; #(
14520 no)
14521 ;; #(
14522 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014523
Matthias Kloseb9621712010-04-24 17:59:49 +000014524$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014525
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 ;; #(
14527 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014528 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014529 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014531
Michael W. Hudson54241132001-12-07 15:38:26 +000014532
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014533# ABI version string for Python extension modules. This appears between the
14534# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14535# from the following attributes which affect the ABI of this Python build (in
14536# this order):
14537#
14538# * The Python implementation (always 'cpython-' for us)
14539# * The major and minor version numbers
14540# * --with-pydebug (adds a 'd')
14541# * --with-pymalloc (adds a 'm')
14542# * --with-wide-unicode (adds a 'u')
14543#
14544# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014545# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14546# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014547
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14549$as_echo_n "checking ABIFLAGS... " >&6; }
14550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14551$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14553$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014554SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14556$as_echo "$SOABI" >&6; }
14557
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014558
14559case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014560 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014561 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14562 *)
14563 EXT_SUFFIX=${SHLIB_SUFFIX};;
14564esac
14565
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14567$as_echo_n "checking LDVERSION... " >&6; }
14568LDVERSION='$(VERSION)$(ABIFLAGS)'
14569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14570$as_echo "$LDVERSION" >&6; }
14571
doko@python.org87421192013-01-26 11:39:31 +010014572
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014573LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014574
14575
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014576# Check whether right shifting a negative integer extends the sign bit
14577# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14579$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014580if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014581 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014582else
Martin v. Löwis11437992002-04-12 09:54:03 +000014583
Matthias Kloseb9621712010-04-24 17:59:49 +000014584if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014585 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014586else
Matthias Kloseb9621712010-04-24 17:59:49 +000014587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014588/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014589
14590int main()
14591{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014592 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014593}
14594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014596if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014597 ac_cv_rshift_extends_sign=yes
14598else
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14602 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014603fi
14604
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605fi
14606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14608$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014609if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014610then
Martin v. Löwis11437992002-04-12 09:54:03 +000014611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014613
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014614fi
14615
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014616# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14618$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014619if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014621else
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
Matthias Kloseb9621712010-04-24 17:59:49 +000014623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014624/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014625#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014626int
14627main ()
14628{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014629
14630 FILE *f = fopen("/dev/null", "r");
14631 flockfile(f);
14632 getc_unlocked(f);
14633 funlockfile(f);
14634
Martin v. Löwis11437992002-04-12 09:54:03 +000014635 ;
14636 return 0;
14637}
14638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014639if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014640 ac_cv_have_getc_unlocked=yes
14641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 ac_cv_have_getc_unlocked=no
14643fi
14644rm -f core conftest.err conftest.$ac_objext \
14645 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14649$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014650if test "$ac_cv_have_getc_unlocked" = yes
14651then
Martin v. Löwis11437992002-04-12 09:54:03 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014654
14655fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014656
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014657# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014658# save the value of LIBS so we don't actually link Python with readline
14659LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014660
Gregory P. Smith18820942008-09-07 06:24:49 +000014661# On some systems we need to link readline to a termcap compatible
14662# library. NOTE: Keep the precedence of listed libraries synchronised
14663# with setup.py.
14664py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14666$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014667for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014668 if test -z "$py_libtermcap"; then
14669 READLINE_LIBS="-lreadline"
14670 else
14671 READLINE_LIBS="-lreadline -l$py_libtermcap"
14672 fi
14673 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014675/* end confdefs.h. */
14676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014677/* Override any GCC internal prototype to avoid an error.
14678 Use char because int might match the return type of a GCC
14679 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014680#ifdef __cplusplus
14681extern "C"
14682#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014683char readline ();
14684int
14685main ()
14686{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014688 ;
14689 return 0;
14690}
14691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014692if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014693 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014695rm -f core conftest.err conftest.$ac_objext \
14696 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014697 if test $py_cv_lib_readline = yes; then
14698 break
14699 fi
14700done
14701# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14702#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014703if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14705$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014706else
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14708$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014709
Matthias Kloseb9621712010-04-24 17:59:49 +000014710$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014711
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014712fi
14713
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014714# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14716$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014717if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014719else
14720 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014721LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014723/* end confdefs.h. */
14724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725/* Override any GCC internal prototype to avoid an error.
14726 Use char because int might match the return type of a GCC
14727 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014728#ifdef __cplusplus
14729extern "C"
14730#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014731char rl_callback_handler_install ();
14732int
14733main ()
14734{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014735return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014736 ;
14737 return 0;
14738}
14739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014740if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014741 ac_cv_lib_readline_rl_callback_handler_install=yes
14742else
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014745rm -f core conftest.err conftest.$ac_objext \
14746 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014747LIBS=$ac_check_lib_save_LIBS
14748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14750$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014751if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014752
Matthias Kloseb9621712010-04-24 17:59:49 +000014753$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014754
14755fi
14756
14757
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014758# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014760/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014761#include <readline/readline.h>
14762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014763if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014764 have_readline=yes
14765else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014766 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014767
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014768fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014769rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014770if test $have_readline = yes
14771then
Matthias Kloseb9621712010-04-24 17:59:49 +000014772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014773/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014774#include <readline/readline.h>
14775
14776_ACEOF
14777if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014778 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014781
14782fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014783rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014784
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014786/* end confdefs.h. */
14787#include <readline/readline.h>
14788
14789_ACEOF
14790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014791 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014794
14795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014796rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014797
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014798fi
14799
Martin v. Löwis0daad592001-09-30 21:09:59 +000014800# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14802$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014803if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014805else
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014807LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014810
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811/* Override any GCC internal prototype to avoid an error.
14812 Use char because int might match the return type of a GCC
14813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014814#ifdef __cplusplus
14815extern "C"
14816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014817char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014818int
14819main ()
14820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 ;
14823 return 0;
14824}
14825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014828else
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014831rm -f core conftest.err conftest.$ac_objext \
14832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014833LIBS=$ac_check_lib_save_LIBS
14834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14836$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014837if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014838
Matthias Kloseb9621712010-04-24 17:59:49 +000014839$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014840
Martin v. Löwis0daad592001-09-30 21:09:59 +000014841fi
14842
Michael W. Hudson54241132001-12-07 15:38:26 +000014843
Thomas Wouters89d996e2007-09-08 17:39:28 +000014844# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14846$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014847if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014848 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014849else
14850 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014851LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014853/* end confdefs.h. */
14854
14855/* Override any GCC internal prototype to avoid an error.
14856 Use char because int might match the return type of a GCC
14857 builtin and then its argument prototype would still apply. */
14858#ifdef __cplusplus
14859extern "C"
14860#endif
14861char rl_completion_display_matches_hook ();
14862int
14863main ()
14864{
14865return rl_completion_display_matches_hook ();
14866 ;
14867 return 0;
14868}
14869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014870if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014871 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14872else
Matthias Kloseb9621712010-04-24 17:59:49 +000014873 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014874fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014875rm -f core conftest.err conftest.$ac_objext \
14876 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014877LIBS=$ac_check_lib_save_LIBS
14878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14880$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014881if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014884
14885fi
14886
14887
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014888# also in 4.0, but not in editline
14889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14890$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14891if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14892 $as_echo_n "(cached) " >&6
14893else
14894 ac_check_lib_save_LIBS=$LIBS
14895LIBS="-lreadline $READLINE_LIBS $LIBS"
14896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14897/* end confdefs.h. */
14898
14899/* Override any GCC internal prototype to avoid an error.
14900 Use char because int might match the return type of a GCC
14901 builtin and then its argument prototype would still apply. */
14902#ifdef __cplusplus
14903extern "C"
14904#endif
14905char rl_resize_terminal ();
14906int
14907main ()
14908{
14909return rl_resize_terminal ();
14910 ;
14911 return 0;
14912}
14913_ACEOF
14914if ac_fn_c_try_link "$LINENO"; then :
14915 ac_cv_lib_readline_rl_resize_terminal=yes
14916else
14917 ac_cv_lib_readline_rl_resize_terminal=no
14918fi
14919rm -f core conftest.err conftest.$ac_objext \
14920 conftest$ac_exeext conftest.$ac_ext
14921LIBS=$ac_check_lib_save_LIBS
14922fi
14923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14924$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14925if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14926
14927$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14928
14929fi
14930
14931
Martin v. Löwis0daad592001-09-30 21:09:59 +000014932# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14934$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014935if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014937else
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014939LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014943/* Override any GCC internal prototype to avoid an error.
14944 Use char because int might match the return type of a GCC
14945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014946#ifdef __cplusplus
14947extern "C"
14948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014949char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014950int
14951main ()
14952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ;
14955 return 0;
14956}
14957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014960else
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014962fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014963rm -f core conftest.err conftest.$ac_objext \
14964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014965LIBS=$ac_check_lib_save_LIBS
14966fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14968$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014969if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014972
Guido van Rossum353ae582001-07-10 16:45:32 +000014973fi
14974
Jack Jansendd19cf82001-12-06 22:36:17 +000014975
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014976# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014978/* end confdefs.h. */
14979#include <readline/readline.h>
14980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014981if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014982 have_readline=yes
14983else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014984 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014985
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014986fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014987rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988if test $have_readline = yes
14989then
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014991/* end confdefs.h. */
14992#include <readline/readline.h>
14993
14994_ACEOF
14995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014996 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014997
Matthias Kloseb9621712010-04-24 17:59:49 +000014998$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014999
15000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015001rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015002
15003fi
15004
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15006$as_echo_n "checking for append_history in -lreadline... " >&6; }
15007if ${ac_cv_lib_readline_append_history+:} false; then :
15008 $as_echo_n "(cached) " >&6
15009else
15010 ac_check_lib_save_LIBS=$LIBS
15011LIBS="-lreadline $READLINE_LIBS $LIBS"
15012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15013/* end confdefs.h. */
15014
15015/* Override any GCC internal prototype to avoid an error.
15016 Use char because int might match the return type of a GCC
15017 builtin and then its argument prototype would still apply. */
15018#ifdef __cplusplus
15019extern "C"
15020#endif
15021char append_history ();
15022int
15023main ()
15024{
15025return append_history ();
15026 ;
15027 return 0;
15028}
15029_ACEOF
15030if ac_fn_c_try_link "$LINENO"; then :
15031 ac_cv_lib_readline_append_history=yes
15032else
15033 ac_cv_lib_readline_append_history=no
15034fi
15035rm -f core conftest.err conftest.$ac_objext \
15036 conftest$ac_exeext conftest.$ac_ext
15037LIBS=$ac_check_lib_save_LIBS
15038fi
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15040$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15041if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15042
15043$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15044
15045fi
15046
15047
Martin v. Löwis82bca632006-02-10 20:49:30 +000015048# End of readline checks: restore LIBS
15049LIBS=$LIBS_no_readline
15050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15052$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015053if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015055else
Martin v. Löwis11437992002-04-12 09:54:03 +000015056
Matthias Kloseb9621712010-04-24 17:59:49 +000015057if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015058 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015059else
Matthias Kloseb9621712010-04-24 17:59:49 +000015060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015061/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015062
15063int main()
15064{
15065 int val1 = nice(1);
15066 if (val1 != -1 && val1 == nice(2))
15067 exit(0);
15068 exit(1);
15069}
15070
Martin v. Löwis11437992002-04-12 09:54:03 +000015071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015072if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015073 ac_cv_broken_nice=yes
15074else
Matthias Kloseb9621712010-04-24 17:59:49 +000015075 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15078 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015079fi
15080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015081fi
15082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15084$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015085if test "$ac_cv_broken_nice" = yes
15086then
Martin v. Löwis11437992002-04-12 09:54:03 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015089
15090fi
15091
Matthias Kloseb9621712010-04-24 17:59:49 +000015092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15093$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015094if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015096else
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015098 ac_cv_broken_poll=no
15099else
Matthias Kloseb9621712010-04-24 17:59:49 +000015100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015101/* end confdefs.h. */
15102
15103#include <poll.h>
15104
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015105int main()
15106{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015107 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015108 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015109
15110 close (42);
15111
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015112 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015113 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015114 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015115 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015116 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015117 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015118 return 1;
15119}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015120
15121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015122if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015123 ac_cv_broken_poll=yes
15124else
Matthias Kloseb9621712010-04-24 17:59:49 +000015125 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15128 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015131fi
15132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15134$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015135if test "$ac_cv_broken_poll" = yes
15136then
15137
Matthias Kloseb9621712010-04-24 17:59:49 +000015138$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015139
15140fi
15141
Brett Cannon43802422005-02-10 20:48:03 +000015142# 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 +000015143# (which is not required by ISO C or UNIX spec) and/or if we support
15144# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015145ac_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 +000015146#include <$ac_cv_struct_tm>
15147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148"
Victor Stinnere0be4232011-10-25 13:06:09 +020015149if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015150
15151cat >>confdefs.h <<_ACEOF
15152#define HAVE_STRUCT_TM_TM_ZONE 1
15153_ACEOF
15154
15155
15156fi
15157
15158if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015161
15162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15164"
Victor Stinnere0be4232011-10-25 13:06:09 +020015165if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015167else
Matthias Kloseb9621712010-04-24 17:59:49 +000015168 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169fi
15170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015172#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173_ACEOF
15174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15176$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015177if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015179else
Matthias Kloseb9621712010-04-24 17:59:49 +000015180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015181/* end confdefs.h. */
15182#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183#if !HAVE_DECL_TZNAME
15184extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015185#endif
15186
15187int
15188main ()
15189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015191 ;
15192 return 0;
15193}
15194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015195if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015196 ac_cv_var_tzname=yes
15197else
Matthias Kloseb9621712010-04-24 17:59:49 +000015198 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015200rm -f core conftest.err conftest.$ac_objext \
15201 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15204$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015205 if test $ac_cv_var_tzname = yes; then
15206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015208
15209 fi
15210fi
15211
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015212
Martin v. Löwis1d459062005-03-14 21:23:33 +000015213# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15215$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015216if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015218else
15219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015221 ac_cv_working_tzset=no
15222else
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015224/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015225
15226#include <stdlib.h>
15227#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015228#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015229
15230#if HAVE_TZNAME
15231extern char *tzname[];
15232#endif
15233
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015234int main()
15235{
Brett Cannon18367812003-09-19 00:59:16 +000015236 /* Note that we need to ensure that not only does tzset(3)
15237 do 'something' with localtime, but it works as documented
15238 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015239 This includes making sure that tzname is set properly if
15240 tm->tm_zone does not exist since it is the alternative way
15241 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015242
15243 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015244 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015245 */
15246
Martin v. Löwis1d459062005-03-14 21:23:33 +000015247 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015248 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15249
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015250 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015251 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015252 if (localtime(&groundhogday)->tm_hour != 0)
15253 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015254#if HAVE_TZNAME
15255 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15256 if (strcmp(tzname[0], "UTC") ||
15257 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15258 exit(1);
15259#endif
Brett Cannon18367812003-09-19 00:59:16 +000015260
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015261 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015262 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015263 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015264 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015265#if HAVE_TZNAME
15266 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15267 exit(1);
15268#endif
Brett Cannon18367812003-09-19 00:59:16 +000015269
15270 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15271 tzset();
15272 if (localtime(&groundhogday)->tm_hour != 11)
15273 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015274#if HAVE_TZNAME
15275 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15276 exit(1);
15277#endif
15278
15279#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015280 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15281 exit(1);
15282 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15283 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015284#endif
Brett Cannon18367812003-09-19 00:59:16 +000015285
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015286 exit(0);
15287}
15288
15289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015290if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015291 ac_cv_working_tzset=yes
15292else
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15296 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015297fi
15298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015299fi
15300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15302$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015303if test "$ac_cv_working_tzset" = yes
15304then
15305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015307
15308fi
15309
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015310# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15312$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015313if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015314 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015315else
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015317/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015318#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015319int
15320main ()
15321{
15322
15323struct stat st;
15324st.st_mtim.tv_nsec = 1;
15325
15326 ;
15327 return 0;
15328}
15329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015331 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015332else
Matthias Kloseb9621712010-04-24 17:59:49 +000015333 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15336fi
15337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15339$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015340if test "$ac_cv_stat_tv_nsec" = yes
15341then
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015344
15345fi
15346
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015347# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15349$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015352else
Matthias Kloseb9621712010-04-24 17:59:49 +000015353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015354/* end confdefs.h. */
15355#include <sys/stat.h>
15356int
15357main ()
15358{
15359
15360struct stat st;
15361st.st_mtimespec.tv_nsec = 1;
15362
15363 ;
15364 return 0;
15365}
15366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015368 ac_cv_stat_tv_nsec2=yes
15369else
Matthias Kloseb9621712010-04-24 17:59:49 +000015370 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15373fi
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15376$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015377if test "$ac_cv_stat_tv_nsec2" = yes
15378then
15379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015381
15382fi
15383
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015384# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015385ac_save_cppflags="$CPPFLAGS"
15386CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015387
15388for ac_header in curses.h ncurses.h
15389do :
15390 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15391ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15392if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15393 cat >>confdefs.h <<_ACEOF
15394#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15395_ACEOF
15396
15397fi
15398
15399done
15400
15401
15402# On Solaris, term.h requires curses.h
15403for ac_header in term.h
15404do :
15405 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15406#ifdef HAVE_CURSES_H
15407#include <curses.h>
15408#endif
15409
15410"
15411if test "x$ac_cv_header_term_h" = xyes; then :
15412 cat >>confdefs.h <<_ACEOF
15413#define HAVE_TERM_H 1
15414_ACEOF
15415
15416fi
15417
15418done
15419
15420
Jack Jansen666b1e72001-10-31 12:11:48 +000015421# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15423$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015424if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015426else
Matthias Kloseb9621712010-04-24 17:59:49 +000015427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015428/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015429#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015430int
15431main ()
15432{
Jack Jansen666b1e72001-10-31 12:11:48 +000015433
15434 int rtn;
15435 rtn = mvwdelch(0,0,0);
15436
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ;
15438 return 0;
15439}
15440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015441if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015442 ac_cv_mvwdelch_is_expression=yes
15443else
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15447fi
15448
Matthias Kloseb9621712010-04-24 17:59:49 +000015449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15450$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015451
15452if test "$ac_cv_mvwdelch_is_expression" = yes
15453then
Martin v. Löwis11437992002-04-12 09:54:03 +000015454
Matthias Kloseb9621712010-04-24 17:59:49 +000015455$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015456
15457fi
15458
Matthias Kloseb9621712010-04-24 17:59:49 +000015459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15460$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015461if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015463else
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015465/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015466#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015467int
15468main ()
15469{
Jack Jansen666b1e72001-10-31 12:11:48 +000015470
15471 WINDOW *w;
15472 w->_flags = 0;
15473
Martin v. Löwis11437992002-04-12 09:54:03 +000015474 ;
15475 return 0;
15476}
15477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015478if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015479 ac_cv_window_has_flags=yes
15480else
Matthias Kloseb9621712010-04-24 17:59:49 +000015481 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484fi
15485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15487$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015488
Jack Jansen666b1e72001-10-31 12:11:48 +000015489
15490if test "$ac_cv_window_has_flags" = yes
15491then
Martin v. Löwis11437992002-04-12 09:54:03 +000015492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015494
15495fi
15496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15498$as_echo_n "checking for is_term_resized... " >&6; }
15499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015500/* end confdefs.h. */
15501#include <curses.h>
15502int
15503main ()
15504{
15505void *x=is_term_resized
15506 ;
15507 return 0;
15508}
15509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015510if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015511
Matthias Kloseb9621712010-04-24 17:59:49 +000015512$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015513
Matthias Kloseb159a552010-04-25 21:00:44 +000015514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15518$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015519
15520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15524$as_echo_n "checking for resize_term... " >&6; }
15525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015526/* end confdefs.h. */
15527#include <curses.h>
15528int
15529main ()
15530{
15531void *x=resize_term
15532 ;
15533 return 0;
15534}
15535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015536if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015539
Matthias Kloseb159a552010-04-25 21:00:44 +000015540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015542else
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15544$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015545
15546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15550$as_echo_n "checking for resizeterm... " >&6; }
15551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015552/* end confdefs.h. */
15553#include <curses.h>
15554int
15555main ()
15556{
15557void *x=resizeterm
15558 ;
15559 return 0;
15560}
15561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015562if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015565
Matthias Kloseb159a552010-04-25 21:00:44 +000015566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015567$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015568else
Matthias Kloseb9621712010-04-24 17:59:49 +000015569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15570$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015571
15572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015574# last curses configure check
15575CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015576
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15578$as_echo "$as_me: checking for device files" >&6;}
15579
15580if test "x$cross_compiling" = xyes; then
15581 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15583$as_echo_n "checking for /dev/ptmx... " >&6; }
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15585$as_echo "not set" >&6; }
15586 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15587 fi
15588 if test "${ac_cv_file__dev_ptc+set}" != set; then
15589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15590$as_echo_n "checking for /dev/ptc... " >&6; }
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15592$as_echo "not set" >&6; }
15593 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15594 fi
15595fi
15596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15598$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015599if ${ac_cv_file__dev_ptmx+:} false; then :
15600 $as_echo_n "(cached) " >&6
15601else
15602 test "$cross_compiling" = yes &&
15603 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15604if test -r "/dev/ptmx"; then
15605 ac_cv_file__dev_ptmx=yes
15606else
15607 ac_cv_file__dev_ptmx=no
15608fi
15609fi
15610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15611$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15612if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015613
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015614fi
15615
15616if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015617
Matthias Kloseb9621712010-04-24 17:59:49 +000015618$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015619
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015620fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15622$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015623if ${ac_cv_file__dev_ptc+:} false; then :
15624 $as_echo_n "(cached) " >&6
15625else
15626 test "$cross_compiling" = yes &&
15627 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15628if test -r "/dev/ptc"; then
15629 ac_cv_file__dev_ptc=yes
15630else
15631 ac_cv_file__dev_ptc=no
15632fi
15633fi
15634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15635$as_echo "$ac_cv_file__dev_ptc" >&6; }
15636if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015637
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015638fi
15639
15640if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015643
Neal Norwitz865400f2003-03-21 01:42:58 +000015644fi
15645
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015646if test "$have_long_long" = yes
15647then
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15649$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015650 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015652else
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015654 ac_cv_have_long_long_format="cross -- assuming no"
15655 if test x$GCC = xyes; then
15656 save_CFLAGS=$CFLAGS
15657 CFLAGS="$CFLAGS -Werror -Wformat"
15658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15659/* end confdefs.h. */
15660
15661 #include <stdio.h>
15662 #include <stddef.h>
15663
15664int
15665main ()
15666{
15667
15668 char *buffer;
15669 sprintf(buffer, "%lld", (long long)123);
15670 sprintf(buffer, "%lld", (long long)-123);
15671 sprintf(buffer, "%llu", (unsigned long long)123);
15672
15673 ;
15674 return 0;
15675}
15676_ACEOF
15677if ac_fn_c_try_compile "$LINENO"; then :
15678 ac_cv_have_long_long_format=yes
15679
15680fi
15681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15682 CFLAGS=$save_CFLAGS
15683 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015684else
Matthias Kloseb9621712010-04-24 17:59:49 +000015685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015686/* end confdefs.h. */
15687
15688 #include <stdio.h>
15689 #include <stddef.h>
15690 #include <string.h>
15691
15692 #ifdef HAVE_SYS_TYPES_H
15693 #include <sys/types.h>
15694 #endif
15695
15696 int main()
15697 {
15698 char buffer[256];
15699
15700 if (sprintf(buffer, "%lld", (long long)123) < 0)
15701 return 1;
15702 if (strcmp(buffer, "123"))
15703 return 1;
15704
15705 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15706 return 1;
15707 if (strcmp(buffer, "-123"))
15708 return 1;
15709
15710 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15711 return 1;
15712 if (strcmp(buffer, "123"))
15713 return 1;
15714
15715 return 0;
15716 }
15717
15718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015719if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015720 ac_cv_have_long_long_format=yes
15721else
Matthias Kloseb9621712010-04-24 17:59:49 +000015722 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015726fi
15727
15728
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015729fi
15730
Matthias Kloseb9621712010-04-24 17:59:49 +000015731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15732$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015733fi
15734
Mark Dickinson89d7d412009-12-31 20:50:59 +000015735if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015736then
15737
Matthias Kloseb9621712010-04-24 17:59:49 +000015738$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015739
15740fi
15741
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015742if test $ac_sys_system = Darwin
15743then
15744 LIBS="$LIBS -framework CoreFoundation"
15745fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15748$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015749if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015751else
Matthias Kloseb9621712010-04-24 17:59:49 +000015752 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015753 ac_cv_have_size_t_format="cross -- assuming yes"
15754
Thomas Wouters477c8d52006-05-27 19:21:47 +000015755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015757/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015758
Thomas Wouters477c8d52006-05-27 19:21:47 +000015759#include <stdio.h>
15760#include <stddef.h>
15761#include <string.h>
15762
Christian Heimes2c181612007-12-17 20:04:13 +000015763#ifdef HAVE_SYS_TYPES_H
15764#include <sys/types.h>
15765#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015766
15767#ifdef HAVE_SSIZE_T
15768typedef ssize_t Py_ssize_t;
15769#elif SIZEOF_VOID_P == SIZEOF_LONG
15770typedef long Py_ssize_t;
15771#else
15772typedef int Py_ssize_t;
15773#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015774
Christian Heimes2c181612007-12-17 20:04:13 +000015775int main()
15776{
15777 char buffer[256];
15778
Thomas Wouters477c8d52006-05-27 19:21:47 +000015779 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15780 return 1;
15781
Thomas Wouters89f507f2006-12-13 04:49:30 +000015782 if (strcmp(buffer, "123"))
15783 return 1;
15784
15785 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15786 return 1;
15787
15788 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015789 return 1;
15790
15791 return 0;
15792}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015793
Thomas Wouters477c8d52006-05-27 19:21:47 +000015794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015796 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015797else
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015802fi
15803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15806$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015807if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015810
15811fi
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015814#ifdef HAVE_SYS_TYPES_H
15815#include <sys/types.h>
15816#endif
15817#ifdef HAVE_SYS_SOCKET_H
15818#include <sys/socket.h>
15819#endif
15820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821"
Victor Stinnere0be4232011-10-25 13:06:09 +020015822if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015823
Martin v. Löwis11437992002-04-12 09:54:03 +000015824else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015825
Matthias Kloseb9621712010-04-24 17:59:49 +000015826$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015827
15828fi
15829
Michael W. Hudson54241132001-12-07 15:38:26 +000015830
Matthias Kloseb9621712010-04-24 17:59:49 +000015831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15832$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015833if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015834 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015835else
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015837 ac_cv_broken_mbstowcs=no
15838else
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015840/* end confdefs.h. */
15841
Stefan Krah19c21392012-11-22 23:47:32 +010015842#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015843#include<stdlib.h>
15844int main() {
15845 size_t len = -1;
15846 const char *str = "text";
15847 len = mbstowcs(NULL, str, 0);
15848 return (len != 4);
15849}
15850
15851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015852if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015853 ac_cv_broken_mbstowcs=no
15854else
Matthias Kloseb9621712010-04-24 17:59:49 +000015855 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15858 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015859fi
15860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015861fi
15862
Matthias Kloseb9621712010-04-24 17:59:49 +000015863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15864$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015865if test "$ac_cv_broken_mbstowcs" = yes
15866then
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015869
15870fi
15871
Antoine Pitroub52ec782009-01-25 16:34:23 +000015872# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15874$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015875
15876# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015877if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015878 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015879if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015880then
15881
Matthias Kloseb9621712010-04-24 17:59:49 +000015882$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15885$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015886fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015887if test "$withval" = no
15888then
15889
15890$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15893$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015894fi
15895
Antoine Pitrou042b1282010-08-13 21:15:58 +000015896else
15897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15898$as_echo "no value specified" >&6; }
15899fi
15900
Antoine Pitroub52ec782009-01-25 16:34:23 +000015901
Matthias Kloseb17289e2012-03-15 19:51:34 +010015902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15903$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15904if ${ac_cv_computed_gotos+:} false; then :
15905 $as_echo_n "(cached) " >&6
15906else
15907 if test "$cross_compiling" = yes; then :
15908 if test "${with_computed_gotos+set}" = set; then
15909 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15910 else
15911 ac_cv_computed_gotos=no
15912 fi
15913else
15914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15915/* end confdefs.h. */
15916
15917int main(int argc, char **argv)
15918{
15919 static void *targets[1] = { &&LABEL1 };
15920 goto LABEL2;
15921LABEL1:
15922 return 0;
15923LABEL2:
15924 goto *targets[0];
15925 return 1;
15926}
15927
15928_ACEOF
15929if ac_fn_c_try_run "$LINENO"; then :
15930 ac_cv_computed_gotos=yes
15931else
15932 ac_cv_computed_gotos=no
15933fi
15934rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15935 conftest.$ac_objext conftest.beam conftest.$ac_ext
15936fi
15937
15938fi
15939
15940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15941$as_echo "$ac_cv_computed_gotos" >&6; }
15942case "$ac_cv_computed_gotos" in yes*)
15943
15944$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15945
15946esac
15947
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015948case $ac_sys_system in
15949AIX*)
15950
15951$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15952 ;;
15953esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015954
Michael W. Hudson54241132001-12-07 15:38:26 +000015955
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015956
15957
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015958for h in `(cd $srcdir;echo Python/thread_*.h)`
15959do
15960 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15961done
15962
Michael W. Hudson54241132001-12-07 15:38:26 +000015963
Ned Deily0db50cf2014-07-25 12:41:31 -070015964SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15966$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015967for dir in $SRCDIRS; do
15968 if test ! -d $dir; then
15969 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015970 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015971done
Matthias Kloseb9621712010-04-24 17:59:49 +000015972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15973$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015974
Stefan Krah1919b7e2012-03-21 18:25:23 +010015975# Availability of -O2:
15976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15977$as_echo_n "checking for -O2... " >&6; }
15978saved_cflags="$CFLAGS"
15979CFLAGS="-O2"
15980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15981/* end confdefs.h. */
15982
15983int
15984main ()
15985{
15986
15987
15988 ;
15989 return 0;
15990}
15991_ACEOF
15992if ac_fn_c_try_compile "$LINENO"; then :
15993 have_O2=yes
15994else
15995 have_O2=no
15996fi
15997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15999$as_echo "$have_O2" >&6; }
16000CFLAGS="$saved_cflags"
16001
16002# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16003# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16005$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16006saved_cflags="$CFLAGS"
16007CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16008if test "$have_O2" = no; then
16009 CFLAGS=""
16010fi
16011if test "$cross_compiling" = yes; then :
16012 have_glibc_memmove_bug=undefined
16013else
16014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16015/* end confdefs.h. */
16016
16017#include <stdio.h>
16018#include <stdlib.h>
16019#include <string.h>
16020void foo(void *p, void *q) { memmove(p, q, 19); }
16021int main() {
16022 char a[32] = "123456789000000000";
16023 foo(&a[9], a);
16024 if (strcmp(a, "123456789123456789000000000") != 0)
16025 return 1;
16026 foo(a, &a[9]);
16027 if (strcmp(a, "123456789000000000") != 0)
16028 return 1;
16029 return 0;
16030}
16031
16032_ACEOF
16033if ac_fn_c_try_run "$LINENO"; then :
16034 have_glibc_memmove_bug=no
16035else
16036 have_glibc_memmove_bug=yes
16037fi
16038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16039 conftest.$ac_objext conftest.beam conftest.$ac_ext
16040fi
16041
16042CFLAGS="$saved_cflags"
16043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16044$as_echo "$have_glibc_memmove_bug" >&6; }
16045if test "$have_glibc_memmove_bug" = yes; then
16046
16047$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16048
16049fi
16050
16051if test "$have_gcc_asm_for_x87" = yes; then
16052 # Some versions of gcc miscompile inline asm:
16053 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16054 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16055 case $CC in
16056 *gcc*)
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16058$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16059 saved_cflags="$CFLAGS"
16060 CFLAGS="-O2"
16061 if test "$cross_compiling" = yes; then :
16062 have_ipa_pure_const_bug=undefined
16063else
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065/* end confdefs.h. */
16066
16067 __attribute__((noinline)) int
16068 foo(int *p) {
16069 int r;
16070 asm ( "movl \$6, (%1)\n\t"
16071 "xorl %0, %0\n\t"
16072 : "=r" (r) : "r" (p) : "memory"
16073 );
16074 return r;
16075 }
16076 int main() {
16077 int p = 8;
16078 if ((foo(&p) ? : p) != 6)
16079 return 1;
16080 return 0;
16081 }
16082
16083_ACEOF
16084if ac_fn_c_try_run "$LINENO"; then :
16085 have_ipa_pure_const_bug=no
16086else
16087 have_ipa_pure_const_bug=yes
16088fi
16089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16090 conftest.$ac_objext conftest.beam conftest.$ac_ext
16091fi
16092
16093 CFLAGS="$saved_cflags"
16094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16095$as_echo "$have_ipa_pure_const_bug" >&6; }
16096 if test "$have_ipa_pure_const_bug" = yes; then
16097
16098$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16099
16100 fi
16101 ;;
16102 esac
16103fi
16104
Victor Stinner4f5366e2015-01-09 02:13:19 +010016105# Check for stdatomic.h
16106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16107$as_echo_n "checking for stdatomic.h... " >&6; }
16108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16109/* end confdefs.h. */
16110
16111
16112 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016113 atomic_int value = ATOMIC_VAR_INIT(1);
16114 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016115 int main() {
16116 int loaded_value = atomic_load(&value);
16117 return 0;
16118 }
16119
16120
16121_ACEOF
16122if ac_fn_c_try_link "$LINENO"; then :
16123 have_stdatomic_h=yes
16124else
16125 have_stdatomic_h=no
16126fi
16127rm -f core conftest.err conftest.$ac_objext \
16128 conftest$ac_exeext conftest.$ac_ext
16129
16130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16131$as_echo "$have_stdatomic_h" >&6; }
16132
16133if test "$have_stdatomic_h" = yes; then
16134
16135$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16136
16137fi
16138
16139# Check for GCC >= 4.7 __atomic builtins
16140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16141$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16143/* end confdefs.h. */
16144
16145
16146 volatile int val = 1;
16147 int main() {
16148 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16149 return 0;
16150 }
16151
16152
16153_ACEOF
16154if ac_fn_c_try_link "$LINENO"; then :
16155 have_builtin_atomic=yes
16156else
16157 have_builtin_atomic=no
16158fi
16159rm -f core conftest.err conftest.$ac_objext \
16160 conftest$ac_exeext conftest.$ac_ext
16161
16162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16163$as_echo "$have_builtin_atomic" >&6; }
16164
16165if test "$have_builtin_atomic" = yes; then
16166
16167$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16168
16169fi
16170
Ned Deily322f5ba2013-11-21 23:01:59 -080016171# ensurepip option
16172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16173$as_echo_n "checking for ensurepip... " >&6; }
16174
16175# Check whether --with-ensurepip was given.
16176if test "${with_ensurepip+set}" = set; then :
16177 withval=$with_ensurepip;
16178else
16179 with_ensurepip=upgrade
16180fi
16181
16182case $with_ensurepip in #(
16183 yes|upgrade) :
16184 ENSUREPIP=upgrade ;; #(
16185 install) :
16186 ENSUREPIP=install ;; #(
16187 no) :
16188 ENSUREPIP=no ;; #(
16189 *) :
16190 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16191esac
16192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16193$as_echo "$ENSUREPIP" >&6; }
16194
16195
Victor Stinner35a97c02015-03-08 02:59:09 +010016196# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16198$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h. */
16201
16202
16203 #include <dirent.h>
16204
16205 int main() {
16206 struct dirent entry;
16207 return entry.d_type == DT_UNKNOWN;
16208 }
16209
16210
16211_ACEOF
16212if ac_fn_c_try_link "$LINENO"; then :
16213 have_dirent_d_type=yes
16214else
16215 have_dirent_d_type=no
16216fi
16217rm -f core conftest.err conftest.$ac_objext \
16218 conftest$ac_exeext conftest.$ac_ext
16219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16220$as_echo "$have_dirent_d_type" >&6; }
16221
16222if test "$have_dirent_d_type" = yes; then
16223
16224$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16225
16226fi
16227
Victor Stinner9eb57c52015-03-19 22:21:49 +010016228# check if the Linux getrandom() syscall is available
16229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16230$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232/* end confdefs.h. */
16233
16234
Victor Stinner1b80b242016-04-12 22:34:58 +020016235 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016236 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016237 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016238
16239 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016240 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016241 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016242 const int flags = GRND_NONBLOCK;
16243 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016244 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016245 return 0;
16246 }
16247
16248
16249_ACEOF
16250if ac_fn_c_try_link "$LINENO"; then :
16251 have_getrandom_syscall=yes
16252else
16253 have_getrandom_syscall=no
16254fi
16255rm -f core conftest.err conftest.$ac_objext \
16256 conftest$ac_exeext conftest.$ac_ext
16257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16258$as_echo "$have_getrandom_syscall" >&6; }
16259
16260if test "$have_getrandom_syscall" = yes; then
16261
16262$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16263
16264fi
16265
Victor Stinnerbae2d622015-10-01 09:47:30 +020016266# check if the getrandom() function is available
16267# the test was written for the Solaris function of <sys/random.h>
16268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16269$as_echo_n "checking for the getrandom() function... " >&6; }
16270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271/* end confdefs.h. */
16272
16273
16274 #include <sys/random.h>
16275
16276 int main() {
16277 char buffer[1];
16278 const size_t buflen = sizeof(buffer);
16279 const int flags = 0;
16280 /* ignore the result, Python checks for ENOSYS at runtime */
16281 (void)getrandom(buffer, buflen, flags);
16282 return 0;
16283 }
16284
16285
16286_ACEOF
16287if ac_fn_c_try_link "$LINENO"; then :
16288 have_getrandom=yes
16289else
16290 have_getrandom=no
16291fi
16292rm -f core conftest.err conftest.$ac_objext \
16293 conftest$ac_exeext conftest.$ac_ext
16294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16295$as_echo "$have_getrandom" >&6; }
16296
16297if test "$have_getrandom" = yes; then
16298
16299$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16300
16301fi
16302
Guido van Rossum627b2d71993-12-24 10:39:16 +000016303# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016304ac_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 +000016305
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016306ac_config_files="$ac_config_files Modules/ld_so_aix"
16307
Martin v. Löwis11437992002-04-12 09:54:03 +000016308cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016309# This file is a shell script that caches the results of configure
16310# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016311# scripts and configure runs, see configure's option --config-cache.
16312# It is not useful on other systems. If it contains results you don't
16313# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016314#
Martin v. Löwis11437992002-04-12 09:54:03 +000016315# config.status only pays attention to the cache file if you give it
16316# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016317#
Skip Montanaro6dead952003-09-25 14:50:04 +000016318# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016319# loading this file, other *unset* `ac_cv_foo' will be assigned the
16320# following values.
16321
16322_ACEOF
16323
Guido van Rossumf78abae1997-01-21 22:02:36 +000016324# The following way of writing the cache mishandles newlines in values,
16325# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016327# Ultrix sh set writes to stderr and can't be redirected directly,
16328# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329(
16330 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16331 eval ac_val=\$$ac_var
16332 case $ac_val in #(
16333 *${as_nl}*)
16334 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016335 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16336$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337 esac
16338 case $ac_var in #(
16339 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016340 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16341 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342 esac ;;
16343 esac
16344 done
16345
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16348 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016349 # `set' does not quote correctly, so add quotes: double-quote
16350 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016352 "s/'/'\\\\''/g;
16353 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 *)
16356 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359 esac |
16360 sort
16361) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016362 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016363 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016364 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16367 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016368 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16369 :end' >>confcache
16370if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16371 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016372 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016373 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16374$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016375 if test ! -f "$cache_file" || test -h "$cache_file"; then
16376 cat confcache >"$cache_file"
16377 else
16378 case $cache_file in #(
16379 */* | ?:*)
16380 mv -f confcache "$cache_file"$$ &&
16381 mv -f "$cache_file"$$ "$cache_file" ;; #(
16382 *)
16383 mv -f confcache "$cache_file" ;;
16384 esac
16385 fi
16386 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016387 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016388 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16389$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016390 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016391fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016392rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016393
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016394test "x$prefix" = xNONE && prefix=$ac_default_prefix
16395# Let make expand exec_prefix.
16396test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016398DEFS=-DHAVE_CONFIG_H
16399
Skip Montanaro6dead952003-09-25 14:50:04 +000016400ac_libobjs=
16401ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016402U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016403for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16404 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016406 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016407 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16408 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016409 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16410 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016411done
16412LIBOBJS=$ac_libobjs
16413
16414LTLIBOBJS=$ac_ltlibobjs
16415
16416
Martin v. Löwis11437992002-04-12 09:54:03 +000016417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418
Victor Stinnere0be4232011-10-25 13:06:09 +020016419: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016420ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016421ac_clean_files_save=$ac_clean_files
16422ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016423{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16424$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16425as_write_fail=0
16426cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016427#! $SHELL
16428# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016430# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016431# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016432
Martin v. Löwis11437992002-04-12 09:54:03 +000016433debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016434ac_cs_recheck=false
16435ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016436
Matthias Kloseb9621712010-04-24 17:59:49 +000016437SHELL=\${CONFIG_SHELL-$SHELL}
16438export SHELL
16439_ASEOF
16440cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16441## -------------------- ##
16442## M4sh Initialization. ##
16443## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016445# Be more Bourne compatible
16446DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016447if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 emulate sh
16449 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016451 # is contrary to our usage. Disable this feature.
16452 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016453 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016454else
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 case `(set -o) 2>/dev/null` in #(
16456 *posix*) :
16457 set -o posix ;; #(
16458 *) :
16459 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016460esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016461fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016462
16463
Matthias Kloseb9621712010-04-24 17:59:49 +000016464as_nl='
16465'
16466export as_nl
16467# Printing a long string crashes Solaris 7 /usr/bin/printf.
16468as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16469as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16470as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16471# Prefer a ksh shell builtin over an external printf program on Solaris,
16472# but without wasting forks for bash or zsh.
16473if test -z "$BASH_VERSION$ZSH_VERSION" \
16474 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16475 as_echo='print -r --'
16476 as_echo_n='print -rn --'
16477elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16478 as_echo='printf %s\n'
16479 as_echo_n='printf %s'
16480else
16481 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16482 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16483 as_echo_n='/usr/ucb/echo -n'
16484 else
16485 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16486 as_echo_n_body='eval
16487 arg=$1;
16488 case $arg in #(
16489 *"$as_nl"*)
16490 expr "X$arg" : "X\\(.*\\)$as_nl";
16491 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16492 esac;
16493 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16494 '
16495 export as_echo_n_body
16496 as_echo_n='sh -c $as_echo_n_body as_echo'
16497 fi
16498 export as_echo_body
16499 as_echo='sh -c $as_echo_body as_echo'
16500fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016501
16502# The user is always right.
16503if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 PATH_SEPARATOR=:
16505 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16506 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16507 PATH_SEPARATOR=';'
16508 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016511
16512# IFS
16513# We need space, tab and new line, in precisely that order. Quoting is
16514# there to prevent editors from complaining about space-tab.
16515# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16516# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517IFS=" "" $as_nl"
16518
16519# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016520as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016521case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522 *[\\/]* ) as_myself=$0 ;;
16523 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016524for as_dir in $PATH
16525do
16526 IFS=$as_save_IFS
16527 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016528 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16529 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016530IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016531
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016532 ;;
16533esac
16534# We did not find ourselves, most probably we were run as `sh COMMAND'
16535# in which case we are not to be found in the path.
16536if test "x$as_myself" = x; then
16537 as_myself=$0
16538fi
16539if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016540 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16541 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542fi
16543
Matthias Kloseb9621712010-04-24 17:59:49 +000016544# Unset variables that we do not need and which cause bugs (e.g. in
16545# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16546# suppresses any "Segmentation fault" message there. '((' could
16547# trigger a bug in pdksh 5.2.14.
16548for as_var in BASH_ENV ENV MAIL MAILPATH
16549do eval test x\${$as_var+set} = xset \
16550 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016551done
16552PS1='$ '
16553PS2='> '
16554PS4='+ '
16555
16556# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016557LC_ALL=C
16558export LC_ALL
16559LANGUAGE=C
16560export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016561
Matthias Kloseb9621712010-04-24 17:59:49 +000016562# CDPATH.
16563(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16564
16565
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016566# as_fn_error STATUS ERROR [LINENO LOG_FD]
16567# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016568# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16569# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016570# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016571as_fn_error ()
16572{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016573 as_status=$1; test $as_status -eq 0 && as_status=1
16574 if test "$4"; then
16575 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16576 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016577 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016578 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016579 as_fn_exit $as_status
16580} # as_fn_error
16581
16582
16583# as_fn_set_status STATUS
16584# -----------------------
16585# Set $? to STATUS, without forking.
16586as_fn_set_status ()
16587{
16588 return $1
16589} # as_fn_set_status
16590
16591# as_fn_exit STATUS
16592# -----------------
16593# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16594as_fn_exit ()
16595{
16596 set +e
16597 as_fn_set_status $1
16598 exit $1
16599} # as_fn_exit
16600
16601# as_fn_unset VAR
16602# ---------------
16603# Portably unset VAR.
16604as_fn_unset ()
16605{
16606 { eval $1=; unset $1;}
16607}
16608as_unset=as_fn_unset
16609# as_fn_append VAR VALUE
16610# ----------------------
16611# Append the text in VALUE to the end of the definition contained in VAR. Take
16612# advantage of any shell optimizations that allow amortized linear growth over
16613# repeated appends, instead of the typical quadratic growth present in naive
16614# implementations.
16615if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16616 eval 'as_fn_append ()
16617 {
16618 eval $1+=\$2
16619 }'
16620else
16621 as_fn_append ()
16622 {
16623 eval $1=\$$1\$2
16624 }
16625fi # as_fn_append
16626
16627# as_fn_arith ARG...
16628# ------------------
16629# Perform arithmetic evaluation on the ARGs, and store the result in the
16630# global $as_val. Take advantage of shells that can avoid forks. The arguments
16631# must be portable across $(()) and expr.
16632if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16633 eval 'as_fn_arith ()
16634 {
16635 as_val=$(( $* ))
16636 }'
16637else
16638 as_fn_arith ()
16639 {
16640 as_val=`expr "$@" || test $? -eq 1`
16641 }
16642fi # as_fn_arith
16643
16644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645if expr a : '\(a\)' >/dev/null 2>&1 &&
16646 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16647 as_expr=expr
16648else
16649 as_expr=false
16650fi
16651
16652if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16653 as_basename=basename
16654else
16655 as_basename=false
16656fi
16657
Matthias Kloseb9621712010-04-24 17:59:49 +000016658if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16659 as_dirname=dirname
16660else
16661 as_dirname=false
16662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664as_me=`$as_basename -- "$0" ||
16665$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16666 X"$0" : 'X\(//\)$' \| \
16667 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016668$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016669 sed '/^.*\/\([^/][^/]*\)\/*$/{
16670 s//\1/
16671 q
16672 }
16673 /^X\/\(\/\/\)$/{
16674 s//\1/
16675 q
16676 }
16677 /^X\/\(\/\).*/{
16678 s//\1/
16679 q
16680 }
16681 s/.*/./; q'`
16682
Matthias Kloseb9621712010-04-24 17:59:49 +000016683# Avoid depending upon Character Ranges.
16684as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16685as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16686as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16687as_cr_digits='0123456789'
16688as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689
16690ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016691case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016694 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016695 xy) ECHO_C='\c';;
16696 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16697 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698 esac;;
16699*)
16700 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016701esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016702
Martin v. Löwis11437992002-04-12 09:54:03 +000016703rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704if test -d conf$$.dir; then
16705 rm -f conf$$.dir/conf$$.file
16706else
16707 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016708 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016710if (echo >conf$$.file) 2>/dev/null; then
16711 if ln -s conf$$.file conf$$ 2>/dev/null; then
16712 as_ln_s='ln -s'
16713 # ... but there are two gotchas:
16714 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16715 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016716 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016717 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016718 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016719 elif ln conf$$.file conf$$ 2>/dev/null; then
16720 as_ln_s=ln
16721 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016722 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016724else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016725 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016727rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16728rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016729
Matthias Kloseb9621712010-04-24 17:59:49 +000016730
16731# as_fn_mkdir_p
16732# -------------
16733# Create "$as_dir" as a directory, including parents if necessary.
16734as_fn_mkdir_p ()
16735{
16736
16737 case $as_dir in #(
16738 -*) as_dir=./$as_dir;;
16739 esac
16740 test -d "$as_dir" || eval $as_mkdir_p || {
16741 as_dirs=
16742 while :; do
16743 case $as_dir in #(
16744 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16745 *) as_qdir=$as_dir;;
16746 esac
16747 as_dirs="'$as_qdir' $as_dirs"
16748 as_dir=`$as_dirname -- "$as_dir" ||
16749$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16750 X"$as_dir" : 'X\(//\)[^/]' \| \
16751 X"$as_dir" : 'X\(//\)$' \| \
16752 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16753$as_echo X"$as_dir" |
16754 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16755 s//\1/
16756 q
16757 }
16758 /^X\(\/\/\)[^/].*/{
16759 s//\1/
16760 q
16761 }
16762 /^X\(\/\/\)$/{
16763 s//\1/
16764 q
16765 }
16766 /^X\(\/\).*/{
16767 s//\1/
16768 q
16769 }
16770 s/.*/./; q'`
16771 test -d "$as_dir" && break
16772 done
16773 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016774 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016775
16776
16777} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016778if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016779 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016780else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016781 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016782 as_mkdir_p=false
16783fi
16784
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016785
16786# as_fn_executable_p FILE
16787# -----------------------
16788# Test if FILE is an executable regular file.
16789as_fn_executable_p ()
16790{
16791 test -f "$1" && test -x "$1"
16792} # as_fn_executable_p
16793as_test_x='test -x'
16794as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016795
16796# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016797as_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 +000016798
16799# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016800as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016801
16802
Martin v. Löwis11437992002-04-12 09:54:03 +000016803exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016804## ----------------------------------- ##
16805## Main body of $CONFIG_STATUS script. ##
16806## ----------------------------------- ##
16807_ASEOF
16808test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016809
Matthias Kloseb9621712010-04-24 17:59:49 +000016810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16811# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016812# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016813# values after options handling.
16814ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016815This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016816generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016817
16818 CONFIG_FILES = $CONFIG_FILES
16819 CONFIG_HEADERS = $CONFIG_HEADERS
16820 CONFIG_LINKS = $CONFIG_LINKS
16821 CONFIG_COMMANDS = $CONFIG_COMMANDS
16822 $ $0 $@
16823
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824on `(hostname || uname -n) 2>/dev/null | sed 1q`
16825"
16826
Martin v. Löwis11437992002-04-12 09:54:03 +000016827_ACEOF
16828
Matthias Kloseb9621712010-04-24 17:59:49 +000016829case $ac_config_files in *"
16830"*) set x $ac_config_files; shift; ac_config_files=$*;;
16831esac
16832
16833case $ac_config_headers in *"
16834"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16835esac
16836
16837
16838cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016839# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016840config_files="$ac_config_files"
16841config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016843_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
Matthias Kloseb9621712010-04-24 17:59:49 +000016845cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016846ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016847\`$as_me' instantiates files and other configuration actions
16848from templates according to the current configuration. Unless the files
16849and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016850
Matthias Kloseb9621712010-04-24 17:59:49 +000016851Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016852
16853 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 --config print configuration, then exit
16856 -q, --quiet, --silent
16857 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016858 -d, --debug don't remove temporary files
16859 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016860 --file=FILE[:TEMPLATE]
16861 instantiate the configuration file FILE
16862 --header=FILE[:TEMPLATE]
16863 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016864
16865Configuration files:
16866$config_files
16867
16868Configuration headers:
16869$config_headers
16870
Matthias Kloseb9621712010-04-24 17:59:49 +000016871Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016874cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16875ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016876ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016877python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016878configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016879 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016880
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016881Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016882This config.status script is free software; the Free Software Foundation
16883gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016884
16885ac_pwd='$ac_pwd'
16886srcdir='$srcdir'
16887INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016888MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016889test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016890_ACEOF
16891
Matthias Kloseb9621712010-04-24 17:59:49 +000016892cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16893# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016894ac_need_defaults=:
16895while test $# != 0
16896do
16897 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016898 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16900 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016901 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016902 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016903 --*=)
16904 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16905 ac_optarg=
16906 ac_shift=:
16907 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016908 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016909 ac_option=$1
16910 ac_optarg=$2
16911 ac_shift=shift
16912 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 esac
16914
Skip Montanaro6dead952003-09-25 14:50:04 +000016915 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016917 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16918 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 $as_echo "$ac_cs_version"; exit ;;
16921 --config | --confi | --conf | --con | --co | --c )
16922 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016924 debug=: ;;
16925 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016926 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016927 case $ac_optarg in
16928 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016929 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016930 esac
16931 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016932 ac_need_defaults=false;;
16933 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016934 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016935 case $ac_optarg in
16936 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16937 esac
16938 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016939 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016940 --he | --h)
16941 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016942 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016943Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016944 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016945 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016946 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16947 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16948 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016949
16950 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016951 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016952Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016953
Matthias Kloseb9621712010-04-24 17:59:49 +000016954 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016956
16957 esac
16958 shift
16959done
16960
Skip Montanaro6dead952003-09-25 14:50:04 +000016961ac_configure_extra_args=
16962
16963if $ac_cs_silent; then
16964 exec 6>/dev/null
16965 ac_configure_extra_args="$ac_configure_extra_args --silent"
16966fi
16967
16968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016969cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016970if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016971 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016972 shift
16973 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16974 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016975 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016976 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016977fi
16978
Martin v. Löwis11437992002-04-12 09:54:03 +000016979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016980cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981exec 5>>config.log
16982{
16983 echo
16984 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16985## Running $as_me. ##
16986_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016987 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016991cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016993
Matthias Kloseb9621712010-04-24 17:59:49 +000016994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016995
16996# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016997for ac_config_target in $ac_config_targets
16998do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999 case $ac_config_target in
17000 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17001 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17002 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017003 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17004 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17006 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017007 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017008 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017009 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010
Victor Stinnere0be4232011-10-25 13:06:09 +020017011 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017012 esac
17013done
17014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015
Martin v. Löwis11437992002-04-12 09:54:03 +000017016# If the user did not use the arguments to specify the items to instantiate,
17017# then the envvar interface is used. Set only those that are not.
17018# We use the long form for the default assignment because of an extremely
17019# bizarre bug on SunOS 4.1.3.
17020if $ac_need_defaults; then
17021 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17022 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17023fi
17024
Skip Montanaro6dead952003-09-25 14:50:04 +000017025# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017027# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028# Hook for its removal unless debugging.
17029# Note that there is a small window in which the directory will not be cleaned:
17030# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017031$debug ||
17032{
Victor Stinnere0be4232011-10-25 13:06:09 +020017033 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017035 : "${ac_tmp:=$tmp}"
17036 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017038 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017039}
Martin v. Löwis11437992002-04-12 09:54:03 +000017040# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017041
Martin v. Löwis11437992002-04-12 09:54:03 +000017042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017044 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017045} ||
17046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047 tmp=./conf$$-$RANDOM
17048 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017049} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017050ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017051
Matthias Kloseb9621712010-04-24 17:59:49 +000017052# Set up the scripts for CONFIG_FILES section.
17053# No need to generate them if there are no CONFIG_FILES.
17054# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017056
Matthias Kloseb9621712010-04-24 17:59:49 +000017057
17058ac_cr=`echo X | tr X '\015'`
17059# On cygwin, bash can eat \r inside `` if the user requested igncr.
17060# But we know of no other shell where ac_cr would be empty at this
17061# point, so we can use a bashism as a fallback.
17062if test "x$ac_cr" = x; then
17063 eval ac_cr=\$\'\\r\'
17064fi
17065ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17066if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017067 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017068else
17069 ac_cs_awk_cr=$ac_cr
17070fi
17071
Victor Stinnere0be4232011-10-25 13:06:09 +020017072echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017073_ACEOF
17074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075
Matthias Kloseb9621712010-04-24 17:59:49 +000017076{
17077 echo "cat >conf$$subs.awk <<_ACEOF" &&
17078 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17079 echo "_ACEOF"
17080} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017081 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17082ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017083ac_delim='%!_!# '
17084for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017086 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087
Matthias Kloseb9621712010-04-24 17:59:49 +000017088 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17089 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 break
17091 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017092 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093 else
17094 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017096done
Matthias Kloseb9621712010-04-24 17:59:49 +000017097rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098
Matthias Kloseb9621712010-04-24 17:59:49 +000017099cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017100cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017102sed -n '
17103h
17104s/^/S["/; s/!.*/"]=/
17105p
17106g
17107s/^[^!]*!//
17108:repl
17109t repl
17110s/'"$ac_delim"'$//
17111t delim
17112:nl
17113h
17114s/\(.\{148\}\)..*/\1/
17115t more1
17116s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17117p
17118n
17119b repl
17120:more1
17121s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17122p
17123g
17124s/.\{148\}//
17125t nl
17126:delim
17127h
17128s/\(.\{148\}\)..*/\1/
17129t more2
17130s/["\\]/\\&/g; s/^/"/; s/$/"/
17131p
17132b
17133:more2
17134s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17135p
17136g
17137s/.\{148\}//
17138t delim
17139' <conf$$subs.awk | sed '
17140/^[^""]/{
17141 N
17142 s/\n//
17143}
17144' >>$CONFIG_STATUS || ac_write_fail=1
17145rm -f conf$$subs.awk
17146cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17147_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017148cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017149 for (key in S) S_is_set[key] = 1
17150 FS = ""
17151
17152}
17153{
17154 line = $ 0
17155 nfields = split(line, field, "@")
17156 substed = 0
17157 len = length(field[1])
17158 for (i = 2; i < nfields; i++) {
17159 key = field[i]
17160 keylen = length(key)
17161 if (S_is_set[key]) {
17162 value = S[key]
17163 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17164 len += length(value) + length(field[++i])
17165 substed = 1
17166 } else
17167 len += 1 + keylen
17168 }
17169
17170 print line
17171}
17172
17173_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17176if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17177 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17178else
17179 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017180fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017181 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017182_ACEOF
17183
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017184# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17185# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017186# trailing colons and then remove the whole line if VPATH becomes empty
17187# (actually we leave an empty line to preserve line numbers).
17188if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017189 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17190h
17191s///
17192s/^/:/
17193s/[ ]*$/:/
17194s/:\$(srcdir):/:/g
17195s/:\${srcdir}:/:/g
17196s/:@srcdir@:/:/g
17197s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017199x
17200s/\(=[ ]*\).*/\1/
17201G
17202s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017203s/^[^=]*=[ ]*$//
17204}'
17205fi
17206
Matthias Kloseb9621712010-04-24 17:59:49 +000017207cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017208fi # test -n "$CONFIG_FILES"
17209
Matthias Kloseb9621712010-04-24 17:59:49 +000017210# Set up the scripts for CONFIG_HEADERS section.
17211# No need to generate them if there are no CONFIG_HEADERS.
17212# This happens for instance with `./config.status Makefile'.
17213if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017214cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017215BEGIN {
17216_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217
Matthias Kloseb9621712010-04-24 17:59:49 +000017218# Transform confdefs.h into an awk script `defines.awk', embedded as
17219# here-document in config.status, that substitutes the proper values into
17220# config.h.in to produce config.h.
17221
17222# Create a delimiter string that does not exist in confdefs.h, to ease
17223# handling of long lines.
17224ac_delim='%!_!# '
17225for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017226 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17227 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017228 break
17229 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017230 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017231 else
17232 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17233 fi
17234done
17235
17236# For the awk script, D is an array of macro values keyed by name,
17237# likewise P contains macro parameters if any. Preserve backslash
17238# newline sequences.
17239
17240ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17241sed -n '
17242s/.\{148\}/&'"$ac_delim"'/g
17243t rset
17244:rset
17245s/^[ ]*#[ ]*define[ ][ ]*/ /
17246t def
17247d
17248:def
17249s/\\$//
17250t bsnl
17251s/["\\]/\\&/g
17252s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17253D["\1"]=" \3"/p
17254s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17255d
17256:bsnl
17257s/["\\]/\\&/g
17258s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17259D["\1"]=" \3\\\\\\n"\\/p
17260t cont
17261s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17262t cont
17263d
17264:cont
17265n
17266s/.\{148\}/&'"$ac_delim"'/g
17267t clear
17268:clear
17269s/\\$//
17270t bsnlc
17271s/["\\]/\\&/g; s/^/"/; s/$/"/p
17272d
17273:bsnlc
17274s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17275b cont
17276' <confdefs.h | sed '
17277s/'"$ac_delim"'/"\\\
17278"/g' >>$CONFIG_STATUS || ac_write_fail=1
17279
17280cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17281 for (key in D) D_is_set[key] = 1
17282 FS = ""
17283}
17284/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17285 line = \$ 0
17286 split(line, arg, " ")
17287 if (arg[1] == "#") {
17288 defundef = arg[2]
17289 mac1 = arg[3]
17290 } else {
17291 defundef = substr(arg[1], 2)
17292 mac1 = arg[2]
17293 }
17294 split(mac1, mac2, "(") #)
17295 macro = mac2[1]
17296 prefix = substr(line, 1, index(line, defundef) - 1)
17297 if (D_is_set[macro]) {
17298 # Preserve the white space surrounding the "#".
17299 print prefix "define", macro P[macro] D[macro]
17300 next
17301 } else {
17302 # Replace #undef with comments. This is necessary, for example,
17303 # in the case of _POSIX_SOURCE, which is predefined and required
17304 # on some systems where configure will not decide to define it.
17305 if (defundef == "undef") {
17306 print "/*", prefix defundef, macro, "*/"
17307 next
17308 }
17309 }
17310}
17311{ print }
17312_ACAWK
17313_ACEOF
17314cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017315 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017316fi # test -n "$CONFIG_HEADERS"
17317
17318
17319eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17320shift
17321for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322do
17323 case $ac_tag in
17324 :[FHLC]) ac_mode=$ac_tag; continue;;
17325 esac
17326 case $ac_mode$ac_tag in
17327 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017328 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 :[FH]-) ac_tag=-:-;;
17330 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17331 esac
17332 ac_save_IFS=$IFS
17333 IFS=:
17334 set x $ac_tag
17335 IFS=$ac_save_IFS
17336 shift
17337 ac_file=$1
17338 shift
17339
17340 case $ac_mode in
17341 :L) ac_source=$1;;
17342 :[FH])
17343 ac_file_inputs=
17344 for ac_f
17345 do
17346 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017347 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 *) # Look for the file first in the build tree, then in the source tree
17349 # (if the path is not absolute). The absolute path cannot be DOS-style,
17350 # because $ac_f cannot contain `:'.
17351 test -f "$ac_f" ||
17352 case $ac_f in
17353 [\\/$]*) false;;
17354 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17355 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017356 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17359 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 done
17361
17362 # Let's still pretend it is `configure' which instantiates (i.e., don't
17363 # use $as_me), people would be surprised to read:
17364 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017365 configure_input='Generated from '`
17366 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17367 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 if test x"$ac_file" != x-; then
17369 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017370 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17371$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017373 # Neutralize special characters interpreted by sed in replacement strings.
17374 case $configure_input in #(
17375 *\&* | *\|* | *\\* )
17376 ac_sed_conf_input=`$as_echo "$configure_input" |
17377 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17378 *) ac_sed_conf_input=$configure_input;;
17379 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380
17381 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017382 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17383 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384 esac
17385 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017386 esac
17387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017389$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017390 X"$ac_file" : 'X\(//\)[^/]' \| \
17391 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017393$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17395 s//\1/
17396 q
17397 }
17398 /^X\(\/\/\)[^/].*/{
17399 s//\1/
17400 q
17401 }
17402 /^X\(\/\/\)$/{
17403 s//\1/
17404 q
17405 }
17406 /^X\(\/\).*/{
17407 s//\1/
17408 q
17409 }
17410 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017411 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 ac_builddir=.
17413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414case "$ac_dir" in
17415.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17416*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017417 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017419 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420 case $ac_top_builddir_sub in
17421 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17422 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17423 esac ;;
17424esac
17425ac_abs_top_builddir=$ac_pwd
17426ac_abs_builddir=$ac_pwd$ac_dir_suffix
17427# for backward compatibility:
17428ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017429
17430case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017432 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433 ac_top_srcdir=$ac_top_builddir_sub
17434 ac_abs_top_srcdir=$ac_pwd ;;
17435 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 ac_top_srcdir=$srcdir
17438 ac_abs_top_srcdir=$srcdir ;;
17439 *) # Relative name.
17440 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17441 ac_top_srcdir=$ac_top_build_prefix$srcdir
17442 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017443esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017445
Martin v. Löwis11437992002-04-12 09:54:03 +000017446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 case $ac_mode in
17448 :F)
17449 #
17450 # CONFIG_FILE
17451 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017452
17453 case $INSTALL in
17454 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017456 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017457 ac_MKDIR_P=$MKDIR_P
17458 case $MKDIR_P in
17459 [\\/$]* | ?:[\\/]* ) ;;
17460 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17461 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017462_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463
Matthias Kloseb9621712010-04-24 17:59:49 +000017464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465# If the template does not know about datarootdir, expand it.
17466# FIXME: This hack should be removed a few years after 2.60.
17467ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017468ac_sed_dataroot='
17469/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017470 p
17471 q
17472}
17473/@datadir@/p
17474/@docdir@/p
17475/@infodir@/p
17476/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017477/@mandir@/p'
17478case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479*datarootdir*) ac_datarootdir_seen=yes;;
17480*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17482$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017484cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485 ac_datarootdir_hack='
17486 s&@datadir@&$datadir&g
17487 s&@docdir@&$docdir&g
17488 s&@infodir@&$infodir&g
17489 s&@localedir@&$localedir&g
17490 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017491 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492esac
17493_ACEOF
17494
17495# Neutralize VPATH when `$srcdir' = `.'.
17496# Shell code in configure.ac might set extrasub.
17497# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17499ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017500$extrasub
17501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017503:t
17504/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017505s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017507s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508s&@srcdir@&$ac_srcdir&;t t
17509s&@abs_srcdir@&$ac_abs_srcdir&;t t
17510s&@top_srcdir@&$ac_top_srcdir&;t t
17511s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17512s&@builddir@&$ac_builddir&;t t
17513s&@abs_builddir@&$ac_abs_builddir&;t t
17514s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17515s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017516s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017518"
Victor Stinnere0be4232011-10-25 13:06:09 +020017519eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17520 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017523 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17524 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17525 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017526 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017527which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017528$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017529which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017530
Victor Stinnere0be4232011-10-25 13:06:09 +020017531 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017532 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017533 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17534 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017535 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017536 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537 ;;
17538 :H)
17539 #
17540 # CONFIG_HEADER
17541 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017542 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017543 {
17544 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017545 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17546 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017547 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017548 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017549 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17550$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017551 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017552 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017553 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017554 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017555 fi
17556 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017557 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017558 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017559 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017560 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563
17564 esac
17565
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017566
17567 case $ac_file$ac_mode in
17568 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17569
17570 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017571done # for ac_tag
17572
Guido van Rossum627b2d71993-12-24 10:39:16 +000017573
Matthias Kloseb9621712010-04-24 17:59:49 +000017574as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017575_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017576ac_clean_files=$ac_clean_files_save
17577
Matthias Kloseb9621712010-04-24 17:59:49 +000017578test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017579 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017580
Martin v. Löwis11437992002-04-12 09:54:03 +000017581
17582# configure is writing to config.log, and then calls config.status.
17583# config.status does its own redirection, appending to config.log.
17584# Unfortunately, on DOS this fails, as config.log is still kept open
17585# by configure, so config.status won't be able to write to it; its
17586# output is simply discarded. So we exec the FD to /dev/null,
17587# effectively closing config.log, so it can be properly (re)opened and
17588# appended to by config.status. When coming back to configure, we
17589# need to make the FD available again.
17590if test "$no_create" != yes; then
17591 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017592 ac_config_status_args=
17593 test "$silent" = yes &&
17594 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017595 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017596 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 exec 5>>config.log
17598 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17599 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017600 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017601fi
17602if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17603 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17604$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017605fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017606
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017607
Christian Heimes75ed8902013-11-20 01:11:18 +010017608echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017609if test ! -f Modules/Setup
17610then
17611 cp $srcdir/Modules/Setup.dist Modules/Setup
17612fi
17613
Christian Heimes75ed8902013-11-20 01:11:18 +010017614echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017615if test ! -f Modules/Setup.local
17616then
17617 echo "# Edit this file for local setup changes" >Modules/Setup.local
17618fi
17619
Christian Heimes75ed8902013-11-20 01:11:18 +010017620echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017621$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17622 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017623 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017624mv config.c Modules