blob: 550c1bbd2da0b67b4a13bfb782ab082f018a0c04 [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
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200742PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200743PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100744host_os
745host_vendor
746host_cpu
747host
748build_os
749build_vendor
750build_cpu
751build
Martin Panter1046d5c2016-04-23 00:58:44 +0000752cross_compiling
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
Victor Stinnerdddf4842016-06-07 11:21:42 +02002877
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002878ac_aux_dir=
2879for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2880 if test -f "$ac_dir/install-sh"; then
2881 ac_aux_dir=$ac_dir
2882 ac_install_sh="$ac_aux_dir/install-sh -c"
2883 break
2884 elif test -f "$ac_dir/install.sh"; then
2885 ac_aux_dir=$ac_dir
2886 ac_install_sh="$ac_aux_dir/install.sh -c"
2887 break
2888 elif test -f "$ac_dir/shtool"; then
2889 ac_aux_dir=$ac_dir
2890 ac_install_sh="$ac_aux_dir/shtool install -c"
2891 break
2892 fi
2893done
2894if test -z "$ac_aux_dir"; then
2895 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2896fi
2897
2898# These three variables are undocumented and unsupported,
2899# and are intended to be withdrawn in a future Autoconf release.
2900# They can cause serious problems if a builder's source tree is in a directory
2901# whose full name contains unusual characters.
2902ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2903ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2904ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2905
2906
2907# Make sure we can run config.sub.
2908$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2909 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2910
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2912$as_echo_n "checking build system type... " >&6; }
2913if ${ac_cv_build+:} false; then :
2914 $as_echo_n "(cached) " >&6
2915else
2916 ac_build_alias=$build_alias
2917test "x$ac_build_alias" = x &&
2918 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2919test "x$ac_build_alias" = x &&
2920 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2921ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2922 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2923
2924fi
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2926$as_echo "$ac_cv_build" >&6; }
2927case $ac_cv_build in
2928*-*-*) ;;
2929*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2930esac
2931build=$ac_cv_build
2932ac_save_IFS=$IFS; IFS='-'
2933set x $ac_cv_build
2934shift
2935build_cpu=$1
2936build_vendor=$2
2937shift; shift
2938# Remember, the first character of IFS is used to create $*,
2939# except with old shells:
2940build_os=$*
2941IFS=$ac_save_IFS
2942case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2943
2944
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2946$as_echo_n "checking host system type... " >&6; }
2947if ${ac_cv_host+:} false; then :
2948 $as_echo_n "(cached) " >&6
2949else
2950 if test "x$host_alias" = x; then
2951 ac_cv_host=$ac_cv_build
2952else
2953 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2954 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2955fi
2956
2957fi
2958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2959$as_echo "$ac_cv_host" >&6; }
2960case $ac_cv_host in
2961*-*-*) ;;
2962*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2963esac
2964host=$ac_cv_host
2965ac_save_IFS=$IFS; IFS='-'
2966set x $ac_cv_host
2967shift
2968host_cpu=$1
2969host_vendor=$2
2970shift; shift
2971# Remember, the first character of IFS is used to create $*,
2972# except with old shells:
2973host_os=$*
2974IFS=$ac_save_IFS
2975case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2976
2977
2978
doko@python.orga10e4a92013-01-25 18:45:12 +01002979
2980
Ned Deilyfcbc2462014-08-22 13:32:49 -07002981# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2982rm -f pybuilddir.txt
2983
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002984for ac_prog in python$PACKAGE_VERSION python3 python
2985do
2986 # Extract the first word of "$ac_prog", so it can be a program name with args.
2987set dummy $ac_prog; ac_word=$2
2988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2989$as_echo_n "checking for $ac_word... " >&6; }
2990if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2991 $as_echo_n "(cached) " >&6
2992else
2993 if test -n "$PYTHON_FOR_GEN"; then
2994 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2995else
2996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2997for as_dir in $PATH
2998do
2999 IFS=$as_save_IFS
3000 test -z "$as_dir" && as_dir=.
3001 for ac_exec_ext in '' $ac_executable_extensions; do
3002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3003 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3005 break 2
3006 fi
3007done
3008 done
3009IFS=$as_save_IFS
3010
3011fi
3012fi
3013PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3014if test -n "$PYTHON_FOR_GEN"; then
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3016$as_echo "$PYTHON_FOR_GEN" >&6; }
3017else
3018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3019$as_echo "no" >&6; }
3020fi
3021
3022
3023 test -n "$PYTHON_FOR_GEN" && break
3024done
3025test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3026
3027if test "$PYTHON_FOR_GEN" = not-found; then
3028 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3029 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3030 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3031fi
3032
3033
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003034if test "$cross_compiling" = yes; then
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3036$as_echo_n "checking for python interpreter for cross build... " >&6; }
3037 if test -z "$PYTHON_FOR_BUILD"; then
3038 for interp in python$PACKAGE_VERSION python3 python; do
3039 which $interp >/dev/null 2>&1 || continue
3040 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
3041 break
3042 fi
3043 interp=
3044 done
3045 if test x$interp = x; then
3046 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3047 fi
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3049$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003050 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 +02003051 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003052elif test "$cross_compiling" = maybe; then
3053 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003054else
3055 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3056fi
3057
3058
Martin v. Löwis11437992002-04-12 09:54:03 +00003059
Benjamin Petersond23f8222009-04-05 19:13:16 +00003060if test "$prefix" != "/"; then
3061 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3062fi
3063
3064
Martin v. Löwis11437992002-04-12 09:54:03 +00003065
3066
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003067# We don't use PACKAGE_ variables, and they cause conflicts
3068# with other autoconf-based packages that include Python.h
3069grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3070rm confdefs.h
3071mv confdefs.h.new confdefs.h
3072
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003073
Yury Selivanov7aa53412015-05-30 10:57:56 -04003074VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003075
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003076# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003077
3078SOVERSION=1.0
3079
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003080# The later defininition of _XOPEN_SOURCE disables certain features
3081# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3082
Matthias Kloseb9621712010-04-24 17:59:49 +00003083$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003084
3085
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003086# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3087# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3088# them.
3089
Matthias Kloseb9621712010-04-24 17:59:49 +00003090$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003091
3092
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003093# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3094# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3095# them.
3096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003098
3099
Martin v. Löwisd6320502004-08-12 13:45:08 +00003100# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3101# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3102
Matthias Kloseb9621712010-04-24 17:59:49 +00003103$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003104
3105
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3107# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3108# them.
3109
Matthias Kloseb9621712010-04-24 17:59:49 +00003110$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111
3112
3113
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003114define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003115
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003116# Arguments passed to configure.
3117
3118CONFIG_ARGS="$ac_configure_args"
3119
Matthias Kloseb9621712010-04-24 17:59:49 +00003120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3121$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003125 case $enableval in
3126 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003127 # Locate the best usable SDK, see Mac/README.txt for more
3128 # information
3129 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003130 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003131 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003132 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3133 if test ! -d "${enableval}"
3134 then
3135 enableval=/
3136 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003137 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 ;;
3139 esac
3140 case $enableval in
3141 no)
3142 UNIVERSALSDK=
3143 enable_universalsdk=
3144 ;;
3145 *)
3146 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003147 if test ! -d "${UNIVERSALSDK}"
3148 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003149 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003150 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003151 ;;
3152 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003153
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003154
Thomas Wouters477c8d52006-05-27 19:21:47 +00003155else
3156
3157 UNIVERSALSDK=
3158 enable_universalsdk=
3159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003160fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003161
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003162if test -n "${UNIVERSALSDK}"
3163then
Matthias Kloseb9621712010-04-24 17:59:49 +00003164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3165$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166else
Matthias Kloseb9621712010-04-24 17:59:49 +00003167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3168$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003169fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003170
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003172
Ned Deily87adb6e2013-10-18 21:09:56 -07003173ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003174
Ned Deilycbfb9a52012-06-23 16:02:19 -07003175# For backward compatibility reasons we prefer to select '32-bit' if available,
3176# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003177UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003178if test "`uname -s`" = "Darwin"
3179then
3180 if test -n "${UNIVERSALSDK}"
3181 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003182 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003183 then
3184 UNIVERSAL_ARCHS="intel"
3185 fi
3186 fi
3187fi
3188
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003189
Matthias Kloseb9621712010-04-24 17:59:49 +00003190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3191$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003192
3193# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003194if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003195 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003196 UNIVERSAL_ARCHS="$withval"
3197
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003198fi
3199
Ned Deily87adb6e2013-10-18 21:09:56 -07003200if test -n "${UNIVERSALSDK}"
3201then
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3203$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3204else
3205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3206$as_echo "no" >&6; }
3207fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003208
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003209
3210# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003211if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003212 withval=$with_framework_name;
3213 PYTHONFRAMEWORK=${withval}
3214 PYTHONFRAMEWORKDIR=${withval}.framework
3215 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3216
3217else
3218
3219 PYTHONFRAMEWORK=Python
3220 PYTHONFRAMEWORKDIR=Python.framework
3221 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3222
3223fi
3224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003226if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003227 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003228 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003229 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003230 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003231 esac
3232 case $enableval in
3233 no)
3234 PYTHONFRAMEWORK=
3235 PYTHONFRAMEWORKDIR=no-framework
3236 PYTHONFRAMEWORKPREFIX=
3237 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003238 FRAMEWORKINSTALLFIRST=
3239 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240 FRAMEWORKALTINSTALLFIRST=
3241 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003242 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003243 if test "x${prefix}" = "xNONE"; then
3244 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3245 else
3246 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3247 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003248 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003249 ;;
3250 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003251 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003252 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003253 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003254 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003255 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3256 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003257 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003258 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003259
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003260 if test "x${prefix}" = "xNONE" ; then
3261 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003262
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003263 else
3264 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3265 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003266
3267 case "${enableval}" in
3268 /System*)
3269 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3270 if test "${prefix}" = "NONE" ; then
3271 # See below
3272 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3273 fi
3274 ;;
3275
3276 /Library*)
3277 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3278 ;;
3279
3280 */Library/Frameworks)
3281 MDIR="`dirname "${enableval}"`"
3282 MDIR="`dirname "${MDIR}"`"
3283 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3284
3285 if test "${prefix}" = "NONE"; then
3286 # User hasn't specified the
3287 # --prefix option, but wants to install
3288 # the framework in a non-default location,
3289 # ensure that the compatibility links get
3290 # installed relative to that prefix as well
3291 # instead of in /usr/local.
3292 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3293 fi
3294 ;;
3295
3296 *)
3297 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3298 ;;
3299 esac
3300
Jack Jansen127e56e2001-09-11 14:41:54 +00003301 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003302
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003303 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003304 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003305 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003306
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003307 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003308
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003309 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3310
3311 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3312
Jack Jansene578a632001-08-15 01:27:14 +00003313 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003314
Guido van Rossum563e7081996-09-10 18:20:48 +00003315else
Martin v. Löwis11437992002-04-12 09:54:03 +00003316
Jack Jansene578a632001-08-15 01:27:14 +00003317 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003318 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003319 PYTHONFRAMEWORKPREFIX=
3320 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003321 FRAMEWORKINSTALLFIRST=
3322 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003323 FRAMEWORKALTINSTALLFIRST=
3324 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003325 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003326 if test "x${prefix}" = "xNONE" ; then
3327 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3328 else
3329 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3330 fi
Jack Jansene578a632001-08-15 01:27:14 +00003331 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003332
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003334fi
3335
Thomas Wouters477c8d52006-05-27 19:21:47 +00003336
3337
Michael W. Hudson54241132001-12-07 15:38:26 +00003338
3339
3340
3341
Jack Jansene578a632001-08-15 01:27:14 +00003342
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003343
3344
3345
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003346
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003347
Ned Deilyb8f944f2013-11-21 22:42:25 -08003348
Jack Jansene578a632001-08-15 01:27:14 +00003349##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003350## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003351## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003352##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003353# Set name for machine-dependent library files
3354
Matthias Kloseb9621712010-04-24 17:59:49 +00003355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3356$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003357if test -z "$MACHDEP"
3358then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003359 # avoid using uname for cross builds
3360 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003361 # ac_sys_system and ac_sys_release are used for setting
3362 # a lot of different things including 'define_xopen_source'
3363 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003364 case "$host" in
3365 *-*-linux*)
3366 ac_sys_system=Linux
3367 ;;
3368 *-*-cygwin*)
3369 ac_sys_system=Cygwin
3370 ;;
3371 *)
3372 # for now, limit cross builds to known configurations
3373 MACHDEP="unknown"
3374 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3375 esac
3376 ac_sys_release=
3377 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003378 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003379 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003380 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003381 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003382 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003383 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003384 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003385 fi
3386 ac_md_system=`echo $ac_sys_system |
3387 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3388 ac_md_release=`echo $ac_sys_release |
3389 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3390 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003391
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003392 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003393 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003394 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003395 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003396 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003397 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003398 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003399fi
Guido van Rossum91922671997-10-09 20:24:13 +00003400
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003401
3402if test "$cross_compiling" = yes; then
3403 case "$host" in
3404 *-*-linux*)
3405 case "$host_cpu" in
3406 arm*)
3407 _host_cpu=arm
3408 ;;
3409 *)
3410 _host_cpu=$host_cpu
3411 esac
3412 ;;
3413 *-*-cygwin*)
3414 _host_cpu=
3415 ;;
3416 *)
3417 # for now, limit cross builds to known configurations
3418 MACHDEP="unknown"
3419 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3420 esac
3421 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3422fi
3423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003424# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3425# disable features if it is defined, without any means to access these
3426# features as extensions. For these systems, we skip the definition of
3427# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3428# some feature, make sure there is no alternative way to access this
3429# feature. Also, when using wildcards, make sure you have verified the
3430# need for not defining _XOPEN_SOURCE on all systems matching the
3431# wildcard, and that the wildcard does not include future systems
3432# (which may remove their limitations).
3433case $ac_sys_system/$ac_sys_release in
3434 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3435 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003436 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003437 # In addition, Stefan Krah confirms that issue #1244610 exists through
3438 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003439 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003440 define_xopen_source=no
3441 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3442 # also defined. This can be overridden by defining _BSD_SOURCE
3443 # As this has a different meaning on Linux, only define it on OpenBSD
3444
Matthias Kloseb9621712010-04-24 17:59:49 +00003445$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003446
3447 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003448 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003449 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3450 # also defined. This can be overridden by defining _BSD_SOURCE
3451 # As this has a different meaning on Linux, only define it on OpenBSD
3452
Matthias Kloseb9621712010-04-24 17:59:49 +00003453$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003454
3455 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003456 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3457 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3458 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003459 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 +00003460 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003461 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3462 # request to enable features supported by the standard as a request
3463 # to disable features not supported by the standard. The best way
3464 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3465 # entirely and define __EXTENSIONS__ instead.
3466 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003467 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003468 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3469 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003470 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003471 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003472 define_xopen_source=no;;
3473 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003474 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003475 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003476 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003477 # On FreeBSD 4, the math functions C89 does not cover are never defined
3478 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3479 FreeBSD/4.*)
3480 define_xopen_source=no;;
3481 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3482 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3483 # identifies itself as Darwin/7.*
3484 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3485 # disables platform specific features beyond repair.
3486 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3487 # has no effect, don't bother defining them
3488 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003489 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003490 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003491 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003492 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3493 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3494 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003495 AIX/4)
3496 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003497 AIX/5)
3498 if test `uname -r` -eq 1; then
3499 define_xopen_source=no
3500 fi
3501 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003502 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3503 # defining NI_NUMERICHOST.
3504 QNX/6.3.2)
3505 define_xopen_source=no
3506 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003507
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003508esac
3509
3510if test $define_xopen_source = yes
3511then
Victor Stinner14d098d2011-09-07 22:29:43 +02003512 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003513
Victor Stinner14d098d2011-09-07 22:29:43 +02003514$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003515
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003516
3517 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3518 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3519 # several APIs are not declared. Since this is also needed in some
3520 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003521
Matthias Kloseb9621712010-04-24 17:59:49 +00003522$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003523
3524
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003525
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003526$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003527
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003528fi
3529
Christian Heimes647cd872013-12-07 23:39:33 +01003530# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3531case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003532 hp*|HP*)
3533 define_stdc_a1=yes;;
3534 *)
3535 define_stdc_a1=no;;
3536esac
3537
3538if test $define_stdc_a1 = yes
3539then
Christian Heimes647cd872013-12-07 23:39:33 +01003540
3541$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3542
Christian Heimesb02bcae2013-12-08 15:21:08 +01003543fi
Christian Heimes647cd872013-12-07 23:39:33 +01003544
Guido van Rossum91922671997-10-09 20:24:13 +00003545#
3546# SGI compilers allow the specification of the both the ABI and the
3547# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003548# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003549#
3550# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3551# thus supply support for various ABI/ISA combinations. The MACHDEP
3552# variable is also adjusted.
3553#
3554
3555if test ! -z "$SGI_ABI"
3556then
3557 CC="cc $SGI_ABI"
3558 LDFLAGS="$SGI_ABI $LDFLAGS"
3559 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3562$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003563
Jack Jansen6b08a402004-06-03 12:41:45 +00003564# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3565# it may influence the way we can build extensions, so distutils
3566# needs to check it
3567
Thomas Wouters477c8d52006-05-27 19:21:47 +00003568
Jack Jansen6b08a402004-06-03 12:41:45 +00003569CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003570EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003571
Guido van Rossum627b2d71993-12-24 10:39:16 +00003572# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003573
3574# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3575# for debug/optimization stuff. BASECFLAGS is for flags that are required
3576# just to get things to compile and link. Users are free to override OPT
3577# when running configure or make. The build should not break if they do.
3578# BASECFLAGS should generally not be messed with, however.
3579
3580# XXX shouldn't some/most/all of this code be merged with the stuff later
3581# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3583$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003585# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003586if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003588 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003589 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003590 without_gcc=yes;;
3591 yes) CC=gcc
3592 without_gcc=no;;
3593 *) CC=$withval
3594 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003595 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003596else
Martin v. Löwis11437992002-04-12 09:54:03 +00003597
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003598 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003599 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003600 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003601 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003602 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603fi
3604
Matthias Kloseb9621712010-04-24 17:59:49 +00003605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3606$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003607
Zachary Ware5af85642015-12-21 12:09:17 -06003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3609$as_echo_n "checking for --with-icc... " >&6; }
3610
3611# Check whether --with-icc was given.
3612if test "${with_icc+set}" = set; then :
3613 withval=$with_icc;
3614 case $withval in
3615 no) CC=${CC:-cc}
3616 with_icc=no;;
3617 yes) CC=icc
3618 CXX=icpc
3619 with_icc=yes;;
3620 *) CC=$withval
3621 with_icc=$withval;;
3622 esac
3623else
3624
3625 with_icc=no
3626fi
3627
3628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3629$as_echo "$with_icc" >&6; }
3630
Guido van Rossum8b131c51995-03-09 14:10:13 +00003631# If the user switches compilers, we can't believe the cache
3632if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3633then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003634 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003635(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003636fi
3637
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003638# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3639# when the compiler supports them, but we don't always want -O2, and
3640# we set -g later.
3641if test -z "$CFLAGS"; then
3642 CFLAGS=
3643fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003644
3645if test "$ac_sys_system" = "Darwin"
3646then
3647 # Compiler selection on MacOSX is more complicated than
3648 # AC_PROG_CC can handle, see Mac/README.txt for more
3649 # information
3650 if test -z "${CC}"
3651 then
3652 found_gcc=
3653 found_clang=
3654 as_save_IFS=$IFS; IFS=:
3655 for as_dir in $PATH
3656 do
3657 IFS=$as_save_IFS
3658 if test -x $as_dir/gcc; then
3659 if test -z "${found_gcc}"; then
3660 found_gcc=$as_dir/gcc
3661 fi
3662 fi
3663 if test -x $as_dir/clang; then
3664 if test -z "${found_clang}"; then
3665 found_clang=$as_dir/clang
3666 fi
3667 fi
3668 done
3669 IFS=$as_save_IFS
3670
3671 if test -n "$found_gcc" -a -n "$found_clang"
3672 then
3673 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3674 then
3675 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3676$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3677 CC="$found_clang"
3678 CXX="$found_clang++"
3679 fi
3680
3681
3682 elif test -z "$found_gcc" -a -n "$found_clang"
3683 then
3684 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3685$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3686 CC="$found_clang"
3687 CXX="$found_clang++"
3688
3689 elif test -z "$found_gcc" -a -z "$found_clang"
3690 then
3691 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3692 if test -n "${found_clang}"
3693 then
3694 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3695$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3696 CC="${found_clang}"
3697 CXX="`/usr/bin/xcrun -find clang++`"
3698
3699 # else: use default behaviour
3700 fi
3701 fi
3702 fi
3703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003704ac_ext=c
3705ac_cpp='$CPP $CPPFLAGS'
3706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3708ac_compiler_gnu=$ac_cv_c_compiler_gnu
3709if test -n "$ac_tool_prefix"; then
3710 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3711set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3713$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003714if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716else
3717 if test -n "$CC"; then
3718 ac_cv_prog_CC="$CC" # Let the user override the test.
3719else
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 $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 +00003729 break 2
3730 fi
3731done
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003733IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003734
Jack Jansendd19cf82001-12-06 22:36:17 +00003735fi
3736fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003737CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003738if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3740$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003741else
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3743$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003744fi
3745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003746
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$ac_cv_prog_CC"; then
3749 ac_ct_CC=$CC
3750 # Extract the first word of "gcc", so it can be a program name with args.
3751set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3753$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003754if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003756else
3757 if test -n "$ac_ct_CC"; then
3758 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3759else
3760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 $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 +00003769 break 2
3770 fi
3771done
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003774
3775fi
3776fi
3777ac_ct_CC=$ac_cv_prog_ac_ct_CC
3778if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3780$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3783$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003784fi
3785
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786 if test "x$ac_ct_CC" = x; then
3787 CC=""
3788 else
3789 case $cross_compiling:$ac_tool_warned in
3790yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793ac_tool_warned=yes ;;
3794esac
3795 CC=$ac_ct_CC
3796 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
3798 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003799fi
3800
Jack Jansendd19cf82001-12-06 22:36:17 +00003801if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 if test -n "$ac_tool_prefix"; then
3803 # 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 +00003804set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3806$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003807if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003809else
3810 if test -n "$CC"; then
3811 ac_cv_prog_CC="$CC" # Let the user override the test.
3812else
Martin v. Löwis11437992002-04-12 09:54:03 +00003813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3814for as_dir in $PATH
3815do
3816 IFS=$as_save_IFS
3817 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003820 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003821 $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 +00003822 break 2
3823 fi
3824done
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828fi
3829fi
3830CC=$ac_cv_prog_CC
3831if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3833$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834else
Matthias Kloseb9621712010-04-24 17:59:49 +00003835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3836$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
3838
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003841fi
3842if test -z "$CC"; then
3843 # Extract the first word of "cc", so it can be a program name with args.
3844set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3846$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003847if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003849else
3850 if test -n "$CC"; then
3851 ac_cv_prog_CC="$CC" # Let the user override the test.
3852else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003853 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3855for as_dir in $PATH
3856do
3857 IFS=$as_save_IFS
3858 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003860 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3862 ac_prog_rejected=yes
3863 continue
3864 fi
3865 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 $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 +00003867 break 2
3868 fi
3869done
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003873if test $ac_prog_rejected = yes; then
3874 # We found a bogon in the path, so make sure we never use it.
3875 set dummy $ac_cv_prog_CC
3876 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003878 # We chose a different compiler from the bogus one.
3879 # However, it has the same basename, so the bogon will be chosen
3880 # first if we set CC to just the basename; use the full file name.
3881 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003882 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003883 fi
3884fi
3885fi
3886fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003887CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3890$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003891else
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3893$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894fi
3895
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896
Martin v. Löwis11437992002-04-12 09:54:03 +00003897fi
3898if test -z "$CC"; then
3899 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 do
3902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3903set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3905$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003906if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003907 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003908else
3909 if test -n "$CC"; then
3910 ac_cv_prog_CC="$CC" # Let the user override the test.
3911else
Martin v. Löwis11437992002-04-12 09:54:03 +00003912as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913for as_dir in $PATH
3914do
3915 IFS=$as_save_IFS
3916 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003919 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 $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 +00003921 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003922 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003923done
Matthias Kloseb9621712010-04-24 17:59:49 +00003924 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003926
3927fi
3928fi
3929CC=$ac_cv_prog_CC
3930if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3932$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003933else
Matthias Kloseb9621712010-04-24 17:59:49 +00003934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003936fi
3937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 test -n "$CC" && break
3940 done
3941fi
3942if test -z "$CC"; then
3943 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003945do
3946 # Extract the first word of "$ac_prog", so it can be a program name with args.
3947set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3949$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003950if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003952else
3953 if test -n "$ac_ct_CC"; then
3954 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3955else
3956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957for as_dir in $PATH
3958do
3959 IFS=$as_save_IFS
3960 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 $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 +00003965 break 2
3966 fi
3967done
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003970
Martin v. Löwis11437992002-04-12 09:54:03 +00003971fi
3972fi
3973ac_ct_CC=$ac_cv_prog_ac_ct_CC
3974if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3976$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003977else
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003980fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003981
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003982
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 test -n "$ac_ct_CC" && break
3984done
Michael W. Hudson54241132001-12-07 15:38:26 +00003985
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986 if test "x$ac_ct_CC" = x; then
3987 CC=""
3988 else
3989 case $cross_compiling:$ac_tool_warned in
3990yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3992$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993ac_tool_warned=yes ;;
3994esac
3995 CC=$ac_ct_CC
3996 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003997fi
3998
3999fi
4000
4001
Matthias Kloseb9621712010-04-24 17:59:49 +00004002test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4003$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004004as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004005See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004006
4007# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004008$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4009set X $ac_compile
4010ac_compiler=$2
4011for ac_option in --version -v -V -qversion; do
4012 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004013case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4018$as_echo "$ac_try_echo"; } >&5
4019 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 if test -s conftest.err; then
4022 sed '10a\
4023... rest of stderr output deleted ...
4024 10q' conftest.err >conftest.er1
4025 cat conftest.er1 >&5
4026 fi
4027 rm -f conftest.er1 conftest.err
4028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4029 test $ac_status = 0; }
4030done
Martin v. Löwis11437992002-04-12 09:54:03 +00004031
Matthias Kloseb9621712010-04-24 17:59:49 +00004032cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004033/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004034
Martin v. Löwis11437992002-04-12 09:54:03 +00004035int
4036main ()
4037{
4038
4039 ;
4040 return 0;
4041}
4042_ACEOF
4043ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004044ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004045# Try to create an executable without -o first, disregard a.out.
4046# It will help us diagnose broken compilers, and finding out an intuition
4047# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4049$as_echo_n "checking whether the C compiler works... " >&6; }
4050ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4051
4052# The possible output files:
4053ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004055ac_rmfiles=
4056for ac_file in $ac_files
4057do
4058 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4061 esac
4062done
4063rm -f $ac_rmfiles
4064
Matthias Kloseb9621712010-04-24 17:59:49 +00004065if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4077# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4078# in a Makefile. We should not override ac_cv_exeext if it was cached,
4079# so that the user can short-circuit this test for compilers unknown to
4080# Autoconf.
4081for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004082do
4083 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004086 ;;
4087 [ab].out )
4088 # We found the default executable, but exeext='' is most
4089 # certainly right.
4090 break;;
4091 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004093 then :; else
4094 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4095 fi
4096 # We set ac_cv_exeext here because the later test for it is not
4097 # safe: cross compilers may not add the suffix if given an `-o'
4098 # argument, so we may need to know it at that point already.
4099 # Even if this section looks crufty: it has the advantage of
4100 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101 break;;
4102 * )
4103 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004104 esac
4105done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004106test "$ac_cv_exeext" = no && ac_cv_exeext=
4107
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004108else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 ac_file=''
4110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004111if test -z "$ac_file"; then :
4112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4113$as_echo "no" >&6; }
4114$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004115sed 's/^/| /' conftest.$ac_ext >&5
4116
Matthias Kloseb9621712010-04-24 17:59:49 +00004117{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004119as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004120See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004121else
4122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4123$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4126$as_echo_n "checking for C compiler default output file name... " >&6; }
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4128$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004129ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004130
Matthias Kloseb9621712010-04-24 17:59:49 +00004131rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004132ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4134$as_echo_n "checking for suffix of executables... " >&6; }
4135if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004136case "(($ac_try" in
4137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4138 *) ac_try_echo=$ac_try;;
4139esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004140eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4141$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004143 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004144 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4145 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4147# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4148# work properly (i.e., refer to `conftest.exe'), while it won't with
4149# `rm'.
4150for ac_file in conftest.exe conftest conftest.*; do
4151 test -f "$ac_file" || continue
4152 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004154 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4155 break;;
4156 * ) break;;
4157 esac
4158done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159else
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4161$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004162as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004163See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004165rm -f conftest conftest$ac_cv_exeext
4166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4167$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004168
4169rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004170EXEEXT=$ac_cv_exeext
4171ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4173/* end confdefs.h. */
4174#include <stdio.h>
4175int
4176main ()
4177{
4178FILE *f = fopen ("conftest.out", "w");
4179 return ferror (f) || fclose (f) != 0;
4180
4181 ;
4182 return 0;
4183}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004185ac_clean_files="$ac_clean_files conftest.out"
4186# Check that the compiler produces executables we can run. If not, either
4187# the compiler is broken, or we cross compile.
4188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4189$as_echo_n "checking whether we are cross compiling... " >&6; }
4190if test "$cross_compiling" != yes; then
4191 { { ac_try="$ac_link"
4192case "(($ac_try" in
4193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4194 *) ac_try_echo=$ac_try;;
4195esac
4196eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4197$as_echo "$ac_try_echo"; } >&5
4198 (eval "$ac_link") 2>&5
4199 ac_status=$?
4200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4201 test $ac_status = 0; }
4202 if { ac_try='./conftest$ac_cv_exeext'
4203 { { case "(($ac_try" in
4204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4205 *) ac_try_echo=$ac_try;;
4206esac
4207eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4208$as_echo "$ac_try_echo"; } >&5
4209 (eval "$ac_try") 2>&5
4210 ac_status=$?
4211 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4212 test $ac_status = 0; }; }; then
4213 cross_compiling=no
4214 else
4215 if test "$cross_compiling" = maybe; then
4216 cross_compiling=yes
4217 else
4218 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004220as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004221If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004222See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004223 fi
4224 fi
4225fi
4226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4227$as_echo "$cross_compiling" >&6; }
4228
4229rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4230ac_clean_files=$ac_clean_files_save
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4232$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004233if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004234 $as_echo_n "(cached) " >&6
4235else
4236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004237/* end confdefs.h. */
4238
4239int
4240main ()
4241{
4242
4243 ;
4244 return 0;
4245}
4246_ACEOF
4247rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004248if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249case "(($ac_try" in
4250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4251 *) ac_try_echo=$ac_try;;
4252esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004253eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4254$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004257 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4258 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 for ac_file in conftest.o conftest.obj conftest.*; do
4260 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004263 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4264 break;;
4265 esac
4266done
4267else
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004269sed 's/^/| /' conftest.$ac_ext >&5
4270
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004273as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004274See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004275fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004276rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004277fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4279$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004280OBJEXT=$ac_cv_objext
4281ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4283$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004284if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004286else
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004289
Martin v. Löwis11437992002-04-12 09:54:03 +00004290int
4291main ()
4292{
4293#ifndef __GNUC__
4294 choke me
4295#endif
4296
4297 ;
4298 return 0;
4299}
4300_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004301if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 ac_compiler_gnu=yes
4303else
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004307ac_cv_c_compiler_gnu=$ac_compiler_gnu
4308
4309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4311$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4312if test $ac_compiler_gnu = yes; then
4313 GCC=yes
4314else
4315 GCC=
4316fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004317ac_test_CFLAGS=${CFLAGS+set}
4318ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4320$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004321if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004322 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004323else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324 ac_save_c_werror_flag=$ac_c_werror_flag
4325 ac_c_werror_flag=yes
4326 ac_cv_prog_cc_g=no
4327 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004330
Martin v. Löwis11437992002-04-12 09:54:03 +00004331int
4332main ()
4333{
4334
4335 ;
4336 return 0;
4337}
4338_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004339if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004340 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341else
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 CFLAGS=""
4343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004344/* end confdefs.h. */
4345
4346int
4347main ()
4348{
4349
4350 ;
4351 return 0;
4352}
4353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004354if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004355
Matthias Kloseb9621712010-04-24 17:59:49 +00004356else
4357 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360/* end confdefs.h. */
4361
4362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4378 ac_c_werror_flag=$ac_save_c_werror_flag
4379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4381$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004382if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004383 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004384elif test $ac_cv_prog_cc_g = yes; then
4385 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004386 CFLAGS="-g -O2"
4387 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004388 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389 fi
4390else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004391 if test "$GCC" = yes; then
4392 CFLAGS="-O2"
4393 else
4394 CFLAGS=
4395 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4398$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004399if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004400 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004401else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004402 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004403ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004405/* end confdefs.h. */
4406#include <stdarg.h>
4407#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004408struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004409/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4410struct buf { int x; };
4411FILE * (*rcsopen) (struct buf *, struct stat *, int);
4412static char *e (p, i)
4413 char **p;
4414 int i;
4415{
4416 return p[i];
4417}
4418static char *f (char * (*g) (char **, int), char **p, ...)
4419{
4420 char *s;
4421 va_list v;
4422 va_start (v,p);
4423 s = g (p, va_arg (v,int));
4424 va_end (v);
4425 return s;
4426}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004427
4428/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4429 function prototypes and stuff, but not '\xHH' hex character constants.
4430 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004431 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004432 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4433 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004434 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004435int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4436
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004437/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4438 inside strings and character constants. */
4439#define FOO(x) 'x'
4440int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4441
Skip Montanaro6dead952003-09-25 14:50:04 +00004442int test (int i, double x);
4443struct s1 {int (*f) (int a);};
4444struct s2 {int (*f) (double a);};
4445int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4446int argc;
4447char **argv;
4448int
4449main ()
4450{
4451return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4452 ;
4453 return 0;
4454}
4455_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004456for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4457 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004458do
4459 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004460 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004463rm -f core conftest.err conftest.$ac_objext
4464 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004465done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004467CC=$ac_save_CC
4468
4469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004470# AC_CACHE_VAL
4471case "x$ac_cv_prog_cc_c89" in
4472 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4474$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4477$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4481$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004482esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004483if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004484
Matthias Kloseb9621712010-04-24 17:59:49 +00004485fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004486
Martin v. Löwis11437992002-04-12 09:54:03 +00004487ac_ext=c
4488ac_cpp='$CPP $CPPFLAGS'
4489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4491ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004492
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004493ac_ext=c
4494ac_cpp='$CPP $CPPFLAGS'
4495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4497ac_compiler_gnu=$ac_cv_c_compiler_gnu
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4499$as_echo_n "checking how to run the C preprocessor... " >&6; }
4500# On Suns, sometimes $CPP names a directory.
4501if test -n "$CPP" && test -d "$CPP"; then
4502 CPP=
4503fi
4504if test -z "$CPP"; then
4505 if ${ac_cv_prog_CPP+:} false; then :
4506 $as_echo_n "(cached) " >&6
4507else
4508 # Double quotes because CPP needs to be expanded
4509 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4510 do
4511 ac_preproc_ok=false
4512for ac_c_preproc_warn_flag in '' yes
4513do
4514 # Use a header file that comes with gcc, so configuring glibc
4515 # with a fresh cross-compiler works.
4516 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4517 # <limits.h> exists even on freestanding compilers.
4518 # On the NeXT, cc -E runs the code through the compiler's parser,
4519 # not just through cpp. "Syntax error" is here to catch this case.
4520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4521/* end confdefs.h. */
4522#ifdef __STDC__
4523# include <limits.h>
4524#else
4525# include <assert.h>
4526#endif
4527 Syntax error
4528_ACEOF
4529if ac_fn_c_try_cpp "$LINENO"; then :
4530
4531else
4532 # Broken: fails on valid input.
4533continue
4534fi
4535rm -f conftest.err conftest.i conftest.$ac_ext
4536
4537 # OK, works on sane cases. Now check whether nonexistent headers
4538 # can be detected and how.
4539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4540/* end confdefs.h. */
4541#include <ac_nonexistent.h>
4542_ACEOF
4543if ac_fn_c_try_cpp "$LINENO"; then :
4544 # Broken: success on invalid input.
4545continue
4546else
4547 # Passes both tests.
4548ac_preproc_ok=:
4549break
4550fi
4551rm -f conftest.err conftest.i conftest.$ac_ext
4552
4553done
4554# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4555rm -f conftest.i conftest.err conftest.$ac_ext
4556if $ac_preproc_ok; then :
4557 break
4558fi
4559
4560 done
4561 ac_cv_prog_CPP=$CPP
4562
4563fi
4564 CPP=$ac_cv_prog_CPP
4565else
4566 ac_cv_prog_CPP=$CPP
4567fi
4568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4569$as_echo "$CPP" >&6; }
4570ac_preproc_ok=false
4571for ac_c_preproc_warn_flag in '' yes
4572do
4573 # Use a header file that comes with gcc, so configuring glibc
4574 # with a fresh cross-compiler works.
4575 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4576 # <limits.h> exists even on freestanding compilers.
4577 # On the NeXT, cc -E runs the code through the compiler's parser,
4578 # not just through cpp. "Syntax error" is here to catch this case.
4579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4580/* end confdefs.h. */
4581#ifdef __STDC__
4582# include <limits.h>
4583#else
4584# include <assert.h>
4585#endif
4586 Syntax error
4587_ACEOF
4588if ac_fn_c_try_cpp "$LINENO"; then :
4589
4590else
4591 # Broken: fails on valid input.
4592continue
4593fi
4594rm -f conftest.err conftest.i conftest.$ac_ext
4595
4596 # OK, works on sane cases. Now check whether nonexistent headers
4597 # can be detected and how.
4598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599/* end confdefs.h. */
4600#include <ac_nonexistent.h>
4601_ACEOF
4602if ac_fn_c_try_cpp "$LINENO"; then :
4603 # Broken: success on invalid input.
4604continue
4605else
4606 # Passes both tests.
4607ac_preproc_ok=:
4608break
4609fi
4610rm -f conftest.err conftest.i conftest.$ac_ext
4611
4612done
4613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4614rm -f conftest.i conftest.err conftest.$ac_ext
4615if $ac_preproc_ok; then :
4616
4617else
4618 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4620as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4621See \`config.log' for more details" "$LINENO" 5; }
4622fi
4623
4624ac_ext=c
4625ac_cpp='$CPP $CPPFLAGS'
4626ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4627ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4628ac_compiler_gnu=$ac_cv_c_compiler_gnu
4629
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4631$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4632if ${ac_cv_path_GREP+:} false; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 if test -z "$GREP"; then
4636 ac_path_GREP_found=false
4637 # Loop through the user's path and test for each of PROGNAME-LIST
4638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4640do
4641 IFS=$as_save_IFS
4642 test -z "$as_dir" && as_dir=.
4643 for ac_prog in grep ggrep; do
4644 for ac_exec_ext in '' $ac_executable_extensions; do
4645 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4646 as_fn_executable_p "$ac_path_GREP" || continue
4647# Check for GNU ac_path_GREP and select it if it is found.
4648 # Check for GNU $ac_path_GREP
4649case `"$ac_path_GREP" --version 2>&1` in
4650*GNU*)
4651 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4652*)
4653 ac_count=0
4654 $as_echo_n 0123456789 >"conftest.in"
4655 while :
4656 do
4657 cat "conftest.in" "conftest.in" >"conftest.tmp"
4658 mv "conftest.tmp" "conftest.in"
4659 cp "conftest.in" "conftest.nl"
4660 $as_echo 'GREP' >> "conftest.nl"
4661 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4662 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4663 as_fn_arith $ac_count + 1 && ac_count=$as_val
4664 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4665 # Best one so far, save it but keep looking for a better one
4666 ac_cv_path_GREP="$ac_path_GREP"
4667 ac_path_GREP_max=$ac_count
4668 fi
4669 # 10*(2^10) chars as input seems more than enough
4670 test $ac_count -gt 10 && break
4671 done
4672 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4673esac
4674
4675 $ac_path_GREP_found && break 3
4676 done
4677 done
4678 done
4679IFS=$as_save_IFS
4680 if test -z "$ac_cv_path_GREP"; then
4681 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4682 fi
4683else
4684 ac_cv_path_GREP=$GREP
4685fi
4686
4687fi
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4689$as_echo "$ac_cv_path_GREP" >&6; }
4690 GREP="$ac_cv_path_GREP"
4691
4692
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004693
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004694
4695
Matthias Kloseb9621712010-04-24 17:59:49 +00004696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4697$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004699# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004700if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004701 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004702
4703 case $withval in
4704 no) with_cxx_main=no
4705 MAINCC='$(CC)';;
4706 yes) with_cxx_main=yes
4707 MAINCC='$(CXX)';;
4708 *) with_cxx_main=yes
4709 MAINCC=$withval
4710 if test -z "$CXX"
4711 then
4712 CXX=$withval
4713 fi;;
4714 esac
4715else
4716
4717 with_cxx_main=no
4718 MAINCC='$(CC)'
4719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004720fi
4721
Matthias Kloseb9621712010-04-24 17:59:49 +00004722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4723$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724
4725preset_cxx="$CXX"
4726if test -z "$CXX"
4727then
4728 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729 gcc) if test -n "$ac_tool_prefix"; then
4730 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4731set dummy ${ac_tool_prefix}g++; ac_word=$2
4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4733$as_echo_n "checking for $ac_word... " >&6; }
4734if ${ac_cv_path_CXX+:} false; then :
4735 $as_echo_n "(cached) " >&6
4736else
4737 case $CXX in
4738 [\\/]* | ?:[\\/]*)
4739 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4740 ;;
4741 *)
4742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4743for as_dir in notfound
4744do
4745 IFS=$as_save_IFS
4746 test -z "$as_dir" && as_dir=.
4747 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004749 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4751 break 2
4752 fi
4753done
4754 done
4755IFS=$as_save_IFS
4756
4757 ;;
4758esac
4759fi
4760CXX=$ac_cv_path_CXX
4761if test -n "$CXX"; then
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4763$as_echo "$CXX" >&6; }
4764else
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769
4770fi
4771if test -z "$ac_cv_path_CXX"; then
4772 ac_pt_CXX=$CXX
4773 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004774set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4776$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777if ${ac_cv_path_ac_pt_CXX+:} false; then :
4778 $as_echo_n "(cached) " >&6
4779else
4780 case $ac_pt_CXX in
4781 [\\/]* | ?:[\\/]*)
4782 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4783 ;;
4784 *)
4785 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in notfound
4787do
4788 IFS=$as_save_IFS
4789 test -z "$as_dir" && as_dir=.
4790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4794 break 2
4795 fi
4796done
4797 done
4798IFS=$as_save_IFS
4799
4800 ;;
4801esac
4802fi
4803ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4804if test -n "$ac_pt_CXX"; then
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4806$as_echo "$ac_pt_CXX" >&6; }
4807else
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4809$as_echo "no" >&6; }
4810fi
4811
4812 if test "x$ac_pt_CXX" = x; then
4813 CXX="g++"
4814 else
4815 case $cross_compiling:$ac_tool_warned in
4816yes:)
4817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4819ac_tool_warned=yes ;;
4820esac
4821 CXX=$ac_pt_CXX
4822 fi
4823else
4824 CXX="$ac_cv_path_CXX"
4825fi
4826 ;;
4827 cc) if test -n "$ac_tool_prefix"; then
4828 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4829set dummy ${ac_tool_prefix}c++; ac_word=$2
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004832if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004833 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004834else
4835 case $CXX in
4836 [\\/]* | ?:[\\/]*)
4837 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4838 ;;
4839 *)
4840 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in notfound
4842do
4843 IFS=$as_save_IFS
4844 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004846 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004848 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004849 break 2
4850 fi
4851done
Matthias Kloseb9621712010-04-24 17:59:49 +00004852 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004853IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004855 ;;
4856esac
4857fi
4858CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004859if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4861$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004862else
Matthias Kloseb9621712010-04-24 17:59:49 +00004863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004866
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867
4868fi
4869if test -z "$ac_cv_path_CXX"; then
4870 ac_pt_CXX=$CXX
4871 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004872set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004876 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004877else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004878 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004879 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880 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 +00004881 ;;
4882 *)
4883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in notfound
4885do
4886 IFS=$as_save_IFS
4887 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004888 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004890 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004892 break 2
4893 fi
4894done
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004896IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004897
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004898 ;;
4899esac
4900fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004901ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4902if test -n "$ac_pt_CXX"; then
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4904$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004905else
Matthias Kloseb9621712010-04-24 17:59:49 +00004906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004909
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004910 if test "x$ac_pt_CXX" = x; then
4911 CXX="c++"
4912 else
4913 case $cross_compiling:$ac_tool_warned in
4914yes:)
4915{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4916$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4917ac_tool_warned=yes ;;
4918esac
4919 CXX=$ac_pt_CXX
4920 fi
4921else
4922 CXX="$ac_cv_path_CXX"
4923fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004924 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004925 clang|*/clang) if test -n "$ac_tool_prefix"; then
4926 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4927set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_CXX+:} false; then :
4931 $as_echo_n "(cached) " >&6
4932else
4933 case $CXX in
4934 [\\/]* | ?:[\\/]*)
4935 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4936 ;;
4937 *)
4938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in notfound
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004945 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
Ned Deilycbfb9a52012-06-23 16:02:19 -07004953 ;;
4954esac
4955fi
4956CXX=$ac_cv_path_CXX
4957if test -n "$CXX"; then
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4959$as_echo "$CXX" >&6; }
4960else
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004965
4966fi
4967if test -z "$ac_cv_path_CXX"; then
4968 ac_pt_CXX=$CXX
4969 # Extract the first word of "clang++", so it can be a program name with args.
4970set dummy clang++; ac_word=$2
4971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4972$as_echo_n "checking for $ac_word... " >&6; }
4973if ${ac_cv_path_ac_pt_CXX+:} false; then :
4974 $as_echo_n "(cached) " >&6
4975else
4976 case $ac_pt_CXX in
4977 [\\/]* | ?:[\\/]*)
4978 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4979 ;;
4980 *)
4981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4982for as_dir in notfound
4983do
4984 IFS=$as_save_IFS
4985 test -z "$as_dir" && as_dir=.
4986 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004988 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4990 break 2
4991 fi
4992done
4993 done
4994IFS=$as_save_IFS
4995
4996 ;;
4997esac
4998fi
4999ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5000if test -n "$ac_pt_CXX"; then
5001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5002$as_echo "$ac_pt_CXX" >&6; }
5003else
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5005$as_echo "no" >&6; }
5006fi
5007
5008 if test "x$ac_pt_CXX" = x; then
5009 CXX="clang++"
5010 else
5011 case $cross_compiling:$ac_tool_warned in
5012yes:)
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5014$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5015ac_tool_warned=yes ;;
5016esac
5017 CXX=$ac_pt_CXX
5018 fi
5019else
5020 CXX="$ac_cv_path_CXX"
5021fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005022 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005023 icc|*/icc) if test -n "$ac_tool_prefix"; then
5024 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5025set dummy ${ac_tool_prefix}icpc; ac_word=$2
5026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5027$as_echo_n "checking for $ac_word... " >&6; }
5028if ${ac_cv_path_CXX+:} false; then :
5029 $as_echo_n "(cached) " >&6
5030else
5031 case $CXX in
5032 [\\/]* | ?:[\\/]*)
5033 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5034 ;;
5035 *)
5036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in notfound
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
5041 for ac_exec_ext in '' $ac_executable_extensions; do
5042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5043 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5045 break 2
5046 fi
5047done
5048 done
5049IFS=$as_save_IFS
5050
5051 ;;
5052esac
5053fi
5054CXX=$ac_cv_path_CXX
5055if test -n "$CXX"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5057$as_echo "$CXX" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063
5064fi
5065if test -z "$ac_cv_path_CXX"; then
5066 ac_pt_CXX=$CXX
5067 # Extract the first word of "icpc", so it can be a program name with args.
5068set dummy icpc; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_ac_pt_CXX+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073else
5074 case $ac_pt_CXX in
5075 [\\/]* | ?:[\\/]*)
5076 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5077 ;;
5078 *)
5079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in notfound
5081do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
5084 for ac_exec_ext in '' $ac_executable_extensions; do
5085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 break 2
5089 fi
5090done
5091 done
5092IFS=$as_save_IFS
5093
5094 ;;
5095esac
5096fi
5097ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5098if test -n "$ac_pt_CXX"; then
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5100$as_echo "$ac_pt_CXX" >&6; }
5101else
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106 if test "x$ac_pt_CXX" = x; then
5107 CXX="icpc"
5108 else
5109 case $cross_compiling:$ac_tool_warned in
5110yes:)
5111{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5112$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5113ac_tool_warned=yes ;;
5114esac
5115 CXX=$ac_pt_CXX
5116 fi
5117else
5118 CXX="$ac_cv_path_CXX"
5119fi
5120 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121 esac
5122 if test "$CXX" = "notfound"
5123 then
5124 CXX=""
5125 fi
5126fi
5127if test -z "$CXX"
5128then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005129 if test -n "$ac_tool_prefix"; then
5130 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5131 do
5132 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5133set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5135$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005136if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005137 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005138else
5139 if test -n "$CXX"; then
5140 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5141else
5142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143for as_dir in $PATH
5144do
5145 IFS=$as_save_IFS
5146 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005147 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005149 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005151 break 2
5152 fi
5153done
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005155IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005156
5157fi
5158fi
5159CXX=$ac_cv_prog_CXX
5160if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5162$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005163else
Matthias Kloseb9621712010-04-24 17:59:49 +00005164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5165$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166fi
5167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005168
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005169 test -n "$CXX" && break
5170 done
5171fi
5172if test -z "$CXX"; then
5173 ac_ct_CXX=$CXX
5174 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5175do
5176 # Extract the first word of "$ac_prog", so it can be a program name with args.
5177set dummy $ac_prog; ac_word=$2
5178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5179$as_echo_n "checking for $ac_word... " >&6; }
5180if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5181 $as_echo_n "(cached) " >&6
5182else
5183 if test -n "$ac_ct_CXX"; then
5184 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5185else
5186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in $PATH
5188do
5189 IFS=$as_save_IFS
5190 test -z "$as_dir" && as_dir=.
5191 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005192 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005193 ac_cv_prog_ac_ct_CXX="$ac_prog"
5194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5195 break 2
5196 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005198 done
5199IFS=$as_save_IFS
5200
5201fi
5202fi
5203ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5204if test -n "$ac_ct_CXX"; then
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5206$as_echo "$ac_ct_CXX" >&6; }
5207else
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5209$as_echo "no" >&6; }
5210fi
5211
5212
5213 test -n "$ac_ct_CXX" && break
5214done
5215
5216 if test "x$ac_ct_CXX" = x; then
5217 CXX="notfound"
5218 else
5219 case $cross_compiling:$ac_tool_warned in
5220yes:)
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5222$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5223ac_tool_warned=yes ;;
5224esac
5225 CXX=$ac_ct_CXX
5226 fi
5227fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005228
5229 if test "$CXX" = "notfound"
5230 then
5231 CXX=""
5232 fi
5233fi
5234if test "$preset_cxx" != "$CXX"
5235then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005236 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005237
5238 By default, distutils will build C++ extension modules with \"$CXX\".
5239 If this is not intended, then set CXX on the configure command line.
5240 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005241$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005242
5243 By default, distutils will build C++ extension modules with \"$CXX\".
5244 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005245 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005246fi
5247
5248
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005249MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5250
5251
5252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5253$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5254cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005255#undef bfin
5256#undef cris
5257#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005258#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005259#undef hppa
5260#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005261#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005262#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005263#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005264#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265#undef unix
5266#if defined(__linux__)
5267# if defined(__x86_64__) && defined(__LP64__)
5268 x86_64-linux-gnu
5269# elif defined(__x86_64__) && defined(__ILP32__)
5270 x86_64-linux-gnux32
5271# elif defined(__i386__)
5272 i386-linux-gnu
5273# elif defined(__aarch64__) && defined(__AARCH64EL__)
5274# if defined(__ILP32__)
5275 aarch64_ilp32-linux-gnu
5276# else
5277 aarch64-linux-gnu
5278# endif
5279# elif defined(__aarch64__) && defined(__AARCH64EB__)
5280# if defined(__ILP32__)
5281 aarch64_be_ilp32-linux-gnu
5282# else
5283 aarch64_be-linux-gnu
5284# endif
5285# elif defined(__alpha__)
5286 alpha-linux-gnu
5287# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5288# if defined(__ARMEL__)
5289 arm-linux-gnueabihf
5290# else
5291 armeb-linux-gnueabihf
5292# endif
5293# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5294# if defined(__ARMEL__)
5295 arm-linux-gnueabi
5296# else
5297 armeb-linux-gnueabi
5298# endif
5299# elif defined(__hppa__)
5300 hppa-linux-gnu
5301# elif defined(__ia64__)
5302 ia64-linux-gnu
5303# elif defined(__m68k__) && !defined(__mcoldfire__)
5304 m68k-linux-gnu
5305# elif defined(__mips_hard_float) && defined(_MIPSEL)
5306# if _MIPS_SIM == _ABIO32
5307 mipsel-linux-gnu
5308# elif _MIPS_SIM == _ABIN32
5309 mips64el-linux-gnuabin32
5310# elif _MIPS_SIM == _ABI64
5311 mips64el-linux-gnuabi64
5312# else
5313# error unknown platform triplet
5314# endif
5315# elif defined(__mips_hard_float)
5316# if _MIPS_SIM == _ABIO32
5317 mips-linux-gnu
5318# elif _MIPS_SIM == _ABIN32
5319 mips64-linux-gnuabin32
5320# elif _MIPS_SIM == _ABI64
5321 mips64-linux-gnuabi64
5322# else
5323# error unknown platform triplet
5324# endif
5325# elif defined(__or1k__)
5326 or1k-linux-gnu
5327# elif defined(__powerpc__) && defined(__SPE__)
5328 powerpc-linux-gnuspe
5329# elif defined(__powerpc64__)
5330# if defined(__LITTLE_ENDIAN__)
5331 powerpc64le-linux-gnu
5332# else
5333 powerpc64-linux-gnu
5334# endif
5335# elif defined(__powerpc__)
5336 powerpc-linux-gnu
5337# elif defined(__s390x__)
5338 s390x-linux-gnu
5339# elif defined(__s390__)
5340 s390-linux-gnu
5341# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5342 sh4-linux-gnu
5343# elif defined(__sparc__) && defined(__arch64__)
5344 sparc64-linux-gnu
5345# elif defined(__sparc__)
5346 sparc-linux-gnu
5347# else
5348# error unknown platform triplet
5349# endif
5350#elif defined(__FreeBSD_kernel__)
5351# if defined(__LP64__)
5352 x86_64-kfreebsd-gnu
5353# elif defined(__i386__)
5354 i386-kfreebsd-gnu
5355# else
5356# error unknown platform triplet
5357# endif
5358#elif defined(__gnu_hurd__)
5359 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005360#elif defined(__APPLE__)
5361 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005362#else
5363# error unknown platform triplet
5364#endif
5365
5366EOF
5367
5368if $CPP conftest.c >conftest.out 2>/dev/null; then
5369 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5371$as_echo "$PLATFORM_TRIPLET" >&6; }
5372else
5373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5374$as_echo "none" >&6; }
5375fi
5376rm -f conftest.c conftest.out
5377
5378if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5379 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5380 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5381 fi
5382fi
5383PLATDIR=plat-$MACHDEP
5384
5385
5386
5387
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5389$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5390save_LDFLAGS="$LDFLAGS"
5391LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005392
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5394/* end confdefs.h. */
5395
5396int
5397main ()
5398{
5399
5400 ;
5401 return 0;
5402}
5403_ACEOF
5404if ac_fn_c_try_link "$LINENO"; then :
5405 NO_AS_NEEDED="-Wl,--no-as-needed"
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5407$as_echo "yes" >&6; }
5408else
5409 NO_AS_NEEDED=""
5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5411$as_echo "no" >&6; }
5412fi
5413rm -f core conftest.err conftest.$ac_objext \
5414 conftest$ac_exeext conftest.$ac_ext
5415LDFLAGS="$save_LDFLAGS"
5416
5417
5418
5419# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005420
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5422$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005423if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425else
5426 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5427 then ac_cv_path_EGREP="$GREP -E"
5428 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005429 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005430 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 # Loop through the user's path and test for each of PROGNAME-LIST
5432 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005433for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5434do
5435 IFS=$as_save_IFS
5436 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005437 for ac_prog in egrep; do
5438 for ac_exec_ext in '' $ac_executable_extensions; do
5439 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005440 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005441# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 # Check for GNU $ac_path_EGREP
5443case `"$ac_path_EGREP" --version 2>&1` in
5444*GNU*)
5445 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5446*)
5447 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005449 while :
5450 do
5451 cat "conftest.in" "conftest.in" >"conftest.tmp"
5452 mv "conftest.tmp" "conftest.in"
5453 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5456 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005458 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5459 # Best one so far, save it but keep looking for a better one
5460 ac_cv_path_EGREP="$ac_path_EGREP"
5461 ac_path_EGREP_max=$ac_count
5462 fi
5463 # 10*(2^10) chars as input seems more than enough
5464 test $ac_count -gt 10 && break
5465 done
5466 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5467esac
5468
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 $ac_path_EGREP_found && break 3
5470 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005471 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005472 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005473IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005474 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005475 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 +00005476 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005477else
5478 ac_cv_path_EGREP=$EGREP
5479fi
5480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005481 fi
5482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5484$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005485 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005486
5487
Matthias Kloseb9621712010-04-24 17:59:49 +00005488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5489$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005490if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005491 $as_echo_n "(cached) " >&6
5492else
5493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005495#include <stdlib.h>
5496#include <stdarg.h>
5497#include <string.h>
5498#include <float.h>
5499
5500int
5501main ()
5502{
5503
5504 ;
5505 return 0;
5506}
5507_ACEOF
5508if ac_fn_c_try_compile "$LINENO"; then :
5509 ac_cv_header_stdc=yes
5510else
5511 ac_cv_header_stdc=no
5512fi
5513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514
5515if test $ac_cv_header_stdc = yes; then
5516 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5518/* end confdefs.h. */
5519#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005520
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005521_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005522if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005523 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005524
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005525else
Matthias Kloseb9621712010-04-24 17:59:49 +00005526 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005527fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005528rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005529
Matthias Kloseb9621712010-04-24 17:59:49 +00005530fi
5531
5532if test $ac_cv_header_stdc = yes; then
5533 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5535/* end confdefs.h. */
5536#include <stdlib.h>
5537
5538_ACEOF
5539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5540 $EGREP "free" >/dev/null 2>&1; then :
5541
5542else
5543 ac_cv_header_stdc=no
5544fi
5545rm -f conftest*
5546
5547fi
5548
5549if test $ac_cv_header_stdc = yes; then
5550 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5551 if test "$cross_compiling" = yes; then :
5552 :
5553else
5554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5555/* end confdefs.h. */
5556#include <ctype.h>
5557#include <stdlib.h>
5558#if ((' ' & 0x0FF) == 0x020)
5559# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5560# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5561#else
5562# define ISLOWER(c) \
5563 (('a' <= (c) && (c) <= 'i') \
5564 || ('j' <= (c) && (c) <= 'r') \
5565 || ('s' <= (c) && (c) <= 'z'))
5566# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5567#endif
5568
5569#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5570int
5571main ()
5572{
5573 int i;
5574 for (i = 0; i < 256; i++)
5575 if (XOR (islower (i), ISLOWER (i))
5576 || toupper (i) != TOUPPER (i))
5577 return 2;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_run "$LINENO"; then :
5582
5583else
5584 ac_cv_header_stdc=no
5585fi
5586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5587 conftest.$ac_objext conftest.beam conftest.$ac_ext
5588fi
5589
5590fi
5591fi
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5593$as_echo "$ac_cv_header_stdc" >&6; }
5594if test $ac_cv_header_stdc = yes; then
5595
5596$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5597
5598fi
5599
5600# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5601for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5602 inttypes.h stdint.h unistd.h
5603do :
5604 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5605ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5606"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005607if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005608 cat >>confdefs.h <<_ACEOF
5609#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5610_ACEOF
5611
5612fi
5613
5614done
5615
5616
5617
5618 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 +02005619if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005620 MINIX=yes
5621else
5622 MINIX=
5623fi
5624
5625
5626 if test "$MINIX" = yes; then
5627
5628$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5629
5630
5631$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5632
5633
5634$as_echo "#define _MINIX 1" >>confdefs.h
5635
5636 fi
5637
5638
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5640$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005641if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005642 $as_echo_n "(cached) " >&6
5643else
5644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645/* end confdefs.h. */
5646
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005647# define __EXTENSIONS__ 1
5648 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005649int
5650main ()
5651{
5652
5653 ;
5654 return 0;
5655}
5656_ACEOF
5657if ac_fn_c_try_compile "$LINENO"; then :
5658 ac_cv_safe_to_define___extensions__=yes
5659else
5660 ac_cv_safe_to_define___extensions__=no
5661fi
5662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5663fi
5664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5665$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5666 test $ac_cv_safe_to_define___extensions__ = yes &&
5667 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5668
5669 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5670
5671 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5672
5673 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5674
5675 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5676
5677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679# Check for unsupported systems
5680case $ac_sys_system/$ac_sys_release in
5681atheos*|Linux*/1*)
5682 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5683 echo See README for details.
5684 exit 1;;
5685esac
5686
5687
Matthias Kloseb9621712010-04-24 17:59:49 +00005688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5689$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
5691# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005692if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 withval=$with_suffix;
5694 case $withval in
5695 no) EXEEXT=;;
5696 yes) EXEEXT=.exe;;
5697 *) EXEEXT=$withval;;
5698 esac
5699fi
5700
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5702$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
5704# Test whether we're running on a non-case-sensitive system, in which
5705# case we give a warning if no ext is given
5706
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5708$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709if test ! -d CaseSensitiveTestDir; then
5710mkdir CaseSensitiveTestDir
5711fi
5712
5713if test -d casesensitivetestdir
5714then
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5716$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 BUILDEXEEXT=.exe
5718else
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5720$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721 BUILDEXEEXT=$EXEEXT
5722fi
5723rmdir CaseSensitiveTestDir
5724
5725case $MACHDEP in
5726bsdos*)
5727 case $CC in
5728 gcc) CC="$CC -D_HAVE_BSDI";;
5729 esac;;
5730esac
5731
5732case $ac_sys_system in
5733hp*|HP*)
5734 case $CC in
5735 cc|*/cc) CC="$CC -Ae";;
5736 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737esac
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5741$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742if test -z "$LIBRARY"
5743then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005744 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5747$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748
5749# LDLIBRARY is the name of the library to link against (as opposed to the
5750# name of the library into which to insert object files). BLDLIBRARY is also
5751# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5752# is blank as the main program is not linked directly against LDLIBRARY.
5753# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5754# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5755# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5756# DLLLIBRARY is the shared (i.e., DLL) library.
5757#
5758# RUNSHARED is used to run shared python without installed libraries
5759#
5760# INSTSONAME is the name of the shared library that will be use to install
5761# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005762#
5763# LDVERSION is the shared library version number, normally the Python version
5764# with the ABI build flags appended.
5765
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766
5767
5768
5769
5770
5771
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005772
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773LDLIBRARY="$LIBRARY"
5774BLDLIBRARY='$(LDLIBRARY)'
5775INSTSONAME='$(LDLIBRARY)'
5776DLLLIBRARY=''
5777LDLIBRARYDIR=''
5778RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005779LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
5781# LINKCC is the command that links the python executable -- default is $(CC).
5782# If CXX is set, and if it is needed to link a main function that was
5783# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5784# python might then depend on the C++ runtime
5785# This is altered for AIX in order to build the export list before
5786# linking.
5787
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5789$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790if test -z "$LINKCC"
5791then
5792 LINKCC='$(PURIFY) $(MAINCC)'
5793 case $ac_sys_system in
5794 AIX*)
5795 exp_extra="\"\""
5796 if test $ac_sys_release -ge 5 -o \
5797 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5798 exp_extra="."
5799 fi
5800 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 QNX*)
5802 # qcc must be used because the other compilers do not
5803 # support -N.
5804 LINKCC=qcc;;
5805 esac
5806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5808$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809
5810# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5811# make sure we default having it set to "no": this is used by
5812# distutils.unixccompiler to know if it should add --enable-new-dtags
5813# to linker command lines, and failing to detect GNU ld simply results
5814# in the same bahaviour as before.
5815
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5817$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818ac_prog=ld
5819if test "$GCC" = yes; then
5820 ac_prog=`$CC -print-prog-name=ld`
5821fi
5822case `"$ac_prog" -V 2>&1 < /dev/null` in
5823 *GNU*)
5824 GNULD=yes;;
5825 *)
5826 GNULD=no;;
5827esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5829$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5832$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005833if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005834 $as_echo_n "(cached) " >&6
5835else
5836 ac_cv_c_inline=no
5837for ac_kw in inline __inline__ __inline; do
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839/* end confdefs.h. */
5840#ifndef __cplusplus
5841typedef int foo_t;
5842static $ac_kw foo_t static_foo () {return 0; }
5843$ac_kw foo_t foo () {return 0; }
5844#endif
5845
5846_ACEOF
5847if ac_fn_c_try_compile "$LINENO"; then :
5848 ac_cv_c_inline=$ac_kw
5849fi
5850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5851 test "$ac_cv_c_inline" != no && break
5852done
5853
5854fi
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5856$as_echo "$ac_cv_c_inline" >&6; }
5857
5858case $ac_cv_c_inline in
5859 inline | yes) ;;
5860 *)
5861 case $ac_cv_c_inline in
5862 no) ac_val=;;
5863 *) ac_val=$ac_cv_c_inline;;
5864 esac
5865 cat >>confdefs.h <<_ACEOF
5866#ifndef __cplusplus
5867#define inline $ac_val
5868#endif
5869_ACEOF
5870 ;;
5871esac
5872
5873if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005874
5875$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005876
5877
5878fi
5879
5880
Matthias Kloseb9621712010-04-24 17:59:49 +00005881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5882$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005884if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 enableval=$enable_shared;
5886fi
5887
5888
5889if test -z "$enable_shared"
5890then
5891 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005892 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 enable_shared="yes";;
5894 *)
5895 enable_shared="no";;
5896 esac
5897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5899$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900
Matthias Kloseb9621712010-04-24 17:59:49 +00005901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5902$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005904if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005905 enableval=$enable_profiling;
5906fi
5907
5908if test "x$enable_profiling" = xyes; then
5909 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005910 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912/* end confdefs.h. */
5913int main() { return 0; }
5914_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005915if ac_fn_c_try_link "$LINENO"; then :
5916
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005918 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005920rm -f core conftest.err conftest.$ac_objext \
5921 conftest$ac_exeext conftest.$ac_ext
5922 CC="$ac_save_cc"
5923else
5924 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5927$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928
doko@ubuntu.comba015832012-06-30 16:52:05 +02005929if test "x$enable_profiling" = xyes; then
5930 BASECFLAGS="-pg $BASECFLAGS"
5931 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932fi
5933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5935$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
5937# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5938# library that we build, but we do not want to link against it (we
5939# will find it with a -framework option). For this reason there is an
5940# extra variable BLDLIBRARY against which Python and the extension
5941# modules are linked, BLDLIBRARY. This is normally the same as
5942# LDLIBRARY, but empty for MacOSX framework builds.
5943if test "$enable_framework"
5944then
5945 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005946 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947 BLDLIBRARY=''
5948else
5949 BLDLIBRARY='$(LDLIBRARY)'
5950fi
5951
5952# Other platforms follow
5953if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005954 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955
Matthias Kloseb9621712010-04-24 17:59:49 +00005956$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957
5958 case $ac_sys_system in
5959 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005960 LDLIBRARY='libpython$(LDVERSION).dll.a'
5961 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005964 LDLIBRARY='libpython$(LDVERSION).so'
5965 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005966 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005967 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005968 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005969 then
5970 PY3LIBRARY=libpython3.so
5971 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005973 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005974 LDLIBRARY='libpython$(LDVERSION).so'
5975 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005976 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005978 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005979 then
5980 PY3LIBRARY=libpython3.so
5981 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005982 ;;
5983 hp*|HP*)
5984 case `uname -m` in
5985 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005986 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005987 ;;
5988 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005989 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005990 ;;
5991 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005992 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005993 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005996 LDLIBRARY='libpython$(LDVERSION).dylib'
5997 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005998 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005999 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006000 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006001 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006002 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006003 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
6005 esac
6006else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006007 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008 case $ac_sys_system in
6009 CYGWIN*)
6010 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006011 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012 ;;
6013 esac
6014fi
6015
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006016if test "$cross_compiling" = yes; then
6017 RUNSHARED=
6018fi
6019
Matthias Kloseb9621712010-04-24 17:59:49 +00006020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6021$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006022
6023if test -n "$ac_tool_prefix"; then
6024 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6025set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6027$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006028if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006030else
6031 if test -n "$RANLIB"; then
6032 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6033else
6034as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037 IFS=$as_save_IFS
6038 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006039 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 break 2
6044 fi
6045done
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047IFS=$as_save_IFS
6048
6049fi
6050fi
6051RANLIB=$ac_cv_prog_RANLIB
6052if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6054$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055else
Matthias Kloseb9621712010-04-24 17:59:49 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058fi
6059
6060
6061fi
6062if test -z "$ac_cv_prog_RANLIB"; then
6063 ac_ct_RANLIB=$RANLIB
6064 # Extract the first word of "ranlib", so it can be a program name with args.
6065set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6067$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006068if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070else
6071 if test -n "$ac_ct_RANLIB"; then
6072 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6073else
6074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077 IFS=$as_save_IFS
6078 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006083 break 2
6084 fi
6085done
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087IFS=$as_save_IFS
6088
6089fi
6090fi
6091ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6092if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6094$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095else
Matthias Kloseb9621712010-04-24 17:59:49 +00006096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6097$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098fi
6099
6100 if test "x$ac_ct_RANLIB" = x; then
6101 RANLIB=":"
6102 else
6103 case $cross_compiling:$ac_tool_warned in
6104yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107ac_tool_warned=yes ;;
6108esac
6109 RANLIB=$ac_ct_RANLIB
6110 fi
6111else
6112 RANLIB="$ac_cv_prog_RANLIB"
6113fi
6114
6115
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006116if test -n "$ac_tool_prefix"; then
6117 for ac_prog in ar aal
6118 do
6119 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6120set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6122$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006123if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125else
6126 if test -n "$AR"; then
6127 ac_cv_prog_AR="$AR" # Let the user override the test.
6128else
6129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6130for as_dir in $PATH
6131do
6132 IFS=$as_save_IFS
6133 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006135 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006136 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006137 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006138 break 2
6139 fi
6140done
Matthias Kloseb9621712010-04-24 17:59:49 +00006141 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006142IFS=$as_save_IFS
6143
6144fi
6145fi
6146AR=$ac_cv_prog_AR
6147if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6149$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006150else
Matthias Kloseb9621712010-04-24 17:59:49 +00006151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6152$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153fi
6154
6155
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006156 test -n "$AR" && break
6157 done
6158fi
6159if test -z "$AR"; then
6160 ac_ct_AR=$AR
6161 for ac_prog in ar aal
6162do
6163 # Extract the first word of "$ac_prog", so it can be a program name with args.
6164set dummy $ac_prog; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_prog_ac_ct_AR+:} false; then :
6168 $as_echo_n "(cached) " >&6
6169else
6170 if test -n "$ac_ct_AR"; then
6171 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6172else
6173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
6178 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006180 ac_cv_prog_ac_ct_AR="$ac_prog"
6181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6182 break 2
6183 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006185 done
6186IFS=$as_save_IFS
6187
6188fi
6189fi
6190ac_ct_AR=$ac_cv_prog_ac_ct_AR
6191if test -n "$ac_ct_AR"; then
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6193$as_echo "$ac_ct_AR" >&6; }
6194else
6195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196$as_echo "no" >&6; }
6197fi
6198
6199
6200 test -n "$ac_ct_AR" && break
6201done
6202
6203 if test "x$ac_ct_AR" = x; then
6204 AR="ar"
6205 else
6206 case $cross_compiling:$ac_tool_warned in
6207yes:)
6208{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6209$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6210ac_tool_warned=yes ;;
6211esac
6212 AR=$ac_ct_AR
6213 fi
6214fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006215
6216
6217# tweak ARFLAGS only if the user didn't set it on the command line
6218
6219if test -z "$ARFLAGS"
6220then
6221 ARFLAGS="rc"
6222fi
6223
doko@ubuntu.com58844492012-06-30 18:25:32 +02006224if test -n "$ac_tool_prefix"; then
6225 for ac_prog in readelf
6226 do
6227 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6228set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230$as_echo_n "checking for $ac_word... " >&6; }
6231if ${ac_cv_prog_READELF+:} false; then :
6232 $as_echo_n "(cached) " >&6
6233else
6234 if test -n "$READELF"; then
6235 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6236else
6237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238for as_dir in $PATH
6239do
6240 IFS=$as_save_IFS
6241 test -z "$as_dir" && as_dir=.
6242 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006243 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006244 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6245 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246 break 2
6247 fi
6248done
6249 done
6250IFS=$as_save_IFS
6251
6252fi
6253fi
6254READELF=$ac_cv_prog_READELF
6255if test -n "$READELF"; then
6256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6257$as_echo "$READELF" >&6; }
6258else
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6260$as_echo "no" >&6; }
6261fi
6262
6263
6264 test -n "$READELF" && break
6265 done
6266fi
6267if test -z "$READELF"; then
6268 ac_ct_READELF=$READELF
6269 for ac_prog in readelf
6270do
6271 # Extract the first word of "$ac_prog", so it can be a program name with args.
6272set dummy $ac_prog; ac_word=$2
6273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6274$as_echo_n "checking for $ac_word... " >&6; }
6275if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6276 $as_echo_n "(cached) " >&6
6277else
6278 if test -n "$ac_ct_READELF"; then
6279 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6280else
6281as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282for as_dir in $PATH
6283do
6284 IFS=$as_save_IFS
6285 test -z "$as_dir" && as_dir=.
6286 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006288 ac_cv_prog_ac_ct_READELF="$ac_prog"
6289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6290 break 2
6291 fi
6292done
6293 done
6294IFS=$as_save_IFS
6295
6296fi
6297fi
6298ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6299if test -n "$ac_ct_READELF"; then
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6301$as_echo "$ac_ct_READELF" >&6; }
6302else
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304$as_echo "no" >&6; }
6305fi
6306
6307
6308 test -n "$ac_ct_READELF" && break
6309done
6310
6311 if test "x$ac_ct_READELF" = x; then
6312 READELF=":"
6313 else
6314 case $cross_compiling:$ac_tool_warned in
6315yes:)
6316{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6317$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6318ac_tool_warned=yes ;;
6319esac
6320 READELF=$ac_ct_READELF
6321 fi
6322fi
6323
6324if test "$cross_compiling" = yes; then
6325 case "$READELF" in
6326 readelf|:)
6327 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6328 ;;
6329 esac
6330fi
6331
6332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006334case $MACHDEP in
6335bsdos*|hp*|HP*)
6336 # install -d does not work on BSDI or HP-UX
6337 if test -z "$INSTALL"
6338 then
6339 INSTALL="${srcdir}/install-sh -c"
6340 fi
6341esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006342# Find a good install program. We prefer a C program (faster),
6343# so one script is as good as another. But avoid the broken or
6344# incompatible versions:
6345# SysV /etc/install, /usr/sbin/install
6346# SunOS /usr/etc/install
6347# IRIX /sbin/install
6348# AIX /bin/install
6349# AmigaOS /C/install, which installs bootblocks on floppy discs
6350# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6351# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6352# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6353# OS/2's system install, which has a completely different semantic
6354# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006355# Reject install programs that cannot install multiple files.
6356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6357$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006358if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006359if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006360 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006361else
6362 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6363for as_dir in $PATH
6364do
6365 IFS=$as_save_IFS
6366 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006367 # Account for people who put trailing slashes in PATH elements.
6368case $as_dir/ in #((
6369 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006371 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372 /usr/ucb/* ) ;;
6373 *)
6374 # OSF1 and SCO ODT 3.0 have their own names for install.
6375 # Don't use installbsd from OSF since it installs stuff as root
6376 # by default.
6377 for ac_prog in ginstall scoinst install; do
6378 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006379 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 if test $ac_prog = install &&
6381 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6382 # AIX install. It has an incompatible calling convention.
6383 :
6384 elif test $ac_prog = install &&
6385 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6386 # program-specific install script used by HP pwplus--don't use.
6387 :
6388 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006389 rm -rf conftest.one conftest.two conftest.dir
6390 echo one > conftest.one
6391 echo two > conftest.two
6392 mkdir conftest.dir
6393 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6394 test -s conftest.one && test -s conftest.two &&
6395 test -s conftest.dir/conftest.one &&
6396 test -s conftest.dir/conftest.two
6397 then
6398 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6399 break 3
6400 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006401 fi
6402 fi
6403 done
6404 done
6405 ;;
6406esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006407
6408 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409IFS=$as_save_IFS
6410
Matthias Kloseb9621712010-04-24 17:59:49 +00006411rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412
6413fi
6414 if test "${ac_cv_path_install+set}" = set; then
6415 INSTALL=$ac_cv_path_install
6416 else
6417 # As a last resort, use the slow shell script. Don't cache a
6418 # value for INSTALL within a source directory, because that will
6419 # break other packages using the cache if that directory is
6420 # removed, or if the value is a relative name.
6421 INSTALL=$ac_install_sh
6422 fi
6423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6425$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
6427# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6428# It thinks the first close brace ends the variable substitution.
6429test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6430
6431test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6432
6433test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6434
Matthias Klose93a0ef12012-03-15 18:08:34 +01006435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6436$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6437if test -z "$MKDIR_P"; then
6438 if ${ac_cv_path_mkdir+:} false; then :
6439 $as_echo_n "(cached) " >&6
6440else
6441 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6443do
6444 IFS=$as_save_IFS
6445 test -z "$as_dir" && as_dir=.
6446 for ac_prog in mkdir gmkdir; do
6447 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006448 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006449 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6450 'mkdir (GNU coreutils) '* | \
6451 'mkdir (coreutils) '* | \
6452 'mkdir (fileutils) '4.1*)
6453 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6454 break 3;;
6455 esac
6456 done
6457 done
6458 done
6459IFS=$as_save_IFS
6460
6461fi
6462
6463 test -d ./--version && rmdir ./--version
6464 if test "${ac_cv_path_mkdir+set}" = set; then
6465 MKDIR_P="$ac_cv_path_mkdir -p"
6466 else
6467 # As a last resort, use the slow shell script. Don't cache a
6468 # value for MKDIR_P within a source directory, because that will
6469 # break other packages using the cache if that directory is
6470 # removed, or if the value is a relative name.
6471 MKDIR_P="$ac_install_sh -d"
6472 fi
6473fi
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6475$as_echo "$MKDIR_P" >&6; }
6476
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477
6478# Not every filesystem supports hard links
6479
6480if test -z "$LN" ; then
6481 case $ac_sys_system in
6482 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483 *) LN=ln;;
6484 esac
6485fi
6486
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006487# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006488
6489ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006490
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006491# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6493$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494
6495# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006496if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006497 withval=$with_pydebug;
6498if test "$withval" != no
6499then
6500
Matthias Kloseb9621712010-04-24 17:59:49 +00006501$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006502
Matthias Kloseb9621712010-04-24 17:59:49 +00006503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6504$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006505 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006506 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006507else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006509fi
6510else
Matthias Kloseb9621712010-04-24 17:59:49 +00006511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6512$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513fi
6514
6515
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006516# Enable LTO flags
6517
6518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6519$as_echo_n "checking for --with-lto... " >&6; }
6520
6521# Check whether --with-lto was given.
6522if test "${with_lto+set}" = set; then :
6523 withval=$with_lto;
6524if test "$withval" != no
6525then
6526 Py_LTO='true'
6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6528$as_echo "yes" >&6; };
6529else
6530 Py_LTO='false'
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; };
6533fi
6534else
6535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6536$as_echo "no" >&6; }
6537fi
6538
6539if test "$Py_LTO" = 'true' ; then
6540 case $CC in
6541 *clang*)
6542 # Any changes made here should be reflected in the GCC+Darwin case below
6543 LTOFLAGS="-flto"
6544 ;;
6545 *gcc*)
6546 case $ac_sys_system in
6547 Darwin*)
6548 LTOFLAGS="-flto"
6549 ;;
6550 *)
6551 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6552 ;;
6553 esac
6554 ;;
6555 esac
6556fi
6557
Brett Cannon7188a3e2015-09-18 15:13:44 -07006558# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006559
6560
6561
6562
6563
6564
Brett Cannon7188a3e2015-09-18 15:13:44 -07006565# Extract the first word of "llvm-profdata", so it can be a program name with args.
6566set dummy llvm-profdata; ac_word=$2
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6568$as_echo_n "checking for $ac_word... " >&6; }
6569if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6570 $as_echo_n "(cached) " >&6
6571else
6572 if test -n "$LLVM_PROF_FOUND"; then
6573 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6574else
6575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576for as_dir in $PATH
6577do
6578 IFS=$as_save_IFS
6579 test -z "$as_dir" && as_dir=.
6580 for ac_exec_ext in '' $ac_executable_extensions; do
6581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6582 ac_cv_prog_LLVM_PROF_FOUND="found"
6583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6584 break 2
6585 fi
6586done
6587 done
6588IFS=$as_save_IFS
6589
6590 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6591fi
6592fi
6593LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6594if test -n "$LLVM_PROF_FOUND"; then
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6596$as_echo "$LLVM_PROF_FOUND" >&6; }
6597else
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602
6603LLVM_PROF_ERR=no
6604case $CC in
6605 *clang*)
6606 # Any changes made here should be reflected in the GCC+Darwin case below
6607 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6608 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6609 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6610 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6611 if test $LLVM_PROF_FOUND = not-found
6612 then
6613 LLVM_PROF_ERR=yes
6614 fi
6615 ;;
6616 *gcc*)
6617 case $ac_sys_system in
6618 Darwin*)
6619 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6620 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6621 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6622 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6623 if test $LLVM_PROF_FOUND = not-found
6624 then
6625 LLVM_PROF_ERR=yes
6626 fi
6627 ;;
6628 *)
6629 PGO_PROF_GEN_FLAG="-fprofile-generate"
6630 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6631 LLVM_PROF_MERGER="true"
6632 LLVM_PROF_FILE=""
6633 ;;
6634 esac
6635 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006636 *icc*)
6637 PGO_PROF_GEN_FLAG="-prof-gen"
6638 PGO_PROF_USE_FLAG="-prof-use"
6639 LLVM_PROF_MERGER="true"
6640 LLVM_PROF_FILE=""
6641 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642esac
6643
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6645# merged with this chunk of code?
6646
6647# Optimizer/debugger flags
6648# ------------------------
6649# (The following bit of code is complicated enough - please keep things
6650# indented properly. Just pretend you're editing Python code. ;-)
6651
6652# There are two parallel sets of case statements below, one that checks to
6653# see if OPT was set and one that does BASECFLAGS setting based upon
6654# compiler and platform. BASECFLAGS tweaks need to be made even if the
6655# user set OPT.
6656
6657# tweak OPT based on compiler and platform, only if the user didn't set
6658# it on the command line
6659
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006660if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661then
6662 case $GCC in
6663 yes)
6664 if test "$CC" != 'g++' ; then
6665 STRICT_PROTO="-Wstrict-prototypes"
6666 fi
6667 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6668 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6669 WRAP="-fwrapv"
6670 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006671
6672 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006673 case $CC in
6674 *clang*) WRAP="-fwrapv"
6675 ;;
6676 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006677
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678 case $ac_cv_prog_cc_g in
6679 yes)
6680 if test "$Py_DEBUG" = 'true' ; then
6681 # Optimization messes up debuggers, so turn it off for
6682 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006683 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6684 OPT="-g -Og -Wall $STRICT_PROTO"
6685 else
6686 OPT="-g -O0 -Wall $STRICT_PROTO"
6687 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688 else
6689 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6690 fi
6691 ;;
6692 *)
6693 OPT="-O3 -Wall $STRICT_PROTO"
6694 ;;
6695 esac
6696 case $ac_sys_system in
6697 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6698 ;;
6699 esac
6700 ;;
6701
6702 *)
6703 OPT="-O"
6704 ;;
6705 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006706fi
6707
6708
6709
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711# The -arch flags for universal builds on OSX
6712UNIVERSAL_ARCH_FLAGS=
6713
6714
6715# tweak BASECFLAGS based on compiler and platform
6716case $GCC in
6717yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006718 # Python doesn't violate C99 aliasing rules, but older versions of
6719 # GCC produce warnings for legal Python code. Enable
6720 # -fno-strict-aliasing on versions of GCC that support but produce
6721 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6723$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724 ac_save_cc="$CC"
6725 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006726 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006727 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006728 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006729else
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006732
Matthias Kloseb159a552010-04-25 21:00:44 +00006733
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006734int
6735main ()
6736{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006737
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006738 ;
6739 return 0;
6740}
Matthias Kloseb159a552010-04-25 21:00:44 +00006741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006743if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006744
6745 CC="$ac_save_cc -fstrict-aliasing"
6746 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006748/* end confdefs.h. */
6749
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006750 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006751int
6752main ()
6753{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006754double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006755 ;
6756 return 0;
6757}
Matthias Kloseb159a552010-04-25 21:00:44 +00006758
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006760if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006761
6762 ac_cv_no_strict_aliasing=no
6763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764else
Matthias Kloseb159a552010-04-25 21:00:44 +00006765
6766 ac_cv_no_strict_aliasing=yes
6767
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006768fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006770
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006771else
Matthias Kloseb159a552010-04-25 21:00:44 +00006772
6773 ac_cv_no_strict_aliasing=no
6774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006777fi
6778
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006779 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6782$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006783 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784 then
6785 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6786 fi
6787
Zachary Ware5af85642015-12-21 12:09:17 -06006788 # ICC doesn't recognize the option, but only emits a warning
6789 ## XXX does it emit an unused result warning and can it be disabled?
6790 case "$CC" in
6791 *icc*)
6792 ac_cv_disable_unused_result_warning=no
6793 ;;
6794 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6796$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6797 ac_save_cc="$CC"
6798 CC="$CC -Wunused-result -Werror"
6799 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006800 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006801 $as_echo_n "(cached) " >&6
6802else
6803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6804/* end confdefs.h. */
6805
6806
6807int
6808main ()
6809{
6810
6811 ;
6812 return 0;
6813}
6814
6815_ACEOF
6816if ac_fn_c_try_compile "$LINENO"; then :
6817
6818 ac_cv_disable_unused_result_warning=yes
6819
6820else
6821
6822 ac_cv_disable_unused_result_warning=no
6823
6824fi
6825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6826fi
6827
6828 CFLAGS="$save_CFLAGS"
6829 CC="$ac_save_cc"
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6831$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006832 ;;
6833 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006834
6835 if test $ac_cv_disable_unused_result_warning = yes
6836 then
6837 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6838 fi
6839
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6841$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6842 ac_save_cc="$CC"
6843 CC="$CC -Werror=declaration-after-statement"
6844 save_CFLAGS="$CFLAGS"
6845 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6846 $as_echo_n "(cached) " >&6
6847else
6848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6849/* end confdefs.h. */
6850
6851
6852int
6853main ()
6854{
6855
6856 ;
6857 return 0;
6858}
6859
6860_ACEOF
6861if ac_fn_c_try_compile "$LINENO"; then :
6862
6863 ac_cv_declaration_after_statement_warning=yes
6864
6865else
6866
6867 ac_cv_declaration_after_statement_warning=no
6868
6869fi
6870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6871fi
6872
6873 CFLAGS="$save_CFLAGS"
6874 CC="$ac_save_cc"
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6876$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6877
6878 if test $ac_cv_declaration_after_statement_warning = yes
6879 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006880 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006881 fi
6882
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6884$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6885 ac_save_cc="$CC"
6886 CC="$CC -Wsign-compare"
6887 save_CFLAGS="$CFLAGS"
6888 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6889 $as_echo_n "(cached) " >&6
6890else
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892/* end confdefs.h. */
6893
6894
6895int
6896main ()
6897{
6898
6899 ;
6900 return 0;
6901}
6902
6903_ACEOF
6904if ac_fn_c_try_compile "$LINENO"; then :
6905
6906 ac_cv_enable_sign_compare_warning=yes
6907
6908else
6909
6910 ac_cv_enable_sign_compare_warning=no
6911
6912fi
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914fi
6915
6916 CFLAGS="$save_CFLAGS"
6917 CC="$ac_save_cc"
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6919$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6920
6921 if test $ac_cv_enable_sign_compare_warning = yes
6922 then
6923 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6924 fi
6925
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6927$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6928 ac_save_cc="$CC"
6929 CC="$CC -Wunreachable-code"
6930 save_CFLAGS="$CFLAGS"
6931 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6932 $as_echo_n "(cached) " >&6
6933else
6934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6935/* end confdefs.h. */
6936
6937
6938int
6939main ()
6940{
6941
6942 ;
6943 return 0;
6944}
6945
6946_ACEOF
6947if ac_fn_c_try_compile "$LINENO"; then :
6948
6949 ac_cv_enable_unreachable_code_warning=yes
6950
6951else
6952
6953 ac_cv_enable_unreachable_code_warning=no
6954
6955fi
6956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6957fi
6958
6959 CFLAGS="$save_CFLAGS"
6960 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006961
6962 # Don't enable unreachable code warning in debug mode, since it usually
6963 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006964 # Issue #24324: Unfortunately, the unreachable code warning does not work
6965 # correctly on gcc and has been silently removed from the compiler.
6966 # It is supported on clang but on OS X systems gcc may be an alias
6967 # for clang. Try to determine if the compiler is not really gcc and,
6968 # if so, only then enable the warning.
6969 if test $ac_cv_enable_unreachable_code_warning = yes && \
6970 test "$Py_DEBUG" != "true" && \
6971 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006972 then
6973 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006974 else
6975 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006976 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6978$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6981 # support. Without this, treatment of subnormals doesn't follow
6982 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006983 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 alpha*)
6985 BASECFLAGS="$BASECFLAGS -mieee"
6986 ;;
6987 esac
6988
6989 case $ac_sys_system in
6990 SCO_SV*)
6991 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6992 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006993
6994 # is there any other compiler on Darwin besides gcc?
6995 Darwin*)
6996 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6997 # used to be here, but non-Apple gcc doesn't accept them.
6998 if test "${CC}" = gcc
6999 then
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007001$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007002 case "${UNIVERSALSDK}" in
7003 */MacOSX10.4u.sdk)
7004 # Build using 10.4 SDK, force usage of gcc when the
7005 # compiler is gcc, otherwise the user will get very
7006 # confusing error messages when building on OSX 10.6
7007 CC=gcc-4.0
7008 CPP=cpp-4.0
7009 ;;
7010 esac
7011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007012$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007013 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007014
Ned Deily87adb6e2013-10-18 21:09:56 -07007015 if test "${enable_universalsdk}"
7016 then
7017 case "$UNIVERSAL_ARCHS" in
7018 32-bit)
7019 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7020 LIPO_32BIT_FLAGS=""
7021 ARCH_RUN_32BIT=""
7022 ;;
7023 64-bit)
7024 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7025 LIPO_32BIT_FLAGS=""
7026 ARCH_RUN_32BIT="true"
7027 ;;
7028 all)
7029 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7030 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7031 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7032 ;;
7033 intel)
7034 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7035 LIPO_32BIT_FLAGS="-extract i386"
7036 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7037 ;;
7038 intel-32)
7039 UNIVERSAL_ARCH_FLAGS="-arch i386"
7040 LIPO_32BIT_FLAGS=""
7041 ARCH_RUN_32BIT=""
7042 ;;
7043 3-way)
7044 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7045 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7046 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7047 ;;
7048 *)
7049 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7050 ;;
7051 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052
Ned Deily87adb6e2013-10-18 21:09:56 -07007053 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7054 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7055 if test "${UNIVERSALSDK}" != "/"
7056 then
7057 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7058 fi
7059 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007060
Ned Deily87adb6e2013-10-18 21:09:56 -07007061 # Calculate an appropriate deployment target for this build:
7062 # The deployment target value is used explicitly to enable certain
7063 # features are enabled (such as builtin libedit support for readline)
7064 # through the use of Apple's Availabiliy Macros and is used as a
7065 # component of the string returned by distutils.get_platform().
7066 #
7067 # Use the value from:
7068 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7069 # 2. the operating system version of the build machine if >= 10.6
7070 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7071 # below to pick either 10.3, 10.4, or 10.5 as the target.
7072 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007073
Ned Deily87adb6e2013-10-18 21:09:56 -07007074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7075$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007076 cur_target_major=`sw_vers -productVersion | \
7077 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7078 cur_target_minor=`sw_vers -productVersion | \
7079 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7080 cur_target="${cur_target_major}.${cur_target_minor}"
7081 if test ${cur_target_major} -eq 10 && \
7082 test ${cur_target_minor} -ge 3 && \
7083 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007084 then
Ned Deily36820b62014-06-25 13:44:22 -07007085 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007086 cur_target=10.3
7087 if test ${enable_universalsdk}
7088 then
7089 case "$UNIVERSAL_ARCHS" in
7090 all|3-way|intel|64-bit)
7091 # These configurations were first supported in 10.5
7092 cur_target='10.5'
7093 ;;
7094 esac
7095 else
7096 if test `/usr/bin/arch` = "i386"
7097 then
7098 # 10.4 was the first release to support Intel archs
7099 cur_target="10.4"
7100 fi
7101 fi
7102 fi
7103 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007104
Ned Deily87adb6e2013-10-18 21:09:56 -07007105 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7106 # environment with a value that is the same as what we'll use
7107 # in the Makefile to ensure that we'll get the same compiler
7108 # environment during configure and build time.
7109 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7110 export MACOSX_DEPLOYMENT_TARGET
7111 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7113$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007114
Ned Deily87adb6e2013-10-18 21:09:56 -07007115 # end of Darwin* tests
7116 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007117 esac
7118 ;;
7119
7120*)
7121 case $ac_sys_system in
7122 OpenUNIX*|UnixWare*)
7123 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7124 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007125 SCO_SV*)
7126 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7127 ;;
7128 esac
7129 ;;
7130esac
7131
Zachary Ware5af85642015-12-21 12:09:17 -06007132# ICC needs -fp-model strict or floats behave badly
7133case "$CC" in
7134*icc*)
7135 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7136 ;;
7137esac
7138
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007139if test "$Py_DEBUG" = 'true'; then
7140 :
7141else
7142 OPT="-DNDEBUG $OPT"
7143fi
7144
7145if test "$ac_arch_flags"
7146then
7147 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7148fi
7149
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007150# On some compilers, pthreads are available without further options
7151# (e.g. MacOS X). On some of these systems, the compiler will not
7152# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7153# So we have to see first whether pthreads are available without
7154# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7156$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007157if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007158 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007161 ac_cv_pthread_is_default=no
7162else
Matthias Kloseb9621712010-04-24 17:59:49 +00007163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164/* end confdefs.h. */
7165
Stefan Krah7dba5942012-11-22 22:49:11 +01007166#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007167#include <pthread.h>
7168
7169void* routine(void* p){return NULL;}
7170
7171int main(){
7172 pthread_t p;
7173 if(pthread_create(&p,NULL,routine,NULL)!=0)
7174 return 1;
7175 (void)pthread_detach(p);
7176 return 0;
7177}
7178
7179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007180if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007181
7182 ac_cv_pthread_is_default=yes
7183 ac_cv_kthread=no
7184 ac_cv_pthread=no
7185
7186else
Matthias Kloseb9621712010-04-24 17:59:49 +00007187 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191fi
7192
7193
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194fi
7195
Matthias Kloseb9621712010-04-24 17:59:49 +00007196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7197$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198
7199
7200if test $ac_cv_pthread_is_default = yes
7201then
7202 ac_cv_kpthread=no
7203else
7204# -Kpthread, if available, provides the right #defines
7205# and linker options to make pthread_create available
7206# Some compilers won't report that they do not support -Kpthread,
7207# so we need to run a program to see whether it really made the
7208# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7210$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007211if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213else
7214 ac_save_cc="$CC"
7215CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007216if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217 ac_cv_kpthread=no
7218else
Matthias Kloseb9621712010-04-24 17:59:49 +00007219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007220/* end confdefs.h. */
7221
Stefan Krah7dba5942012-11-22 22:49:11 +01007222#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223#include <pthread.h>
7224
7225void* routine(void* p){return NULL;}
7226
7227int main(){
7228 pthread_t p;
7229 if(pthread_create(&p,NULL,routine,NULL)!=0)
7230 return 1;
7231 (void)pthread_detach(p);
7232 return 0;
7233}
7234
7235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007236if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007237 ac_cv_kpthread=yes
7238else
Matthias Kloseb9621712010-04-24 17:59:49 +00007239 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7242 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243fi
7244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245CC="$ac_save_cc"
7246fi
7247
Matthias Kloseb9621712010-04-24 17:59:49 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7249$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007250fi
7251
7252if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7253then
7254# -Kthread, if available, provides the right #defines
7255# and linker options to make pthread_create available
7256# Some compilers won't report that they do not support -Kthread,
7257# so we need to run a program to see whether it really made the
7258# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7260$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007261if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007262 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007263else
7264 ac_save_cc="$CC"
7265CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007266if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267 ac_cv_kthread=no
7268else
Matthias Kloseb9621712010-04-24 17:59:49 +00007269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270/* end confdefs.h. */
7271
Stefan Krah7dba5942012-11-22 22:49:11 +01007272#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007273#include <pthread.h>
7274
7275void* routine(void* p){return NULL;}
7276
7277int main(){
7278 pthread_t p;
7279 if(pthread_create(&p,NULL,routine,NULL)!=0)
7280 return 1;
7281 (void)pthread_detach(p);
7282 return 0;
7283}
7284
7285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007286if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287 ac_cv_kthread=yes
7288else
Matthias Kloseb9621712010-04-24 17:59:49 +00007289 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007291rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7292 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007293fi
7294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007295CC="$ac_save_cc"
7296fi
7297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7299$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007300fi
7301
7302if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7303then
7304# -pthread, if available, provides the right #defines
7305# and linker options to make pthread_create available
7306# Some compilers won't report that they do not support -pthread,
7307# so we need to run a program to see whether it really made the
7308# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7310$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007311if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007312 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007313else
7314 ac_save_cc="$CC"
7315CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007316if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317 ac_cv_pthread=no
7318else
Matthias Kloseb9621712010-04-24 17:59:49 +00007319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320/* end confdefs.h. */
7321
Stefan Krah7dba5942012-11-22 22:49:11 +01007322#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323#include <pthread.h>
7324
7325void* routine(void* p){return NULL;}
7326
7327int main(){
7328 pthread_t p;
7329 if(pthread_create(&p,NULL,routine,NULL)!=0)
7330 return 1;
7331 (void)pthread_detach(p);
7332 return 0;
7333}
7334
7335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007336if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337 ac_cv_pthread=yes
7338else
Matthias Kloseb9621712010-04-24 17:59:49 +00007339 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7342 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343fi
7344
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345CC="$ac_save_cc"
7346fi
7347
Matthias Kloseb9621712010-04-24 17:59:49 +00007348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7349$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350fi
7351
7352# If we have set a CC compiler flag for thread support then
7353# check if it works for CXX, too.
7354ac_cv_cxx_thread=no
7355if test ! -z "$CXX"
7356then
Matthias Kloseb9621712010-04-24 17:59:49 +00007357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7358$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007359ac_save_cxx="$CXX"
7360
7361if test "$ac_cv_kpthread" = "yes"
7362then
7363 CXX="$CXX -Kpthread"
7364 ac_cv_cxx_thread=yes
7365elif test "$ac_cv_kthread" = "yes"
7366then
7367 CXX="$CXX -Kthread"
7368 ac_cv_cxx_thread=yes
7369elif test "$ac_cv_pthread" = "yes"
7370then
7371 CXX="$CXX -pthread"
7372 ac_cv_cxx_thread=yes
7373fi
7374
7375if test $ac_cv_cxx_thread = yes
7376then
7377 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7378 $CXX -c conftest.$ac_ext 2>&5
7379 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7380 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7381 then
7382 ac_cv_cxx_thread=yes
7383 else
7384 ac_cv_cxx_thread=no
7385 fi
7386 rm -fr conftest*
7387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7389$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390fi
7391CXX="$ac_save_cxx"
7392
7393
7394# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7396$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007397if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007398 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399else
Matthias Kloseb9621712010-04-24 17:59:49 +00007400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401/* end confdefs.h. */
7402#include <stdlib.h>
7403#include <stdarg.h>
7404#include <string.h>
7405#include <float.h>
7406
7407int
7408main ()
7409{
7410
7411 ;
7412 return 0;
7413}
7414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007415if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416 ac_cv_header_stdc=yes
7417else
Matthias Kloseb9621712010-04-24 17:59:49 +00007418 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421
7422if test $ac_cv_header_stdc = yes; then
7423 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007425/* end confdefs.h. */
7426#include <string.h>
7427
7428_ACEOF
7429if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007430 $EGREP "memchr" >/dev/null 2>&1; then :
7431
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007432else
7433 ac_cv_header_stdc=no
7434fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007435rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436
7437fi
7438
7439if test $ac_cv_header_stdc = yes; then
7440 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007442/* end confdefs.h. */
7443#include <stdlib.h>
7444
7445_ACEOF
7446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007447 $EGREP "free" >/dev/null 2>&1; then :
7448
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449else
7450 ac_cv_header_stdc=no
7451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007452rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453
7454fi
7455
7456if test $ac_cv_header_stdc = yes; then
7457 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459 :
7460else
Matthias Kloseb9621712010-04-24 17:59:49 +00007461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462/* end confdefs.h. */
7463#include <ctype.h>
7464#include <stdlib.h>
7465#if ((' ' & 0x0FF) == 0x020)
7466# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7467# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7468#else
7469# define ISLOWER(c) \
7470 (('a' <= (c) && (c) <= 'i') \
7471 || ('j' <= (c) && (c) <= 'r') \
7472 || ('s' <= (c) && (c) <= 'z'))
7473# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7474#endif
7475
7476#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7477int
7478main ()
7479{
7480 int i;
7481 for (i = 0; i < 256; i++)
7482 if (XOR (islower (i), ISLOWER (i))
7483 || toupper (i) != TOUPPER (i))
7484 return 2;
7485 return 0;
7486}
7487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007488if ac_fn_c_try_run "$LINENO"; then :
7489
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490else
Matthias Kloseb9621712010-04-24 17:59:49 +00007491 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7494 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495fi
7496
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497fi
7498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7500$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501if test $ac_cv_header_stdc = yes; then
7502
Matthias Kloseb9621712010-04-24 17:59:49 +00007503$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
7505fi
7506
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007507for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007508fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007509ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007510sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007511unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007512poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007513sys/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 +01007514sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007515sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007516sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007517sys/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 -07007518libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007519bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007520sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007521do :
7522 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7523ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007524if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007525 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007526#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007527_ACEOF
7528
7529fi
7530
Guido van Rossum627b2d71993-12-24 10:39:16 +00007531done
7532
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007533ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007534for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7537$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007539 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007540else
Matthias Kloseb9621712010-04-24 17:59:49 +00007541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007542/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007543#include <sys/types.h>
7544#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546int
7547main ()
7548{
7549if ((DIR *) 0)
7550return 0;
7551 ;
7552 return 0;
7553}
7554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007555if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007557else
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562eval ac_res=\$$as_ac_Header
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7564$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007565if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007566 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007567#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007568_ACEOF
7569
7570ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007571fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007572
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007573done
7574# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7575if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7577$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007578if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007580else
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585/* Override any GCC internal prototype to avoid an error.
7586 Use char because int might match the return type of a GCC
7587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007588#ifdef __cplusplus
7589extern "C"
7590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007591char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007592int
7593main ()
7594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007596 ;
7597 return 0;
7598}
7599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007600for ac_lib in '' dir; do
7601 if test -z "$ac_lib"; then
7602 ac_res="none required"
7603 else
7604 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007605 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007606 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007610rm -f core conftest.err conftest.$ac_objext \
7611 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007612 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615done
Victor Stinnere0be4232011-10-25 13:06:09 +02007616if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007618else
7619 ac_cv_search_opendir=no
7620fi
7621rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007622LIBS=$ac_func_search_save_LIBS
7623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7625$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007626ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007627if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007630fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007631
Michael W. Hudson54241132001-12-07 15:38:26 +00007632else
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7634$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007635if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007636 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007637else
7638 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642/* Override any GCC internal prototype to avoid an error.
7643 Use char because int might match the return type of a GCC
7644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007645#ifdef __cplusplus
7646extern "C"
7647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007648char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007649int
7650main ()
7651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007652return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007653 ;
7654 return 0;
7655}
7656_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657for ac_lib in '' x; do
7658 if test -z "$ac_lib"; then
7659 ac_res="none required"
7660 else
7661 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007662 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007663 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007667rm -f core conftest.err conftest.$ac_objext \
7668 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007669 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672done
Victor Stinnere0be4232011-10-25 13:06:09 +02007673if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675else
7676 ac_cv_search_opendir=no
7677fi
7678rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007679LIBS=$ac_func_search_save_LIBS
7680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7682$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007684if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007685 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007686
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007687fi
7688
7689fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007690
Matthias Kloseb9621712010-04-24 17:59:49 +00007691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7692$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007693if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007694 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007695else
Matthias Kloseb9621712010-04-24 17:59:49 +00007696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007697/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007698#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007699int
7700main ()
7701{
7702return makedev(0, 0);
7703 ;
7704 return 0;
7705}
7706_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007708 ac_cv_header_sys_types_h_makedev=yes
7709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007712rm -f core conftest.err conftest.$ac_objext \
7713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007714
7715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7717$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007718
7719if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007720ac_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 +02007721if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007722
Matthias Kloseb9621712010-04-24 17:59:49 +00007723$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007724
7725fi
7726
7727
7728
7729 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 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 +02007731if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007732
Matthias Kloseb9621712010-04-24 17:59:49 +00007733$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007734
7735fi
7736
7737
7738 fi
7739fi
7740
Michael W. Hudson54241132001-12-07 15:38:26 +00007741
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007742# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7743for ac_header in net/if.h
7744do :
7745 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7746#ifdef STDC_HEADERS
7747# include <stdlib.h>
7748# include <stddef.h>
7749#else
7750# ifdef HAVE_STDLIB_H
7751# include <stdlib.h>
7752# endif
7753#endif
7754#ifdef HAVE_SYS_SOCKET_H
7755# include <sys/socket.h>
7756#endif
7757
7758"
Victor Stinnere0be4232011-10-25 13:06:09 +02007759if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007760 cat >>confdefs.h <<_ACEOF
7761#define HAVE_NET_IF_H 1
7762_ACEOF
7763
7764fi
7765
7766done
7767
7768
Martin v. Löwis11017b12006-01-14 18:12:57 +00007769# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007770for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007771do :
7772 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 +00007773#ifdef HAVE_ASM_TYPES_H
7774#include <asm/types.h>
7775#endif
7776#ifdef HAVE_SYS_SOCKET_H
7777#include <sys/socket.h>
7778#endif
7779
Matthias Kloseb9621712010-04-24 17:59:49 +00007780"
Victor Stinnere0be4232011-10-25 13:06:09 +02007781if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007782 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007783#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007784_ACEOF
7785
7786fi
7787
7788done
7789
7790
Charles-François Natali47413c12011-10-06 19:47:44 +02007791# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007792for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007793do :
7794 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7795ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7796#ifdef HAVE_SYS_SOCKET_H
7797#include <sys/socket.h>
7798#endif
7799
7800"
7801if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7802 cat >>confdefs.h <<_ACEOF
7803#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7804_ACEOF
7805
7806fi
7807
7808done
7809
7810
Guido van Rossum627b2d71993-12-24 10:39:16 +00007811# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007812was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7814$as_echo_n "checking for clock_t in time.h... " >&6; }
7815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007816/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007817#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007818
7819_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007822 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007823else
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
7825
Matthias Kloseb9621712010-04-24 17:59:49 +00007826$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007828
Guido van Rossum627b2d71993-12-24 10:39:16 +00007829fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007830rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007831
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7833$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007834
Matthias Kloseb9621712010-04-24 17:59:49 +00007835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7836$as_echo_n "checking for makedev... " >&6; }
7837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007838/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007839
Jesus Cea740f53a2010-04-28 11:35:30 +00007840#if defined(MAJOR_IN_MKDEV)
7841#include <sys/mkdev.h>
7842#elif defined(MAJOR_IN_SYSMACROS)
7843#include <sys/sysmacros.h>
7844#else
7845#include <sys/types.h>
7846#endif
7847
Neal Norwitz11690112002-07-30 01:08:28 +00007848int
7849main ()
7850{
Jesus Cea740f53a2010-04-28 11:35:30 +00007851
7852 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007853 ;
7854 return 0;
7855}
Matthias Kloseb159a552010-04-25 21:00:44 +00007856
Neal Norwitz11690112002-07-30 01:08:28 +00007857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007858if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007859 ac_cv_has_makedev=yes
7860else
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007863rm -f core conftest.err conftest.$ac_objext \
7864 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7866$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007867if test "$ac_cv_has_makedev" = "yes"; then
7868
Matthias Kloseb9621712010-04-24 17:59:49 +00007869$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007870
7871fi
7872
Christian Heimes985ecdc2013-11-20 11:46:18 +01007873# byte swapping
7874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7875$as_echo_n "checking for le64toh... " >&6; }
7876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7877/* end confdefs.h. */
7878
7879#ifdef HAVE_ENDIAN_H
7880#include <endian.h>
7881#elif defined(HAVE_SYS_ENDIAN_H)
7882#include <sys/endian.h>
7883#endif
7884
7885int
7886main ()
7887{
7888
7889 le64toh(1)
7890 ;
7891 return 0;
7892}
7893
7894_ACEOF
7895if ac_fn_c_try_link "$LINENO"; then :
7896 ac_cv_has_le64toh=yes
7897else
7898 ac_cv_has_le64toh=no
7899fi
7900rm -f core conftest.err conftest.$ac_objext \
7901 conftest$ac_exeext conftest.$ac_ext
7902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7903$as_echo "$ac_cv_has_le64toh" >&6; }
7904if test "$ac_cv_has_le64toh" = "yes"; then
7905
7906$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7907
7908fi
7909
Martin v. Löwis399a6892002-10-04 10:22:02 +00007910# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7911# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7912# defined, but the compiler does not support pragma redefine_extname,
7913# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7914# structures (such as rlimit64) without declaring them. As a
7915# work-around, disable LFS on such configurations
7916
7917use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7919$as_echo_n "checking Solaris LFS bug... " >&6; }
7920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007922
7923#define _LARGEFILE_SOURCE 1
7924#define _FILE_OFFSET_BITS 64
7925#include <sys/resource.h>
7926
Martin v. Löwis399a6892002-10-04 10:22:02 +00007927int
7928main ()
7929{
7930struct rlimit foo;
7931 ;
7932 return 0;
7933}
7934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007936 sol_lfs_bug=no
7937else
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007939fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7942$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007943if test "$sol_lfs_bug" = "yes"; then
7944 use_lfs=no
7945fi
7946
7947if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007948# Two defines needed to enable largefile support on various platforms
7949# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007950case $ac_sys_system/$ac_sys_release in
7951AIX*)
7952
7953$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7954
7955 ;;
7956esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007957
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007959
7960
Matthias Kloseb9621712010-04-24 17:59:49 +00007961$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007962
Martin v. Löwis399a6892002-10-04 10:22:02 +00007963fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007964
Guido van Rossum84e7b241996-08-19 21:59:00 +00007965# Add some code to confdefs.h so that the test for off_t works on SCO
7966cat >> confdefs.h <<\EOF
7967#if defined(SCO_DS)
7968#undef _OFF_T
7969#endif
7970EOF
7971
Guido van Rossumef2255b2000-03-10 22:30:29 +00007972# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007973ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007976else
Martin v. Löwis11437992002-04-12 09:54:03 +00007977
7978cat >>confdefs.h <<_ACEOF
7979#define mode_t int
7980_ACEOF
7981
7982fi
7983
Matthias Kloseb9621712010-04-24 17:59:49 +00007984ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007985if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007986
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007987else
Martin v. Löwis11437992002-04-12 09:54:03 +00007988
7989cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007991_ACEOF
7992
7993fi
7994
Matthias Kloseb9621712010-04-24 17:59:49 +00007995ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007996if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007997
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999
8000cat >>confdefs.h <<_ACEOF
8001#define pid_t int
8002_ACEOF
8003
8004fi
8005
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008006
Martin v. Löwis11437992002-04-12 09:54:03 +00008007cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008008#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008009_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008010
Matthias Kloseb9621712010-04-24 17:59:49 +00008011ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008012if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008013
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008014else
Martin v. Löwis11437992002-04-12 09:54:03 +00008015
8016cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008018_ACEOF
8019
8020fi
8021
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8023$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008024if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008026else
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008028/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008029#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008030
8031_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008033 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008034 ac_cv_type_uid_t=yes
8035else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008036 ac_cv_type_uid_t=no
8037fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008038rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8042$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008043if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008044
Matthias Kloseb9621712010-04-24 17:59:49 +00008045$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008046
8047
Matthias Kloseb9621712010-04-24 17:59:49 +00008048$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049
8050fi
8051
Mark Dickinson983bc162012-12-02 12:11:38 +00008052
8053# There are two separate checks for each of the exact-width integer types we
8054# need. First we check whether the type is available using the usual
8055# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8056# and <stdint.h> where available). We then also use the special type checks of
8057# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8058# directly, #define's uint32_t to be a suitable type.
8059
8060ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8061if test "x$ac_cv_type_uint32_t" = xyes; then :
8062
8063$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8064
8065fi
8066
Matthias Kloseb9621712010-04-24 17:59:49 +00008067ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8068case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008069 no|yes) ;; #(
8070 *)
8071
Matthias Kloseb9621712010-04-24 17:59:49 +00008072$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008073
8074
8075cat >>confdefs.h <<_ACEOF
8076#define uint32_t $ac_cv_c_uint32_t
8077_ACEOF
8078;;
8079 esac
8080
Mark Dickinson983bc162012-12-02 12:11:38 +00008081
8082ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8083if test "x$ac_cv_type_uint64_t" = xyes; then :
8084
8085$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8086
8087fi
8088
Matthias Kloseb9621712010-04-24 17:59:49 +00008089ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8090case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008091 no|yes) ;; #(
8092 *)
8093
Matthias Kloseb9621712010-04-24 17:59:49 +00008094$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008095
8096
8097cat >>confdefs.h <<_ACEOF
8098#define uint64_t $ac_cv_c_uint64_t
8099_ACEOF
8100;;
8101 esac
8102
Mark Dickinson983bc162012-12-02 12:11:38 +00008103
8104ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8105if test "x$ac_cv_type_int32_t" = xyes; then :
8106
8107$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8108
8109fi
8110
Matthias Kloseb9621712010-04-24 17:59:49 +00008111ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8112case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008113 no|yes) ;; #(
8114 *)
8115
8116cat >>confdefs.h <<_ACEOF
8117#define int32_t $ac_cv_c_int32_t
8118_ACEOF
8119;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008120esac
8121
Mark Dickinson983bc162012-12-02 12:11:38 +00008122
8123ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8124if test "x$ac_cv_type_int64_t" = xyes; then :
8125
8126$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8127
8128fi
8129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8131case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008132 no|yes) ;; #(
8133 *)
8134
8135cat >>confdefs.h <<_ACEOF
8136#define int64_t $ac_cv_c_int64_t
8137_ACEOF
8138;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008139esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008140
Mark Dickinson983bc162012-12-02 12:11:38 +00008141
Matthias Kloseb9621712010-04-24 17:59:49 +00008142ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008143if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008146
8147fi
8148
Stefan Krah1919b7e2012-03-21 18:25:23 +01008149ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8150if test "x$ac_cv_type___uint128_t" = xyes; then :
8151
8152$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8153
8154fi
8155
Jack Jansendd19cf82001-12-06 22:36:17 +00008156
Michael W. Hudson54241132001-12-07 15:38:26 +00008157# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008158# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008159# The cast to long int works around a bug in the HP C Compiler
8160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8162# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8164$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 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 +00008169
Martin v. Löwis11437992002-04-12 09:54:03 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 if test "$ac_cv_type_int" = yes; then
8172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008174as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008175See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 else
8177 ac_cv_sizeof_int=0
8178 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008180
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8183$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184
8185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008188#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008190
8191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192# The cast to long int works around a bug in the HP C Compiler
8193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8197$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008198if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008200else
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 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 +00008202
Martin v. Löwis11437992002-04-12 09:54:03 +00008203else
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 if test "$ac_cv_type_long" = yes; then
8205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008207as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008208See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 else
8210 ac_cv_sizeof_long=0
8211 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213
Martin v. Löwis11437992002-04-12 09:54:03 +00008214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8216$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217
8218
8219
Martin v. Löwis11437992002-04-12 09:54:03 +00008220cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008221#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008223
8224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8230$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 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 +00008235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type_void_p" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 else
8243 ac_cv_sizeof_void_p=0
8244 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8249$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250
8251
8252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008254#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008255_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008256
8257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258# The cast to long int works around a bug in the HP C Compiler
8259# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8260# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8261# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8263$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008264if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008266else
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 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 +00008268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269else
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 if test "$ac_cv_type_short" = yes; then
8271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008273as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008274See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275 else
8276 ac_cv_sizeof_short=0
8277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8282$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283
8284
8285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008287#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008288_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008289
8290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291# The cast to long int works around a bug in the HP C Compiler
8292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8294# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8296$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008297if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 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 +00008301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302else
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 if test "$ac_cv_type_float" = yes; then
8304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008306as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008307See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308 else
8309 ac_cv_sizeof_float=0
8310 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8315$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316
8317
8318
Martin v. Löwis11437992002-04-12 09:54:03 +00008319cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008320#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008321_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008322
8323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324# The cast to long int works around a bug in the HP C Compiler
8325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8329$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008330if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008332else
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 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 +00008334
Martin v. Löwis11437992002-04-12 09:54:03 +00008335else
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 if test "$ac_cv_type_double" = yes; then
8337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008339as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008340See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008341 else
8342 ac_cv_sizeof_double=0
8343 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345
Martin v. Löwis11437992002-04-12 09:54:03 +00008346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8348$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349
8350
8351
Martin v. Löwis11437992002-04-12 09:54:03 +00008352cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008353#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008354_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008355
8356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008357# The cast to long int works around a bug in the HP C Compiler
8358# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8359# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8360# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8362$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008363if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008365else
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 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 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 if test "$ac_cv_type_fpos_t" = yes; then
8370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008372as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008373See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374 else
8375 ac_cv_sizeof_fpos_t=0
8376 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8381$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382
8383
8384
Martin v. Löwis11437992002-04-12 09:54:03 +00008385cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008386#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008387_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008388
Michael W. Hudson54241132001-12-07 15:38:26 +00008389
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390# The cast to long int works around a bug in the HP C Compiler
8391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8393# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8395$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008396if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008398else
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 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 +00008400
Martin v. Löwis18e16552006-02-15 17:27:45 +00008401else
Matthias Kloseb9621712010-04-24 17:59:49 +00008402 if test "$ac_cv_type_size_t" = yes; then
8403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008405as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008406See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008407 else
8408 ac_cv_sizeof_size_t=0
8409 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008411
Martin v. Löwis18e16552006-02-15 17:27:45 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8414$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008415
8416
8417
Martin v. Löwis18e16552006-02-15 17:27:45 +00008418cat >>confdefs.h <<_ACEOF
8419#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8420_ACEOF
8421
8422
Christian Heimes400adb02008-02-01 08:12:03 +00008423# The cast to long int works around a bug in the HP C Compiler
8424# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8425# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8426# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8428$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008429if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008430 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008431else
Matthias Kloseb9621712010-04-24 17:59:49 +00008432 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 +00008433
Christian Heimes400adb02008-02-01 08:12:03 +00008434else
Matthias Kloseb9621712010-04-24 17:59:49 +00008435 if test "$ac_cv_type_pid_t" = yes; then
8436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008438as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008439See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008440 else
8441 ac_cv_sizeof_pid_t=0
8442 fi
8443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008444
Christian Heimes400adb02008-02-01 08:12:03 +00008445fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8447$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008448
8449
8450
8451cat >>confdefs.h <<_ACEOF
8452#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8453_ACEOF
8454
8455
Michael W. Hudson54241132001-12-07 15:38:26 +00008456
Matthias Kloseb9621712010-04-24 17:59:49 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8458$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008459have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008461/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008462
Martin v. Löwis11437992002-04-12 09:54:03 +00008463int
8464main ()
8465{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008466long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ;
8468 return 0;
8469}
8470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008472
8473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008476 have_long_long=yes
8477
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8481$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008482if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483# The cast to long int works around a bug in the HP C Compiler
8484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8486# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8488$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008489if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008491else
Matthias Kloseb9621712010-04-24 17:59:49 +00008492 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 +00008493
Martin v. Löwis11437992002-04-12 09:54:03 +00008494else
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 if test "$ac_cv_type_long_long" = yes; then
8496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008498as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008499See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500 else
8501 ac_cv_sizeof_long_long=0
8502 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008503fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8507$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508
8509
8510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008512#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008513_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008514
Michael W. Hudson54241132001-12-07 15:38:26 +00008515
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008516fi
8517
Matthias Kloseb9621712010-04-24 17:59:49 +00008518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8519$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008520have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008522/* end confdefs.h. */
8523
8524int
8525main ()
8526{
8527long double x; x = (long double)0;
8528 ;
8529 return 0;
8530}
8531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008532if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008533
8534
Matthias Kloseb9621712010-04-24 17:59:49 +00008535$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008536
8537 have_long_double=yes
8538
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008539fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8542$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008543if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008544# The cast to long int works around a bug in the HP C Compiler
8545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8547# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8549$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008550if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 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 +00008554
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 if test "$ac_cv_type_long_double" = yes; then
8557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008559as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008560See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008561 else
8562 ac_cv_sizeof_long_double=0
8563 fi
8564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8568$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008569
8570
8571
8572cat >>confdefs.h <<_ACEOF
8573#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8574_ACEOF
8575
8576
8577fi
8578
8579
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8581$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008582have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008584/* end confdefs.h. */
8585
8586int
8587main ()
8588{
8589_Bool x; x = (_Bool)0;
8590 ;
8591 return 0;
8592}
8593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008594if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008595
8596
Matthias Kloseb9621712010-04-24 17:59:49 +00008597$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008598
8599 have_c99_bool=yes
8600
Thomas Woutersb2137042007-02-01 18:02:27 +00008601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8604$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008605if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008606# The cast to long int works around a bug in the HP C Compiler
8607# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8608# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8609# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8611$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008612if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008613 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008614else
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 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 +00008616
Thomas Woutersb2137042007-02-01 18:02:27 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 if test "$ac_cv_type__Bool" = yes; then
8619 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8620$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008621as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008622See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008623 else
8624 ac_cv_sizeof__Bool=0
8625 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008627
Thomas Woutersb2137042007-02-01 18:02:27 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8630$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631
8632
8633
Thomas Woutersb2137042007-02-01 18:02:27 +00008634cat >>confdefs.h <<_ACEOF
8635#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8636_ACEOF
8637
8638
8639fi
8640
Matthias Kloseb9621712010-04-24 17:59:49 +00008641ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008642 #include <stdint.h>
8643 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008644 #ifdef HAVE_INTTYPES_H
8645 #include <inttypes.h>
8646 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008647"
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008649
8650cat >>confdefs.h <<_ACEOF
8651#define HAVE_UINTPTR_T 1
8652_ACEOF
8653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8659$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 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 +00008664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_uintptr_t" = yes; then
8667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof_uintptr_t=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8678$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679
8680
8681
Martin v. Löwis11437992002-04-12 09:54:03 +00008682cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008683#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008684_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008685
Michael W. Hudson54241132001-12-07 15:38:26 +00008686
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008687fi
8688
Thomas Wouters89f507f2006-12-13 04:49:30 +00008689
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008690# The cast to long int works around a bug in the HP C Compiler
8691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8693# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8695$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008696if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008700#ifdef HAVE_SYS_TYPES_H
8701#include <sys/types.h>
8702#endif
8703
Matthias Kloseb9621712010-04-24 17:59:49 +00008704"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008706else
Matthias Kloseb9621712010-04-24 17:59:49 +00008707 if test "$ac_cv_type_off_t" = yes; then
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008710as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008711See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008712 else
8713 ac_cv_sizeof_off_t=0
8714 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008716
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8719$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008720
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008721
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008724#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008725_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008726
Michael W. Hudson54241132001-12-07 15:38:26 +00008727
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008728
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8730$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008731if test "$have_long_long" = yes
8732then
8733if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008734 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008735
Matthias Kloseb9621712010-04-24 17:59:49 +00008736$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008737
Matthias Kloseb9621712010-04-24 17:59:49 +00008738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8739$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8742$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008743fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008744else
Matthias Kloseb9621712010-04-24 17:59:49 +00008745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8746$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008747fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749# The cast to long int works around a bug in the HP C Compiler
8750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8752# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8754$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008755if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008759#ifdef HAVE_SYS_TYPES_H
8760#include <sys/types.h>
8761#endif
8762#ifdef HAVE_TIME_H
8763#include <time.h>
8764#endif
8765
Matthias Kloseb9621712010-04-24 17:59:49 +00008766"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008767
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008768else
Matthias Kloseb9621712010-04-24 17:59:49 +00008769 if test "$ac_cv_type_time_t" = yes; then
8770 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8771$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008772as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008773See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008774 else
8775 ac_cv_sizeof_time_t=0
8776 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008778
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8781$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008782
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008783
8784
Martin v. Löwis11437992002-04-12 09:54:03 +00008785cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008786#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008787_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008788
Michael W. Hudson54241132001-12-07 15:38:26 +00008789
8790
Trent Mick635f6fb2000-08-23 21:33:05 +00008791# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008792ac_save_cc="$CC"
8793if test "$ac_cv_kpthread" = "yes"
8794then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008795elif test "$ac_cv_kthread" = "yes"
8796then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008797elif test "$ac_cv_pthread" = "yes"
8798then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008799fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8802$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008803have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008805/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008806
8807 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008808int
8809main ()
8810{
Guido van Rossum12580492000-09-24 16:47:19 +00008811pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ;
8813 return 0;
8814}
Matthias Kloseb159a552010-04-25 21:00:44 +00008815
Martin v. Löwis11437992002-04-12 09:54:03 +00008816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008817if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008818 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8822$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008823if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8826# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8827# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8829$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008830if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008831 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008832else
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008834#ifdef HAVE_PTHREAD_H
8835#include <pthread.h>
8836#endif
8837
Matthias Kloseb9621712010-04-24 17:59:49 +00008838"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840else
Matthias Kloseb9621712010-04-24 17:59:49 +00008841 if test "$ac_cv_type_pthread_t" = yes; then
8842 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8843$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008844as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008845See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008846 else
8847 ac_cv_sizeof_pthread_t=0
8848 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008849fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008850
Trent Mick635f6fb2000-08-23 21:33:05 +00008851fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8853$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008854
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008855
8856
Martin v. Löwis11437992002-04-12 09:54:03 +00008857cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008858#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008859_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008860
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008861
Trent Mick635f6fb2000-08-23 21:33:05 +00008862fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008863CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008864
Michael W. Hudson54241132001-12-07 15:38:26 +00008865
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008866case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008867 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008868 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8869 ;;
8870 Darwin/*)
8871 OTHER_LIBTOOL_OPT=""
8872 ;;
8873esac
8874
8875
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008876
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008877case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008878 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008879 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8880 if test "${enable_universalsdk}"; then
8881 :
8882 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008883 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008884 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008885 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008886 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008887 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008888 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008889 if test ${gcc_version} '<' 4.0
8890 then
8891 LIBTOOL_CRUFT="-lcc_dynamic"
8892 else
8893 LIBTOOL_CRUFT=""
8894 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008896 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008897else
Matthias Kloseb9621712010-04-24 17:59:49 +00008898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008899/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008900
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008901 #include <unistd.h>
8902 int main(int argc, char*argv[])
8903 {
8904 if (sizeof(long) == 4) {
8905 return 0;
8906 } else {
8907 return 1;
8908 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008909 }
8910
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008912if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008913 ac_osx_32bit=yes
8914else
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008919fi
8920
8921
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008922 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008923 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008924 i386)
8925 MACOSX_DEFAULT_ARCH="i386"
8926 ;;
8927 ppc)
8928 MACOSX_DEFAULT_ARCH="ppc"
8929 ;;
8930 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008931 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008932 ;;
8933 esac
8934 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008935 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008936 i386)
8937 MACOSX_DEFAULT_ARCH="x86_64"
8938 ;;
8939 ppc)
8940 MACOSX_DEFAULT_ARCH="ppc64"
8941 ;;
8942 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008943 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008944 ;;
8945 esac
8946
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008947 fi
8948
8949 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008950 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008951 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008952esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8954$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008955if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008956then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008957 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008959 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008960
Matthias Kloseb9621712010-04-24 17:59:49 +00008961$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008962
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8964$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008965 if test $enable_shared = "yes"
8966 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008967 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 +00008968 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008969else
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8971$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008972fi
8973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8975$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008976case $ac_sys_system/$ac_sys_release in
8977 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008980
Matthias Kloseb9621712010-04-24 17:59:49 +00008981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8982$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008983 ;;
8984 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8986$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008987 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008988esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008989
Guido van Rossum0a516c91994-09-12 10:58:40 +00008990# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008991
Michael W. Hudson54241132001-12-07 15:38:26 +00008992
8993
8994
8995
Benjamin Peterson99f03762010-04-11 22:15:28 +00008996
Thomas Wouters477c8d52006-05-27 19:21:47 +00008997
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008998# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8999# -- usually .so, .sl on HP-UX, .dll on Cygwin
9000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9001$as_echo_n "checking the extension of shared libraries... " >&6; }
9002if test -z "$SHLIB_SUFFIX"; then
9003 case $ac_sys_system in
9004 hp*|HP*)
9005 case `uname -m` in
9006 ia64) SHLIB_SUFFIX=.so;;
9007 *) SHLIB_SUFFIX=.sl;;
9008 esac
9009 ;;
9010 CYGWIN*) SHLIB_SUFFIX=.dll;;
9011 *) SHLIB_SUFFIX=.so;;
9012 esac
9013fi
9014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9015$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009016
Guido van Rossum0a516c91994-09-12 10:58:40 +00009017# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009018# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009019# (Shared libraries in this instance are shared modules to be loaded into
9020# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9022$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009023if test -z "$LDSHARED"
9024then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009025 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009026 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009027 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009028 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009029 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009030 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009031 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009033 if test "$GCC" = "yes" ; then
9034 LDSHARED='$(CC) -shared'
9035 LDCXXSHARED='$(CXX) -shared'
9036 else
9037 LDSHARED='$(CC) -G'
9038 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009039 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009040 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009041 if test "$GCC" = "yes" ; then
9042 LDSHARED='$(CC) -shared'
9043 LDCXXSHARED='$(CXX) -shared'
9044 else
9045 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009046 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009047 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009048 LDSHARED='$(CC) -bundle'
9049 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009050 if test "$enable_framework" ; then
9051 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009052 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9053 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009054 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009055 else
9056 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009057 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009058 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009059 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009060 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009061 LDSHARED='$(CC) -bundle'
9062 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009063 if test "$enable_framework" ; then
9064 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009065 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9066 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009067 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009068 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009069 # No framework, use the Python app as bundle-loader
9070 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009071 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009072 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009074 Darwin/*)
9075 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9076 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009077
Ned Deily36820b62014-06-25 13:44:22 -07009078 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9079 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9080 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9081 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9082 if test ${dep_target_major} -eq 10 && \
9083 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009084 then
Ned Deily36820b62014-06-25 13:44:22 -07009085 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009086 LDSHARED='$(CC) -bundle'
9087 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009088 if test "$enable_framework" ; then
9089 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009090 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9091 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009092 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009093 else
9094 # No framework, use the Python app as bundle-loader
9095 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9096 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009097 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009098 fi
Ned Deily36820b62014-06-25 13:44:22 -07009099 else
9100 # building for OS X 10.3 and later
9101 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9102 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9103 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009104 fi
9105 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009106 Linux*|GNU*|QNX*)
9107 LDSHARED='$(CC) -shared'
9108 LDCXXSHARED='$(CXX) -shared';;
9109 BSD/OS*/4*)
9110 LDSHARED="gcc -shared"
9111 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009112 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009113 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009114 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009115 LDSHARED='$(CC) -shared'
9116 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009117 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009118 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009119 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009120 OpenBSD*)
9121 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9122 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009123 LDSHARED='$(CC) -shared $(CCSHARED)'
9124 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009125 else
9126 case `uname -r` in
9127 [01].* | 2.[0-7] | 2.[0-7].*)
9128 LDSHARED="ld -Bshareable ${LDFLAGS}"
9129 ;;
9130 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009131 LDSHARED='$(CC) -shared $(CCSHARED)'
9132 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009133 ;;
9134 esac
9135 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009136 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009137 LDSHARED='$(CC) -shared'
9138 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009139 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 if test "$GCC" = "yes" ; then
9141 LDSHARED='$(CC) -shared'
9142 LDCXXSHARED='$(CXX) -shared'
9143 else
9144 LDSHARED='$(CC) -G'
9145 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009146 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009147 SCO_SV*)
9148 LDSHARED='$(CC) -Wl,-G,-Bexport'
9149 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9150 CYGWIN*)
9151 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9152 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009153 *) LDSHARED="ld";;
9154 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9157$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009158LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009159BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009160# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009161# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9163$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009164if test -z "$CCSHARED"
9165then
Guido van Rossum07397971997-04-29 21:49:50 +00009166 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009167 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009168 then CCSHARED="-fPIC";
9169 elif test `uname -p` = sparc;
9170 then CCSHARED="-xcode=pic32";
9171 else CCSHARED="-Kpic";
9172 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009173 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009174 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009175 else CCSHARED="+z";
9176 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009177 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009178 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009179 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009180 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009181 if test "$GCC" = "yes"
9182 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009183 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009184 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009185 SCO_SV*)
9186 if test "$GCC" = "yes"
9187 then CCSHARED="-fPIC"
9188 else CCSHARED="-Kpic -belf"
9189 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009190 IRIX*/6*) case $CC in
9191 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009192 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009193 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009194 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009195fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9197$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009199# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9201$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009202if test -z "$LINKFORSHARED"
9203then
Guido van Rossum07397971997-04-29 21:49:50 +00009204 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009205 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009206 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009207 LINKFORSHARED="-Wl,-E -Wl,+s";;
9208# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009209 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009210 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009211 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009213 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009214
9215 # Issue #18075: the default maximum stack size (8MBytes) is too
9216 # small for the default recursion limit. Increase the stack size
9217 # to ensure that tests don't crash
9218 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9219
Jack Jansene578a632001-08-15 01:27:14 +00009220 if test "$enable_framework"
9221 then
Jack Jansenda49e192005-01-07 13:08:22 +00009222 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009223 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009224 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009225 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009226 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009227 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009228 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009229 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9230 then
9231 LINKFORSHARED="-Wl,--export-dynamic"
9232 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009233 SunOS/5*) case $CC in
9234 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009235 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009236 then
9237 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009238 fi;;
9239 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009240 CYGWIN*)
9241 if test $enable_shared = "no"
9242 then
9243 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9244 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009245 QNX*)
9246 # -Wl,-E causes the symbols to be added to the dynamic
9247 # symbol table so that they can be found when a module
9248 # is loaded. -N 2048K causes the stack size to be set
9249 # to 2048 kilobytes so that the stack doesn't overflow
9250 # when running test_compile.py.
9251 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009252 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9255$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256
Michael W. Hudson54241132001-12-07 15:38:26 +00009257
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009258
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9260$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009261if test ! "$LIBRARY" = "$LDLIBRARY"
9262then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009263 case $ac_sys_system in
9264 CYGWIN*)
9265 # Cygwin needs CCSHARED when building extension DLLs
9266 # but not when building the interpreter DLL.
9267 CFLAGSFORSHARED='';;
9268 *)
9269 CFLAGSFORSHARED='$(CCSHARED)'
9270 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009271fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9273$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009274
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009275# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9276# library (with --enable-shared).
9277# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009278# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9279# if it is not required, since it creates a dependency of the shared library
9280# to LIBS. This, in turn, means that applications linking the shared libpython
9281# don't need to link LIBS explicitly. The default should be only changed
9282# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009283
Matthias Kloseb9621712010-04-24 17:59:49 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9285$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009286case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009287 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009288 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009289esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9291$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009292
9293
Guido van Rossum627b2d71993-12-24 10:39:16 +00009294# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9296$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009297if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009298 $as_echo_n "(cached) " >&6
9299else
9300 ac_check_lib_save_LIBS=$LIBS
9301LIBS="-lsendfile $LIBS"
9302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9303/* end confdefs.h. */
9304
9305/* Override any GCC internal prototype to avoid an error.
9306 Use char because int might match the return type of a GCC
9307 builtin and then its argument prototype would still apply. */
9308#ifdef __cplusplus
9309extern "C"
9310#endif
9311char sendfile ();
9312int
9313main ()
9314{
9315return sendfile ();
9316 ;
9317 return 0;
9318}
9319_ACEOF
9320if ac_fn_c_try_link "$LINENO"; then :
9321 ac_cv_lib_sendfile_sendfile=yes
9322else
9323 ac_cv_lib_sendfile_sendfile=no
9324fi
9325rm -f core conftest.err conftest.$ac_objext \
9326 conftest$ac_exeext conftest.$ac_ext
9327LIBS=$ac_check_lib_save_LIBS
9328fi
9329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9330$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009331if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009332 cat >>confdefs.h <<_ACEOF
9333#define HAVE_LIBSENDFILE 1
9334_ACEOF
9335
9336 LIBS="-lsendfile $LIBS"
9337
9338fi
9339
Matthias Kloseb9621712010-04-24 17:59:49 +00009340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9341$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009342if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009343 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009344else
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009346LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009350/* Override any GCC internal prototype to avoid an error.
9351 Use char because int might match the return type of a GCC
9352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009353#ifdef __cplusplus
9354extern "C"
9355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009356char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009357int
9358main ()
9359{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ;
9362 return 0;
9363}
9364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009365if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009367else
Matthias Kloseb9621712010-04-24 17:59:49 +00009368 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009370rm -f core conftest.err conftest.$ac_objext \
9371 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009372LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9375$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009376if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 cat >>confdefs.h <<_ACEOF
9378#define HAVE_LIBDL 1
9379_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009380
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009381 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009383fi
9384 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9386$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009387if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009388 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009389else
Martin v. Löwis11437992002-04-12 09:54:03 +00009390 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009391LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009395/* Override any GCC internal prototype to avoid an error.
9396 Use char because int might match the return type of a GCC
9397 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009398#ifdef __cplusplus
9399extern "C"
9400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009401char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009402int
9403main ()
9404{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 ;
9407 return 0;
9408}
9409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009410if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009412else
Matthias Kloseb9621712010-04-24 17:59:49 +00009413 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415rm -f core conftest.err conftest.$ac_objext \
9416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009417LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009418fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9420$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009421if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 cat >>confdefs.h <<_ACEOF
9423#define HAVE_LIBDLD 1
9424_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009425
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009426 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009428fi
9429 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009430
Georg Brandlb1441c72009-01-03 22:33:39 +00009431# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009432if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9434$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009435if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009436 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009437else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009438 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442/* Override any GCC internal prototype to avoid an error.
9443 Use char because int might match the return type of a GCC
9444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009445#ifdef __cplusplus
9446extern "C"
9447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009448char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449int
9450main ()
9451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ;
9454 return 0;
9455}
9456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009457for ac_lib in '' pthread rt posix4; do
9458 if test -z "$ac_lib"; then
9459 ac_res="none required"
9460 else
9461 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009462 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009463 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009465 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009467rm -f core conftest.err conftest.$ac_objext \
9468 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009469 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009472done
Victor Stinnere0be4232011-10-25 13:06:09 +02009473if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475else
9476 ac_cv_search_sem_init=no
9477fi
9478rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009479LIBS=$ac_func_search_save_LIBS
9480fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9482$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009484if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009486
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009487fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009488 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009489 # posix4 on Solaris 2.6
9490 # pthread (first!) on Linux
9491fi
9492
Martin v. Löwis19d17342003-06-14 21:03:05 +00009493# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9495$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009496if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009497 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009498else
9499 ac_check_lib_save_LIBS=$LIBS
9500LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009502/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504/* Override any GCC internal prototype to avoid an error.
9505 Use char because int might match the return type of a GCC
9506 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009507#ifdef __cplusplus
9508extern "C"
9509#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009510char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009511int
9512main ()
9513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009515 ;
9516 return 0;
9517}
9518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009520 ac_cv_lib_intl_textdomain=yes
9521else
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009524rm -f core conftest.err conftest.$ac_objext \
9525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009526LIBS=$ac_check_lib_save_LIBS
9527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9529$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009530if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009531
Matthias Kloseb9621712010-04-24 17:59:49 +00009532$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009533
Brett Cannonc6d936e2009-06-07 20:09:53 +00009534 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009535fi
9536
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009537
9538# checks for system dependent C++ extensions support
9539case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9541$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009544
Georg Brandl59e87bd2011-02-15 19:48:59 +00009545 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009546int
9547main ()
9548{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009549loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ;
9551 return 0;
9552}
Matthias Kloseb159a552010-04-25 21:00:44 +00009553
Martin v. Löwis11437992002-04-12 09:54:03 +00009554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009555if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009556
Matthias Kloseb159a552010-04-25 21:00:44 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009559
Matthias Kloseb159a552010-04-25 21:00:44 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009561$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009562
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009563else
Matthias Kloseb159a552010-04-25 21:00:44 +00009564
9565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009566$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009567
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009569rm -f core conftest.err conftest.$ac_objext \
9570 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009571 *) ;;
9572esac
9573
Christian Heimes985ecdc2013-11-20 11:46:18 +01009574# check for systems that require aligned memory access
9575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9576$as_echo_n "checking aligned memory access is required... " >&6; }
9577if test "$cross_compiling" = yes; then :
9578 aligned_required=yes
9579else
9580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9581/* end confdefs.h. */
9582
9583int main()
9584{
9585 char s[16];
9586 int i, *p1, *p2;
9587 for (i=0; i < 16; i++)
9588 s[i] = i;
9589 p1 = (int*)(s+1);
9590 p2 = (int*)(s+2);
9591 if (*p1 == *p2)
9592 return 1;
9593 return 0;
9594}
9595
9596_ACEOF
9597if ac_fn_c_try_run "$LINENO"; then :
9598 aligned_required=no
9599else
9600 aligned_required=yes
9601fi
9602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9603 conftest.$ac_objext conftest.beam conftest.$ac_ext
9604fi
9605
9606
9607if test "$aligned_required" = yes ; then
9608
9609$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9610
9611fi
9612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9613$as_echo "$aligned_required" >&6; }
9614
9615
9616# str, bytes and memoryview hash algorithm
9617
9618
9619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9620$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9621
9622# Check whether --with-hash_algorithm was given.
9623if test "${with_hash_algorithm+set}" = set; then :
9624 withval=$with_hash_algorithm;
9625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9626$as_echo "$withval" >&6; }
9627case "$withval" in
9628 siphash24)
9629 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9630
9631 ;;
9632 fnv)
9633 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9634
9635 ;;
9636 *)
9637 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9638 ;;
9639esac
9640
9641else
9642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9643$as_echo "default" >&6; }
9644fi
9645
9646
Charles-François Natalid30b0222014-05-08 23:08:51 +01009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9648$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9649
9650# Check whether --with-address_sanitizer was given.
9651if test "${with_address_sanitizer+set}" = set; then :
9652 withval=$with_address_sanitizer;
9653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9654$as_echo "$withval" >&6; }
9655BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9656LDFLAGS="-fsanitize=address $LDFLAGS"
9657
9658else
9659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9660$as_echo "no" >&6; }
9661fi
9662
9663
Guido van Rossum70c7f481998-03-26 18:44:10 +00009664# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9666$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009667if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009669else
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009671LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009675/* Override any GCC internal prototype to avoid an error.
9676 Use char because int might match the return type of a GCC
9677 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009678#ifdef __cplusplus
9679extern "C"
9680#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009681char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009682int
9683main ()
9684{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009686 ;
9687 return 0;
9688}
9689_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009690if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009692else
Matthias Kloseb9621712010-04-24 17:59:49 +00009693 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009695rm -f core conftest.err conftest.$ac_objext \
9696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009697LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9700$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009701if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009702 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009703fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009704 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9706$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009707if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009708 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009709else
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009711LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715/* Override any GCC internal prototype to avoid an error.
9716 Use char because int might match the return type of a GCC
9717 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009718#ifdef __cplusplus
9719extern "C"
9720#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009721char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ;
9727 return 0;
9728}
9729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009730if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009732else
Matthias Kloseb9621712010-04-24 17:59:49 +00009733 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009735rm -f core conftest.err conftest.$ac_objext \
9736 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009737LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9740$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009741if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009742 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009743fi
9744 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009745
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9747$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009750if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9753$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009754LIBS="$withval $LIBS"
9755
9756else
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9758$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009759fi
9760
Guido van Rossum7f43da71994-08-01 12:15:30 +00009761
Victor Stinner8291b5e2015-03-20 16:03:14 +01009762
9763
9764
9765
9766
9767
9768
9769if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9770 if test -n "$ac_tool_prefix"; then
9771 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9772set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9774$as_echo_n "checking for $ac_word... " >&6; }
9775if ${ac_cv_path_PKG_CONFIG+:} false; then :
9776 $as_echo_n "(cached) " >&6
9777else
9778 case $PKG_CONFIG in
9779 [\\/]* | ?:[\\/]*)
9780 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9781 ;;
9782 *)
9783 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9784for as_dir in $PATH
9785do
9786 IFS=$as_save_IFS
9787 test -z "$as_dir" && as_dir=.
9788 for ac_exec_ext in '' $ac_executable_extensions; do
9789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9790 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9792 break 2
9793 fi
9794done
9795 done
9796IFS=$as_save_IFS
9797
9798 ;;
9799esac
9800fi
9801PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9802if test -n "$PKG_CONFIG"; then
9803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9804$as_echo "$PKG_CONFIG" >&6; }
9805else
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9807$as_echo "no" >&6; }
9808fi
9809
9810
9811fi
9812if test -z "$ac_cv_path_PKG_CONFIG"; then
9813 ac_pt_PKG_CONFIG=$PKG_CONFIG
9814 # Extract the first word of "pkg-config", so it can be a program name with args.
9815set dummy pkg-config; ac_word=$2
9816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9817$as_echo_n "checking for $ac_word... " >&6; }
9818if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9819 $as_echo_n "(cached) " >&6
9820else
9821 case $ac_pt_PKG_CONFIG in
9822 [\\/]* | ?:[\\/]*)
9823 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9824 ;;
9825 *)
9826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827for as_dir in $PATH
9828do
9829 IFS=$as_save_IFS
9830 test -z "$as_dir" && as_dir=.
9831 for ac_exec_ext in '' $ac_executable_extensions; do
9832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835 break 2
9836 fi
9837done
9838 done
9839IFS=$as_save_IFS
9840
9841 ;;
9842esac
9843fi
9844ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9845if test -n "$ac_pt_PKG_CONFIG"; then
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9847$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9848else
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9850$as_echo "no" >&6; }
9851fi
9852
9853 if test "x$ac_pt_PKG_CONFIG" = x; then
9854 PKG_CONFIG=""
9855 else
9856 case $cross_compiling:$ac_tool_warned in
9857yes:)
9858{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9859$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9860ac_tool_warned=yes ;;
9861esac
9862 PKG_CONFIG=$ac_pt_PKG_CONFIG
9863 fi
9864else
9865 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9866fi
9867
9868fi
9869if test -n "$PKG_CONFIG"; then
9870 _pkg_min_version=0.9.0
9871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9872$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9873 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9875$as_echo "yes" >&6; }
9876 else
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9878$as_echo "no" >&6; }
9879 PKG_CONFIG=""
9880 fi
9881fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009882
9883# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9885$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009886
9887# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009888if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009889 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009890else
9891 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009892fi
9893
9894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9896$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009897
9898# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9900$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009901
9902# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009903if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009904 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009905else
9906 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009907fi
9908
9909
9910if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009911 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9912else
9913 LIBFFI_INCLUDEDIR=""
9914fi
9915
9916
Matthias Kloseb9621712010-04-24 17:59:49 +00009917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9918$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009919
Stefan Krah60187b52012-03-23 19:06:27 +01009920# Check for use of the system libmpdec library
9921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9922$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9923
9924# Check whether --with-system_libmpdec was given.
9925if test "${with_system_libmpdec+set}" = set; then :
9926 withval=$with_system_libmpdec;
9927else
9928 with_system_libmpdec="no"
9929fi
9930
9931
9932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9933$as_echo "$with_system_libmpdec" >&6; }
9934
Benjamin Peterson076ed002010-10-31 17:11:02 +00009935# Check for support for loadable sqlite extensions
9936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9937$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9938# Check whether --enable-loadable-sqlite-extensions was given.
9939if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9940 enableval=$enable_loadable_sqlite_extensions;
9941else
9942 enable_loadable_sqlite_extensions="no"
9943fi
9944
9945
9946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9947$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9948
Ned Deilyd819b932013-09-06 01:07:05 -07009949# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9950
9951
9952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9953$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9954
9955# Check whether --with-tcltk-includes was given.
9956if test "${with_tcltk_includes+set}" = set; then :
9957 withval=$with_tcltk_includes;
9958else
9959 with_tcltk_includes="default"
9960fi
9961
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9963$as_echo "$with_tcltk_includes" >&6; }
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9965$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9966
9967# Check whether --with-tcltk-libs was given.
9968if test "${with_tcltk_libs+set}" = set; then :
9969 withval=$with_tcltk_libs;
9970else
9971 with_tcltk_libs="default"
9972fi
9973
9974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9975$as_echo "$with_tcltk_libs" >&6; }
9976if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9977then
9978 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9979 then
9980 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9981 fi
9982 TCLTK_INCLUDES=""
9983 TCLTK_LIBS=""
9984else
9985 TCLTK_INCLUDES="$with_tcltk_includes"
9986 TCLTK_LIBS="$with_tcltk_libs"
9987fi
9988
Matthias Klose55708cc2009-04-30 08:06:49 +00009989# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9991$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009992
9993# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009995 withval=$with_dbmliborder;
9996if test x$with_dbmliborder = xyes
9997then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009998as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009999else
10000 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10001 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10002 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010003 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010004 fi
10005 done
10006fi
10007fi
10008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10010$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010011
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010012# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010013
10014
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10016$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010018# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010019if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020 withval=$with_signal_module;
10021fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010022
10023
10024if test -z "$with_signal_module"
10025then with_signal_module="yes"
10026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10028$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010029
10030if test "${with_signal_module}" = "yes"; then
10031 USE_SIGNAL_MODULE=""
10032 SIGNAL_OBJS=""
10033else
10034 USE_SIGNAL_MODULE="#"
10035 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10036fi
10037
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010038# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010039
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010040USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010042
Martin v. Löwis11437992002-04-12 09:54:03 +000010043
10044# Templates for things AC_DEFINEd more than once.
10045# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010046
10047
Martin v. Löwis11437992002-04-12 09:54:03 +000010048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10050$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010052# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010053if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010054 withval=$with_threads;
10055fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010056
10057
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010058# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010061if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062 withval=$with_thread; with_threads=$with_thread
10063fi
10064
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010065
10066if test -z "$with_threads"
10067then with_threads="yes"
10068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10070$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010071
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010072
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010073if test "$with_threads" = "no"
10074then
10075 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010076elif test "$ac_cv_pthread_is_default" = yes
10077then
Matthias Kloseb9621712010-04-24 17:59:49 +000010078 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010079
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010080 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010082
10083 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010084 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010085elif test "$ac_cv_kpthread" = "yes"
10086then
10087 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010088 if test "$ac_cv_cxx_thread" = "yes"; then
10089 CXX="$CXX -Kpthread"
10090 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010091 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010092
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010093 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010094 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010095elif test "$ac_cv_kthread" = "yes"
10096then
10097 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010098 if test "$ac_cv_cxx_thread" = "yes"; then
10099 CXX="$CXX -Kthread"
10100 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010101 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010102
10103 posix_threads=yes
10104 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010105elif test "$ac_cv_pthread" = "yes"
10106then
10107 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010108 if test "$ac_cv_cxx_thread" = "yes"; then
10109 CXX="$CXX -pthread"
10110 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010111 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010112
10113 posix_threads=yes
10114 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010115else
10116 if test ! -z "$with_threads" -a -d "$with_threads"
10117 then LDFLAGS="$LDFLAGS -L$with_threads"
10118 fi
10119 if test ! -z "$withval" -a -d "$withval"
10120 then LDFLAGS="$LDFLAGS -L$withval"
10121 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010122
10123 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010124 # define _POSIX_THREADS in unistd.h. Some apparently don't
10125 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10127$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010129/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010130
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010131#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010132#ifdef _POSIX_THREADS
10133yes
10134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010135
10136_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010138 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010139 unistd_defines_pthreads=yes
10140else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010141 unistd_defines_pthreads=no
10142fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010143rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010144
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10146$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010149
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010150 # Just looking for pthread_create in libpthread is not enough:
10151 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10152 # So we really have to include pthread.h, and then link.
10153 _libs=$LIBS
10154 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10156$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010158/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010159
10160#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010161#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010162
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010163void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010164int
10165main ()
10166{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010167
10168pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010169 ;
10170 return 0;
10171}
10172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10176$as_echo "yes" >&6; }
10177 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010178
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010179 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010180 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010181else
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010183 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010185if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010187
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010188 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010189 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010190else
Guido van Rossumad678af1998-10-02 14:42:15 +000010191
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10193$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010194if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010195 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010196else
Martin v. Löwis11437992002-04-12 09:54:03 +000010197 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010198LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202/* Override any GCC internal prototype to avoid an error.
10203 Use char because int might match the return type of a GCC
10204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010205#ifdef __cplusplus
10206extern "C"
10207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010208char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010209int
10210main ()
10211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010212return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 ;
10214 return 0;
10215}
10216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010217if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010219else
Matthias Kloseb9621712010-04-24 17:59:49 +000010220 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010222rm -f core conftest.err conftest.$ac_objext \
10223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010224LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10227$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010228if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010230
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010231 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010232 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010233 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010234else
Greg Steinadf63d62000-07-05 10:38:09 +000010235
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10237$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010238if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010239 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010242LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010246/* Override any GCC internal prototype to avoid an error.
10247 Use char because int might match the return type of a GCC
10248 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010249#ifdef __cplusplus
10250extern "C"
10251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010252char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010253int
10254main ()
10255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010257 ;
10258 return 0;
10259}
10260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010263else
Matthias Kloseb9621712010-04-24 17:59:49 +000010264 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010266rm -f core conftest.err conftest.$ac_objext \
10267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010268LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10271$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010272if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010273 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010274
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010275 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010276 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010277 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010278else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010279
Matthias Kloseb9621712010-04-24 17:59:49 +000010280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10281$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010282if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010284else
Martin v. Löwis11437992002-04-12 09:54:03 +000010285 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010286LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010290/* Override any GCC internal prototype to avoid an error.
10291 Use char because int might match the return type of a GCC
10292 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010293#ifdef __cplusplus
10294extern "C"
10295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010296char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010297int
10298main ()
10299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 ;
10302 return 0;
10303}
10304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010305if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010307else
Matthias Kloseb9621712010-04-24 17:59:49 +000010308 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010310rm -f core conftest.err conftest.$ac_objext \
10311 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010312LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10315$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010316if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010318
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010319 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010320 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010321 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010322else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10325$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010326if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010328else
Martin v. Löwis11437992002-04-12 09:54:03 +000010329 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010330LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010332/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334/* Override any GCC internal prototype to avoid an error.
10335 Use char because int might match the return type of a GCC
10336 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010337#ifdef __cplusplus
10338extern "C"
10339#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010340char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010341int
10342main ()
10343{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 ;
10346 return 0;
10347}
10348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010351else
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010354rm -f core conftest.err conftest.$ac_objext \
10355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010356LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10359$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010360if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010361 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010362
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010363 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010364 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010365 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010366else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010367
Martin v. Löwis130fb172001-07-19 11:00:41 +000010368 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010369fi
10370
Guido van Rossum627b2d71993-12-24 10:39:16 +000010371
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010372fi
10373
Guido van Rossum0be3e491997-05-22 20:33:33 +000010374fi
10375
Guido van Rossum49545951997-12-02 19:28:29 +000010376fi
10377
Guido van Rossumb93a8621998-05-07 13:27:32 +000010378fi
10379
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010381rm -f core conftest.err conftest.$ac_objext \
10382 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010383
Matthias Kloseb9621712010-04-24 17:59:49 +000010384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10385$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010386if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010387 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010388else
Martin v. Löwis11437992002-04-12 09:54:03 +000010389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010390LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394/* Override any GCC internal prototype to avoid an error.
10395 Use char because int might match the return type of a GCC
10396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010397#ifdef __cplusplus
10398extern "C"
10399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010400char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010401int
10402main ()
10403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010405 ;
10406 return 0;
10407}
10408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010410 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010411else
Matthias Kloseb9621712010-04-24 17:59:49 +000010412 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010413fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010414rm -f core conftest.err conftest.$ac_objext \
10415 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010416LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10419$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010420if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010422
Martin v. Löwis130fb172001-07-19 11:00:41 +000010423 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010424 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010425 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010426fi
10427
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010428
Neal Norwitza978ab02002-11-02 16:58:05 +000010429 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10431$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010434else
Martin v. Löwis11437992002-04-12 09:54:03 +000010435 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010436LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440/* Override any GCC internal prototype to avoid an error.
10441 Use char because int might match the return type of a GCC
10442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010446char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010447int
10448main ()
10449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010451 ;
10452 return 0;
10453}
10454_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010455if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010456 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010457else
Matthias Kloseb9621712010-04-24 17:59:49 +000010458 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010460rm -f core conftest.err conftest.$ac_objext \
10461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010462LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010463fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10465$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010466if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010468
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010469 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010470 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010471 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010472fi
10473
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010474 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010475fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010476
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010477if test "$posix_threads" = "yes"; then
10478 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010479
Matthias Kloseb9621712010-04-24 17:59:49 +000010480$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010481
10482 fi
10483
10484 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10485 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010486 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010487$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010488
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010489 ;;
10490 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010492
10493 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010494 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010495$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010496
10497 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010498 esac
10499
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10501$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010502 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010503 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010504else
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010506 ac_cv_pthread_system_supported=no
10507else
Matthias Kloseb9621712010-04-24 17:59:49 +000010508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010509/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010510
10511 #include <stdio.h>
10512 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010513 void *foo(void *parm) {
10514 return NULL;
10515 }
10516 main() {
10517 pthread_attr_t attr;
10518 pthread_t id;
10519 if (pthread_attr_init(&attr)) exit(-1);
10520 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10521 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10522 exit(0);
10523 }
10524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010525if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010526 ac_cv_pthread_system_supported=yes
10527else
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10531 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534
Guido van Rossum627b2d71993-12-24 10:39:16 +000010535fi
10536
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10538$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010539 if test "$ac_cv_pthread_system_supported" = "yes"; then
10540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542
10543 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 for ac_func in pthread_sigmask
10545do :
10546 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010547if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010548 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010549#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010550_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010551 case $ac_sys_system in
10552 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010555
10556 ;;
10557 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558fi
10559done
10560
Christian Heimesf77b4b22013-08-21 13:26:05 +020010561 for ac_func in pthread_atfork
10562do :
10563 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10564if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10565 cat >>confdefs.h <<_ACEOF
10566#define HAVE_PTHREAD_ATFORK 1
10567_ACEOF
10568
10569fi
10570done
10571
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572fi
10573
10574
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010575# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010576
Matthias Kloseb9621712010-04-24 17:59:49 +000010577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10578$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010580if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010582 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585 ipv6=no
10586 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10588$as_echo "yes" >&6; }
10589 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590
10591 ipv6=yes
10592 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010594else
Martin v. Löwis11437992002-04-12 09:54:03 +000010595
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010598 /* AF_INET6 available check */
10599#include <sys/types.h>
10600#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010601int
10602main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010603{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010604int domain = AF_INET6;
10605 ;
10606 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010607}
Martin v. Löwis11437992002-04-12 09:54:03 +000010608_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010609if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10612$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010613 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010614
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010615else
Matthias Kloseb159a552010-04-25 21:00:44 +000010616
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10618$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010619 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010620
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010621fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010624if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10626$as_echo_n "checking if RFC2553 API is available... " >&6; }
10627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010628/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010629
10630 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010631#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010632int
10633main ()
10634{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010635struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010636 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ;
10638 return 0;
10639}
Matthias Kloseb159a552010-04-25 21:00:44 +000010640
Martin v. Löwis11437992002-04-12 09:54:03 +000010641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010642if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010643
10644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010645$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010646 ipv6=yes
10647
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010648else
Matthias Kloseb159a552010-04-25 21:00:44 +000010649
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010652 ipv6=no
10653
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010656fi
10657
10658if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010660
10661fi
10662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663fi
10664
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010665
10666ipv6type=unknown
10667ipv6lib=none
10668ipv6trylibc=no
10669
10670if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10672$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010673 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10674 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675 case $i in
10676 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010678/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010679
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010680#include <netinet/in.h>
10681#ifdef IPV6_INRIA_VERSION
10682yes
10683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010686 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010687 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010688fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010689rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010690
10691 ;;
10692 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010694/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010695
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010696#include <netinet/in.h>
10697#ifdef __KAME__
10698yes
10699#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010700_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010703 ipv6type=$i;
10704 ipv6lib=inet6
10705 ipv6libdir=/usr/local/v6/lib
10706 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010707fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010708rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010709
10710 ;;
10711 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010713/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715#include <features.h>
10716#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10717yes
10718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722 ipv6type=$i;
10723 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010724fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010725rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010726
10727 ;;
10728 linux-inet6)
10729 if test -d /usr/inet6; then
10730 ipv6type=$i
10731 ipv6lib=inet6
10732 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010733 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734 fi
10735 ;;
10736 solaris)
10737 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010738 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739 ipv6type=$i
10740 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 fi
10742 fi
10743 ;;
10744 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010746/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010747
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010748#include <sys/param.h>
10749#ifdef _TOSHIBA_INET6
10750yes
10751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010752_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755 ipv6type=$i;
10756 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010757 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010759rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760
10761 ;;
10762 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010765
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766#include </usr/local/v6/include/sys/v6config.h>
10767#ifdef __V6D__
10768yes
10769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010770_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773 ipv6type=$i;
10774 ipv6lib=v6;
10775 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010776 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010778rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010779
10780 ;;
10781 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010784
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010785#include <sys/param.h>
10786#ifdef _ZETA_MINAMI_INET6
10787yes
10788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010789_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010790if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010791 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010792 ipv6type=$i;
10793 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010794 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010796rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010797
10798 ;;
10799 esac
10800 if test "$ipv6type" != "unknown"; then
10801 break
10802 fi
10803 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10805$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010806fi
10807
10808if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10809 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10810 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10811 echo "using lib$ipv6lib"
10812 else
10813 if test $ipv6trylibc = "yes"; then
10814 echo "using libc"
10815 else
10816 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10817 echo "You need to fetch lib$ipv6lib.a from appropriate"
10818 echo 'ipv6 kit and compile beforehand.'
10819 exit 1
10820 fi
10821 fi
10822fi
10823
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10825$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10827/* end confdefs.h. */
10828 /* CAN_RAW_FD_FRAMES available check */
10829#include <linux/can/raw.h>
10830int
10831main ()
10832{
10833int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838if ac_fn_c_try_compile "$LINENO"; then :
10839
10840
10841$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10842
10843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10844$as_echo "yes" >&6; }
10845
10846else
10847
10848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849$as_echo "no" >&6; }
10850
10851fi
10852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10855$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010857/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010858
10859 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010860int
10861main ()
10862{
10863FSIORefNum fRef = 0
10864 ;
10865 return 0;
10866}
Matthias Kloseb159a552010-04-25 21:00:44 +000010867
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010869if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010870
Matthias Kloseb159a552010-04-25 21:00:44 +000010871
Matthias Kloseb9621712010-04-24 17:59:49 +000010872$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10875$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010876
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010877else
Matthias Kloseb159a552010-04-25 21:00:44 +000010878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10880$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010881
10882fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10884
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010885# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10887$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010890if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010891 withval=$with_doc_strings;
10892fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010893
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010894
10895if test -z "$with_doc_strings"
10896then with_doc_strings="yes"
10897fi
10898if test "$with_doc_strings" != "no"
10899then
10900
Matthias Kloseb9621712010-04-24 17:59:49 +000010901$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010902
10903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10905$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010906
Antoine Pitrou042b1282010-08-13 21:15:58 +000010907# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10909$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010911# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010912if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010913 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010914if test "$withval" != no
10915then
10916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010918
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10920$as_echo "yes" >&6; }
10921else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10922$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010923fi
10924else
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10926$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927fi
10928
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010929
10930# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10932$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010935if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010936 withval=$with_pymalloc;
10937fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010938
Neil Schemenauera35c6882001-02-27 04:45:05 +000010939
Neil Schemenauer16c22972002-03-22 15:34:49 +000010940if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010941then
10942 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010943fi
10944if test "$with_pymalloc" != "no"
10945then
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010948
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010949 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10952$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010953
Benjamin Peterson05159c42009-12-03 03:01:27 +000010954# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10956$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010957
10958# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010959if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010960 withval=$with_valgrind;
10961else
10962 with_valgrind=no
10963fi
10964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10966$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010967if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 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 +020010969if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010972
10973else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010974 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010975
10976fi
10977
10978
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010979 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010980fi
10981
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010982# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010983
Guido van Rossum98935bf2001-09-05 19:13:16 +000010984DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010985
Guido van Rossume97ee181999-12-20 21:27:22 +000010986# the dlopen() function means we might want to use dynload_shlib.o. some
10987# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010988for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010989do :
10990 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010991if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010992 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010993#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010994_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010995
Guido van Rossume97ee181999-12-20 21:27:22 +000010996fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010997done
Guido van Rossume97ee181999-12-20 21:27:22 +000010998
Michael W. Hudson54241132001-12-07 15:38:26 +000010999
Guido van Rossume97ee181999-12-20 21:27:22 +000011000# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11001# loading of modules.
11002
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11004$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011005if test -z "$DYNLOADFILE"
11006then
11007 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011008 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11009 if test "$ac_cv_func_dlopen" = yes
11010 then DYNLOADFILE="dynload_shlib.o"
11011 else DYNLOADFILE="dynload_aix.o"
11012 fi
11013 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011014 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011015 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11016 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011017 *)
11018 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11019 # out any dynamic loading
11020 if test "$ac_cv_func_dlopen" = yes
11021 then DYNLOADFILE="dynload_shlib.o"
11022 else DYNLOADFILE="dynload_stub.o"
11023 fi
11024 ;;
11025 esac
11026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11028$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011029if test "$DYNLOADFILE" != "dynload_stub.o"
11030then
Martin v. Löwis11437992002-04-12 09:54:03 +000011031
Matthias Kloseb9621712010-04-24 17:59:49 +000011032$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011033
11034fi
11035
Neil Schemenauer4e425612001-06-19 15:44:15 +000011036# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11037
Michael W. Hudson54241132001-12-07 15:38:26 +000011038
Matthias Kloseb9621712010-04-24 17:59:49 +000011039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11040$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011041if test -z "$MACHDEP_OBJS"
11042then
Jack Jansene578a632001-08-15 01:27:14 +000011043 MACHDEP_OBJS=$extra_machdep_objs
11044else
11045 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011046fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011047if test -z "$MACHDEP_OBJS"; then
11048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11049$as_echo "none" >&6; }
11050else
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11052$as_echo "$MACHDEP_OBJS" >&6; }
11053fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011054
Guido van Rossum627b2d71993-12-24 10:39:16 +000011055# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011056for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011057 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011058 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011059 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011060 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011061 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011062 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011063 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11064 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011065 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011066 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011067 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011068 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011069 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011070 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011071 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11072 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011073 sigaction sigaltstack siginterrupt sigpending sigrelse \
11074 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011075 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011076 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011077 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011078do :
11079 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11080ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011081if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011082 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011083#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011084_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011085
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011086fi
11087done
11088
Michael W. Hudson54241132001-12-07 15:38:26 +000011089
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011090ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11091 #include <dirent.h>
11092"
11093if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11094
11095$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11096
11097fi
11098
11099
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011100# For some functions, having a definition is not sufficient, since
11101# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11103$as_echo_n "checking for chroot... " >&6; }
11104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011105/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011106#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011107int
11108main ()
11109{
11110void *x=chroot
11111 ;
11112 return 0;
11113}
11114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011115if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011116
Matthias Kloseb9621712010-04-24 17:59:49 +000011117$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011118
Matthias Kloseb159a552010-04-25 21:00:44 +000011119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011120$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011121else
Matthias Kloseb9621712010-04-24 17:59:49 +000011122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011124
11125fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11128$as_echo_n "checking for link... " >&6; }
11129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011131#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011132int
11133main ()
11134{
11135void *x=link
11136 ;
11137 return 0;
11138}
11139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011140if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011141
Matthias Kloseb9621712010-04-24 17:59:49 +000011142$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011143
Matthias Kloseb159a552010-04-25 21:00:44 +000011144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011145$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011146else
Matthias Kloseb9621712010-04-24 17:59:49 +000011147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11148$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011149
11150fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11153$as_echo_n "checking for symlink... " >&6; }
11154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011155/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011156#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011157int
11158main ()
11159{
11160void *x=symlink
11161 ;
11162 return 0;
11163}
11164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011168
Matthias Kloseb159a552010-04-25 21:00:44 +000011169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011171else
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11173$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011174
11175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11178$as_echo_n "checking for fchdir... " >&6; }
11179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011181#include <unistd.h>
11182int
11183main ()
11184{
11185void *x=fchdir
11186 ;
11187 return 0;
11188}
11189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011190if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011191
Matthias Kloseb9621712010-04-24 17:59:49 +000011192$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011193
Matthias Kloseb159a552010-04-25 21:00:44 +000011194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011195$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011196else
Matthias Kloseb9621712010-04-24 17:59:49 +000011197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011199
11200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11203$as_echo_n "checking for fsync... " >&6; }
11204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011205/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011206#include <unistd.h>
11207int
11208main ()
11209{
11210void *x=fsync
11211 ;
11212 return 0;
11213}
11214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011215if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011218
Matthias Kloseb159a552010-04-25 21:00:44 +000011219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011220$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011221else
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011224
11225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11228$as_echo_n "checking for fdatasync... " >&6; }
11229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011230/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011231#include <unistd.h>
11232int
11233main ()
11234{
11235void *x=fdatasync
11236 ;
11237 return 0;
11238}
11239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011240if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011241
Matthias Kloseb9621712010-04-24 17:59:49 +000011242$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011243
Matthias Kloseb159a552010-04-25 21:00:44 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011245$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011246else
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11248$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011249
11250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11253$as_echo_n "checking for epoll... " >&6; }
11254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011255/* end confdefs.h. */
11256#include <sys/epoll.h>
11257int
11258main ()
11259{
11260void *x=epoll_create
11261 ;
11262 return 0;
11263}
11264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011266
Matthias Kloseb9621712010-04-24 17:59:49 +000011267$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011268
Matthias Kloseb159a552010-04-25 21:00:44 +000011269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011270$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011271else
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11273$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011274
11275fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11278$as_echo_n "checking for epoll_create1... " >&6; }
11279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11280/* end confdefs.h. */
11281#include <sys/epoll.h>
11282int
11283main ()
11284{
11285void *x=epoll_create1
11286 ;
11287 return 0;
11288}
11289_ACEOF
11290if ac_fn_c_try_compile "$LINENO"; then :
11291
11292$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11293
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11295$as_echo "yes" >&6; }
11296else
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298$as_echo "no" >&6; }
11299
11300fi
11301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11303$as_echo_n "checking for kqueue... " >&6; }
11304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011305/* end confdefs.h. */
11306
11307#include <sys/types.h>
11308#include <sys/event.h>
11309
11310int
11311main ()
11312{
11313int x=kqueue()
11314 ;
11315 return 0;
11316}
11317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011318if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011319
Matthias Kloseb9621712010-04-24 17:59:49 +000011320$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011321
Matthias Kloseb159a552010-04-25 21:00:44 +000011322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011324else
Matthias Kloseb9621712010-04-24 17:59:49 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11326$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011327
11328fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11331$as_echo_n "checking for prlimit... " >&6; }
11332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11333/* end confdefs.h. */
11334
11335#include <sys/time.h>
11336#include <sys/resource.h>
11337
11338int
11339main ()
11340{
11341void *x=prlimit
11342 ;
11343 return 0;
11344}
11345_ACEOF
11346if ac_fn_c_try_compile "$LINENO"; then :
11347
11348$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11349
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11351$as_echo "yes" >&6; }
11352else
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
11355
11356fi
11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11358
Martin v. Löwisd5843682002-11-21 20:41:28 +000011359# On some systems (eg. FreeBSD 5), we would find a definition of the
11360# functions ctermid_r, setgroups in the library, but no prototype
11361# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11362# address to avoid compiler warnings and potential miscompilations
11363# because of the missing prototypes.
11364
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11366$as_echo_n "checking for ctermid_r... " >&6; }
11367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011368/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011369
Martin v. Löwisd5843682002-11-21 20:41:28 +000011370#include <stdio.h>
11371
Martin v. Löwisd5843682002-11-21 20:41:28 +000011372int
11373main ()
11374{
11375void* p = ctermid_r
11376 ;
11377 return 0;
11378}
11379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011380if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011381
Matthias Kloseb9621712010-04-24 17:59:49 +000011382$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011383
Matthias Kloseb159a552010-04-25 21:00:44 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011385$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011386else
Matthias Kloseb9621712010-04-24 17:59:49 +000011387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11388$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011389
11390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11392
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11394$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011395if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011396 $as_echo_n "(cached) " >&6
11397else
11398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011399/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011400#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011401int
11402main ()
11403{
11404void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011405
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011406 ;
11407 return 0;
11408}
11409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011410if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011411 ac_cv_flock_decl=yes
11412else
11413 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011414
11415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011417
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011418fi
11419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11420$as_echo "$ac_cv_flock_decl" >&6; }
11421if test "x${ac_cv_flock_decl}" = xyes; then
11422 for ac_func in flock
11423do :
11424 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011425if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011426 cat >>confdefs.h <<_ACEOF
11427#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011428_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011429
Antoine Pitroua3000072010-09-07 14:52:42 +000011430else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011432$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011433if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011434 $as_echo_n "(cached) " >&6
11435else
11436 ac_check_lib_save_LIBS=$LIBS
11437LIBS="-lbsd $LIBS"
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439/* end confdefs.h. */
11440
11441/* Override any GCC internal prototype to avoid an error.
11442 Use char because int might match the return type of a GCC
11443 builtin and then its argument prototype would still apply. */
11444#ifdef __cplusplus
11445extern "C"
11446#endif
11447char flock ();
11448int
11449main ()
11450{
11451return flock ();
11452 ;
11453 return 0;
11454}
11455_ACEOF
11456if ac_fn_c_try_link "$LINENO"; then :
11457 ac_cv_lib_bsd_flock=yes
11458else
11459 ac_cv_lib_bsd_flock=no
11460fi
11461rm -f core conftest.err conftest.$ac_objext \
11462 conftest$ac_exeext conftest.$ac_ext
11463LIBS=$ac_check_lib_save_LIBS
11464fi
11465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11466$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011467if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011468 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011469
11470
11471$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11472
11473
11474fi
11475
11476
11477fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011478done
11479
Antoine Pitroua3000072010-09-07 14:52:42 +000011480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011481
Matthias Kloseb9621712010-04-24 17:59:49 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11483$as_echo_n "checking for getpagesize... " >&6; }
11484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011486
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011487#include <unistd.h>
11488
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011489int
11490main ()
11491{
11492void* p = getpagesize
11493 ;
11494 return 0;
11495}
11496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011497if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011498
Matthias Kloseb9621712010-04-24 17:59:49 +000011499$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011500
Matthias Kloseb159a552010-04-25 21:00:44 +000011501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011502$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011503else
Matthias Kloseb9621712010-04-24 17:59:49 +000011504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11505$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011506
11507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011509
Victor Stinner984890f2011-11-24 13:53:38 +010011510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11511$as_echo_n "checking for broken unsetenv... " >&6; }
11512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11513/* end confdefs.h. */
11514
11515#include <stdlib.h>
11516
11517int
11518main ()
11519{
11520int res = unsetenv("DUMMY")
11521 ;
11522 return 0;
11523}
11524_ACEOF
11525if ac_fn_c_try_compile "$LINENO"; then :
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
11528else
11529
11530$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11531
11532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11533$as_echo "yes" >&6; }
11534
11535fi
11536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11537
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011538for ac_prog in true
11539do
11540 # Extract the first word of "$ac_prog", so it can be a program name with args.
11541set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11543$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011544if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011546else
11547 if test -n "$TRUE"; then
11548 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11549else
11550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11551for as_dir in $PATH
11552do
11553 IFS=$as_save_IFS
11554 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011555 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011557 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 $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 +000011559 break 2
11560 fi
11561done
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011563IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011564
11565fi
11566fi
11567TRUE=$ac_cv_prog_TRUE
11568if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11570$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011571else
Matthias Kloseb9621712010-04-24 17:59:49 +000011572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11573$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011574fi
11575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011576
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011577 test -n "$TRUE" && break
11578done
11579test -n "$TRUE" || TRUE="/bin/true"
11580
11581
Matthias Kloseb9621712010-04-24 17:59:49 +000011582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11583$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011584if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011585 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011586else
11587 ac_check_lib_save_LIBS=$LIBS
11588LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011590/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592/* Override any GCC internal prototype to avoid an error.
11593 Use char because int might match the return type of a GCC
11594 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011595#ifdef __cplusplus
11596extern "C"
11597#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011598char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011599int
11600main ()
11601{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011603 ;
11604 return 0;
11605}
11606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011607if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011608 ac_cv_lib_c_inet_aton=yes
11609else
Matthias Kloseb9621712010-04-24 17:59:49 +000011610 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011611fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011612rm -f core conftest.err conftest.$ac_objext \
11613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011614LIBS=$ac_check_lib_save_LIBS
11615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11617$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011618if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011619 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011620else
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11622$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011623if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011625else
11626 ac_check_lib_save_LIBS=$LIBS
11627LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011629/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011630
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631/* Override any GCC internal prototype to avoid an error.
11632 Use char because int might match the return type of a GCC
11633 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011634#ifdef __cplusplus
11635extern "C"
11636#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011637char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011638int
11639main ()
11640{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011641return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011642 ;
11643 return 0;
11644}
11645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011646if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011647 ac_cv_lib_resolv_inet_aton=yes
11648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011650fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011651rm -f core conftest.err conftest.$ac_objext \
11652 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011653LIBS=$ac_check_lib_save_LIBS
11654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11656$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011657if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011658 cat >>confdefs.h <<_ACEOF
11659#define HAVE_LIBRESOLV 1
11660_ACEOF
11661
11662 LIBS="-lresolv $LIBS"
11663
11664fi
11665
11666
11667fi
11668
11669
Christian Heimesd0764e22007-12-04 15:00:33 +000011670# On Tru64, chflags seems to be present, but calling it will
11671# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11673$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011674if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011676else
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011678 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011679else
Matthias Kloseb9621712010-04-24 17:59:49 +000011680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011681/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011682
Christian Heimesd0764e22007-12-04 15:00:33 +000011683#include <sys/stat.h>
11684#include <unistd.h>
11685int main(int argc, char*argv[])
11686{
11687 if(chflags(argv[0], 0) != 0)
11688 return 1;
11689 return 0;
11690}
Ned Deily3eb67d52011-06-28 00:00:28 -070011691
Christian Heimesd0764e22007-12-04 15:00:33 +000011692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011693if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011694 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011695else
Matthias Kloseb9621712010-04-24 17:59:49 +000011696 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011700fi
11701
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011702
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11705$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011706if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011707 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011708if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011709 ac_cv_have_chflags="yes"
11710else
11711 ac_cv_have_chflags="no"
11712fi
11713
11714fi
11715if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011716
Matthias Kloseb9621712010-04-24 17:59:49 +000011717$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011718
11719fi
11720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11722$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011723if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011727 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011728else
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011730/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011731
Christian Heimesd0764e22007-12-04 15:00:33 +000011732#include <sys/stat.h>
11733#include <unistd.h>
11734int main(int argc, char*argv[])
11735{
11736 if(lchflags(argv[0], 0) != 0)
11737 return 1;
11738 return 0;
11739}
Ned Deily3eb67d52011-06-28 00:00:28 -070011740
Christian Heimesd0764e22007-12-04 15:00:33 +000011741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011742if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011743 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011744else
Matthias Kloseb9621712010-04-24 17:59:49 +000011745 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011749fi
11750
11751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11754$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011755if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011756 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011757if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011758 ac_cv_have_lchflags="yes"
11759else
11760 ac_cv_have_lchflags="no"
11761fi
11762
11763fi
11764if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011767
11768fi
11769
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011770case $ac_sys_system/$ac_sys_release in
11771Darwin/*)
11772 _CUR_CFLAGS="${CFLAGS}"
11773 _CUR_LDFLAGS="${LDFLAGS}"
11774 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11775 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11776 ;;
11777esac
11778
Matthias Kloseb9621712010-04-24 17:59:49 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11780$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011783else
11784 ac_check_lib_save_LIBS=$LIBS
11785LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011787/* end confdefs.h. */
11788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011789/* Override any GCC internal prototype to avoid an error.
11790 Use char because int might match the return type of a GCC
11791 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011792#ifdef __cplusplus
11793extern "C"
11794#endif
11795char inflateCopy ();
11796int
11797main ()
11798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011800 ;
11801 return 0;
11802}
11803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011804if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011805 ac_cv_lib_z_inflateCopy=yes
11806else
Matthias Kloseb9621712010-04-24 17:59:49 +000011807 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011809rm -f core conftest.err conftest.$ac_objext \
11810 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011811LIBS=$ac_check_lib_save_LIBS
11812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11814$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011815if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011818
11819fi
11820
11821
11822case $ac_sys_system/$ac_sys_release in
11823Darwin/*)
11824 CFLAGS="${_CUR_CFLAGS}"
11825 LDFLAGS="${_CUR_LDFLAGS}"
11826 ;;
11827esac
11828
Matthias Kloseb9621712010-04-24 17:59:49 +000011829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11830$as_echo_n "checking for hstrerror... " >&6; }
11831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011832/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011833
Martin v. Löwise9416172003-05-03 10:12:45 +000011834#include <netdb.h>
11835
Martin v. Löwise9416172003-05-03 10:12:45 +000011836int
11837main ()
11838{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011840 ;
11841 return 0;
11842}
11843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011845
Matthias Kloseb9621712010-04-24 17:59:49 +000011846$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011847
Matthias Kloseb159a552010-04-25 21:00:44 +000011848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011849$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011850else
Matthias Kloseb9621712010-04-24 17:59:49 +000011851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11852$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011853
11854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011855rm -f core conftest.err conftest.$ac_objext \
11856 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857
Matthias Kloseb9621712010-04-24 17:59:49 +000011858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11859$as_echo_n "checking for inet_aton... " >&6; }
11860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011861/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011862
Martin v. Löwis86d66262006-02-17 08:40:11 +000011863#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011864#include <sys/socket.h>
11865#include <netinet/in.h>
11866#include <arpa/inet.h>
11867
Martin v. Löwise9416172003-05-03 10:12:45 +000011868int
11869main ()
11870{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011871void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011872 ;
11873 return 0;
11874}
11875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011879
Matthias Kloseb159a552010-04-25 21:00:44 +000011880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011881$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11884$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011885
11886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011887rm -f core conftest.err conftest.$ac_objext \
11888 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011889
Matthias Kloseb9621712010-04-24 17:59:49 +000011890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11891$as_echo_n "checking for inet_pton... " >&6; }
11892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011893/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011894
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011895#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011896#include <sys/socket.h>
11897#include <netinet/in.h>
11898#include <arpa/inet.h>
11899
Martin v. Löwise9416172003-05-03 10:12:45 +000011900int
11901main ()
11902{
11903void* p = inet_pton
11904 ;
11905 return 0;
11906}
11907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011911
Matthias Kloseb159a552010-04-25 21:00:44 +000011912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011913$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011914else
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11916$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011917
11918fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011920
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011921# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11923$as_echo_n "checking for setgroups... " >&6; }
11924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011925/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011926
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011927#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011928#ifdef HAVE_GRP_H
11929#include <grp.h>
11930#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011931
Martin v. Löwisd5843682002-11-21 20:41:28 +000011932int
11933main ()
11934{
11935void* p = setgroups
11936 ;
11937 return 0;
11938}
11939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011940if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011943
Matthias Kloseb159a552010-04-25 21:00:44 +000011944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011945$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011946else
Matthias Kloseb9621712010-04-24 17:59:49 +000011947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11948$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011949
11950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011952
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011953# check for openpty and forkpty
11954
11955for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011956do :
11957 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011958if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011959 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011960#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011961_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011962
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11965$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011966if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011968else
Martin v. Löwis11437992002-04-12 09:54:03 +000011969 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011970LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011974/* Override any GCC internal prototype to avoid an error.
11975 Use char because int might match the return type of a GCC
11976 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011977#ifdef __cplusplus
11978extern "C"
11979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011980char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011981int
11982main ()
11983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 ;
11986 return 0;
11987}
11988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011989if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011994rm -f core conftest.err conftest.$ac_objext \
11995 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011996LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11999$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012000if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012002 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012003else
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12005$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012006if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012008else
12009 ac_check_lib_save_LIBS=$LIBS
12010LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012012/* end confdefs.h. */
12013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014/* Override any GCC internal prototype to avoid an error.
12015 Use char because int might match the return type of a GCC
12016 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012017#ifdef __cplusplus
12018extern "C"
12019#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012020char openpty ();
12021int
12022main ()
12023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012024return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012025 ;
12026 return 0;
12027}
12028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012029if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012030 ac_cv_lib_bsd_openpty=yes
12031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012034rm -f core conftest.err conftest.$ac_objext \
12035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012036LIBS=$ac_check_lib_save_LIBS
12037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12039$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012040if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012042 LIBS="$LIBS -lbsd"
12043fi
12044
12045
12046fi
12047
Fred Drake8cef4cf2000-06-28 16:40:38 +000012048
12049fi
12050done
12051
12052for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012053do :
12054 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012055if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012056 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012058_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012059
Fred Drake8cef4cf2000-06-28 16:40:38 +000012060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12062$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012063if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012065else
Martin v. Löwis11437992002-04-12 09:54:03 +000012066 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012067LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012070
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071/* Override any GCC internal prototype to avoid an error.
12072 Use char because int might match the return type of a GCC
12073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012074#ifdef __cplusplus
12075extern "C"
12076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012077char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012078int
12079main ()
12080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012081return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012082 ;
12083 return 0;
12084}
12085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012086if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012087 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012088else
Matthias Kloseb9621712010-04-24 17:59:49 +000012089 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012091rm -f core conftest.err conftest.$ac_objext \
12092 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012093LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12096$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012097if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012099 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12102$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012103if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012105else
12106 ac_check_lib_save_LIBS=$LIBS
12107LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012109/* end confdefs.h. */
12110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012111/* Override any GCC internal prototype to avoid an error.
12112 Use char because int might match the return type of a GCC
12113 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012114#ifdef __cplusplus
12115extern "C"
12116#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012117char forkpty ();
12118int
12119main ()
12120{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012122 ;
12123 return 0;
12124}
12125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012126if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012127 ac_cv_lib_bsd_forkpty=yes
12128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012131rm -f core conftest.err conftest.$ac_objext \
12132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012133LIBS=$ac_check_lib_save_LIBS
12134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12136$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012137if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012139 LIBS="$LIBS -lbsd"
12140fi
12141
12142
12143fi
12144
Fred Drake8cef4cf2000-06-28 16:40:38 +000012145
12146fi
12147done
12148
Jack Jansendd19cf82001-12-06 22:36:17 +000012149
Christian Heimesb186d002008-03-18 15:15:01 +000012150# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012151for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012152do :
12153 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012154if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012155 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012156#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012157_ACEOF
12158
12159fi
12160done
12161
12162
Michael W. Hudson54241132001-12-07 15:38:26 +000012163# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012164for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012165do :
12166 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12167ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012168if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012171_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012172
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012173fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012174done
12175
Michael W. Hudson54241132001-12-07 15:38:26 +000012176
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012177ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012178if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012179 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012180
Martin v. Löwis1142de32002-03-29 16:28:31 +000012181else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012182 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012183 *" dup2.$ac_objext "* ) ;;
12184 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012186esac
12187
Martin v. Löwis1142de32002-03-29 16:28:31 +000012188fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012189
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012190ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012192 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12193
12194else
12195 case " $LIBOBJS " in
12196 *" strdup.$ac_objext "* ) ;;
12197 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12198 ;;
12199esac
12200
12201fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012202
12203
12204for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012205do :
12206 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012207if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012209#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012212/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012213#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012214int
12215main ()
12216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 ;
12219 return 0;
12220}
12221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012225
Guido van Rossum627b2d71993-12-24 10:39:16 +000012226fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012228
Guido van Rossum627b2d71993-12-24 10:39:16 +000012229fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012230done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012231
Jack Jansen150753c2003-03-29 22:07:47 +000012232for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012233do :
12234 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012235if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012236 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012237#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012240/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012241#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012242int
12243main ()
12244{
12245setpgrp(0,0);
12246 ;
12247 return 0;
12248}
12249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012250if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012253
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012256
12257fi
12258done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012259
Thomas Wouters3a584202000-08-05 23:28:51 +000012260for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012261do :
12262 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012263if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012269#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012278if ac_fn_c_try_compile "$LINENO"; then :
12279
Guido van Rossum627b2d71993-12-24 10:39:16 +000012280else
Skip Montanaro6dead952003-09-25 14:50:04 +000012281
Matthias Kloseb9621712010-04-24 17:59:49 +000012282$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283
Martin v. Löwis11437992002-04-12 09:54:03 +000012284
Guido van Rossum627b2d71993-12-24 10:39:16 +000012285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012287
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012288fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012289done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012290
Michael W. Hudson54241132001-12-07 15:38:26 +000012291
Victor Stinnere0be4232011-10-25 13:06:09 +020012292for ac_func in clock_gettime
12293do :
12294 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12295if test "x$ac_cv_func_clock_gettime" = xyes; then :
12296 cat >>confdefs.h <<_ACEOF
12297#define HAVE_CLOCK_GETTIME 1
12298_ACEOF
12299
12300else
12301
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12303$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12304if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12305 $as_echo_n "(cached) " >&6
12306else
12307 ac_check_lib_save_LIBS=$LIBS
12308LIBS="-lrt $LIBS"
12309cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12310/* end confdefs.h. */
12311
12312/* Override any GCC internal prototype to avoid an error.
12313 Use char because int might match the return type of a GCC
12314 builtin and then its argument prototype would still apply. */
12315#ifdef __cplusplus
12316extern "C"
12317#endif
12318char clock_gettime ();
12319int
12320main ()
12321{
12322return clock_gettime ();
12323 ;
12324 return 0;
12325}
12326_ACEOF
12327if ac_fn_c_try_link "$LINENO"; then :
12328 ac_cv_lib_rt_clock_gettime=yes
12329else
12330 ac_cv_lib_rt_clock_gettime=no
12331fi
12332rm -f core conftest.err conftest.$ac_objext \
12333 conftest$ac_exeext conftest.$ac_ext
12334LIBS=$ac_check_lib_save_LIBS
12335fi
12336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12337$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12338if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12339
Victor Stinner7efb8332014-08-29 15:41:08 +020012340 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012341 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12342
12343
12344$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12345
12346
12347fi
12348
12349
12350fi
12351done
12352
12353
12354for ac_func in clock_getres
12355do :
12356 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12357if test "x$ac_cv_func_clock_getres" = xyes; then :
12358 cat >>confdefs.h <<_ACEOF
12359#define HAVE_CLOCK_GETRES 1
12360_ACEOF
12361
12362else
12363
12364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12365$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12366if ${ac_cv_lib_rt_clock_getres+:} false; then :
12367 $as_echo_n "(cached) " >&6
12368else
12369 ac_check_lib_save_LIBS=$LIBS
12370LIBS="-lrt $LIBS"
12371cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12372/* end confdefs.h. */
12373
12374/* Override any GCC internal prototype to avoid an error.
12375 Use char because int might match the return type of a GCC
12376 builtin and then its argument prototype would still apply. */
12377#ifdef __cplusplus
12378extern "C"
12379#endif
12380char clock_getres ();
12381int
12382main ()
12383{
12384return clock_getres ();
12385 ;
12386 return 0;
12387}
12388_ACEOF
12389if ac_fn_c_try_link "$LINENO"; then :
12390 ac_cv_lib_rt_clock_getres=yes
12391else
12392 ac_cv_lib_rt_clock_getres=no
12393fi
12394rm -f core conftest.err conftest.$ac_objext \
12395 conftest$ac_exeext conftest.$ac_ext
12396LIBS=$ac_check_lib_save_LIBS
12397fi
12398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12399$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12400if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12401
12402 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12403
12404
12405fi
12406
12407
12408fi
12409done
12410
12411
Matthias Kloseb9621712010-04-24 17:59:49 +000012412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12413$as_echo_n "checking for major... " >&6; }
12414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012415/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012416
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012417#if defined(MAJOR_IN_MKDEV)
12418#include <sys/mkdev.h>
12419#elif defined(MAJOR_IN_SYSMACROS)
12420#include <sys/sysmacros.h>
12421#else
12422#include <sys/types.h>
12423#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012424
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012425int
12426main ()
12427{
12428
12429 makedev(major(0),minor(0));
12430
12431 ;
12432 return 0;
12433}
12434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012436
12437
Matthias Kloseb9621712010-04-24 17:59:49 +000012438$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012439
Matthias Kloseb9621712010-04-24 17:59:49 +000012440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12441$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012442
12443else
Skip Montanaro6dead952003-09-25 14:50:04 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12446$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012447
12448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012449rm -f core conftest.err conftest.$ac_objext \
12450 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012451
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012452# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012453# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12455$as_echo_n "checking for getaddrinfo... " >&6; }
12456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012458
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012459#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012460#include <sys/socket.h>
12461#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012462#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012463
Martin v. Löwis11437992002-04-12 09:54:03 +000012464int
12465main ()
12466{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012467getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012468 ;
12469 return 0;
12470}
12471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012472if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012473 have_getaddrinfo=yes
12474else
Matthias Kloseb9621712010-04-24 17:59:49 +000012475 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012476fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012477rm -f core conftest.err conftest.$ac_objext \
12478 conftest$ac_exeext conftest.$ac_ext
12479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12480$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012481if test $have_getaddrinfo = yes
12482then
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12484$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012485 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012489
12490if test "${enable_ipv6+set}" = set; then
12491 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12492else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012493 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012494fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012498
Stefan Krah19c21392012-11-22 23:47:32 +010012499#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012500#include <sys/types.h>
12501#include <netdb.h>
12502#include <string.h>
12503#include <sys/socket.h>
12504#include <netinet/in.h>
12505
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012506int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012507{
12508 int passive, gaierr, inet4 = 0, inet6 = 0;
12509 struct addrinfo hints, *ai, *aitop;
12510 char straddr[INET6_ADDRSTRLEN], strport[16];
12511
12512 for (passive = 0; passive <= 1; passive++) {
12513 memset(&hints, 0, sizeof(hints));
12514 hints.ai_family = AF_UNSPEC;
12515 hints.ai_flags = passive ? AI_PASSIVE : 0;
12516 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012517 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012518 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12519 (void)gai_strerror(gaierr);
12520 goto bad;
12521 }
12522 for (ai = aitop; ai; ai = ai->ai_next) {
12523 if (ai->ai_addr == NULL ||
12524 ai->ai_addrlen == 0 ||
12525 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12526 straddr, sizeof(straddr), strport, sizeof(strport),
12527 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12528 goto bad;
12529 }
12530 switch (ai->ai_family) {
12531 case AF_INET:
12532 if (strcmp(strport, "54321") != 0) {
12533 goto bad;
12534 }
12535 if (passive) {
12536 if (strcmp(straddr, "0.0.0.0") != 0) {
12537 goto bad;
12538 }
12539 } else {
12540 if (strcmp(straddr, "127.0.0.1") != 0) {
12541 goto bad;
12542 }
12543 }
12544 inet4++;
12545 break;
12546 case AF_INET6:
12547 if (strcmp(strport, "54321") != 0) {
12548 goto bad;
12549 }
12550 if (passive) {
12551 if (strcmp(straddr, "::") != 0) {
12552 goto bad;
12553 }
12554 } else {
12555 if (strcmp(straddr, "::1") != 0) {
12556 goto bad;
12557 }
12558 }
12559 inet6++;
12560 break;
12561 case AF_UNSPEC:
12562 goto bad;
12563 break;
12564 default:
12565 /* another family support? */
12566 break;
12567 }
12568 }
12569 }
12570
12571 if (!(inet4 == 0 || inet4 == 2))
12572 goto bad;
12573 if (!(inet6 == 0 || inet6 == 2))
12574 goto bad;
12575
12576 if (aitop)
12577 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012578 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012579
12580 bad:
12581 if (aitop)
12582 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012583 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012584}
12585
Martin v. Löwis11437992002-04-12 09:54:03 +000012586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012587if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012588 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012589else
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12593 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012596fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12601$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12602
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012603if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012604then
12605 if test $ipv6 = yes
12606 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012607 echo 'Fatal: You must get working getaddrinfo() function.'
12608 echo ' or you can specify "--disable-ipv6"'.
12609 exit 1
12610 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012611else
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Matthias Kloseb9621712010-04-24 17:59:49 +000012613$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012614
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012615fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012616
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012617for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012618do :
12619 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012620if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012621 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012622#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012623_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012624
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012625fi
12626done
12627
Michael W. Hudson54241132001-12-07 15:38:26 +000012628
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012629# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12631$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012632if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012634else
Matthias Kloseb9621712010-04-24 17:59:49 +000012635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637#include <sys/types.h>
12638#include <sys/time.h>
12639#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Martin v. Löwis11437992002-04-12 09:54:03 +000012641int
12642main ()
12643{
12644if ((struct tm *) 0)
12645return 0;
12646 ;
12647 return 0;
12648}
12649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012650if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012652else
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12658$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012659if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012662
12663fi
12664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12666$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012667if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012668 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012669else
Matthias Kloseb9621712010-04-24 17:59:49 +000012670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012671/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672#include <sys/types.h>
12673#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012674
Martin v. Löwis11437992002-04-12 09:54:03 +000012675int
12676main ()
12677{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678struct tm tm;
12679 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012680 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012681 ;
12682 return 0;
12683}
12684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012685if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012686 ac_cv_struct_tm=time.h
12687else
Matthias Kloseb9621712010-04-24 17:59:49 +000012688 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12693$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012694if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012697
12698fi
12699
Matthias Kloseb9621712010-04-24 17:59:49 +000012700ac_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 +000012701#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012702
Matthias Kloseb9621712010-04-24 17:59:49 +000012703"
Victor Stinnere0be4232011-10-25 13:06:09 +020012704if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
12706cat >>confdefs.h <<_ACEOF
12707#define HAVE_STRUCT_TM_TM_ZONE 1
12708_ACEOF
12709
12710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012712
Martin v. Löwis11437992002-04-12 09:54:03 +000012713if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716
12717else
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12719"
Victor Stinnere0be4232011-10-25 13:06:09 +020012720if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012721 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724fi
12725
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012727#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728_ACEOF
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12731$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012732if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012733 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734else
Matthias Kloseb9621712010-04-24 17:59:49 +000012735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012737#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012738#if !HAVE_DECL_TZNAME
12739extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012750if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751 ac_cv_var_tzname=yes
12752else
Matthias Kloseb9621712010-04-24 17:59:49 +000012753 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012755rm -f core conftest.err conftest.$ac_objext \
12756 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12759$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012760 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
Matthias Kloseb9621712010-04-24 17:59:49 +000012762$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012763
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012764 fi
12765fi
12766
Matthias Kloseb9621712010-04-24 17:59:49 +000012767ac_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 +020012768if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
12770cat >>confdefs.h <<_ACEOF
12771#define HAVE_STRUCT_STAT_ST_RDEV 1
12772_ACEOF
12773
12774
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012775fi
12776
Matthias Kloseb9621712010-04-24 17:59:49 +000012777ac_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 +020012778if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012779
Martin v. Löwis11437992002-04-12 09:54:03 +000012780cat >>confdefs.h <<_ACEOF
12781#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12782_ACEOF
12783
12784
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012785fi
12786
Matthias Kloseb9621712010-04-24 17:59:49 +000012787ac_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 +020012788if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012789
12790cat >>confdefs.h <<_ACEOF
12791#define HAVE_STRUCT_STAT_ST_FLAGS 1
12792_ACEOF
12793
12794
12795fi
12796
Matthias Kloseb9621712010-04-24 17:59:49 +000012797ac_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 +020012798if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012799
12800cat >>confdefs.h <<_ACEOF
12801#define HAVE_STRUCT_STAT_ST_GEN 1
12802_ACEOF
12803
12804
12805fi
12806
Matthias Kloseb9621712010-04-24 17:59:49 +000012807ac_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 +020012808if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012809
12810cat >>confdefs.h <<_ACEOF
12811#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12812_ACEOF
12813
12814
12815fi
12816
Matthias Kloseb9621712010-04-24 17:59:49 +000012817ac_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 +020012818if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012819
Martin v. Löwis11437992002-04-12 09:54:03 +000012820cat >>confdefs.h <<_ACEOF
12821#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12822_ACEOF
12823
12824
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012825fi
12826
Michael W. Hudson54241132001-12-07 15:38:26 +000012827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12829$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012830if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832else
Matthias Kloseb159a552010-04-25 21:00:44 +000012833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012835/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012837int
12838main ()
12839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012840return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 ;
12842 return 0;
12843}
12844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012845if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012846 ac_cv_header_time_altzone=yes
12847else
Matthias Kloseb9621712010-04-24 17:59:49 +000012848 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012849fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012852fi
12853
Matthias Kloseb9621712010-04-24 17:59:49 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12855$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012856if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012857
Matthias Kloseb9621712010-04-24 17:59:49 +000012858$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012859
12860fi
12861
Guido van Rossumda88dad1995-01-26 00:46:29 +000012862was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12864$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012866/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012867
12868#include <sys/types.h>
12869#include <sys/select.h>
12870#include <sys/time.h>
12871
Martin v. Löwis11437992002-04-12 09:54:03 +000012872int
12873main ()
12874{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012875;
Martin v. Löwis11437992002-04-12 09:54:03 +000012876 ;
12877 return 0;
12878}
12879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012880if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012881
12882
Matthias Kloseb9621712010-04-24 17:59:49 +000012883$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012885 was_it_defined=yes
12886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12890$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12893$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012894if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012899#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012900int
12901main ()
12902{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012903struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012904 ;
12905 return 0;
12906}
12907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012908if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909 ac_cv_struct_addrinfo=yes
12910else
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12914fi
12915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12917$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012918if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012919
Matthias Kloseb9621712010-04-24 17:59:49 +000012920$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012921
12922fi
12923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12925$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012926if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012928else
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012930/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012931
12932# include <sys/types.h>
12933# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012934int
12935main ()
12936{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012937struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012938 ;
12939 return 0;
12940}
12941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012943 ac_cv_struct_sockaddr_storage=yes
12944else
Matthias Kloseb9621712010-04-24 17:59:49 +000012945 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12948fi
12949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12951$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012952if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012953
Matthias Kloseb9621712010-04-24 17:59:49 +000012954$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012955
12956fi
12957
Guido van Rossum627b2d71993-12-24 10:39:16 +000012958# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012959
Matthias Kloseb9621712010-04-24 17:59:49 +000012960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12961$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012962if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012963 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012964else
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012966/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012967$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012968int
12969main ()
12970{
12971static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012972test_array [0] = 0;
12973return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
12975 ;
12976 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012977}
Martin v. Löwis11437992002-04-12 09:54:03 +000012978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012979if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012980 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012981else
Matthias Kloseb9621712010-04-24 17:59:49 +000012982 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12987$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012988if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012989 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012990
12991fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012992
Matthias Kloseb9621712010-04-24 17:59:49 +000012993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12994$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012995if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012996 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012997else
Matthias Kloseb9621712010-04-24 17:59:49 +000012998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012999/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000
Martin v. Löwis11437992002-04-12 09:54:03 +000013001int
13002main ()
13003{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013004
Martin v. Löwis11437992002-04-12 09:54:03 +000013005#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013006 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013007 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013008 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013009 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010 char const *const *pcpcc;
13011 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 /* NEC SVR4.0.2 mips cc rejects this. */
13013 struct point {int x, y;};
13014 static struct point const zero = {0,0};
13015 /* AIX XL C 1.02.0.0 rejects this.
13016 It does not let you subtract one const X* pointer from another in
13017 an arm of an if-expression whose if-part is not a constant
13018 expression */
13019 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022 ++pcpcc;
13023 ppc = (char**) pcpcc;
13024 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013025 { /* SCO 3.2v4 cc rejects this sort of thing. */
13026 char tx;
13027 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013028 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013029
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013032 }
13033 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13034 int x[] = {25, 17};
13035 const int *foo = &x[0];
13036 ++foo;
13037 }
13038 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13039 typedef const int *iptr;
13040 iptr p = 0;
13041 ++p;
13042 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013043 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013045 struct s { int j; const int *ap[3]; } bx;
13046 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013047 }
13048 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13049 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013051 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013052 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013053#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013054
Martin v. Löwis11437992002-04-12 09:54:03 +000013055 ;
13056 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013057}
Martin v. Löwis11437992002-04-12 09:54:03 +000013058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013059if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013060 ac_cv_c_const=yes
13061else
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13067$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013068if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013069
Matthias Kloseb9621712010-04-24 17:59:49 +000013070$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071
13072fi
13073
Michael W. Hudson54241132001-12-07 15:38:26 +000013074
Guido van Rossumda88dad1995-01-26 00:46:29 +000013075works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13077$as_echo_n "checking for working volatile... " >&6; }
13078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013079/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013080
Martin v. Löwis11437992002-04-12 09:54:03 +000013081int
13082main ()
13083{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013084volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013085 ;
13086 return 0;
13087}
13088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013089if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013090 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013091else
Skip Montanaro6dead952003-09-25 14:50:04 +000013092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013094
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013095
Guido van Rossum627b2d71993-12-24 10:39:16 +000013096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13099$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013100
Guido van Rossumda88dad1995-01-26 00:46:29 +000013101works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13103$as_echo_n "checking for working signed char... " >&6; }
13104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013106
Martin v. Löwis11437992002-04-12 09:54:03 +000013107int
13108main ()
13109{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 ;
13112 return 0;
13113}
13114_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013115if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013116 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013117else
Skip Montanaro6dead952003-09-25 14:50:04 +000013118
Matthias Kloseb9621712010-04-24 17:59:49 +000013119$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013120
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013121
Guido van Rossum7f43da71994-08-01 12:15:30 +000013122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13125$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013126
Guido van Rossumda88dad1995-01-26 00:46:29 +000013127have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13129$as_echo_n "checking for prototypes... " >&6; }
13130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013131/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013132int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013133int
13134main ()
13135{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013136return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 ;
13138 return 0;
13139}
13140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013141if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013142
Matthias Kloseb9621712010-04-24 17:59:49 +000013143$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013144
Matthias Kloseb159a552010-04-25 21:00:44 +000013145 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13149$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013150
Guido van Rossumda88dad1995-01-26 00:46:29 +000013151works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13153$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013155/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013156
13157#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013158int foo(int x, ...) {
13159 va_list va;
13160 va_start(va, x);
13161 va_arg(va, int);
13162 va_arg(va, char *);
13163 va_arg(va, double);
13164 return 0;
13165}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167int
13168main ()
13169{
Guido van Rossum90eea071996-08-30 20:58:57 +000013170return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 ;
13172 return 0;
13173}
13174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013176
13177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013179
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013180 works=yes
13181
Guido van Rossum627b2d71993-12-24 10:39:16 +000013182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13185$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186
Martin v. Löwisd6320502004-08-12 13:45:08 +000013187# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13189$as_echo_n "checking for socketpair... " >&6; }
13190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013191/* end confdefs.h. */
13192
13193#include <sys/types.h>
13194#include <sys/socket.h>
13195
13196int
13197main ()
13198{
13199void *x=socketpair
13200 ;
13201 return 0;
13202}
13203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013204if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013207
Matthias Kloseb159a552010-04-25 21:00:44 +000013208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013209$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013210else
Matthias Kloseb9621712010-04-24 17:59:49 +000013211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013213
13214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013216
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13219$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013221/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222#include <sys/types.h>
13223#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013224int
13225main ()
13226{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227struct sockaddr x;
13228x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 ;
13230 return 0;
13231}
13232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013233if ac_fn_c_try_compile "$LINENO"; then :
13234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13235$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238
13239else
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013242
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013245
Guido van Rossumda88dad1995-01-26 00:46:29 +000013246va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13248$as_echo_n "checking whether va_list is an array... " >&6; }
13249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251
13252#ifdef HAVE_STDARG_PROTOTYPES
13253#include <stdarg.h>
13254#else
13255#include <varargs.h>
13256#endif
13257
Martin v. Löwis11437992002-04-12 09:54:03 +000013258int
13259main ()
13260{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 ;
13263 return 0;
13264}
13265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013266if ac_fn_c_try_compile "$LINENO"; then :
13267
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013268else
Skip Montanaro6dead952003-09-25 14:50:04 +000013269
Martin v. Löwis11437992002-04-12 09:54:03 +000013270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Guido van Rossumda88dad1995-01-26 00:46:29 +000013273 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013274
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13278$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013280# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013281
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013284if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13289$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013290 OLD_CFLAGS=$CFLAGS
13291 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013293/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013294
13295# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013296
Martin v. Löwis11437992002-04-12 09:54:03 +000013297int
13298main ()
13299{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013300
13301 char *name;
13302 struct hostent *he, *res;
13303 char buffer[2048];
13304 int buflen = 2048;
13305 int h_errnop;
13306
13307 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013308
13309 ;
13310 return 0;
13311}
13312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013319
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13321$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013323else
Skip Montanaro6dead952003-09-25 14:50:04 +000013324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13326$as_echo "no" >&6; }
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13328$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013330/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013331
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013332# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334int
13335main ()
13336{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013337
13338 char *name;
13339 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013340 char buffer[2048];
13341 int buflen = 2048;
13342 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013343
Matthias Kloseb159a552010-04-25 21:00:44 +000013344 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
13346 ;
13347 return 0;
13348}
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013353
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
Matthias Kloseb159a552010-04-25 21:00:44 +000013355$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13358$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013360else
Skip Montanaro6dead952003-09-25 14:50:04 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13363$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13365$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13367/* end confdefs.h. */
13368
13369# include <netdb.h>
13370
13371int
13372main ()
13373{
13374
13375 char *name;
13376 struct hostent *he;
13377 struct hostent_data data;
13378
13379 (void) gethostbyname_r(name, he, &data);
13380
13381 ;
13382 return 0;
13383}
13384_ACEOF
13385if ac_fn_c_try_compile "$LINENO"; then :
13386
13387 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13388
13389
13390$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13391
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13393$as_echo "yes" >&6; }
13394
13395else
13396
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13398$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013408 CFLAGS=$OLD_CFLAGS
13409
13410else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013411
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 for ac_func in gethostbyname
13413do :
13414 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013415if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013417#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013418_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013419
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013420fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013421done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013422
Michael W. Hudson54241132001-12-07 15:38:26 +000013423
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424fi
13425
Michael W. Hudson54241132001-12-07 15:38:26 +000013426
13427
13428
13429
13430
13431
Guido van Rossum627b2d71993-12-24 10:39:16 +000013432# checks for system services
13433# (none yet)
13434
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013435# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013436ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013437if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013438
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013439else
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13441$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013442if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013444else
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013446LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013449
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450/* Override any GCC internal prototype to avoid an error.
13451 Use char because int might match the return type of a GCC
13452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013453#ifdef __cplusplus
13454extern "C"
13455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013456char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013457int
13458main ()
13459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013461 ;
13462 return 0;
13463}
13464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013465if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013467else
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013470rm -f core conftest.err conftest.$ac_objext \
13471 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013472LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13475$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013476if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 cat >>confdefs.h <<_ACEOF
13478#define HAVE_LIBIEEE 1
13479_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013480
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013481 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483fi
13484
Michael W. Hudson54241132001-12-07 15:38:26 +000013485
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013486fi
13487
Michael W. Hudson54241132001-12-07 15:38:26 +000013488
Guido van Rossum7f253911997-05-09 02:42:48 +000013489# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13491$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013493# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013495 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013496if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013497then
13498
Matthias Kloseb9621712010-04-24 17:59:49 +000013499$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013500
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13502$as_echo "yes" >&6; }
13503else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13504$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013505fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013506else
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13508$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013509fi
13510
Guido van Rossum7f253911997-05-09 02:42:48 +000013511
Guido van Rossum7f43da71994-08-01 12:15:30 +000013512# check for --with-libm=...
13513
Guido van Rossum563e7081996-09-10 18:20:48 +000013514case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013515Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013516*) LIBM=-lm
13517esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13519$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013521# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013522if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013523 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013524if test "$withval" = no
13525then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13527$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013528elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013529then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13531$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013532else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013533fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013534else
Matthias Kloseb9621712010-04-24 17:59:49 +000013535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13536$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537fi
13538
Guido van Rossum7f43da71994-08-01 12:15:30 +000013539
13540# check for --with-libc=...
13541
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13543$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013546if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013548if test "$withval" = no
13549then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13551$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013552elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013553then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13555$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013556else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013557fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013558else
Matthias Kloseb9621712010-04-24 17:59:49 +000013559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13560$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561fi
13562
Guido van Rossum7f43da71994-08-01 12:15:30 +000013563
Stefan Krah1919b7e2012-03-21 18:25:23 +010013564# **************************************
13565# * Check for gcc x64 inline assembler *
13566# **************************************
13567
13568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13569$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571/* end confdefs.h. */
13572
13573int
13574main ()
13575{
13576
13577 __asm__ __volatile__ ("movq %rcx, %rax");
13578
13579 ;
13580 return 0;
13581}
13582_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013583if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013584 have_gcc_asm_for_x64=yes
13585else
13586 have_gcc_asm_for_x64=no
13587fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013588rm -f core conftest.err conftest.$ac_objext \
13589 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13591$as_echo "$have_gcc_asm_for_x64" >&6; }
13592if test "$have_gcc_asm_for_x64" = yes
13593then
13594
13595$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13596
13597fi
13598
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013599# **************************************************
13600# * Check for various properties of floating point *
13601# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13604$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013605if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013606 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013607else
13608
Matthias Kloseb9621712010-04-24 17:59:49 +000013609if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013610 ac_cv_little_endian_double=no
13611else
Matthias Kloseb9621712010-04-24 17:59:49 +000013612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613/* end confdefs.h. */
13614
13615#include <string.h>
13616int main() {
13617 double x = 9006104071832581.0;
13618 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13619 return 0;
13620 else
13621 return 1;
13622}
13623
13624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013625if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013626 ac_cv_little_endian_double=yes
13627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013630rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13631 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013632fi
13633
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013634fi
13635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13637$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013638if test "$ac_cv_little_endian_double" = yes
13639then
13640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013642
13643fi
13644
Matthias Kloseb9621712010-04-24 17:59:49 +000013645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13646$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013647if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013649else
13650
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013652 ac_cv_big_endian_double=no
13653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013655/* end confdefs.h. */
13656
13657#include <string.h>
13658int main() {
13659 double x = 9006104071832581.0;
13660 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13661 return 0;
13662 else
13663 return 1;
13664}
13665
13666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013668 ac_cv_big_endian_double=yes
13669else
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013671fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13673 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013674fi
13675
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013676fi
13677
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13679$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680if test "$ac_cv_big_endian_double" = yes
13681then
13682
Matthias Kloseb9621712010-04-24 17:59:49 +000013683$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013684
13685fi
13686
13687# Some ARM platforms use a mixed-endian representation for doubles.
13688# While Python doesn't currently have full support for these platforms
13689# (see e.g., issue 1762561), we can at least make sure that float <-> string
13690# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13692$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013693if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013695else
13696
Matthias Kloseb9621712010-04-24 17:59:49 +000013697if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013698 ac_cv_mixed_endian_double=no
13699else
Matthias Kloseb9621712010-04-24 17:59:49 +000013700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013701/* end confdefs.h. */
13702
13703#include <string.h>
13704int main() {
13705 double x = 9006104071832581.0;
13706 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13707 return 0;
13708 else
13709 return 1;
13710}
13711
13712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013713if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013714 ac_cv_mixed_endian_double=yes
13715else
Matthias Kloseb9621712010-04-24 17:59:49 +000013716 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013720fi
13721
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722fi
13723
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13725$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013726if test "$ac_cv_mixed_endian_double" = yes
13727then
13728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013730
13731fi
13732
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013733# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013734# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013735# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013736# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013737# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013738# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013739
13740# This inline assembler syntax may also work for suncc and icc,
13741# so we try it on all platforms.
13742
Matthias Kloseb9621712010-04-24 17:59:49 +000013743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13744$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746/* end confdefs.h. */
13747
13748int
13749main ()
13750{
13751
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013752 unsigned short cw;
13753 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13754 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013755
13756 ;
13757 return 0;
13758}
13759_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013760if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761 have_gcc_asm_for_x87=yes
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013765rm -f core conftest.err conftest.$ac_objext \
13766 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13768$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013769if test "$have_gcc_asm_for_x87" = yes
13770then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013771
Matthias Kloseb9621712010-04-24 17:59:49 +000013772$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013775
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13777$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13779/* end confdefs.h. */
13780
13781int
13782main ()
13783{
13784
13785 unsigned int fpcr;
13786 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13787 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13788
13789 ;
13790 return 0;
13791}
13792_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013793if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013794 have_gcc_asm_for_mc68881=yes
13795else
13796 have_gcc_asm_for_mc68881=no
13797fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013798rm -f core conftest.err conftest.$ac_objext \
13799 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13801$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13802if test "$have_gcc_asm_for_mc68881" = yes
13803then
13804
13805$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13806
13807fi
13808
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013809# Detect whether system arithmetic is subject to x87-style double
13810# rounding issues. The result of this test has little meaning on non
13811# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13812# mode is round-to-nearest and double rounding issues are present, and
13813# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13815$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816# $BASECFLAGS may affect the result
13817ac_save_cc="$CC"
13818CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013819if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013820 ac_cv_x87_double_rounding=no
13821else
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013823/* end confdefs.h. */
13824
13825#include <stdlib.h>
13826#include <math.h>
13827int main() {
13828 volatile double x, y, z;
13829 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13830 x = 0.99999999999999989; /* 1-2**-53 */
13831 y = 1./x;
13832 if (y != 1.)
13833 exit(0);
13834 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13835 x = 1e16;
13836 y = 2.99999;
13837 z = x + y;
13838 if (z != 1e16+4.)
13839 exit(0);
13840 /* both tests show evidence of double rounding */
13841 exit(1);
13842}
13843
13844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013845if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013846 ac_cv_x87_double_rounding=no
13847else
Matthias Kloseb9621712010-04-24 17:59:49 +000013848 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013852fi
13853
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13856$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013857if test "$ac_cv_x87_double_rounding" = yes
13858then
13859
Matthias Kloseb9621712010-04-24 17:59:49 +000013860$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013861
13862fi
13863
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864# ************************************
13865# * Check for mathematical functions *
13866# ************************************
13867
13868LIBS_SAVE=$LIBS
13869LIBS="$LIBS $LIBM"
13870
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013871for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13872do :
13873 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13874ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013875if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013876 cat >>confdefs.h <<_ACEOF
13877#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13878_ACEOF
13879
13880fi
13881done
13882
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013883for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013884do :
13885 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13886ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013887if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013888 cat >>confdefs.h <<_ACEOF
13889#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13890_ACEOF
13891
13892fi
13893done
13894
13895ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13896"
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013898 ac_have_decl=1
13899else
13900 ac_have_decl=0
13901fi
13902
13903cat >>confdefs.h <<_ACEOF
13904#define HAVE_DECL_ISINF $ac_have_decl
13905_ACEOF
13906ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13907"
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013909 ac_have_decl=1
13910else
13911 ac_have_decl=0
13912fi
13913
13914cat >>confdefs.h <<_ACEOF
13915#define HAVE_DECL_ISNAN $ac_have_decl
13916_ACEOF
13917ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13918"
Victor Stinnere0be4232011-10-25 13:06:09 +020013919if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013920 ac_have_decl=1
13921else
13922 ac_have_decl=0
13923fi
13924
13925cat >>confdefs.h <<_ACEOF
13926#define HAVE_DECL_ISFINITE $ac_have_decl
13927_ACEOF
13928
13929
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013930# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13931# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13933$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013934if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013935 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013936else
13937
Matthias Kloseb9621712010-04-24 17:59:49 +000013938if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013939 ac_cv_tanh_preserves_zero_sign=no
13940else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013942/* end confdefs.h. */
13943
13944#include <math.h>
13945#include <stdlib.h>
13946int main() {
13947 /* return 0 if either negative zeros don't exist
13948 on this platform or if negative zeros exist
13949 and tanh(-0.) == -0. */
13950 if (atan2(0., -1.) == atan2(-0., -1.) ||
13951 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13952 else exit(1);
13953}
13954
13955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013957 ac_cv_tanh_preserves_zero_sign=yes
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013963fi
13964
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013965fi
13966
Matthias Kloseb9621712010-04-24 17:59:49 +000013967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13968$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013969if test "$ac_cv_tanh_preserves_zero_sign" = yes
13970then
13971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013973
13974fi
13975
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013976if test "$ac_cv_func_log1p" = yes
13977then
13978 # On some versions of AIX, log1p(-0.) returns 0. instead of
13979 # -0. See issue #9920.
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13981$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013982 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013983 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013984else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013985
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013986 if test "$cross_compiling" = yes; then :
13987 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013988else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13990/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013991
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013992 #include <math.h>
13993 #include <stdlib.h>
13994 int main() {
13995 /* Fail if the signs of log1p(-0.) and -0. can be
13996 distinguished. */
13997 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13998 return 0;
13999 else
14000 return 1;
14001 }
14002
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014003_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014004if ac_fn_c_try_run "$LINENO"; then :
14005 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014006else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014007 ac_cv_log1p_drops_zero_sign=yes
14008fi
14009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014011fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014012
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014013fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014014
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14016$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14017fi
14018if test "$ac_cv_log1p_drops_zero_sign" = yes
14019then
14020
14021$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14022
14023fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014024
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014025LIBS=$LIBS_SAVE
14026
Mark Dickinsona614f042009-11-28 12:48:43 +000014027# For multiprocessing module, check that sem_open
14028# actually works. For FreeBSD versions <= 7.2,
14029# the kernel module that provides POSIX semaphores
14030# isn't loaded by default, so an attempt to call
14031# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14033$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014034if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014035 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014036else
Matthias Kloseb9621712010-04-24 17:59:49 +000014037 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014038 ac_cv_posix_semaphores_enabled=yes
14039else
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014041/* end confdefs.h. */
14042
14043#include <unistd.h>
14044#include <fcntl.h>
14045#include <stdio.h>
14046#include <semaphore.h>
14047#include <sys/stat.h>
14048
14049int main(void) {
14050 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14051 if (a == SEM_FAILED) {
14052 perror("sem_open");
14053 return 1;
14054 }
14055 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014056 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014057 return 0;
14058}
14059
14060_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014061if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014062 ac_cv_posix_semaphores_enabled=yes
14063else
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014065fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14067 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014068fi
14069
14070
Mark Dickinsona614f042009-11-28 12:48:43 +000014071fi
14072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14074$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014075if test $ac_cv_posix_semaphores_enabled = no
14076then
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014079
14080fi
14081
Mark Dickinson10683072009-04-18 21:18:19 +000014082# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14084$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014085if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014086 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014087else
Matthias Kloseb9621712010-04-24 17:59:49 +000014088 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014089 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014090else
Matthias Kloseb9621712010-04-24 17:59:49 +000014091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014092/* end confdefs.h. */
14093
14094#include <unistd.h>
14095#include <fcntl.h>
14096#include <stdio.h>
14097#include <semaphore.h>
14098#include <sys/stat.h>
14099
14100int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014101 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014102 int count;
14103 int res;
14104 if(a==SEM_FAILED){
14105 perror("sem_open");
14106 return 1;
14107
14108 }
14109 res = sem_getvalue(a, &count);
14110 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014111 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014112 return res==-1 ? 1 : 0;
14113}
14114
Mark Dickinson10683072009-04-18 21:18:19 +000014115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014117 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014123fi
14124
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014126fi
14127
Matthias Kloseb9621712010-04-24 17:59:49 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14129$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014130if test $ac_cv_broken_sem_getvalue = yes
14131then
14132
Matthias Kloseb9621712010-04-24 17:59:49 +000014133$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014134
14135fi
14136
Mark Dickinsonbd792642009-03-18 20:06:12 +000014137# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14139$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014140# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014141if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014142 enableval=$enable_big_digits; case $enable_big_digits in
14143yes)
14144 enable_big_digits=30 ;;
14145no)
14146 enable_big_digits=15 ;;
1414715|30)
14148 ;;
14149*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014150 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 +000014151esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14153$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014154
14155cat >>confdefs.h <<_ACEOF
14156#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14157_ACEOF
14158
14159
14160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14162$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014163fi
14164
14165
Guido van Rossumef2255b2000-03-10 22:30:29 +000014166# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014167ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014168if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014169
14170
Matthias Kloseb9621712010-04-24 17:59:49 +000014171$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014172
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014173 wchar_h="yes"
14174
Guido van Rossumef2255b2000-03-10 22:30:29 +000014175else
Martin v. Löwis11437992002-04-12 09:54:03 +000014176 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014177
14178fi
14179
Michael W. Hudson54241132001-12-07 15:38:26 +000014180
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014182# determine wchar_t size
14183if test "$wchar_h" = yes
14184then
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014186# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14187# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14188# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14190$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014191if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014193else
Matthias Kloseb9621712010-04-24 17:59:49 +000014194 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14195"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Martin v. Löwis11437992002-04-12 09:54:03 +000014197else
Matthias Kloseb9621712010-04-24 17:59:49 +000014198 if test "$ac_cv_type_wchar_t" = yes; then
14199 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14200$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014201as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014202See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014203 else
14204 ac_cv_sizeof_wchar_t=0
14205 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014206fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14210$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211
14212
14213
Martin v. Löwis11437992002-04-12 09:54:03 +000014214cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014215#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014216_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014217
Michael W. Hudson54241132001-12-07 15:38:26 +000014218
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014219fi
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14222$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014223have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014225/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014226
14227#include <tcl.h>
14228#if TCL_UTF_MAX != 6
14229# error "NOT UCS4_TCL"
14230#endif
14231int
14232main ()
14233{
14234
14235 ;
14236 return 0;
14237}
14238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014240
14241
Matthias Kloseb9621712010-04-24 17:59:49 +000014242$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014243
14244 have_ucs4_tcl=yes
14245
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14249$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014250
Skip Montanaro6dead952003-09-25 14:50:04 +000014251# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014252if test "$wchar_h" = yes
14253then
14254 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14256$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014257 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014259else
14260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014262 ac_cv_wchar_t_signed=yes
14263else
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014265/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014266
14267 #include <wchar.h>
14268 int main()
14269 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014270 /* Success: exit code 0 */
14271 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014272 }
14273
14274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014275if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014276 ac_cv_wchar_t_signed=yes
14277else
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14281 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014282fi
14283
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014284fi
14285
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14287$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288fi
14289
Georg Brandl52d168a2008-01-07 18:10:24 +000014290# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014291if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014292 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014293then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014294 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014295
Matthias Kloseb9621712010-04-24 17:59:49 +000014296$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014297
Georg Brandl52d168a2008-01-07 18:10:24 +000014298else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014299 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014300fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14302$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014303
14304# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14306$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014307if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014308 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014309else
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 ac_cv_c_bigendian=unknown
14311 # See if we're dealing with a universal compiler.
14312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14313/* end confdefs.h. */
14314#ifndef __APPLE_CC__
14315 not a universal capable compiler
14316 #endif
14317 typedef int dummy;
14318
Skip Montanaro6dead952003-09-25 14:50:04 +000014319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014320if ac_fn_c_try_compile "$LINENO"; then :
14321
14322 # Check for potential -arch flags. It is not universal unless
14323 # there are at least two -arch flags with different values.
14324 ac_arch=
14325 ac_prev=
14326 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14327 if test -n "$ac_prev"; then
14328 case $ac_word in
14329 i?86 | x86_64 | ppc | ppc64)
14330 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14331 ac_arch=$ac_word
14332 else
14333 ac_cv_c_bigendian=universal
14334 break
14335 fi
14336 ;;
14337 esac
14338 ac_prev=
14339 elif test "x$ac_word" = "x-arch"; then
14340 ac_prev=arch
14341 fi
14342 done
14343fi
14344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14345 if test $ac_cv_c_bigendian = unknown; then
14346 # See if sys/param.h defines the BYTE_ORDER macro.
14347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014348/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014349#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014350 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014351
Martin v. Löwis11437992002-04-12 09:54:03 +000014352int
14353main ()
14354{
Matthias Kloseb9621712010-04-24 17:59:49 +000014355#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14356 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14357 && LITTLE_ENDIAN)
14358 bogus endian macros
14359 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014360
14361 ;
14362 return 0;
14363}
14364_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014365if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014366 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014368/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014369#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014371
Martin v. Löwis11437992002-04-12 09:54:03 +000014372int
14373main ()
14374{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014375#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014376 not big endian
14377 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014378
14379 ;
14380 return 0;
14381}
14382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014383if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014384 ac_cv_c_bigendian=yes
14385else
Matthias Kloseb9621712010-04-24 17:59:49 +000014386 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014389fi
14390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14391 fi
14392 if test $ac_cv_c_bigendian = unknown; then
14393 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014395/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014396#include <limits.h>
14397
Martin v. Löwis11437992002-04-12 09:54:03 +000014398int
14399main ()
14400{
Matthias Kloseb9621712010-04-24 17:59:49 +000014401#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14402 bogus endian macros
14403 #endif
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ;
14406 return 0;
14407}
14408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014409if ac_fn_c_try_compile "$LINENO"; then :
14410 # It does; now see whether it defined to _BIG_ENDIAN or not.
14411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14412/* end confdefs.h. */
14413#include <limits.h>
14414
14415int
14416main ()
14417{
14418#ifndef _BIG_ENDIAN
14419 not big endian
14420 #endif
14421
14422 ;
14423 return 0;
14424}
14425_ACEOF
14426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14432fi
14433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14434 fi
14435 if test $ac_cv_c_bigendian = unknown; then
14436 # Compile a test program.
14437 if test "$cross_compiling" = yes; then :
14438 # Try to guess by grepping values from an object file.
14439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14440/* end confdefs.h. */
14441short int ascii_mm[] =
14442 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14443 short int ascii_ii[] =
14444 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14445 int use_ascii (int i) {
14446 return ascii_mm[i] + ascii_ii[i];
14447 }
14448 short int ebcdic_ii[] =
14449 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14450 short int ebcdic_mm[] =
14451 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14452 int use_ebcdic (int i) {
14453 return ebcdic_mm[i] + ebcdic_ii[i];
14454 }
14455 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456
Matthias Kloseb9621712010-04-24 17:59:49 +000014457int
14458main ()
14459{
14460return use_ascii (foo) == use_ebcdic (foo);
14461 ;
14462 return 0;
14463}
14464_ACEOF
14465if ac_fn_c_try_compile "$LINENO"; then :
14466 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14467 ac_cv_c_bigendian=yes
14468 fi
14469 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14470 if test "$ac_cv_c_bigendian" = unknown; then
14471 ac_cv_c_bigendian=no
14472 else
14473 # finding both strings is unlikely to happen, but who knows?
14474 ac_cv_c_bigendian=unknown
14475 fi
14476 fi
14477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014479else
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014481/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014482$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014483int
14484main ()
14485{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 /* Are we little or big endian? From Harbison&Steele. */
14488 union
14489 {
14490 long int l;
14491 char c[sizeof (long int)];
14492 } u;
14493 u.l = 1;
14494 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495
14496 ;
14497 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014498}
Martin v. Löwis11437992002-04-12 09:54:03 +000014499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014500if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014501 ac_cv_c_bigendian=no
14502else
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14506 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14512$as_echo "$ac_cv_c_bigendian" >&6; }
14513 case $ac_cv_c_bigendian in #(
14514 yes)
14515 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14516;; #(
14517 no)
14518 ;; #(
14519 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ;; #(
14524 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014525 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014526 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014528
Michael W. Hudson54241132001-12-07 15:38:26 +000014529
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014530# ABI version string for Python extension modules. This appears between the
14531# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14532# from the following attributes which affect the ABI of this Python build (in
14533# this order):
14534#
14535# * The Python implementation (always 'cpython-' for us)
14536# * The major and minor version numbers
14537# * --with-pydebug (adds a 'd')
14538# * --with-pymalloc (adds a 'm')
14539# * --with-wide-unicode (adds a 'u')
14540#
14541# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014542# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14543# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014544
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14546$as_echo_n "checking ABIFLAGS... " >&6; }
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14548$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14550$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014551SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14553$as_echo "$SOABI" >&6; }
14554
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014555
14556case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014557 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014558 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14559 *)
14560 EXT_SUFFIX=${SHLIB_SUFFIX};;
14561esac
14562
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14564$as_echo_n "checking LDVERSION... " >&6; }
14565LDVERSION='$(VERSION)$(ABIFLAGS)'
14566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14567$as_echo "$LDVERSION" >&6; }
14568
doko@python.org87421192013-01-26 11:39:31 +010014569
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014570LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014571
14572
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014573# Check whether right shifting a negative integer extends the sign bit
14574# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14576$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014577if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014579else
Martin v. Löwis11437992002-04-12 09:54:03 +000014580
Matthias Kloseb9621712010-04-24 17:59:49 +000014581if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014582 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014583else
Matthias Kloseb9621712010-04-24 17:59:49 +000014584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014585/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014586
14587int main()
14588{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014589 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014590}
14591
Martin v. Löwis11437992002-04-12 09:54:03 +000014592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014594 ac_cv_rshift_extends_sign=yes
14595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014600fi
14601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014602fi
14603
Matthias Kloseb9621712010-04-24 17:59:49 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14605$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014606if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014607then
Martin v. Löwis11437992002-04-12 09:54:03 +000014608
Matthias Kloseb9621712010-04-24 17:59:49 +000014609$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014610
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014611fi
14612
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014613# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14615$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014616if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014617 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014618else
Martin v. Löwis11437992002-04-12 09:54:03 +000014619
Matthias Kloseb9621712010-04-24 17:59:49 +000014620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014621/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014622#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014623int
14624main ()
14625{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014626
14627 FILE *f = fopen("/dev/null", "r");
14628 flockfile(f);
14629 getc_unlocked(f);
14630 funlockfile(f);
14631
Martin v. Löwis11437992002-04-12 09:54:03 +000014632 ;
14633 return 0;
14634}
14635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014636if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014637 ac_cv_have_getc_unlocked=yes
14638else
Matthias Kloseb9621712010-04-24 17:59:49 +000014639 ac_cv_have_getc_unlocked=no
14640fi
14641rm -f core conftest.err conftest.$ac_objext \
14642 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644
Matthias Kloseb9621712010-04-24 17:59:49 +000014645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14646$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014647if test "$ac_cv_have_getc_unlocked" = yes
14648then
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
Matthias Kloseb9621712010-04-24 17:59:49 +000014650$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014651
14652fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014653
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014654# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014655# save the value of LIBS so we don't actually link Python with readline
14656LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014657
Gregory P. Smith18820942008-09-07 06:24:49 +000014658# On some systems we need to link readline to a termcap compatible
14659# library. NOTE: Keep the precedence of listed libraries synchronised
14660# with setup.py.
14661py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14663$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014664for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014665 if test -z "$py_libtermcap"; then
14666 READLINE_LIBS="-lreadline"
14667 else
14668 READLINE_LIBS="-lreadline -l$py_libtermcap"
14669 fi
14670 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014672/* end confdefs.h. */
14673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674/* Override any GCC internal prototype to avoid an error.
14675 Use char because int might match the return type of a GCC
14676 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014677#ifdef __cplusplus
14678extern "C"
14679#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014680char readline ();
14681int
14682main ()
14683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014684return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014685 ;
14686 return 0;
14687}
14688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014689if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014690 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014691fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014692rm -f core conftest.err conftest.$ac_objext \
14693 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014694 if test $py_cv_lib_readline = yes; then
14695 break
14696 fi
14697done
14698# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14699#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014700if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14702$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014703else
Matthias Kloseb9621712010-04-24 17:59:49 +000014704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14705$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014708
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014709fi
14710
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014711# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14713$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014714if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014715 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014716else
14717 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014718LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014720/* end confdefs.h. */
14721
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722/* Override any GCC internal prototype to avoid an error.
14723 Use char because int might match the return type of a GCC
14724 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014725#ifdef __cplusplus
14726extern "C"
14727#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014728char rl_callback_handler_install ();
14729int
14730main ()
14731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014732return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014733 ;
14734 return 0;
14735}
14736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014737if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014738 ac_cv_lib_readline_rl_callback_handler_install=yes
14739else
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014742rm -f core conftest.err conftest.$ac_objext \
14743 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014744LIBS=$ac_check_lib_save_LIBS
14745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14747$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014748if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014749
Matthias Kloseb9621712010-04-24 17:59:49 +000014750$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014751
14752fi
14753
14754
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014755# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014757/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014758#include <readline/readline.h>
14759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014760if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014761 have_readline=yes
14762else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014763 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014764
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014765fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014766rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014767if test $have_readline = yes
14768then
Matthias Kloseb9621712010-04-24 17:59:49 +000014769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014770/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014771#include <readline/readline.h>
14772
14773_ACEOF
14774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014775 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014776
Matthias Kloseb9621712010-04-24 17:59:49 +000014777$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014778
14779fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014780rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014783/* end confdefs.h. */
14784#include <readline/readline.h>
14785
14786_ACEOF
14787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014788 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014791
14792fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014793rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014794
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014795fi
14796
Martin v. Löwis0daad592001-09-30 21:09:59 +000014797# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14799$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014800if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014802else
Martin v. Löwis11437992002-04-12 09:54:03 +000014803 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014804LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808/* Override any GCC internal prototype to avoid an error.
14809 Use char because int might match the return type of a GCC
14810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014811#ifdef __cplusplus
14812extern "C"
14813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014814char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014815int
14816main ()
14817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 ;
14820 return 0;
14821}
14822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014824 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014825else
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828rm -f core conftest.err conftest.$ac_objext \
14829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014830LIBS=$ac_check_lib_save_LIBS
14831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14833$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014834if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014837
Martin v. Löwis0daad592001-09-30 21:09:59 +000014838fi
14839
Michael W. Hudson54241132001-12-07 15:38:26 +000014840
Thomas Wouters89d996e2007-09-08 17:39:28 +000014841# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14843$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014844if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014846else
14847 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014848LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014850/* end confdefs.h. */
14851
14852/* Override any GCC internal prototype to avoid an error.
14853 Use char because int might match the return type of a GCC
14854 builtin and then its argument prototype would still apply. */
14855#ifdef __cplusplus
14856extern "C"
14857#endif
14858char rl_completion_display_matches_hook ();
14859int
14860main ()
14861{
14862return rl_completion_display_matches_hook ();
14863 ;
14864 return 0;
14865}
14866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014867if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014868 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14869else
Matthias Kloseb9621712010-04-24 17:59:49 +000014870 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014871fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014872rm -f core conftest.err conftest.$ac_objext \
14873 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014874LIBS=$ac_check_lib_save_LIBS
14875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14877$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014878if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014879
Matthias Kloseb9621712010-04-24 17:59:49 +000014880$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014881
14882fi
14883
14884
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014885# also in 4.0, but not in editline
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14887$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14888if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14889 $as_echo_n "(cached) " >&6
14890else
14891 ac_check_lib_save_LIBS=$LIBS
14892LIBS="-lreadline $READLINE_LIBS $LIBS"
14893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894/* end confdefs.h. */
14895
14896/* Override any GCC internal prototype to avoid an error.
14897 Use char because int might match the return type of a GCC
14898 builtin and then its argument prototype would still apply. */
14899#ifdef __cplusplus
14900extern "C"
14901#endif
14902char rl_resize_terminal ();
14903int
14904main ()
14905{
14906return rl_resize_terminal ();
14907 ;
14908 return 0;
14909}
14910_ACEOF
14911if ac_fn_c_try_link "$LINENO"; then :
14912 ac_cv_lib_readline_rl_resize_terminal=yes
14913else
14914 ac_cv_lib_readline_rl_resize_terminal=no
14915fi
14916rm -f core conftest.err conftest.$ac_objext \
14917 conftest$ac_exeext conftest.$ac_ext
14918LIBS=$ac_check_lib_save_LIBS
14919fi
14920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14921$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14922if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14923
14924$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14925
14926fi
14927
14928
Martin v. Löwis0daad592001-09-30 21:09:59 +000014929# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14931$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014932if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014934else
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014936LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014939
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014940/* Override any GCC internal prototype to avoid an error.
14941 Use char because int might match the return type of a GCC
14942 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014943#ifdef __cplusplus
14944extern "C"
14945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014946char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014947int
14948main ()
14949{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014955if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014957else
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014960rm -f core conftest.err conftest.$ac_objext \
14961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014962LIBS=$ac_check_lib_save_LIBS
14963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14965$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014966if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014967
Matthias Kloseb9621712010-04-24 17:59:49 +000014968$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014969
Guido van Rossum353ae582001-07-10 16:45:32 +000014970fi
14971
Jack Jansendd19cf82001-12-06 22:36:17 +000014972
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014973# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014975/* end confdefs.h. */
14976#include <readline/readline.h>
14977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014978if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014979 have_readline=yes
14980else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014981 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014982
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014984rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014985if test $have_readline = yes
14986then
Matthias Kloseb9621712010-04-24 17:59:49 +000014987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014988/* end confdefs.h. */
14989#include <readline/readline.h>
14990
14991_ACEOF
14992if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014993 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014994
Matthias Kloseb9621712010-04-24 17:59:49 +000014995$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014996
14997fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014998rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014999
15000fi
15001
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15003$as_echo_n "checking for append_history in -lreadline... " >&6; }
15004if ${ac_cv_lib_readline_append_history+:} false; then :
15005 $as_echo_n "(cached) " >&6
15006else
15007 ac_check_lib_save_LIBS=$LIBS
15008LIBS="-lreadline $READLINE_LIBS $LIBS"
15009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15010/* end confdefs.h. */
15011
15012/* Override any GCC internal prototype to avoid an error.
15013 Use char because int might match the return type of a GCC
15014 builtin and then its argument prototype would still apply. */
15015#ifdef __cplusplus
15016extern "C"
15017#endif
15018char append_history ();
15019int
15020main ()
15021{
15022return append_history ();
15023 ;
15024 return 0;
15025}
15026_ACEOF
15027if ac_fn_c_try_link "$LINENO"; then :
15028 ac_cv_lib_readline_append_history=yes
15029else
15030 ac_cv_lib_readline_append_history=no
15031fi
15032rm -f core conftest.err conftest.$ac_objext \
15033 conftest$ac_exeext conftest.$ac_ext
15034LIBS=$ac_check_lib_save_LIBS
15035fi
15036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15037$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15038if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15039
15040$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15041
15042fi
15043
15044
Martin v. Löwis82bca632006-02-10 20:49:30 +000015045# End of readline checks: restore LIBS
15046LIBS=$LIBS_no_readline
15047
Matthias Kloseb9621712010-04-24 17:59:49 +000015048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15049$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015050if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015052else
Martin v. Löwis11437992002-04-12 09:54:03 +000015053
Matthias Kloseb9621712010-04-24 17:59:49 +000015054if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015055 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015056else
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015058/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015059
15060int main()
15061{
15062 int val1 = nice(1);
15063 if (val1 != -1 && val1 == nice(2))
15064 exit(0);
15065 exit(1);
15066}
15067
Martin v. Löwis11437992002-04-12 09:54:03 +000015068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015069if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015070 ac_cv_broken_nice=yes
15071else
Matthias Kloseb9621712010-04-24 17:59:49 +000015072 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015074rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15075 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015076fi
15077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015078fi
15079
Matthias Kloseb9621712010-04-24 17:59:49 +000015080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15081$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015082if test "$ac_cv_broken_nice" = yes
15083then
Martin v. Löwis11437992002-04-12 09:54:03 +000015084
Matthias Kloseb9621712010-04-24 17:59:49 +000015085$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015086
15087fi
15088
Matthias Kloseb9621712010-04-24 17:59:49 +000015089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15090$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015091if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015093else
Matthias Kloseb9621712010-04-24 17:59:49 +000015094 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015095 ac_cv_broken_poll=no
15096else
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015098/* end confdefs.h. */
15099
15100#include <poll.h>
15101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015102int main()
15103{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015104 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015105 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015106
15107 close (42);
15108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015109 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015110 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015111 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015112 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015113 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015114 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015115 return 1;
15116}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015117
15118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015119if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015120 ac_cv_broken_poll=yes
15121else
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15125 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015126fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015127
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015128fi
15129
Matthias Kloseb9621712010-04-24 17:59:49 +000015130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15131$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015132if test "$ac_cv_broken_poll" = yes
15133then
15134
Matthias Kloseb9621712010-04-24 17:59:49 +000015135$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015136
15137fi
15138
Brett Cannon43802422005-02-10 20:48:03 +000015139# 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 +000015140# (which is not required by ISO C or UNIX spec) and/or if we support
15141# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015142ac_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 +000015143#include <$ac_cv_struct_tm>
15144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145"
Victor Stinnere0be4232011-10-25 13:06:09 +020015146if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015147
15148cat >>confdefs.h <<_ACEOF
15149#define HAVE_STRUCT_TM_TM_ZONE 1
15150_ACEOF
15151
15152
15153fi
15154
15155if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15156
Matthias Kloseb9621712010-04-24 17:59:49 +000015157$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015158
15159else
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15161"
Victor Stinnere0be4232011-10-25 13:06:09 +020015162if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164else
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166fi
15167
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015169#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170_ACEOF
15171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15173$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015174if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015176else
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015178/* end confdefs.h. */
15179#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180#if !HAVE_DECL_TZNAME
15181extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015182#endif
15183
15184int
15185main ()
15186{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015187return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015192if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015193 ac_cv_var_tzname=yes
15194else
Matthias Kloseb9621712010-04-24 17:59:49 +000015195 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015197rm -f core conftest.err conftest.$ac_objext \
15198 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15201$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015202 if test $ac_cv_var_tzname = yes; then
15203
Matthias Kloseb9621712010-04-24 17:59:49 +000015204$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015205
15206 fi
15207fi
15208
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015209
Martin v. Löwis1d459062005-03-14 21:23:33 +000015210# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15212$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015213if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015215else
15216
Matthias Kloseb9621712010-04-24 17:59:49 +000015217if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015218 ac_cv_working_tzset=no
15219else
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015221/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015222
15223#include <stdlib.h>
15224#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015225#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015226
15227#if HAVE_TZNAME
15228extern char *tzname[];
15229#endif
15230
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015231int main()
15232{
Brett Cannon18367812003-09-19 00:59:16 +000015233 /* Note that we need to ensure that not only does tzset(3)
15234 do 'something' with localtime, but it works as documented
15235 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015236 This includes making sure that tzname is set properly if
15237 tm->tm_zone does not exist since it is the alternative way
15238 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015239
15240 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015241 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015242 */
15243
Martin v. Löwis1d459062005-03-14 21:23:33 +000015244 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015245 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15246
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015247 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015248 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015249 if (localtime(&groundhogday)->tm_hour != 0)
15250 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015251#if HAVE_TZNAME
15252 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15253 if (strcmp(tzname[0], "UTC") ||
15254 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15255 exit(1);
15256#endif
Brett Cannon18367812003-09-19 00:59:16 +000015257
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015258 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015259 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015260 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015261 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015262#if HAVE_TZNAME
15263 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15264 exit(1);
15265#endif
Brett Cannon18367812003-09-19 00:59:16 +000015266
15267 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15268 tzset();
15269 if (localtime(&groundhogday)->tm_hour != 11)
15270 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015271#if HAVE_TZNAME
15272 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15273 exit(1);
15274#endif
15275
15276#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015277 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15278 exit(1);
15279 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15280 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015281#endif
Brett Cannon18367812003-09-19 00:59:16 +000015282
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015283 exit(0);
15284}
15285
15286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015287if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015288 ac_cv_working_tzset=yes
15289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015291fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15293 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015294fi
15295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296fi
15297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15299$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015300if test "$ac_cv_working_tzset" = yes
15301then
15302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015304
15305fi
15306
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015307# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15309$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015310if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015311 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015314/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015315#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015316int
15317main ()
15318{
15319
15320struct stat st;
15321st.st_mtim.tv_nsec = 1;
15322
15323 ;
15324 return 0;
15325}
15326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015328 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015329else
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15333fi
15334
Matthias Kloseb9621712010-04-24 17:59:49 +000015335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15336$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015337if test "$ac_cv_stat_tv_nsec" = yes
15338then
15339
Matthias Kloseb9621712010-04-24 17:59:49 +000015340$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015341
15342fi
15343
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015344# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15346$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015347if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015349else
Matthias Kloseb9621712010-04-24 17:59:49 +000015350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015351/* end confdefs.h. */
15352#include <sys/stat.h>
15353int
15354main ()
15355{
15356
15357struct stat st;
15358st.st_mtimespec.tv_nsec = 1;
15359
15360 ;
15361 return 0;
15362}
15363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015364if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015365 ac_cv_stat_tv_nsec2=yes
15366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15370fi
15371
Matthias Kloseb9621712010-04-24 17:59:49 +000015372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15373$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015374if test "$ac_cv_stat_tv_nsec2" = yes
15375then
15376
Matthias Kloseb9621712010-04-24 17:59:49 +000015377$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015378
15379fi
15380
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015381# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015382ac_save_cppflags="$CPPFLAGS"
15383CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015384
15385for ac_header in curses.h ncurses.h
15386do :
15387 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15388ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15389if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15390 cat >>confdefs.h <<_ACEOF
15391#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15392_ACEOF
15393
15394fi
15395
15396done
15397
15398
15399# On Solaris, term.h requires curses.h
15400for ac_header in term.h
15401do :
15402 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15403#ifdef HAVE_CURSES_H
15404#include <curses.h>
15405#endif
15406
15407"
15408if test "x$ac_cv_header_term_h" = xyes; then :
15409 cat >>confdefs.h <<_ACEOF
15410#define HAVE_TERM_H 1
15411_ACEOF
15412
15413fi
15414
15415done
15416
15417
Jack Jansen666b1e72001-10-31 12:11:48 +000015418# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15420$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015421if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015423else
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015425/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015426#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015427int
15428main ()
15429{
Jack Jansen666b1e72001-10-31 12:11:48 +000015430
15431 int rtn;
15432 rtn = mvwdelch(0,0,0);
15433
Martin v. Löwis11437992002-04-12 09:54:03 +000015434 ;
15435 return 0;
15436}
15437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015438if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015439 ac_cv_mvwdelch_is_expression=yes
15440else
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15444fi
15445
Matthias Kloseb9621712010-04-24 17:59:49 +000015446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15447$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015448
15449if test "$ac_cv_mvwdelch_is_expression" = yes
15450then
Martin v. Löwis11437992002-04-12 09:54:03 +000015451
Matthias Kloseb9621712010-04-24 17:59:49 +000015452$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015453
15454fi
15455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15457$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015458if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015460else
Matthias Kloseb9621712010-04-24 17:59:49 +000015461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015462/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015463#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015464int
15465main ()
15466{
Jack Jansen666b1e72001-10-31 12:11:48 +000015467
15468 WINDOW *w;
15469 w->_flags = 0;
15470
Martin v. Löwis11437992002-04-12 09:54:03 +000015471 ;
15472 return 0;
15473}
15474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015475if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015476 ac_cv_window_has_flags=yes
15477else
Matthias Kloseb9621712010-04-24 17:59:49 +000015478 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15481fi
15482
Matthias Kloseb9621712010-04-24 17:59:49 +000015483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15484$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015485
Jack Jansen666b1e72001-10-31 12:11:48 +000015486
15487if test "$ac_cv_window_has_flags" = yes
15488then
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Matthias Kloseb9621712010-04-24 17:59:49 +000015490$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015491
15492fi
15493
Matthias Kloseb9621712010-04-24 17:59:49 +000015494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15495$as_echo_n "checking for is_term_resized... " >&6; }
15496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015497/* end confdefs.h. */
15498#include <curses.h>
15499int
15500main ()
15501{
15502void *x=is_term_resized
15503 ;
15504 return 0;
15505}
15506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015508
Matthias Kloseb9621712010-04-24 17:59:49 +000015509$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015510
Matthias Kloseb159a552010-04-25 21:00:44 +000015511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015512$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015513else
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15515$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015516
15517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15519
Matthias Kloseb9621712010-04-24 17:59:49 +000015520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15521$as_echo_n "checking for resize_term... " >&6; }
15522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015523/* end confdefs.h. */
15524#include <curses.h>
15525int
15526main ()
15527{
15528void *x=resize_term
15529 ;
15530 return 0;
15531}
15532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015533if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015534
Matthias Kloseb9621712010-04-24 17:59:49 +000015535$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015536
Matthias Kloseb159a552010-04-25 21:00:44 +000015537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015538$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015539else
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15541$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015542
15543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15545
Matthias Kloseb9621712010-04-24 17:59:49 +000015546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15547$as_echo_n "checking for resizeterm... " >&6; }
15548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015549/* end confdefs.h. */
15550#include <curses.h>
15551int
15552main ()
15553{
15554void *x=resizeterm
15555 ;
15556 return 0;
15557}
15558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015559if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015560
Matthias Kloseb9621712010-04-24 17:59:49 +000015561$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015562
Matthias Kloseb159a552010-04-25 21:00:44 +000015563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015564$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015565else
Matthias Kloseb9621712010-04-24 17:59:49 +000015566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15567$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015568
15569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015571# last curses configure check
15572CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15575$as_echo "$as_me: checking for device files" >&6;}
15576
15577if test "x$cross_compiling" = xyes; then
15578 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15580$as_echo_n "checking for /dev/ptmx... " >&6; }
15581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15582$as_echo "not set" >&6; }
15583 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15584 fi
15585 if test "${ac_cv_file__dev_ptc+set}" != set; then
15586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15587$as_echo_n "checking for /dev/ptc... " >&6; }
15588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15589$as_echo "not set" >&6; }
15590 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15591 fi
15592fi
15593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15595$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015596if ${ac_cv_file__dev_ptmx+:} false; then :
15597 $as_echo_n "(cached) " >&6
15598else
15599 test "$cross_compiling" = yes &&
15600 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15601if test -r "/dev/ptmx"; then
15602 ac_cv_file__dev_ptmx=yes
15603else
15604 ac_cv_file__dev_ptmx=no
15605fi
15606fi
15607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15608$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15609if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015610
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015611fi
15612
15613if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015616
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15619$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015620if ${ac_cv_file__dev_ptc+:} false; then :
15621 $as_echo_n "(cached) " >&6
15622else
15623 test "$cross_compiling" = yes &&
15624 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15625if test -r "/dev/ptc"; then
15626 ac_cv_file__dev_ptc=yes
15627else
15628 ac_cv_file__dev_ptc=no
15629fi
15630fi
15631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15632$as_echo "$ac_cv_file__dev_ptc" >&6; }
15633if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015634
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015635fi
15636
15637if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015640
Neal Norwitz865400f2003-03-21 01:42:58 +000015641fi
15642
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015643if test "$have_long_long" = yes
15644then
Matthias Kloseb9621712010-04-24 17:59:49 +000015645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15646$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015647 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015649else
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015651 ac_cv_have_long_long_format="cross -- assuming no"
15652 if test x$GCC = xyes; then
15653 save_CFLAGS=$CFLAGS
15654 CFLAGS="$CFLAGS -Werror -Wformat"
15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15656/* end confdefs.h. */
15657
15658 #include <stdio.h>
15659 #include <stddef.h>
15660
15661int
15662main ()
15663{
15664
15665 char *buffer;
15666 sprintf(buffer, "%lld", (long long)123);
15667 sprintf(buffer, "%lld", (long long)-123);
15668 sprintf(buffer, "%llu", (unsigned long long)123);
15669
15670 ;
15671 return 0;
15672}
15673_ACEOF
15674if ac_fn_c_try_compile "$LINENO"; then :
15675 ac_cv_have_long_long_format=yes
15676
15677fi
15678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15679 CFLAGS=$save_CFLAGS
15680 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015683/* end confdefs.h. */
15684
15685 #include <stdio.h>
15686 #include <stddef.h>
15687 #include <string.h>
15688
15689 #ifdef HAVE_SYS_TYPES_H
15690 #include <sys/types.h>
15691 #endif
15692
15693 int main()
15694 {
15695 char buffer[256];
15696
15697 if (sprintf(buffer, "%lld", (long long)123) < 0)
15698 return 1;
15699 if (strcmp(buffer, "123"))
15700 return 1;
15701
15702 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15703 return 1;
15704 if (strcmp(buffer, "-123"))
15705 return 1;
15706
15707 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15708 return 1;
15709 if (strcmp(buffer, "123"))
15710 return 1;
15711
15712 return 0;
15713 }
15714
15715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015716if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015717 ac_cv_have_long_long_format=yes
15718else
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015723fi
15724
15725
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015726fi
15727
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15729$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015730fi
15731
Mark Dickinson89d7d412009-12-31 20:50:59 +000015732if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015733then
15734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015736
15737fi
15738
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015739if test $ac_sys_system = Darwin
15740then
15741 LIBS="$LIBS -framework CoreFoundation"
15742fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015743
Matthias Kloseb9621712010-04-24 17:59:49 +000015744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15745$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015746if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015747 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015748else
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015750 ac_cv_have_size_t_format="cross -- assuming yes"
15751
Thomas Wouters477c8d52006-05-27 19:21:47 +000015752else
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015754/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015755
Thomas Wouters477c8d52006-05-27 19:21:47 +000015756#include <stdio.h>
15757#include <stddef.h>
15758#include <string.h>
15759
Christian Heimes2c181612007-12-17 20:04:13 +000015760#ifdef HAVE_SYS_TYPES_H
15761#include <sys/types.h>
15762#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015763
15764#ifdef HAVE_SSIZE_T
15765typedef ssize_t Py_ssize_t;
15766#elif SIZEOF_VOID_P == SIZEOF_LONG
15767typedef long Py_ssize_t;
15768#else
15769typedef int Py_ssize_t;
15770#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015771
Christian Heimes2c181612007-12-17 20:04:13 +000015772int main()
15773{
15774 char buffer[256];
15775
Thomas Wouters477c8d52006-05-27 19:21:47 +000015776 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15777 return 1;
15778
Thomas Wouters89f507f2006-12-13 04:49:30 +000015779 if (strcmp(buffer, "123"))
15780 return 1;
15781
15782 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15783 return 1;
15784
15785 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015786 return 1;
15787
15788 return 0;
15789}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015790
Thomas Wouters477c8d52006-05-27 19:21:47 +000015791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015792if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015793 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015794else
Matthias Kloseb9621712010-04-24 17:59:49 +000015795 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15798 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015799fi
15800
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15803$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015804if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015807
15808fi
15809
Matthias Kloseb9621712010-04-24 17:59:49 +000015810ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015811#ifdef HAVE_SYS_TYPES_H
15812#include <sys/types.h>
15813#endif
15814#ifdef HAVE_SYS_SOCKET_H
15815#include <sys/socket.h>
15816#endif
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818"
Victor Stinnere0be4232011-10-25 13:06:09 +020015819if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015824
15825fi
15826
Michael W. Hudson54241132001-12-07 15:38:26 +000015827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15829$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015830if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015832else
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015834 ac_cv_broken_mbstowcs=no
15835else
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015837/* end confdefs.h. */
15838
Stefan Krah19c21392012-11-22 23:47:32 +010015839#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015840#include<stdlib.h>
15841int main() {
15842 size_t len = -1;
15843 const char *str = "text";
15844 len = mbstowcs(NULL, str, 0);
15845 return (len != 4);
15846}
15847
15848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015849if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015850 ac_cv_broken_mbstowcs=no
15851else
Matthias Kloseb9621712010-04-24 17:59:49 +000015852 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15855 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015856fi
15857
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015858fi
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15861$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015862if test "$ac_cv_broken_mbstowcs" = yes
15863then
15864
Matthias Kloseb9621712010-04-24 17:59:49 +000015865$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015866
15867fi
15868
Antoine Pitroub52ec782009-01-25 16:34:23 +000015869# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15871$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015872
15873# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015874if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015875 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015876if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015877then
15878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15882$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015883fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015884if test "$withval" = no
15885then
15886
15887$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15888
Matthias Kloseb9621712010-04-24 17:59:49 +000015889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15890$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015891fi
15892
Antoine Pitrou042b1282010-08-13 21:15:58 +000015893else
15894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15895$as_echo "no value specified" >&6; }
15896fi
15897
Antoine Pitroub52ec782009-01-25 16:34:23 +000015898
Matthias Kloseb17289e2012-03-15 19:51:34 +010015899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15900$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15901if ${ac_cv_computed_gotos+:} false; then :
15902 $as_echo_n "(cached) " >&6
15903else
15904 if test "$cross_compiling" = yes; then :
15905 if test "${with_computed_gotos+set}" = set; then
15906 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15907 else
15908 ac_cv_computed_gotos=no
15909 fi
15910else
15911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15912/* end confdefs.h. */
15913
15914int main(int argc, char **argv)
15915{
15916 static void *targets[1] = { &&LABEL1 };
15917 goto LABEL2;
15918LABEL1:
15919 return 0;
15920LABEL2:
15921 goto *targets[0];
15922 return 1;
15923}
15924
15925_ACEOF
15926if ac_fn_c_try_run "$LINENO"; then :
15927 ac_cv_computed_gotos=yes
15928else
15929 ac_cv_computed_gotos=no
15930fi
15931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15932 conftest.$ac_objext conftest.beam conftest.$ac_ext
15933fi
15934
15935fi
15936
15937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15938$as_echo "$ac_cv_computed_gotos" >&6; }
15939case "$ac_cv_computed_gotos" in yes*)
15940
15941$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15942
15943esac
15944
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015945case $ac_sys_system in
15946AIX*)
15947
15948$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15949 ;;
15950esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015951
Michael W. Hudson54241132001-12-07 15:38:26 +000015952
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015953
15954
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015955for h in `(cd $srcdir;echo Python/thread_*.h)`
15956do
15957 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15958done
15959
Michael W. Hudson54241132001-12-07 15:38:26 +000015960
Ned Deily0db50cf2014-07-25 12:41:31 -070015961SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15963$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015964for dir in $SRCDIRS; do
15965 if test ! -d $dir; then
15966 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015967 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015968done
Matthias Kloseb9621712010-04-24 17:59:49 +000015969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15970$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015971
Stefan Krah1919b7e2012-03-21 18:25:23 +010015972# Availability of -O2:
15973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15974$as_echo_n "checking for -O2... " >&6; }
15975saved_cflags="$CFLAGS"
15976CFLAGS="-O2"
15977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15978/* end confdefs.h. */
15979
15980int
15981main ()
15982{
15983
15984
15985 ;
15986 return 0;
15987}
15988_ACEOF
15989if ac_fn_c_try_compile "$LINENO"; then :
15990 have_O2=yes
15991else
15992 have_O2=no
15993fi
15994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15996$as_echo "$have_O2" >&6; }
15997CFLAGS="$saved_cflags"
15998
15999# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16000# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16002$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16003saved_cflags="$CFLAGS"
16004CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16005if test "$have_O2" = no; then
16006 CFLAGS=""
16007fi
16008if test "$cross_compiling" = yes; then :
16009 have_glibc_memmove_bug=undefined
16010else
16011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16012/* end confdefs.h. */
16013
16014#include <stdio.h>
16015#include <stdlib.h>
16016#include <string.h>
16017void foo(void *p, void *q) { memmove(p, q, 19); }
16018int main() {
16019 char a[32] = "123456789000000000";
16020 foo(&a[9], a);
16021 if (strcmp(a, "123456789123456789000000000") != 0)
16022 return 1;
16023 foo(a, &a[9]);
16024 if (strcmp(a, "123456789000000000") != 0)
16025 return 1;
16026 return 0;
16027}
16028
16029_ACEOF
16030if ac_fn_c_try_run "$LINENO"; then :
16031 have_glibc_memmove_bug=no
16032else
16033 have_glibc_memmove_bug=yes
16034fi
16035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16036 conftest.$ac_objext conftest.beam conftest.$ac_ext
16037fi
16038
16039CFLAGS="$saved_cflags"
16040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16041$as_echo "$have_glibc_memmove_bug" >&6; }
16042if test "$have_glibc_memmove_bug" = yes; then
16043
16044$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16045
16046fi
16047
16048if test "$have_gcc_asm_for_x87" = yes; then
16049 # Some versions of gcc miscompile inline asm:
16050 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16051 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16052 case $CC in
16053 *gcc*)
16054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16055$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16056 saved_cflags="$CFLAGS"
16057 CFLAGS="-O2"
16058 if test "$cross_compiling" = yes; then :
16059 have_ipa_pure_const_bug=undefined
16060else
16061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16062/* end confdefs.h. */
16063
16064 __attribute__((noinline)) int
16065 foo(int *p) {
16066 int r;
16067 asm ( "movl \$6, (%1)\n\t"
16068 "xorl %0, %0\n\t"
16069 : "=r" (r) : "r" (p) : "memory"
16070 );
16071 return r;
16072 }
16073 int main() {
16074 int p = 8;
16075 if ((foo(&p) ? : p) != 6)
16076 return 1;
16077 return 0;
16078 }
16079
16080_ACEOF
16081if ac_fn_c_try_run "$LINENO"; then :
16082 have_ipa_pure_const_bug=no
16083else
16084 have_ipa_pure_const_bug=yes
16085fi
16086rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16087 conftest.$ac_objext conftest.beam conftest.$ac_ext
16088fi
16089
16090 CFLAGS="$saved_cflags"
16091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16092$as_echo "$have_ipa_pure_const_bug" >&6; }
16093 if test "$have_ipa_pure_const_bug" = yes; then
16094
16095$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16096
16097 fi
16098 ;;
16099 esac
16100fi
16101
Victor Stinner4f5366e2015-01-09 02:13:19 +010016102# Check for stdatomic.h
16103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16104$as_echo_n "checking for stdatomic.h... " >&6; }
16105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16106/* end confdefs.h. */
16107
16108
16109 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016110 atomic_int value = ATOMIC_VAR_INIT(1);
16111 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016112 int main() {
16113 int loaded_value = atomic_load(&value);
16114 return 0;
16115 }
16116
16117
16118_ACEOF
16119if ac_fn_c_try_link "$LINENO"; then :
16120 have_stdatomic_h=yes
16121else
16122 have_stdatomic_h=no
16123fi
16124rm -f core conftest.err conftest.$ac_objext \
16125 conftest$ac_exeext conftest.$ac_ext
16126
16127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16128$as_echo "$have_stdatomic_h" >&6; }
16129
16130if test "$have_stdatomic_h" = yes; then
16131
16132$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16133
16134fi
16135
16136# Check for GCC >= 4.7 __atomic builtins
16137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16138$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16140/* end confdefs.h. */
16141
16142
16143 volatile int val = 1;
16144 int main() {
16145 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16146 return 0;
16147 }
16148
16149
16150_ACEOF
16151if ac_fn_c_try_link "$LINENO"; then :
16152 have_builtin_atomic=yes
16153else
16154 have_builtin_atomic=no
16155fi
16156rm -f core conftest.err conftest.$ac_objext \
16157 conftest$ac_exeext conftest.$ac_ext
16158
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16160$as_echo "$have_builtin_atomic" >&6; }
16161
16162if test "$have_builtin_atomic" = yes; then
16163
16164$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16165
16166fi
16167
Ned Deily322f5ba2013-11-21 23:01:59 -080016168# ensurepip option
16169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16170$as_echo_n "checking for ensurepip... " >&6; }
16171
16172# Check whether --with-ensurepip was given.
16173if test "${with_ensurepip+set}" = set; then :
16174 withval=$with_ensurepip;
16175else
16176 with_ensurepip=upgrade
16177fi
16178
16179case $with_ensurepip in #(
16180 yes|upgrade) :
16181 ENSUREPIP=upgrade ;; #(
16182 install) :
16183 ENSUREPIP=install ;; #(
16184 no) :
16185 ENSUREPIP=no ;; #(
16186 *) :
16187 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16188esac
16189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16190$as_echo "$ENSUREPIP" >&6; }
16191
16192
Victor Stinner35a97c02015-03-08 02:59:09 +010016193# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16195$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16197/* end confdefs.h. */
16198
16199
16200 #include <dirent.h>
16201
16202 int main() {
16203 struct dirent entry;
16204 return entry.d_type == DT_UNKNOWN;
16205 }
16206
16207
16208_ACEOF
16209if ac_fn_c_try_link "$LINENO"; then :
16210 have_dirent_d_type=yes
16211else
16212 have_dirent_d_type=no
16213fi
16214rm -f core conftest.err conftest.$ac_objext \
16215 conftest$ac_exeext conftest.$ac_ext
16216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16217$as_echo "$have_dirent_d_type" >&6; }
16218
16219if test "$have_dirent_d_type" = yes; then
16220
16221$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16222
16223fi
16224
Victor Stinner9eb57c52015-03-19 22:21:49 +010016225# check if the Linux getrandom() syscall is available
16226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16227$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16229/* end confdefs.h. */
16230
16231
Victor Stinner1b80b242016-04-12 22:34:58 +020016232 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016233 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016234 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016235
16236 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016237 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016238 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016239 const int flags = GRND_NONBLOCK;
16240 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016241 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016242 return 0;
16243 }
16244
16245
16246_ACEOF
16247if ac_fn_c_try_link "$LINENO"; then :
16248 have_getrandom_syscall=yes
16249else
16250 have_getrandom_syscall=no
16251fi
16252rm -f core conftest.err conftest.$ac_objext \
16253 conftest$ac_exeext conftest.$ac_ext
16254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16255$as_echo "$have_getrandom_syscall" >&6; }
16256
16257if test "$have_getrandom_syscall" = yes; then
16258
16259$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16260
16261fi
16262
Victor Stinnerbae2d622015-10-01 09:47:30 +020016263# check if the getrandom() function is available
16264# the test was written for the Solaris function of <sys/random.h>
16265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16266$as_echo_n "checking for the getrandom() function... " >&6; }
16267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16268/* end confdefs.h. */
16269
16270
16271 #include <sys/random.h>
16272
16273 int main() {
16274 char buffer[1];
16275 const size_t buflen = sizeof(buffer);
16276 const int flags = 0;
16277 /* ignore the result, Python checks for ENOSYS at runtime */
16278 (void)getrandom(buffer, buflen, flags);
16279 return 0;
16280 }
16281
16282
16283_ACEOF
16284if ac_fn_c_try_link "$LINENO"; then :
16285 have_getrandom=yes
16286else
16287 have_getrandom=no
16288fi
16289rm -f core conftest.err conftest.$ac_objext \
16290 conftest$ac_exeext conftest.$ac_ext
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16292$as_echo "$have_getrandom" >&6; }
16293
16294if test "$have_getrandom" = yes; then
16295
16296$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16297
16298fi
16299
Guido van Rossum627b2d71993-12-24 10:39:16 +000016300# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016301ac_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 +000016302
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016303ac_config_files="$ac_config_files Modules/ld_so_aix"
16304
Martin v. Löwis11437992002-04-12 09:54:03 +000016305cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016306# This file is a shell script that caches the results of configure
16307# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016308# scripts and configure runs, see configure's option --config-cache.
16309# It is not useful on other systems. If it contains results you don't
16310# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016311#
Martin v. Löwis11437992002-04-12 09:54:03 +000016312# config.status only pays attention to the cache file if you give it
16313# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016314#
Skip Montanaro6dead952003-09-25 14:50:04 +000016315# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016316# loading this file, other *unset* `ac_cv_foo' will be assigned the
16317# following values.
16318
16319_ACEOF
16320
Guido van Rossumf78abae1997-01-21 22:02:36 +000016321# The following way of writing the cache mishandles newlines in values,
16322# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016324# Ultrix sh set writes to stderr and can't be redirected directly,
16325# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326(
16327 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16328 eval ac_val=\$$ac_var
16329 case $ac_val in #(
16330 *${as_nl}*)
16331 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016332 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16333$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016334 esac
16335 case $ac_var in #(
16336 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016337 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16338 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339 esac ;;
16340 esac
16341 done
16342
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16345 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016346 # `set' does not quote correctly, so add quotes: double-quote
16347 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016348 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016349 "s/'/'\\\\''/g;
16350 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016352 *)
16353 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016355 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356 esac |
16357 sort
16358) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016359 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016361 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16364 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16366 :end' >>confcache
16367if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16368 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016369 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016370 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16371$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016372 if test ! -f "$cache_file" || test -h "$cache_file"; then
16373 cat confcache >"$cache_file"
16374 else
16375 case $cache_file in #(
16376 */* | ?:*)
16377 mv -f confcache "$cache_file"$$ &&
16378 mv -f "$cache_file"$$ "$cache_file" ;; #(
16379 *)
16380 mv -f confcache "$cache_file" ;;
16381 esac
16382 fi
16383 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016384 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16386$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016387 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016388fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016389rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016390
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016391test "x$prefix" = xNONE && prefix=$ac_default_prefix
16392# Let make expand exec_prefix.
16393test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016394
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016395DEFS=-DHAVE_CONFIG_H
16396
Skip Montanaro6dead952003-09-25 14:50:04 +000016397ac_libobjs=
16398ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016399U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016400for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16401 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016403 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16405 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016406 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16407 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016408done
16409LIBOBJS=$ac_libobjs
16410
16411LTLIBOBJS=$ac_ltlibobjs
16412
16413
Martin v. Löwis11437992002-04-12 09:54:03 +000016414
Matthias Kloseb9621712010-04-24 17:59:49 +000016415
Victor Stinnere0be4232011-10-25 13:06:09 +020016416: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016417ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016418ac_clean_files_save=$ac_clean_files
16419ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016420{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16421$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16422as_write_fail=0
16423cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016424#! $SHELL
16425# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016426# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016427# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016428# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429
Martin v. Löwis11437992002-04-12 09:54:03 +000016430debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016431ac_cs_recheck=false
16432ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016433
Matthias Kloseb9621712010-04-24 17:59:49 +000016434SHELL=\${CONFIG_SHELL-$SHELL}
16435export SHELL
16436_ASEOF
16437cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16438## -------------------- ##
16439## M4sh Initialization. ##
16440## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016442# Be more Bourne compatible
16443DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016444if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016445 emulate sh
16446 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016447 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016448 # is contrary to our usage. Disable this feature.
16449 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016451else
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 case `(set -o) 2>/dev/null` in #(
16453 *posix*) :
16454 set -o posix ;; #(
16455 *) :
16456 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016458fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016459
16460
Matthias Kloseb9621712010-04-24 17:59:49 +000016461as_nl='
16462'
16463export as_nl
16464# Printing a long string crashes Solaris 7 /usr/bin/printf.
16465as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16466as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16467as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16468# Prefer a ksh shell builtin over an external printf program on Solaris,
16469# but without wasting forks for bash or zsh.
16470if test -z "$BASH_VERSION$ZSH_VERSION" \
16471 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16472 as_echo='print -r --'
16473 as_echo_n='print -rn --'
16474elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16475 as_echo='printf %s\n'
16476 as_echo_n='printf %s'
16477else
16478 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16479 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16480 as_echo_n='/usr/ucb/echo -n'
16481 else
16482 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16483 as_echo_n_body='eval
16484 arg=$1;
16485 case $arg in #(
16486 *"$as_nl"*)
16487 expr "X$arg" : "X\\(.*\\)$as_nl";
16488 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16489 esac;
16490 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16491 '
16492 export as_echo_n_body
16493 as_echo_n='sh -c $as_echo_n_body as_echo'
16494 fi
16495 export as_echo_body
16496 as_echo='sh -c $as_echo_body as_echo'
16497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016498
16499# The user is always right.
16500if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016501 PATH_SEPARATOR=:
16502 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16503 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16504 PATH_SEPARATOR=';'
16505 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508
16509# IFS
16510# We need space, tab and new line, in precisely that order. Quoting is
16511# there to prevent editors from complaining about space-tab.
16512# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16513# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514IFS=" "" $as_nl"
16515
16516# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016517as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016518case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519 *[\\/]* ) as_myself=$0 ;;
16520 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016521for as_dir in $PATH
16522do
16523 IFS=$as_save_IFS
16524 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016525 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16526 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 ;;
16530esac
16531# We did not find ourselves, most probably we were run as `sh COMMAND'
16532# in which case we are not to be found in the path.
16533if test "x$as_myself" = x; then
16534 as_myself=$0
16535fi
16536if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016537 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16538 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539fi
16540
Matthias Kloseb9621712010-04-24 17:59:49 +000016541# Unset variables that we do not need and which cause bugs (e.g. in
16542# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16543# suppresses any "Segmentation fault" message there. '((' could
16544# trigger a bug in pdksh 5.2.14.
16545for as_var in BASH_ENV ENV MAIL MAILPATH
16546do eval test x\${$as_var+set} = xset \
16547 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016548done
16549PS1='$ '
16550PS2='> '
16551PS4='+ '
16552
16553# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016554LC_ALL=C
16555export LC_ALL
16556LANGUAGE=C
16557export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558
Matthias Kloseb9621712010-04-24 17:59:49 +000016559# CDPATH.
16560(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16561
16562
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016563# as_fn_error STATUS ERROR [LINENO LOG_FD]
16564# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016565# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16566# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016567# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016568as_fn_error ()
16569{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016570 as_status=$1; test $as_status -eq 0 && as_status=1
16571 if test "$4"; then
16572 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16573 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016574 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016575 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016576 as_fn_exit $as_status
16577} # as_fn_error
16578
16579
16580# as_fn_set_status STATUS
16581# -----------------------
16582# Set $? to STATUS, without forking.
16583as_fn_set_status ()
16584{
16585 return $1
16586} # as_fn_set_status
16587
16588# as_fn_exit STATUS
16589# -----------------
16590# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16591as_fn_exit ()
16592{
16593 set +e
16594 as_fn_set_status $1
16595 exit $1
16596} # as_fn_exit
16597
16598# as_fn_unset VAR
16599# ---------------
16600# Portably unset VAR.
16601as_fn_unset ()
16602{
16603 { eval $1=; unset $1;}
16604}
16605as_unset=as_fn_unset
16606# as_fn_append VAR VALUE
16607# ----------------------
16608# Append the text in VALUE to the end of the definition contained in VAR. Take
16609# advantage of any shell optimizations that allow amortized linear growth over
16610# repeated appends, instead of the typical quadratic growth present in naive
16611# implementations.
16612if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16613 eval 'as_fn_append ()
16614 {
16615 eval $1+=\$2
16616 }'
16617else
16618 as_fn_append ()
16619 {
16620 eval $1=\$$1\$2
16621 }
16622fi # as_fn_append
16623
16624# as_fn_arith ARG...
16625# ------------------
16626# Perform arithmetic evaluation on the ARGs, and store the result in the
16627# global $as_val. Take advantage of shells that can avoid forks. The arguments
16628# must be portable across $(()) and expr.
16629if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16630 eval 'as_fn_arith ()
16631 {
16632 as_val=$(( $* ))
16633 }'
16634else
16635 as_fn_arith ()
16636 {
16637 as_val=`expr "$@" || test $? -eq 1`
16638 }
16639fi # as_fn_arith
16640
16641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016642if expr a : '\(a\)' >/dev/null 2>&1 &&
16643 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16644 as_expr=expr
16645else
16646 as_expr=false
16647fi
16648
16649if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16650 as_basename=basename
16651else
16652 as_basename=false
16653fi
16654
Matthias Kloseb9621712010-04-24 17:59:49 +000016655if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16656 as_dirname=dirname
16657else
16658 as_dirname=false
16659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661as_me=`$as_basename -- "$0" ||
16662$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16663 X"$0" : 'X\(//\)$' \| \
16664 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016665$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666 sed '/^.*\/\([^/][^/]*\)\/*$/{
16667 s//\1/
16668 q
16669 }
16670 /^X\/\(\/\/\)$/{
16671 s//\1/
16672 q
16673 }
16674 /^X\/\(\/\).*/{
16675 s//\1/
16676 q
16677 }
16678 s/.*/./; q'`
16679
Matthias Kloseb9621712010-04-24 17:59:49 +000016680# Avoid depending upon Character Ranges.
16681as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16682as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16683as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16684as_cr_digits='0123456789'
16685as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686
16687ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016688case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016692 xy) ECHO_C='\c';;
16693 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16694 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 esac;;
16696*)
16697 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016698esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016699
Martin v. Löwis11437992002-04-12 09:54:03 +000016700rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701if test -d conf$$.dir; then
16702 rm -f conf$$.dir/conf$$.file
16703else
16704 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016705 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016707if (echo >conf$$.file) 2>/dev/null; then
16708 if ln -s conf$$.file conf$$ 2>/dev/null; then
16709 as_ln_s='ln -s'
16710 # ... but there are two gotchas:
16711 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16712 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016713 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016714 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016715 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016716 elif ln conf$$.file conf$$ 2>/dev/null; then
16717 as_ln_s=ln
16718 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016719 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016721else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016722 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016724rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16725rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016726
Matthias Kloseb9621712010-04-24 17:59:49 +000016727
16728# as_fn_mkdir_p
16729# -------------
16730# Create "$as_dir" as a directory, including parents if necessary.
16731as_fn_mkdir_p ()
16732{
16733
16734 case $as_dir in #(
16735 -*) as_dir=./$as_dir;;
16736 esac
16737 test -d "$as_dir" || eval $as_mkdir_p || {
16738 as_dirs=
16739 while :; do
16740 case $as_dir in #(
16741 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16742 *) as_qdir=$as_dir;;
16743 esac
16744 as_dirs="'$as_qdir' $as_dirs"
16745 as_dir=`$as_dirname -- "$as_dir" ||
16746$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16747 X"$as_dir" : 'X\(//\)[^/]' \| \
16748 X"$as_dir" : 'X\(//\)$' \| \
16749 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16750$as_echo X"$as_dir" |
16751 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16752 s//\1/
16753 q
16754 }
16755 /^X\(\/\/\)[^/].*/{
16756 s//\1/
16757 q
16758 }
16759 /^X\(\/\/\)$/{
16760 s//\1/
16761 q
16762 }
16763 /^X\(\/\).*/{
16764 s//\1/
16765 q
16766 }
16767 s/.*/./; q'`
16768 test -d "$as_dir" && break
16769 done
16770 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016771 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016772
16773
16774} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016775if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016776 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016777else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016778 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016779 as_mkdir_p=false
16780fi
16781
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016782
16783# as_fn_executable_p FILE
16784# -----------------------
16785# Test if FILE is an executable regular file.
16786as_fn_executable_p ()
16787{
16788 test -f "$1" && test -x "$1"
16789} # as_fn_executable_p
16790as_test_x='test -x'
16791as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016792
16793# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016794as_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 +000016795
16796# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016797as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
16799
Martin v. Löwis11437992002-04-12 09:54:03 +000016800exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016801## ----------------------------------- ##
16802## Main body of $CONFIG_STATUS script. ##
16803## ----------------------------------- ##
16804_ASEOF
16805test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016806
Matthias Kloseb9621712010-04-24 17:59:49 +000016807cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16808# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016809# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016810# values after options handling.
16811ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016812This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016813generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016814
16815 CONFIG_FILES = $CONFIG_FILES
16816 CONFIG_HEADERS = $CONFIG_HEADERS
16817 CONFIG_LINKS = $CONFIG_LINKS
16818 CONFIG_COMMANDS = $CONFIG_COMMANDS
16819 $ $0 $@
16820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016821on `(hostname || uname -n) 2>/dev/null | sed 1q`
16822"
16823
Martin v. Löwis11437992002-04-12 09:54:03 +000016824_ACEOF
16825
Matthias Kloseb9621712010-04-24 17:59:49 +000016826case $ac_config_files in *"
16827"*) set x $ac_config_files; shift; ac_config_files=$*;;
16828esac
16829
16830case $ac_config_headers in *"
16831"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16832esac
16833
16834
16835cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016836# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016837config_files="$ac_config_files"
16838config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016841
Matthias Kloseb9621712010-04-24 17:59:49 +000016842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016843ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016844\`$as_me' instantiates files and other configuration actions
16845from templates according to the current configuration. Unless the files
16846and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016847
Matthias Kloseb9621712010-04-24 17:59:49 +000016848Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016849
16850 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016852 --config print configuration, then exit
16853 -q, --quiet, --silent
16854 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 -d, --debug don't remove temporary files
16856 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016857 --file=FILE[:TEMPLATE]
16858 instantiate the configuration file FILE
16859 --header=FILE[:TEMPLATE]
16860 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016861
16862Configuration files:
16863$config_files
16864
16865Configuration headers:
16866$config_headers
16867
Matthias Kloseb9621712010-04-24 17:59:49 +000016868Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016871cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16872ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016873ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016874python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016875configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016876 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016877
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016878Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016879This config.status script is free software; the Free Software Foundation
16880gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881
16882ac_pwd='$ac_pwd'
16883srcdir='$srcdir'
16884INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016885MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016886test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016887_ACEOF
16888
Matthias Kloseb9621712010-04-24 17:59:49 +000016889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16890# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016891ac_need_defaults=:
16892while test $# != 0
16893do
16894 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016895 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16897 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016898 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016899 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016900 --*=)
16901 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16902 ac_optarg=
16903 ac_shift=:
16904 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016906 ac_option=$1
16907 ac_optarg=$2
16908 ac_shift=shift
16909 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 esac
16911
Skip Montanaro6dead952003-09-25 14:50:04 +000016912 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016914 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16915 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016917 $as_echo "$ac_cs_version"; exit ;;
16918 --config | --confi | --conf | --con | --co | --c )
16919 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 debug=: ;;
16922 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016923 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016924 case $ac_optarg in
16925 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016926 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016927 esac
16928 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016929 ac_need_defaults=false;;
16930 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016931 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016932 case $ac_optarg in
16933 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16934 esac
16935 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016937 --he | --h)
16938 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016939 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016940Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016942 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016943 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16944 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16945 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016946
16947 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016948 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016949Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016950
Matthias Kloseb9621712010-04-24 17:59:49 +000016951 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016952 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016953
16954 esac
16955 shift
16956done
16957
Skip Montanaro6dead952003-09-25 14:50:04 +000016958ac_configure_extra_args=
16959
16960if $ac_cs_silent; then
16961 exec 6>/dev/null
16962 ac_configure_extra_args="$ac_configure_extra_args --silent"
16963fi
16964
16965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016966cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016967if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016968 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016969 shift
16970 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16971 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016973 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016974fi
16975
Martin v. Löwis11437992002-04-12 09:54:03 +000016976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016977cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978exec 5>>config.log
16979{
16980 echo
16981 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16982## Running $as_me. ##
16983_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016984 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016989_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016990
Matthias Kloseb9621712010-04-24 17:59:49 +000016991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992
16993# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016994for ac_config_target in $ac_config_targets
16995do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996 case $ac_config_target in
16997 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16998 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16999 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017000 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17001 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17003 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017004 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017005 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017006 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007
Victor Stinnere0be4232011-10-25 13:06:09 +020017008 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 esac
17010done
17011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012
Martin v. Löwis11437992002-04-12 09:54:03 +000017013# If the user did not use the arguments to specify the items to instantiate,
17014# then the envvar interface is used. Set only those that are not.
17015# We use the long form for the default assignment because of an extremely
17016# bizarre bug on SunOS 4.1.3.
17017if $ac_need_defaults; then
17018 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17019 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17020fi
17021
Skip Montanaro6dead952003-09-25 14:50:04 +000017022# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017024# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017025# Hook for its removal unless debugging.
17026# Note that there is a small window in which the directory will not be cleaned:
17027# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017028$debug ||
17029{
Victor Stinnere0be4232011-10-25 13:06:09 +020017030 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017032 : "${ac_tmp:=$tmp}"
17033 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017035 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017036}
Martin v. Löwis11437992002-04-12 09:54:03 +000017037# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017038
Martin v. Löwis11437992002-04-12 09:54:03 +000017039{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017040 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017041 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017042} ||
17043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044 tmp=./conf$$-$RANDOM
17045 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017046} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017047ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
Matthias Kloseb9621712010-04-24 17:59:49 +000017049# Set up the scripts for CONFIG_FILES section.
17050# No need to generate them if there are no CONFIG_FILES.
17051# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017052if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017053
Matthias Kloseb9621712010-04-24 17:59:49 +000017054
17055ac_cr=`echo X | tr X '\015'`
17056# On cygwin, bash can eat \r inside `` if the user requested igncr.
17057# But we know of no other shell where ac_cr would be empty at this
17058# point, so we can use a bashism as a fallback.
17059if test "x$ac_cr" = x; then
17060 eval ac_cr=\$\'\\r\'
17061fi
17062ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17063if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017064 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017065else
17066 ac_cs_awk_cr=$ac_cr
17067fi
17068
Victor Stinnere0be4232011-10-25 13:06:09 +020017069echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017070_ACEOF
17071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072
Matthias Kloseb9621712010-04-24 17:59:49 +000017073{
17074 echo "cat >conf$$subs.awk <<_ACEOF" &&
17075 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17076 echo "_ACEOF"
17077} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017078 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17079ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080ac_delim='%!_!# '
17081for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017082 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017083 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17086 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087 break
17088 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017089 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 else
17091 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017092 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093done
Matthias Kloseb9621712010-04-24 17:59:49 +000017094rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095
Matthias Kloseb9621712010-04-24 17:59:49 +000017096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017097cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017099sed -n '
17100h
17101s/^/S["/; s/!.*/"]=/
17102p
17103g
17104s/^[^!]*!//
17105:repl
17106t repl
17107s/'"$ac_delim"'$//
17108t delim
17109:nl
17110h
17111s/\(.\{148\}\)..*/\1/
17112t more1
17113s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17114p
17115n
17116b repl
17117:more1
17118s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17119p
17120g
17121s/.\{148\}//
17122t nl
17123:delim
17124h
17125s/\(.\{148\}\)..*/\1/
17126t more2
17127s/["\\]/\\&/g; s/^/"/; s/$/"/
17128p
17129b
17130:more2
17131s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17132p
17133g
17134s/.\{148\}//
17135t delim
17136' <conf$$subs.awk | sed '
17137/^[^""]/{
17138 N
17139 s/\n//
17140}
17141' >>$CONFIG_STATUS || ac_write_fail=1
17142rm -f conf$$subs.awk
17143cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17144_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017145cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017146 for (key in S) S_is_set[key] = 1
17147 FS = ""
17148
17149}
17150{
17151 line = $ 0
17152 nfields = split(line, field, "@")
17153 substed = 0
17154 len = length(field[1])
17155 for (i = 2; i < nfields; i++) {
17156 key = field[i]
17157 keylen = length(key)
17158 if (S_is_set[key]) {
17159 value = S[key]
17160 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17161 len += length(value) + length(field[++i])
17162 substed = 1
17163 } else
17164 len += 1 + keylen
17165 }
17166
17167 print line
17168}
17169
17170_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17173if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17174 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17175else
17176 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017177fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017178 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017179_ACEOF
17180
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017181# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17182# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183# trailing colons and then remove the whole line if VPATH becomes empty
17184# (actually we leave an empty line to preserve line numbers).
17185if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017186 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17187h
17188s///
17189s/^/:/
17190s/[ ]*$/:/
17191s/:\$(srcdir):/:/g
17192s/:\${srcdir}:/:/g
17193s/:@srcdir@:/:/g
17194s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017196x
17197s/\(=[ ]*\).*/\1/
17198G
17199s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200s/^[^=]*=[ ]*$//
17201}'
17202fi
17203
Matthias Kloseb9621712010-04-24 17:59:49 +000017204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017205fi # test -n "$CONFIG_FILES"
17206
Matthias Kloseb9621712010-04-24 17:59:49 +000017207# Set up the scripts for CONFIG_HEADERS section.
17208# No need to generate them if there are no CONFIG_HEADERS.
17209# This happens for instance with `./config.status Makefile'.
17210if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017211cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017212BEGIN {
17213_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017214
Matthias Kloseb9621712010-04-24 17:59:49 +000017215# Transform confdefs.h into an awk script `defines.awk', embedded as
17216# here-document in config.status, that substitutes the proper values into
17217# config.h.in to produce config.h.
17218
17219# Create a delimiter string that does not exist in confdefs.h, to ease
17220# handling of long lines.
17221ac_delim='%!_!# '
17222for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017223 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17224 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017225 break
17226 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017227 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017228 else
17229 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17230 fi
17231done
17232
17233# For the awk script, D is an array of macro values keyed by name,
17234# likewise P contains macro parameters if any. Preserve backslash
17235# newline sequences.
17236
17237ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17238sed -n '
17239s/.\{148\}/&'"$ac_delim"'/g
17240t rset
17241:rset
17242s/^[ ]*#[ ]*define[ ][ ]*/ /
17243t def
17244d
17245:def
17246s/\\$//
17247t bsnl
17248s/["\\]/\\&/g
17249s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17250D["\1"]=" \3"/p
17251s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17252d
17253:bsnl
17254s/["\\]/\\&/g
17255s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17256D["\1"]=" \3\\\\\\n"\\/p
17257t cont
17258s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17259t cont
17260d
17261:cont
17262n
17263s/.\{148\}/&'"$ac_delim"'/g
17264t clear
17265:clear
17266s/\\$//
17267t bsnlc
17268s/["\\]/\\&/g; s/^/"/; s/$/"/p
17269d
17270:bsnlc
17271s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17272b cont
17273' <confdefs.h | sed '
17274s/'"$ac_delim"'/"\\\
17275"/g' >>$CONFIG_STATUS || ac_write_fail=1
17276
17277cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17278 for (key in D) D_is_set[key] = 1
17279 FS = ""
17280}
17281/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17282 line = \$ 0
17283 split(line, arg, " ")
17284 if (arg[1] == "#") {
17285 defundef = arg[2]
17286 mac1 = arg[3]
17287 } else {
17288 defundef = substr(arg[1], 2)
17289 mac1 = arg[2]
17290 }
17291 split(mac1, mac2, "(") #)
17292 macro = mac2[1]
17293 prefix = substr(line, 1, index(line, defundef) - 1)
17294 if (D_is_set[macro]) {
17295 # Preserve the white space surrounding the "#".
17296 print prefix "define", macro P[macro] D[macro]
17297 next
17298 } else {
17299 # Replace #undef with comments. This is necessary, for example,
17300 # in the case of _POSIX_SOURCE, which is predefined and required
17301 # on some systems where configure will not decide to define it.
17302 if (defundef == "undef") {
17303 print "/*", prefix defundef, macro, "*/"
17304 next
17305 }
17306 }
17307}
17308{ print }
17309_ACAWK
17310_ACEOF
17311cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017312 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017313fi # test -n "$CONFIG_HEADERS"
17314
17315
17316eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17317shift
17318for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319do
17320 case $ac_tag in
17321 :[FHLC]) ac_mode=$ac_tag; continue;;
17322 esac
17323 case $ac_mode$ac_tag in
17324 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017325 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326 :[FH]-) ac_tag=-:-;;
17327 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17328 esac
17329 ac_save_IFS=$IFS
17330 IFS=:
17331 set x $ac_tag
17332 IFS=$ac_save_IFS
17333 shift
17334 ac_file=$1
17335 shift
17336
17337 case $ac_mode in
17338 :L) ac_source=$1;;
17339 :[FH])
17340 ac_file_inputs=
17341 for ac_f
17342 do
17343 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017344 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345 *) # Look for the file first in the build tree, then in the source tree
17346 # (if the path is not absolute). The absolute path cannot be DOS-style,
17347 # because $ac_f cannot contain `:'.
17348 test -f "$ac_f" ||
17349 case $ac_f in
17350 [\\/$]*) false;;
17351 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17352 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017353 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017355 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17356 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357 done
17358
17359 # Let's still pretend it is `configure' which instantiates (i.e., don't
17360 # use $as_me), people would be surprised to read:
17361 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017362 configure_input='Generated from '`
17363 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17364 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 if test x"$ac_file" != x-; then
17366 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17368$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017370 # Neutralize special characters interpreted by sed in replacement strings.
17371 case $configure_input in #(
17372 *\&* | *\|* | *\\* )
17373 ac_sed_conf_input=`$as_echo "$configure_input" |
17374 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17375 *) ac_sed_conf_input=$configure_input;;
17376 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377
17378 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017379 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17380 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381 esac
17382 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017383 esac
17384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017386$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017387 X"$ac_file" : 'X\(//\)[^/]' \| \
17388 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017390$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017391 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17392 s//\1/
17393 q
17394 }
17395 /^X\(\/\/\)[^/].*/{
17396 s//\1/
17397 q
17398 }
17399 /^X\(\/\/\)$/{
17400 s//\1/
17401 q
17402 }
17403 /^X\(\/\).*/{
17404 s//\1/
17405 q
17406 }
17407 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017408 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017409 ac_builddir=.
17410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411case "$ac_dir" in
17412.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17413*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017414 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017415 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017416 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017417 case $ac_top_builddir_sub in
17418 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17419 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17420 esac ;;
17421esac
17422ac_abs_top_builddir=$ac_pwd
17423ac_abs_builddir=$ac_pwd$ac_dir_suffix
17424# for backward compatibility:
17425ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017426
17427case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430 ac_top_srcdir=$ac_top_builddir_sub
17431 ac_abs_top_srcdir=$ac_pwd ;;
17432 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 ac_top_srcdir=$srcdir
17435 ac_abs_top_srcdir=$srcdir ;;
17436 *) # Relative name.
17437 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17438 ac_top_srcdir=$ac_top_build_prefix$srcdir
17439 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017440esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017442
Martin v. Löwis11437992002-04-12 09:54:03 +000017443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444 case $ac_mode in
17445 :F)
17446 #
17447 # CONFIG_FILE
17448 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017449
17450 case $INSTALL in
17451 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017453 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017454 ac_MKDIR_P=$MKDIR_P
17455 case $MKDIR_P in
17456 [\\/$]* | ?:[\\/]* ) ;;
17457 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17458 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017459_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460
Matthias Kloseb9621712010-04-24 17:59:49 +000017461cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462# If the template does not know about datarootdir, expand it.
17463# FIXME: This hack should be removed a few years after 2.60.
17464ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017465ac_sed_dataroot='
17466/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 p
17468 q
17469}
17470/@datadir@/p
17471/@docdir@/p
17472/@infodir@/p
17473/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017474/@mandir@/p'
17475case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017476*datarootdir*) ac_datarootdir_seen=yes;;
17477*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017478 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17479$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017481cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482 ac_datarootdir_hack='
17483 s&@datadir@&$datadir&g
17484 s&@docdir@&$docdir&g
17485 s&@infodir@&$infodir&g
17486 s&@localedir@&$localedir&g
17487 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017488 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017489esac
17490_ACEOF
17491
17492# Neutralize VPATH when `$srcdir' = `.'.
17493# Shell code in configure.ac might set extrasub.
17494# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017495cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17496ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017497$extrasub
17498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017499cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017500:t
17501/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017502s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017504s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505s&@srcdir@&$ac_srcdir&;t t
17506s&@abs_srcdir@&$ac_abs_srcdir&;t t
17507s&@top_srcdir@&$ac_top_srcdir&;t t
17508s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17509s&@builddir@&$ac_builddir&;t t
17510s&@abs_builddir@&$ac_abs_builddir&;t t
17511s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17512s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017513s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017515"
Victor Stinnere0be4232011-10-25 13:06:09 +020017516eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17517 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017520 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17521 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17522 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017524which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017525$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017526which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017527
Victor Stinnere0be4232011-10-25 13:06:09 +020017528 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017529 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017530 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17531 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017532 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017533 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534 ;;
17535 :H)
17536 #
17537 # CONFIG_HEADER
17538 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017539 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017540 {
17541 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017542 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17543 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017544 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017545 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017546 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17547$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017548 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017549 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017550 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017551 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 fi
17553 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017555 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017556 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017557 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560
17561 esac
17562
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017563
17564 case $ac_file$ac_mode in
17565 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17566
17567 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568done # for ac_tag
17569
Guido van Rossum627b2d71993-12-24 10:39:16 +000017570
Matthias Kloseb9621712010-04-24 17:59:49 +000017571as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017572_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017573ac_clean_files=$ac_clean_files_save
17574
Matthias Kloseb9621712010-04-24 17:59:49 +000017575test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017576 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017577
Martin v. Löwis11437992002-04-12 09:54:03 +000017578
17579# configure is writing to config.log, and then calls config.status.
17580# config.status does its own redirection, appending to config.log.
17581# Unfortunately, on DOS this fails, as config.log is still kept open
17582# by configure, so config.status won't be able to write to it; its
17583# output is simply discarded. So we exec the FD to /dev/null,
17584# effectively closing config.log, so it can be properly (re)opened and
17585# appended to by config.status. When coming back to configure, we
17586# need to make the FD available again.
17587if test "$no_create" != yes; then
17588 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017589 ac_config_status_args=
17590 test "$silent" = yes &&
17591 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017592 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017593 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017594 exec 5>>config.log
17595 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17596 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017597 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017598fi
17599if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17600 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17601$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017602fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017603
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017604
Christian Heimes75ed8902013-11-20 01:11:18 +010017605echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017606if test ! -f Modules/Setup
17607then
17608 cp $srcdir/Modules/Setup.dist Modules/Setup
17609fi
17610
Christian Heimes75ed8902013-11-20 01:11:18 +010017611echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017612if test ! -f Modules/Setup.local
17613then
17614 echo "# Edit this file for local setup changes" >Modules/Setup.local
17615fi
17616
Christian Heimes75ed8902013-11-20 01:11:18 +010017617echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017618$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17619 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017620 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017621mv config.c Modules