blob: d9a22eb866aec94eb8a20749a991879345a332e7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07006# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700586PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
Gregory P. Smith794b2912016-09-08 00:07:40 -0700665target_os
666target_vendor
667target_cpu
668target
669LLVM_PROFDATA
Brett Cannon4ff151a2015-09-18 15:09:42 -0700670LLVM_PROF_ERR
671LLVM_PROF_FILE
672LLVM_PROF_MERGER
673PGO_PROF_USE_FLAG
674PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000675LTOFLAGS
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700676DEF_MAKE_RULE
677DEF_MAKE_ALL_RULE
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000678UNIVERSAL_ARCH_FLAGS
679BASECFLAGS
680OPT
681LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000682MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683INSTALL_DATA
684INSTALL_SCRIPT
685INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100686HAS_HG
687HGBRANCH
688HGTAG
689HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400690BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000691SVNVERSION
692ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100693ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000694AR
695RANLIB
696GNULD
697LINKCC
698RUNSHARED
699INSTSONAME
700LDLIBRARYDIR
701BLDLIBRARY
702DLLLIBRARY
703LDLIBRARY
704LIBRARY
705BUILDEXEEXT
706EGREP
707GREP
708CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100709MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100710ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000711MAINCC
712CXX
713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722EXTRAMACHDEPPATH
723EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200724PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000725SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100726_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000727MACHDEP
728FRAMEWORKINSTALLAPPSPREFIX
729FRAMEWORKUNIXTOOLSPREFIX
730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
Martin Panterbc82de02016-07-29 05:52:32 +0000745GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100746PYTHON_FOR_BUILD
747host_os
748host_vendor
749host_cpu
750host
751build_os
752build_vendor
753build_cpu
754build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000755target_alias
756host_alias
757build_alias
758LIBS
759ECHO_T
760ECHO_N
761ECHO_C
762DEFS
763mandir
764localedir
765libdir
766psdir
767pdfdir
768dvidir
769htmldir
770infodir
771docdir
772oldincludedir
773includedir
Benjamin Peterson42e10292016-07-07 00:02:31 -0700774runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000775localstatedir
776sharedstatedir
777sysconfdir
778datadir
779datarootdir
780libexecdir
781sbindir
782bindir
783program_transform_name
784prefix
785exec_prefix
786PACKAGE_URL
787PACKAGE_BUGREPORT
788PACKAGE_STRING
789PACKAGE_VERSION
790PACKAGE_TARNAME
791PACKAGE_NAME
792PATH_SEPARATOR
793SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000794ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000795ac_user_opts='
796enable_option_checking
797enable_universalsdk
798with_universal_archs
799with_framework_name
800enable_framework
801with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600802with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000803with_cxx_main
804with_suffix
805enable_shared
806enable_profiling
807with_pydebug
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700808with_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000809with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000810enable_toolbox_glue
811with_libs
812with_system_expat
813with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700814with_tcltk_includes
815with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000816with_dbmliborder
817with_signal_module
818with_dec_threads
819with_threads
820with_thread
821with_pth
822enable_ipv6
823with_doc_strings
824with_tsc
825with_pymalloc
826with_valgrind
827with_wctype_functions
828with_fpectl
829with_libm
830with_libc
831enable_big_digits
832enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500833with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800834with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000835'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836 ac_precious_vars='build_alias
837host_alias
838target_alias
839CC
840CFLAGS
841LDFLAGS
842LIBS
843CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500844CPP
845PKG_CONFIG
846PKG_CONFIG_PATH
847PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000848
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000851ac_init_help=
852ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000853ac_unrecognized_opts=
854ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# The variables have the same names as the options, with
856# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000857cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860no_recursion=
861prefix=NONE
862program_prefix=NONE
863program_suffix=NONE
864program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869x_includes=NONE
870x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000871
872# Installation directory options.
873# These are left unexpanded so users can "make install exec_prefix=/foo"
874# and all the variables that are supposed to be based on exec_prefix
875# by default will actually change.
876# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878bindir='${exec_prefix}/bin'
879sbindir='${exec_prefix}/sbin'
880libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000881datarootdir='${prefix}/share'
882datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883sysconfdir='${prefix}/etc'
884sharedstatedir='${prefix}/com'
885localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700886runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887includedir='${prefix}/include'
888oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +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=
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000911 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
912 *=) ac_optarg= ;;
913 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +0000957 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000958 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +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 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Klosea0bea5d2010-05-08 10:00:28 +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 Klosea0bea5d2010-05-08 10:00:28 +0000983 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000984 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001057 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 ac_prev=localstatedir ;;
1059 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Benjamin Peterson42e10292016-07-07 00:02:31 -07001139 -runstatedir | --runstatedir | --runstatedi | --runstated \
1140 | --runstate | --runstat | --runsta | --runst | --runs \
1141 | --run | --ru | --r)
1142 ac_prev=runstatedir ;;
1143 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1144 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1145 | --run=* | --ru=* | --r=*)
1146 runstatedir=$ac_optarg ;;
1147
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1149 ac_prev=sbindir ;;
1150 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1151 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001153
1154 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1155 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1156 | --sharedst | --shareds | --shared | --share | --shar \
1157 | --sha | --sh)
1158 ac_prev=sharedstatedir ;;
1159 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1160 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1161 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1162 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001164
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001165 -site | --site | --sit)
1166 ac_prev=site ;;
1167 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1171 ac_prev=srcdir ;;
1172 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001175 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1176 | --syscon | --sysco | --sysc | --sys | --sy)
1177 ac_prev=sysconfdir ;;
1178 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1179 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
1187 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1188 verbose=yes ;;
1189
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 -version | --version | --versio | --versi | --vers | -V)
1191 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001194 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001195 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001196 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001197 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001198 ac_useropt_orig=$ac_useropt
1199 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1200 case $ac_user_opts in
1201 *"
1202"with_$ac_useropt"
1203"*) ;;
1204 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1205 ac_unrecognized_sep=', ';;
1206 esac
1207 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208
1209 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001210 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001213 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218"with_$ac_useropt"
1219"*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1222 esac
1223 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001225 --x)
1226 # Obsolete; use --with-x.
1227 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1230 | --x-incl | --x-inc | --x-in | --x-i)
1231 ac_prev=x_includes ;;
1232 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1233 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1237 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1238 ac_prev=x_libraries ;;
1239 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1240 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001243 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1244Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245 ;;
1246
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 *=*)
1248 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1249 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001250 case $ac_envvar in #(
1251 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001252 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001253 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001254 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 export $ac_envvar ;;
1256
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001257 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001259 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001261 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001262 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263 ;;
1264
1265 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001266done
1267
Guido van Rossum7f43da71994-08-01 12:15:30 +00001268if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001270 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271fi
1272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001273if test -n "$ac_unrecognized_opts"; then
1274 case $enable_option_checking in
1275 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001276 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001277 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1278 esac
1279fi
1280
1281# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001282for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1283 datadir sysconfdir sharedstatedir localstatedir includedir \
1284 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001285 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001287 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001288 # Remove trailing slashes.
1289 case $ac_val in
1290 */ )
1291 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1292 eval $ac_var=\$ac_val;;
1293 esac
1294 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001295 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001296 [\\/$]* | ?:[\\/]* ) continue;;
1297 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001298 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001299 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001300done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# There might be people who depend on the old broken behavior: `$host'
1303# used to hold the argument of --host etc.
1304# FIXME: To remove some day.
1305build=$build_alias
1306host=$host_alias
1307target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# FIXME: To remove some day.
1310if test "x$host_alias" != x; then
1311 if test "x$build_alias" = x; then
1312 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 elif test "x$build_alias" != "x$host_alias"; then
1314 cross_compiling=yes
1315 fi
1316fi
1317
1318ac_tool_prefix=
1319test -n "$host_alias" && ac_tool_prefix=$host_alias-
1320
1321test "$silent" = yes && exec 6>/dev/null
1322
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323
Martin v. Löwiseba40652007-08-30 20:10:57 +00001324ac_pwd=`pwd` && test -n "$ac_pwd" &&
1325ac_ls_di=`ls -di .` &&
1326ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001327 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001329 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001330
1331
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332# Find the source files, if location was not specified.
1333if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001336 ac_confdir=`$as_dirname -- "$as_myself" ||
1337$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1338 X"$as_myself" : 'X\(//\)[^/]' \| \
1339 X"$as_myself" : 'X\(//\)$' \| \
1340 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1341$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\/\)[^/].*/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\).*/{
1355 s//\1/
1356 q
1357 }
1358 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001359 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001360 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361 srcdir=..
1362 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001363else
1364 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001366if test ! -r "$srcdir/$ac_unique_file"; then
1367 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001368 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001370ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1371ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001372 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001373 pwd)`
1374# When building in place, set srcdir=.
1375if test "$ac_abs_confdir" = "$ac_pwd"; then
1376 srcdir=.
1377fi
1378# Remove unnecessary trailing slashes from srcdir.
1379# Double slashes in file names in object file debugging info
1380# mess up M-x gdb in Emacs.
1381case $srcdir in
1382*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1383esac
1384for ac_var in $ac_precious_vars; do
1385 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1386 eval ac_env_${ac_var}_value=\$${ac_var}
1387 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1389done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001390
Martin v. Löwis11437992002-04-12 09:54:03 +00001391#
1392# Report the --help message.
1393#
1394if test "$ac_init_help" = "long"; then
1395 # Omit some internal or obsolete options to make the list less imposing.
1396 # This message is too long to be a string in the A/UX 3.1 sh.
1397 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001398\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399
1400Usage: $0 [OPTION]... [VAR=VALUE]...
1401
1402To assign environment variables (e.g., CC, CFLAGS...), specify them as
1403VAR=VALUE. See below for descriptions of some of the useful variables.
1404
1405Defaults for the options are specified in brackets.
1406
1407Configuration:
1408 -h, --help display this help and exit
1409 --help=short display options specific to this package
1410 --help=recursive display the short help of all the included packages
1411 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001412 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --cache-file=FILE cache test results in FILE [disabled]
1414 -C, --config-cache alias for \`--cache-file=config.cache'
1415 -n, --no-create do not create output files
1416 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1417
Martin v. Löwis11437992002-04-12 09:54:03 +00001418Installation directories:
1419 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001420 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001422 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423
1424By default, \`make install' will install all the files in
1425\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1426an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1427for instance \`--prefix=\$HOME'.
1428
1429For better control, use the options below.
1430
1431Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001432 --bindir=DIR user executables [EPREFIX/bin]
1433 --sbindir=DIR system admin executables [EPREFIX/sbin]
1434 --libexecdir=DIR program executables [EPREFIX/libexec]
1435 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1436 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1437 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001438 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001465 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001473 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001474 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1480 --enable-ipv6 Enable ipv6 (with ipv4) support
1481 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001482 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001483 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001485 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001486
1487Optional Packages:
1488 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1489 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001490 --with-universal-archs=ARCH
1491 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001492 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001493 --with-framework-name=FRAMEWORK
1494 specify an alternate name of the framework built
1495 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001496 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001497 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00001503 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07001504 etc). Disabled by default.
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001505 --with-lto Enable Link Time Optimization in PGO builds.
1506 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001507 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001508 --with-system-expat build pyexpat module using an installed expat
1509 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001510 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001511 --with-tcltk-includes='-I...'
1512 override search for Tcl and Tk include files
1513 --with-tcltk-libs='-L...'
1514 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001515 --with-dbmliborder=db1:db2:...
1516 order to check db backends for dbm. Valid value is a
1517 colon separated string with the backend names
1518 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-signal-module disable/enable signal module
1520 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1521 --with(out)-threads[=DIRECTORY]
1522 disable/enable thread support
1523 --with(out)-thread[=DIRECTORY]
1524 deprecated; use --with(out)-threads
1525 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001527 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001528 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001529 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with-fpectl enable SIGFPE catching
1532 --with-libm=STRING math library
1533 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001534 --with(out)-computed-gotos
1535 Use computed gotos in evaluation loop (enabled by
1536 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001537 --with(out)-ensurepip=[=OPTION]
1538 "install" or "upgrade" using bundled pip, default is
1539 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541Some influential environment variables:
1542 CC C compiler command
1543 CFLAGS C compiler flags
1544 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1545 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001547 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001550 PKG_CONFIG path to pkg-config utility
1551 PKG_CONFIG_PATH
1552 directories to add to pkg-config's search path
1553 PKG_CONFIG_LIBDIR
1554 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
1556Use these variables to override the choices made by `configure' or to help
1557it to find libraries and programs with nonstandard names/locations.
1558
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001559Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001561ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001562fi
1563
1564if test "$ac_init_help" = "recursive"; then
1565 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001567 test -d "$ac_dir" ||
1568 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1569 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001570 ac_builddir=.
1571
Martin v. Löwiseba40652007-08-30 20:10:57 +00001572case "$ac_dir" in
1573.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1574*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001575 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001577 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 case $ac_top_builddir_sub in
1579 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1580 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1581 esac ;;
1582esac
1583ac_abs_top_builddir=$ac_pwd
1584ac_abs_builddir=$ac_pwd$ac_dir_suffix
1585# for backward compatibility:
1586ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001587
1588case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 ac_top_srcdir=$ac_top_builddir_sub
1592 ac_abs_top_srcdir=$ac_pwd ;;
1593 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 ac_top_srcdir=$srcdir
1596 ac_abs_top_srcdir=$srcdir ;;
1597 *) # Relative name.
1598 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1599 ac_top_srcdir=$ac_top_build_prefix$srcdir
1600 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001601esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001603
Martin v. Löwiseba40652007-08-30 20:10:57 +00001604 cd "$ac_dir" || { ac_status=$?; continue; }
1605 # Check for guested configure.
1606 if test -f "$ac_srcdir/configure.gnu"; then
1607 echo &&
1608 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1609 elif test -f "$ac_srcdir/configure"; then
1610 echo &&
1611 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001612 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001613 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 fi || ac_status=$?
1615 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001616 done
1617fi
1618
Martin v. Löwiseba40652007-08-30 20:10:57 +00001619test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001620if $ac_init_version; then
1621 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001622python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001623generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001624
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001625Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001626This configure script is free software; the Free Software Foundation
1627gives unlimited permission to copy, distribute and modify it.
1628_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001629 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001630fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001631
1632## ------------------------ ##
1633## Autoconf initialization. ##
1634## ------------------------ ##
1635
1636# ac_fn_c_try_compile LINENO
1637# --------------------------
1638# Try to compile conftest.$ac_ext, and return whether this succeeded.
1639ac_fn_c_try_compile ()
1640{
1641 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1642 rm -f conftest.$ac_objext
1643 if { { ac_try="$ac_compile"
1644case "(($ac_try" in
1645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1646 *) ac_try_echo=$ac_try;;
1647esac
1648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1649$as_echo "$ac_try_echo"; } >&5
1650 (eval "$ac_compile") 2>conftest.err
1651 ac_status=$?
1652 if test -s conftest.err; then
1653 grep -v '^ *+' conftest.err >conftest.er1
1654 cat conftest.er1 >&5
1655 mv -f conftest.er1 conftest.err
1656 fi
1657 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1658 test $ac_status = 0; } && {
1659 test -z "$ac_c_werror_flag" ||
1660 test ! -s conftest.err
1661 } && test -s conftest.$ac_objext; then :
1662 ac_retval=0
1663else
1664 $as_echo "$as_me: failed program was:" >&5
1665sed 's/^/| /' conftest.$ac_ext >&5
1666
1667 ac_retval=1
1668fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001669 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001670 as_fn_set_status $ac_retval
1671
1672} # ac_fn_c_try_compile
1673
1674# ac_fn_c_try_cpp LINENO
1675# ----------------------
1676# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1677ac_fn_c_try_cpp ()
1678{
1679 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1680 if { { ac_try="$ac_cpp conftest.$ac_ext"
1681case "(($ac_try" in
1682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1683 *) ac_try_echo=$ac_try;;
1684esac
1685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1686$as_echo "$ac_try_echo"; } >&5
1687 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1688 ac_status=$?
1689 if test -s conftest.err; then
1690 grep -v '^ *+' conftest.err >conftest.er1
1691 cat conftest.er1 >&5
1692 mv -f conftest.er1 conftest.err
1693 fi
1694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001695 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001696 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1697 test ! -s conftest.err
1698 }; then :
1699 ac_retval=0
1700else
1701 $as_echo "$as_me: failed program was:" >&5
1702sed 's/^/| /' conftest.$ac_ext >&5
1703
1704 ac_retval=1
1705fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001706 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001707 as_fn_set_status $ac_retval
1708
1709} # ac_fn_c_try_cpp
1710
1711# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1712# -------------------------------------------------------
1713# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1714# the include files in INCLUDES and setting the cache variable VAR
1715# accordingly.
1716ac_fn_c_check_header_mongrel ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001719 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1721$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001722if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001723 $as_echo_n "(cached) " >&6
1724fi
1725eval ac_res=\$$3
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1727$as_echo "$ac_res" >&6; }
1728else
1729 # Is the header compilable?
1730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1731$as_echo_n "checking $2 usability... " >&6; }
1732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1733/* end confdefs.h. */
1734$4
1735#include <$2>
1736_ACEOF
1737if ac_fn_c_try_compile "$LINENO"; then :
1738 ac_header_compiler=yes
1739else
1740 ac_header_compiler=no
1741fi
1742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1744$as_echo "$ac_header_compiler" >&6; }
1745
1746# Is the header present?
1747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1748$as_echo_n "checking $2 presence... " >&6; }
1749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1750/* end confdefs.h. */
1751#include <$2>
1752_ACEOF
1753if ac_fn_c_try_cpp "$LINENO"; then :
1754 ac_header_preproc=yes
1755else
1756 ac_header_preproc=no
1757fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001758rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1760$as_echo "$ac_header_preproc" >&6; }
1761
1762# So? What about this header?
1763case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1764 yes:no: )
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1766$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1768$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1769 ;;
1770 no:yes:* )
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1772$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1774$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1776$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1778$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1780$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001781( $as_echo "## --------------------------------------- ##
1782## Report this to https://bugs.python.org/ ##
1783## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001784 ) | sed "s/^/$as_me: WARNING: /" >&2
1785 ;;
1786esac
1787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1788$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001789if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001790 $as_echo_n "(cached) " >&6
1791else
1792 eval "$3=\$ac_header_compiler"
1793fi
1794eval ac_res=\$$3
1795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1796$as_echo "$ac_res" >&6; }
1797fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001798 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001799
1800} # ac_fn_c_check_header_mongrel
1801
1802# ac_fn_c_try_run LINENO
1803# ----------------------
1804# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1805# that executables *can* be run.
1806ac_fn_c_try_run ()
1807{
1808 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1809 if { { ac_try="$ac_link"
1810case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815$as_echo "$ac_try_echo"; } >&5
1816 (eval "$ac_link") 2>&5
1817 ac_status=$?
1818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1820 { { case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823esac
1824eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1825$as_echo "$ac_try_echo"; } >&5
1826 (eval "$ac_try") 2>&5
1827 ac_status=$?
1828 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1829 test $ac_status = 0; }; }; then :
1830 ac_retval=0
1831else
1832 $as_echo "$as_me: program exited with status $ac_status" >&5
1833 $as_echo "$as_me: failed program was:" >&5
1834sed 's/^/| /' conftest.$ac_ext >&5
1835
1836 ac_retval=$ac_status
1837fi
1838 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001840 as_fn_set_status $ac_retval
1841
1842} # ac_fn_c_try_run
1843
1844# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1845# -------------------------------------------------------
1846# Tests whether HEADER exists and can be compiled using the include files in
1847# INCLUDES, setting the cache variable VAR accordingly.
1848ac_fn_c_check_header_compile ()
1849{
1850 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001853if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001854 $as_echo_n "(cached) " >&6
1855else
1856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1857/* end confdefs.h. */
1858$4
1859#include <$2>
1860_ACEOF
1861if ac_fn_c_try_compile "$LINENO"; then :
1862 eval "$3=yes"
1863else
1864 eval "$3=no"
1865fi
1866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1867fi
1868eval ac_res=\$$3
1869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1870$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001871 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001872
1873} # ac_fn_c_check_header_compile
1874
1875# ac_fn_c_try_link LINENO
1876# -----------------------
1877# Try to link conftest.$ac_ext, and return whether this succeeded.
1878ac_fn_c_try_link ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 rm -f conftest.$ac_objext conftest$ac_exeext
1882 if { { ac_try="$ac_link"
1883case "(($ac_try" in
1884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1885 *) ac_try_echo=$ac_try;;
1886esac
1887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1888$as_echo "$ac_try_echo"; } >&5
1889 (eval "$ac_link") 2>conftest.err
1890 ac_status=$?
1891 if test -s conftest.err; then
1892 grep -v '^ *+' conftest.err >conftest.er1
1893 cat conftest.er1 >&5
1894 mv -f conftest.er1 conftest.err
1895 fi
1896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1897 test $ac_status = 0; } && {
1898 test -z "$ac_c_werror_flag" ||
1899 test ! -s conftest.err
1900 } && test -s conftest$ac_exeext && {
1901 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001902 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001903 }; then :
1904 ac_retval=0
1905else
1906 $as_echo "$as_me: failed program was:" >&5
1907sed 's/^/| /' conftest.$ac_ext >&5
1908
1909 ac_retval=1
1910fi
1911 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1912 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1913 # interfere with the next link command; also delete a directory that is
1914 # left behind by Apple's compiler. We do this before executing the actions.
1915 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001916 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001917 as_fn_set_status $ac_retval
1918
1919} # ac_fn_c_try_link
1920
1921# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1922# -------------------------------------------
1923# Tests whether TYPE exists after having included INCLUDES, setting cache
1924# variable VAR accordingly.
1925ac_fn_c_check_type ()
1926{
1927 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1929$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001930if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001931 $as_echo_n "(cached) " >&6
1932else
1933 eval "$3=no"
1934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1935/* end confdefs.h. */
1936$4
1937int
1938main ()
1939{
1940if (sizeof ($2))
1941 return 0;
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof (($2)))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960
1961else
1962 eval "$3=yes"
1963fi
1964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968eval ac_res=\$$3
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001972
1973} # ac_fn_c_check_type
1974
1975# ac_fn_c_find_uintX_t LINENO BITS VAR
1976# ------------------------------------
1977# Finds an unsigned integer type with width BITS, setting cache variable VAR
1978# accordingly.
1979ac_fn_c_find_uintX_t ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1983$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001984if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001985 $as_echo_n "(cached) " >&6
1986else
1987 eval "$3=no"
1988 # Order is important - never check a type that is potentially smaller
1989 # than half of the expected target width.
1990 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1991 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$ac_includes_default
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001999test_array [0] = 0;
2000return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 case $ac_type in #(
2008 uint$2_t) :
2009 eval "$3=yes" ;; #(
2010 *) :
2011 eval "$3=\$ac_type" ;;
2012esac
2013fi
2014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002015 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002016
2017else
2018 break
2019fi
2020 done
2021fi
2022eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002026
2027} # ac_fn_c_find_uintX_t
2028
2029# ac_fn_c_find_intX_t LINENO BITS VAR
2030# -----------------------------------
2031# Finds a signed integer type with width BITS, setting cache variable VAR
2032# accordingly.
2033ac_fn_c_find_intX_t ()
2034{
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2037$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002038if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002039 $as_echo_n "(cached) " >&6
2040else
2041 eval "$3=no"
2042 # Order is important - never check a type that is potentially smaller
2043 # than half of the expected target width.
2044 for ac_type in int$2_t 'int' 'long int' \
2045 'long long int' 'short int' 'signed char'; do
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047/* end confdefs.h. */
2048$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002049 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002050int
2051main ()
2052{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002053static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002054test_array [0] = 0;
2055return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2063/* end confdefs.h. */
2064$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002065 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002066int
2067main ()
2068{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002069static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002070 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002071test_array [0] = 0;
2072return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002073
2074 ;
2075 return 0;
2076}
2077_ACEOF
2078if ac_fn_c_try_compile "$LINENO"; then :
2079
2080else
2081 case $ac_type in #(
2082 int$2_t) :
2083 eval "$3=yes" ;; #(
2084 *) :
2085 eval "$3=\$ac_type" ;;
2086esac
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002091 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002092
2093else
2094 break
2095fi
2096 done
2097fi
2098eval ac_res=\$$3
2099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2100$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002101 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002102
2103} # ac_fn_c_find_intX_t
2104
2105# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2106# --------------------------------------------
2107# Tries to find the compile-time value of EXPR in a program that includes
2108# INCLUDES, setting VAR accordingly. Returns whether the value could be
2109# computed
2110ac_fn_c_compute_int ()
2111{
2112 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2113 if test "$cross_compiling" = yes; then
2114 # Depending upon the size, compute the lo and hi bounds.
2115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118int
2119main ()
2120{
2121static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002122test_array [0] = 0;
2123return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129if ac_fn_c_try_compile "$LINENO"; then :
2130 ac_lo=0 ac_mid=0
2131 while :; do
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002139test_array [0] = 0;
2140return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_hi=$ac_mid; break
2148else
2149 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2150 if test $ac_lo -le $ac_mid; then
2151 ac_lo= ac_hi=
2152 break
2153 fi
2154 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157 done
2158else
2159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2160/* end confdefs.h. */
2161$4
2162int
2163main ()
2164{
2165static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002166test_array [0] = 0;
2167return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002168
2169 ;
2170 return 0;
2171}
2172_ACEOF
2173if ac_fn_c_try_compile "$LINENO"; then :
2174 ac_hi=-1 ac_mid=-1
2175 while :; do
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178$4
2179int
2180main ()
2181{
2182static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002183test_array [0] = 0;
2184return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002185
2186 ;
2187 return 0;
2188}
2189_ACEOF
2190if ac_fn_c_try_compile "$LINENO"; then :
2191 ac_lo=$ac_mid; break
2192else
2193 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2194 if test $ac_mid -le $ac_hi; then
2195 ac_lo= ac_hi=
2196 break
2197 fi
2198 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2199fi
2200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 done
2202else
2203 ac_lo= ac_hi=
2204fi
2205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208# Binary search between lo and hi bounds.
2209while test "x$ac_lo" != "x$ac_hi"; do
2210 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212/* end confdefs.h. */
2213$4
2214int
2215main ()
2216{
2217static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002218test_array [0] = 0;
2219return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002220
2221 ;
2222 return 0;
2223}
2224_ACEOF
2225if ac_fn_c_try_compile "$LINENO"; then :
2226 ac_hi=$ac_mid
2227else
2228 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2229fi
2230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2231done
2232case $ac_lo in #((
2233?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2234'') ac_retval=1 ;;
2235esac
2236 else
2237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2238/* end confdefs.h. */
2239$4
2240static long int longval () { return $2; }
2241static unsigned long int ulongval () { return $2; }
2242#include <stdio.h>
2243#include <stdlib.h>
2244int
2245main ()
2246{
2247
2248 FILE *f = fopen ("conftest.val", "w");
2249 if (! f)
2250 return 1;
2251 if (($2) < 0)
2252 {
2253 long int i = longval ();
2254 if (i != ($2))
2255 return 1;
2256 fprintf (f, "%ld", i);
2257 }
2258 else
2259 {
2260 unsigned long int i = ulongval ();
2261 if (i != ($2))
2262 return 1;
2263 fprintf (f, "%lu", i);
2264 }
2265 /* Do not output a trailing newline, as this causes \r\n confusion
2266 on some platforms. */
2267 return ferror (f) || fclose (f) != 0;
2268
2269 ;
2270 return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_run "$LINENO"; then :
2274 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2275else
2276 ac_retval=1
2277fi
2278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2279 conftest.$ac_objext conftest.beam conftest.$ac_ext
2280rm -f conftest.val
2281
2282 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002283 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002284 as_fn_set_status $ac_retval
2285
2286} # ac_fn_c_compute_int
2287
2288# ac_fn_c_check_func LINENO FUNC VAR
2289# ----------------------------------
2290# Tests whether FUNC exists, setting the cache variable VAR accordingly
2291ac_fn_c_check_func ()
2292{
2293 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2295$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002296if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002297 $as_echo_n "(cached) " >&6
2298else
2299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2300/* end confdefs.h. */
2301/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2302 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2303#define $2 innocuous_$2
2304
2305/* System header to define __stub macros and hopefully few prototypes,
2306 which can conflict with char $2 (); below.
2307 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2308 <limits.h> exists even on freestanding compilers. */
2309
2310#ifdef __STDC__
2311# include <limits.h>
2312#else
2313# include <assert.h>
2314#endif
2315
2316#undef $2
2317
2318/* Override any GCC internal prototype to avoid an error.
2319 Use char because int might match the return type of a GCC
2320 builtin and then its argument prototype would still apply. */
2321#ifdef __cplusplus
2322extern "C"
2323#endif
2324char $2 ();
2325/* The GNU C library defines this for functions which it implements
2326 to always fail with ENOSYS. Some functions are actually named
2327 something starting with __ and the normal name is an alias. */
2328#if defined __stub_$2 || defined __stub___$2
2329choke me
2330#endif
2331
2332int
2333main ()
2334{
2335return $2 ();
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_link "$LINENO"; then :
2341 eval "$3=yes"
2342else
2343 eval "$3=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext \
2346 conftest$ac_exeext conftest.$ac_ext
2347fi
2348eval ac_res=\$$3
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2350$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002351 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002352
2353} # ac_fn_c_check_func
2354
2355# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2356# ----------------------------------------------------
2357# Tries to find if the field MEMBER exists in type AGGR, after including
2358# INCLUDES, setting cache variable VAR accordingly.
2359ac_fn_c_check_member ()
2360{
2361 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2363$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002364if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002365 $as_echo_n "(cached) " >&6
2366else
2367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */
2369$5
2370int
2371main ()
2372{
2373static $2 ac_aggr;
2374if (ac_aggr.$3)
2375return 0;
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380if ac_fn_c_try_compile "$LINENO"; then :
2381 eval "$4=yes"
2382else
2383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2384/* end confdefs.h. */
2385$5
2386int
2387main ()
2388{
2389static $2 ac_aggr;
2390if (sizeof ac_aggr.$3)
2391return 0;
2392 ;
2393 return 0;
2394}
2395_ACEOF
2396if ac_fn_c_try_compile "$LINENO"; then :
2397 eval "$4=yes"
2398else
2399 eval "$4=no"
2400fi
2401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2404fi
2405eval ac_res=\$$4
2406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2407$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002408 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002409
2410} # ac_fn_c_check_member
2411
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002412# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2413# ---------------------------------------------
2414# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2415# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002416ac_fn_c_check_decl ()
2417{
2418 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002419 as_decl_name=`echo $2|sed 's/ *(.*//'`
2420 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2422$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002423if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424 $as_echo_n "(cached) " >&6
2425else
2426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2427/* end confdefs.h. */
2428$4
2429int
2430main ()
2431{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002432#ifndef $as_decl_name
2433#ifdef __cplusplus
2434 (void) $as_decl_use;
2435#else
2436 (void) $as_decl_name;
2437#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002438#endif
2439
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
2445 eval "$3=yes"
2446else
2447 eval "$3=no"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451eval ac_res=\$$3
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2453$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002454 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002455
2456} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002457cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002458This file contains any messages produced by compilers while
2459running configure, to aid debugging if configure makes a mistake.
2460
Martin v. Löwis174440b2008-10-03 08:59:41 +00002461It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002462generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002463
2464 $ $0 $@
2465
2466_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002467exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002468{
2469cat <<_ASUNAME
2470## --------- ##
2471## Platform. ##
2472## --------- ##
2473
2474hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2475uname -m = `(uname -m) 2>/dev/null || echo unknown`
2476uname -r = `(uname -r) 2>/dev/null || echo unknown`
2477uname -s = `(uname -s) 2>/dev/null || echo unknown`
2478uname -v = `(uname -v) 2>/dev/null || echo unknown`
2479
2480/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2481/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2482
2483/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2484/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2485/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002487/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2488/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2489/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2490
2491_ASUNAME
2492
2493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2494for as_dir in $PATH
2495do
2496 IFS=$as_save_IFS
2497 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002498 $as_echo "PATH: $as_dir"
2499 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502} >&5
2503
2504cat >&5 <<_ACEOF
2505
2506
2507## ----------- ##
2508## Core tests. ##
2509## ----------- ##
2510
2511_ACEOF
2512
2513
2514# Keep a trace of the command line.
2515# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002516# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002517# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002519ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002520ac_configure_args0=
2521ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002522ac_must_keep_next=false
2523for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002524do
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 for ac_arg
2526 do
2527 case $ac_arg in
2528 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2529 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2530 | -silent | --silent | --silen | --sile | --sil)
2531 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002533 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002534 esac
2535 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002536 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002537 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002538 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002540 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 case $ac_arg in
2543 *=* | --config-cache | -C | -disable-* | --disable-* \
2544 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2545 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2546 | -with-* | --with-* | -without-* | --without-* | --x)
2547 case "$ac_configure_args0 " in
2548 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2549 esac
2550 ;;
2551 -* ) ac_must_keep_next=true ;;
2552 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002553 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002554 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 ;;
2556 esac
2557 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002558done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002559{ ac_configure_args0=; unset ac_configure_args0;}
2560{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002561
2562# When interrupted or exit'd, cleanup temporary files, and complete
2563# config.log. We remove comments because anyway the quotes in there
2564# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565# WARNING: Use '\'' to represent an apostrophe within the trap.
2566# 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 +00002567trap 'exit_status=$?
2568 # Save into config.log some information that might help in debugging.
2569 {
2570 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002571
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002572 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002573## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002574## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 echo
2576 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577(
2578 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2579 eval ac_val=\$$ac_var
2580 case $ac_val in #(
2581 *${as_nl}*)
2582 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002583 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2584$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002585 esac
2586 case $ac_var in #(
2587 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002588 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2589 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 esac ;;
2591 esac
2592 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2595 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597 "s/'\''/'\''\\\\'\'''\''/g;
2598 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2599 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002600 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002602 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 esac |
2604 sort
2605)
Martin v. Löwis11437992002-04-12 09:54:03 +00002606 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002607
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002608 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002609## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002610## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002611 echo
2612 for ac_var in $ac_subst_vars
2613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614 eval ac_val=\$$ac_var
2615 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002616 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002617 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002618 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002619 done | sort
2620 echo
2621
2622 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002623 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002624## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002625## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002626 echo
2627 for ac_var in $ac_subst_files
2628 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629 eval ac_val=\$$ac_var
2630 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002631 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002632 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002633 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002634 done | sort
2635 echo
2636 fi
2637
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002639 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002640## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002641## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 echo
2645 fi
2646 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002647 $as_echo "$as_me: caught signal $ac_signal"
2648 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002649 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650 rm -f core *.core core.conftest.* &&
2651 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002653' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002654for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002655 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002656done
2657ac_signal=0
2658
2659# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002662$as_echo "/* confdefs.h */" > confdefs.h
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664# Predefined preprocessor variables.
2665
2666cat >>confdefs.h <<_ACEOF
2667#define PACKAGE_NAME "$PACKAGE_NAME"
2668_ACEOF
2669
Martin v. Löwis11437992002-04-12 09:54:03 +00002670cat >>confdefs.h <<_ACEOF
2671#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2672_ACEOF
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674cat >>confdefs.h <<_ACEOF
2675#define PACKAGE_VERSION "$PACKAGE_VERSION"
2676_ACEOF
2677
Martin v. Löwis11437992002-04-12 09:54:03 +00002678cat >>confdefs.h <<_ACEOF
2679#define PACKAGE_STRING "$PACKAGE_STRING"
2680_ACEOF
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682cat >>confdefs.h <<_ACEOF
2683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2684_ACEOF
2685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002686cat >>confdefs.h <<_ACEOF
2687#define PACKAGE_URL "$PACKAGE_URL"
2688_ACEOF
2689
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
2691# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692# Prefer an explicitly selected file to automatically selected ones.
2693ac_site_file1=NONE
2694ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002696 # We do not want a PATH search for config.site.
2697 case $CONFIG_SITE in #((
2698 -*) ac_site_file1=./$CONFIG_SITE;;
2699 */*) ac_site_file1=$CONFIG_SITE;;
2700 *) ac_site_file1=./$CONFIG_SITE;;
2701 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002702elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002703 ac_site_file1=$prefix/share/config.site
2704 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002706 ac_site_file1=$ac_default_prefix/share/config.site
2707 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002709for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002710do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 test "x$ac_site_file" = xNONE && continue
2712 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2714$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002716 . "$ac_site_file" \
2717 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2718$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2719as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002720See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721 fi
2722done
2723
2724if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002725 # Some versions of bash will fail to source /dev/null (special files
2726 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2727 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2729$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2732 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 esac
2734 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002736 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2737$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 >$cache_file
2739fi
2740
2741# Check that the precious variables saved in the cache have kept the same
2742# value.
2743ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002744for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2746 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2748 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002749 case $ac_old_set,$ac_new_set in
2750 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2752$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 +00002753 ac_cache_corrupted=: ;;
2754 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2756$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 ac_cache_corrupted=: ;;
2758 ,);;
2759 *)
2760 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002761 # differences in whitespace do not lead to failure.
2762 ac_old_val_w=`echo x $ac_old_val`
2763 ac_new_val_w=`echo x $ac_new_val`
2764 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2766$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2767 ac_cache_corrupted=:
2768 else
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2770$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2771 eval $ac_var=\$ac_old_val
2772 fi
2773 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2774$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2776$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 fi;;
2778 esac
2779 # Pass precious variables to config.status.
2780 if test "$ac_new_set" = set; then
2781 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002782 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002783 *) ac_arg=$ac_var=$ac_new_val ;;
2784 esac
2785 case " $ac_configure_args " in
2786 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002787 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 esac
2789 fi
2790done
2791if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002792 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2795$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002796 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002798## -------------------- ##
2799## Main body of script. ##
2800## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801
Guido van Rossum7f43da71994-08-01 12:15:30 +00002802ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002803ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2806ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002807
Guido van Rossum627b2d71993-12-24 10:39:16 +00002808
Michael W. Hudson54241132001-12-07 15:38:26 +00002809
Martin v. Löwiseba40652007-08-30 20:10:57 +00002810ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002811
2812
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002813ac_aux_dir=
2814for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2815 if test -f "$ac_dir/install-sh"; then
2816 ac_aux_dir=$ac_dir
2817 ac_install_sh="$ac_aux_dir/install-sh -c"
2818 break
2819 elif test -f "$ac_dir/install.sh"; then
2820 ac_aux_dir=$ac_dir
2821 ac_install_sh="$ac_aux_dir/install.sh -c"
2822 break
2823 elif test -f "$ac_dir/shtool"; then
2824 ac_aux_dir=$ac_dir
2825 ac_install_sh="$ac_aux_dir/shtool install -c"
2826 break
2827 fi
2828done
2829if test -z "$ac_aux_dir"; then
2830 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2831fi
2832
2833# These three variables are undocumented and unsupported,
2834# and are intended to be withdrawn in a future Autoconf release.
2835# They can cause serious problems if a builder's source tree is in a directory
2836# whose full name contains unusual characters.
2837ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2838ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2839ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2840
2841
2842# Make sure we can run config.sub.
2843$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2844 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2845
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2847$as_echo_n "checking build system type... " >&6; }
2848if ${ac_cv_build+:} false; then :
2849 $as_echo_n "(cached) " >&6
2850else
2851 ac_build_alias=$build_alias
2852test "x$ac_build_alias" = x &&
2853 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2854test "x$ac_build_alias" = x &&
2855 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2856ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2857 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2861$as_echo "$ac_cv_build" >&6; }
2862case $ac_cv_build in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2865esac
2866build=$ac_cv_build
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_build
2869shift
2870build_cpu=$1
2871build_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875build_os=$*
2876IFS=$ac_save_IFS
2877case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2878
2879
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2881$as_echo_n "checking host system type... " >&6; }
2882if ${ac_cv_host+:} false; then :
2883 $as_echo_n "(cached) " >&6
2884else
2885 if test "x$host_alias" = x; then
2886 ac_cv_host=$ac_cv_build
2887else
2888 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2889 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2890fi
2891
2892fi
2893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2894$as_echo "$ac_cv_host" >&6; }
2895case $ac_cv_host in
2896*-*-*) ;;
2897*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2898esac
2899host=$ac_cv_host
2900ac_save_IFS=$IFS; IFS='-'
2901set x $ac_cv_host
2902shift
2903host_cpu=$1
2904host_vendor=$2
2905shift; shift
2906# Remember, the first character of IFS is used to create $*,
2907# except with old shells:
2908host_os=$*
2909IFS=$ac_save_IFS
2910case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2911
2912
2913
2914
2915
Ned Deily983df862014-08-22 13:30:59 -07002916# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2917rm -f pybuilddir.txt
2918
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python2 python; do
2924 which $interp >/dev/null 2>&1 || continue
2925 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002935 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002936 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002937 # Used to comment out stuff for rebuilding generated files
2938 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002939elif test "$cross_compiling" = maybe; then
2940 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2941else
2942 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002943 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Martin Panter801110b2016-07-28 01:28:27 +00002948
Georg Brandlbcd64a32009-03-31 21:45:18 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Martin v. Löwis174440b2008-10-03 08:59:41 +00002963VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Martin v. Löwis1142de32002-03-29 16:28:31 +00002965
2966SOVERSION=1.0
2967
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968# The later defininition of _XOPEN_SOURCE disables certain features
2969# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002971$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972
2973
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2976# them.
2977
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002978$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979
2980
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2983# them.
2984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002985$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986
2987
Martin v. Löwisd6320502004-08-12 13:45:08 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2990
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002991$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002992
2993
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2996# them.
2997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002998$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002999
3000
3001
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003002define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003003
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003004# Arguments passed to configure.
3005
3006CONFIG_ARGS="$ac_configure_args"
3007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3009$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003010# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003011if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003012 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003013 case $enableval in
3014 yes)
3015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003016 if test ! -d "${enableval}"
3017 then
3018 enableval=/
3019 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003020 ;;
3021 esac
3022 case $enableval in
3023 no)
3024 UNIVERSALSDK=
3025 enable_universalsdk=
3026 ;;
3027 *)
3028 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003029 if test ! -d "${UNIVERSALSDK}"
3030 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003031 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003032 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003033 ;;
3034 esac
3035
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003036
Ronald Oussoren988117f2006-04-29 11:31:35 +00003037else
3038
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041
Martin v. Löwiseba40652007-08-30 20:10:57 +00003042fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003043
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003044if test -n "${UNIVERSALSDK}"
3045then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3047$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3050$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003051fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003052
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003054
Ned Deily8e60f6e2013-05-30 00:14:29 -07003055ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003056
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003057UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3060$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003061
3062# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003063if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003064 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3066$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003067 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003068 if test "${enable_universalsdk}" ; then
3069 :
3070 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003071 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003072 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003073
3074else
3075
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3077$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003078
3079fi
3080
3081
3082
3083
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003084
3085# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003086if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003087 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003088 if test "${enable_framework}"; then
3089 :
3090 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003091 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003092 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003093 PYTHONFRAMEWORK=${withval}
3094 PYTHONFRAMEWORKDIR=${withval}.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3096
3097else
3098
3099 PYTHONFRAMEWORK=Python
3100 PYTHONFRAMEWORKDIR=Python.framework
3101 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3102
3103fi
3104
Martin v. Löwiseba40652007-08-30 20:10:57 +00003105# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003106if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003107 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003108 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003109 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003110 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003111 esac
3112 case $enableval in
3113 no)
3114 PYTHONFRAMEWORK=
3115 PYTHONFRAMEWORKDIR=no-framework
3116 PYTHONFRAMEWORKPREFIX=
3117 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003118 FRAMEWORKINSTALLFIRST=
3119 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003120 FRAMEWORKALTINSTALLFIRST=
3121 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003137
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003138 if test "x${prefix}" = "xNONE" ; then
3139 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003140
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003144
3145 case "${enableval}" in
3146 /System*)
3147 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3148 if test "${prefix}" = "NONE" ; then
3149 # See below
3150 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3151 fi
3152 ;;
3153
3154 /Library*)
3155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3156 ;;
3157
3158 */Library/Frameworks)
3159 MDIR="`dirname "${enableval}"`"
3160 MDIR="`dirname "${MDIR}"`"
3161 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3162
3163 if test "${prefix}" = "NONE"; then
3164 # User hasn't specified the
3165 # --prefix option, but wants to install
3166 # the framework in a non-default location,
3167 # ensure that the compatibility links get
3168 # installed relative to that prefix as well
3169 # instead of in /usr/local.
3170 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3171 fi
3172 ;;
3173
3174 *)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177 esac
3178
Jack Jansen127e56e2001-09-11 14:41:54 +00003179 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003180
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003181 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003182 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003183 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003184
Martin v. Löwiseba40652007-08-30 20:10:57 +00003185 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003186
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003188
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003189 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3190
3191 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3192
Jack Jansene578a632001-08-15 01:27:14 +00003193 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003194
Guido van Rossum563e7081996-09-10 18:20:48 +00003195else
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Jack Jansene578a632001-08-15 01:27:14 +00003197 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORKPREFIX=
3200 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003201 FRAMEWORKINSTALLFIRST=
3202 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003203 FRAMEWORKALTINSTALLFIRST=
3204 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003212
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213fi
3214
Michael W. Hudson54241132001-12-07 15:38:26 +00003215
3216
3217
3218
Jack Jansene578a632001-08-15 01:27:14 +00003219
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003220
3221
Ronald Oussoren5b787322006-06-06 19:50:24 +00003222
3223
3224
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003225
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003226
Jack Jansene578a632001-08-15 01:27:14 +00003227##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003228## AS_HELP_STRING([--with-dyld],
3229## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003230##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231# Set name for machine-dependent library files
3232
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3234$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003235if test -z "$MACHDEP"
3236then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003237 # avoid using uname for cross builds
3238 if test "$cross_compiling" = yes; then
3239 # ac_sys_system and ac_sys_release are only used for setting
3240 # `define_xopen_source' in the case statement below. For the
3241 # current supported cross builds, this macro is not adjusted.
3242 case "$host" in
3243 *-*-linux*)
3244 ac_sys_system=Linux
3245 ;;
3246 *-*-cygwin*)
3247 ac_sys_system=Cygwin
3248 ;;
3249 *)
3250 # for now, limit cross builds to known configurations
3251 MACHDEP="unknown"
3252 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3253 esac
3254 ac_sys_release=
3255 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003256 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003257 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003258 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003259 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003260 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003261 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003263 fi
3264 ac_md_system=`echo $ac_sys_system |
3265 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3266 ac_md_release=`echo $ac_sys_release |
3267 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3268 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003269
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003270 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003271 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003272 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003273 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003274 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003275 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003276 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003277 esac
3278fi
3279
3280
3281if test "$cross_compiling" = yes; then
3282 case "$host" in
3283 *-*-linux*)
3284 case "$host_cpu" in
3285 arm*)
3286 _host_cpu=arm
3287 ;;
3288 *)
3289 _host_cpu=$host_cpu
3290 esac
3291 ;;
3292 *-*-cygwin*)
3293 _host_cpu=
3294 ;;
3295 *)
3296 # for now, limit cross builds to known configurations
3297 MACHDEP="unknown"
3298 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003300 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301fi
Guido van Rossum91922671997-10-09 20:24:13 +00003302
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003303# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3304# disable features if it is defined, without any means to access these
3305# features as extensions. For these systems, we skip the definition of
3306# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3307# some feature, make sure there is no alternative way to access this
3308# feature. Also, when using wildcards, make sure you have verified the
3309# need for not defining _XOPEN_SOURCE on all systems matching the
3310# wildcard, and that the wildcard does not include future systems
3311# (which may remove their limitations).
3312case $ac_sys_system/$ac_sys_release in
3313 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3314 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003315 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003316 # In addition, Stefan Krah confirms that issue #1244610 exists through
3317 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003318 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003319 define_xopen_source=no
3320 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3321 # also defined. This can be overridden by defining _BSD_SOURCE
3322 # As this has a different meaning on Linux, only define it on OpenBSD
3323
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003324$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003325
3326 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003327 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003328 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3329 # also defined. This can be overridden by defining _BSD_SOURCE
3330 # As this has a different meaning on Linux, only define it on OpenBSD
3331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003332$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003333
3334 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003335 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3336 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3337 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003338 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003339 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003340 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3341 # request to enable features supported by the standard as a request
3342 # to disable features not supported by the standard. The best way
3343 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3344 # entirely and define __EXTENSIONS__ instead.
3345 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003346 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003347 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3348 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003349 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003350 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003351 define_xopen_source=no;;
3352 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003353 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003355 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003356 # On FreeBSD 4, the math functions C89 does not cover are never defined
3357 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3358 FreeBSD/4.*)
3359 define_xopen_source=no;;
3360 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3361 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3362 # identifies itself as Darwin/7.*
3363 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3364 # disables platform specific features beyond repair.
3365 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3366 # has no effect, don't bother defining them
3367 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003368 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003369 Darwin/1[0-9].*)
3370 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003371 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3372 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3373 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003374 AIX/4)
3375 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003376 AIX/5)
3377 if test `uname -r` -eq 1; then
3378 define_xopen_source=no
3379 fi
3380 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003381 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3382 # defining NI_NUMERICHOST.
3383 QNX/6.3.2)
3384 define_xopen_source=no
3385 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003386
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003387esac
3388
3389if test $define_xopen_source = yes
3390then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003392$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003393
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003394
3395 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3396 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3397 # several APIs are not declared. Since this is also needed in some
3398 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003400$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
3402
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003404$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407fi
3408
Guido van Rossum91922671997-10-09 20:24:13 +00003409#
3410# SGI compilers allow the specification of the both the ABI and the
3411# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003412# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003413#
3414# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3415# thus supply support for various ABI/ISA combinations. The MACHDEP
3416# variable is also adjusted.
3417#
3418
3419if test ! -z "$SGI_ABI"
3420then
3421 CC="cc $SGI_ABI"
3422 LDFLAGS="$SGI_ABI $LDFLAGS"
3423 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3426$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003427
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003428
3429PLATDIR=plat-$MACHDEP
3430
Jack Jansen83f898c2002-12-30 22:23:40 +00003431# And add extra plat-mac for darwin
3432
Jack Jansen7b59b422003-03-17 15:44:10 +00003433
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3435$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003436if test -z "$EXTRAPLATDIR"
3437then
3438 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003439 darwin)
3440 EXTRAPLATDIR="\$(PLATMACDIRS)"
3441 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3442 ;;
3443 *)
3444 EXTRAPLATDIR=""
3445 EXTRAMACHDEPPATH=""
3446 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003447 esac
3448fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3450$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003451
Jack Jansen6b08a402004-06-03 12:41:45 +00003452# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3453# it may influence the way we can build extensions, so distutils
3454# needs to check it
3455
Ronald Oussoren988117f2006-04-29 11:31:35 +00003456
Jack Jansen6b08a402004-06-03 12:41:45 +00003457CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003458EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003459
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003461
3462# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3463# for debug/optimization stuff. BASECFLAGS is for flags that are required
3464# just to get things to compile and link. Users are free to override OPT
3465# when running configure or make. The build should not break if they do.
3466# BASECFLAGS should generally not be messed with, however.
3467
3468# XXX shouldn't some/most/all of this code be merged with the stuff later
3469# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3471$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Martin v. Löwiseba40652007-08-30 20:10:57 +00003473# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003474if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003475 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003477 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478 without_gcc=yes;;
3479 yes) CC=gcc
3480 without_gcc=no;;
3481 *) CC=$withval
3482 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003486 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003487 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003488 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003489 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003490 case $BE_HOST_CPU in
3491 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003492 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003493 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003494 BASECFLAGS="$BASECFLAGS -export pragma"
3495 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003496 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003497 ;;
3498 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003499 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003500 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003501 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003502 ;;
3503 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003504 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003505 ;;
3506 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003507 AR="\$(srcdir)/Modules/ar_beos"
3508 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003509 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003510 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003511 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512fi
3513
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3515$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003516
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3518$as_echo_n "checking for --with-icc... " >&6; }
3519
3520# Check whether --with-icc was given.
3521if test "${with_icc+set}" = set; then :
3522 withval=$with_icc;
3523 case $withval in
3524 no) CC=${CC:-cc}
3525 with_icc=no;;
3526 yes) CC=icc
3527 CXX=icpc
3528 with_icc=yes;;
3529 *) CC=$withval
3530 with_icc=$withval;;
3531 esac
3532else
3533
3534 with_icc=no
3535fi
3536
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3538$as_echo "$with_icc" >&6; }
3539
Guido van Rossum8b131c51995-03-09 14:10:13 +00003540# If the user switches compilers, we can't believe the cache
3541if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3542then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003543 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003544(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003545fi
3546
Trent Nelson15daa352012-12-13 06:46:39 +00003547if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3548 # Normally, MIPSpro CC treats #error directives as warnings, which means
3549 # a successful exit code is returned (0). This is a problem because IRIX
3550 # has a bunch of system headers with this guard at the top:
3551 #
3552 # #ifndef __c99
3553 # #error This header file is to be used only for c99 mode compilations
3554 # #else
3555 #
3556 # When autoconf tests for such a header, like stdint.h, this happens:
3557 #
3558 # configure:4619: cc -c conftest.c >&5
3559 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3560 # #error directive: This header file is to be used only for c99 mode
3561 # compilations
3562 #
3563 # #error This header file is to be used only for c99 mode compilations
3564 # ^
3565 #
3566 # configure:4619: $? = 0
3567 # configure:4619: result: yes
3568 #
3569 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3570 # warning as an error, which causes cc to return a non-zero result,
3571 # which autoconf can interpret correctly.
3572 CFLAGS="$CFLAGS -diag_error 1035"
3573 # Whilst we're here, we might as well make sure CXX defaults to something
3574 # sensible if we're not using gcc.
3575 if test -z "$CXX"; then
3576 CXX="CC"
3577 fi
3578fi
3579
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003580# If the user set CFLAGS, use this instead of the automatically
3581# determined setting
3582preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003583ac_ext=c
3584ac_cpp='$CPP $CPPFLAGS'
3585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3587ac_compiler_gnu=$ac_cv_c_compiler_gnu
3588if test -n "$ac_tool_prefix"; then
3589 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3590set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003593if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595else
3596 if test -n "$CC"; then
3597 ac_cv_prog_CC="$CC" # Let the user override the test.
3598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003604 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 $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 +00003608 break 2
3609 fi
3610done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Jack Jansendd19cf82001-12-06 22:36:17 +00003614fi
3615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003616CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003617if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3619$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
Martin v. Löwiseba40652007-08-30 20:10:57 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627if test -z "$ac_cv_prog_CC"; then
3628 ac_ct_CC=$CC
3629 # Extract the first word of "gcc", so it can be a program name with args.
3630set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003633if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003635else
3636 if test -n "$ac_ct_CC"; then
3637 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003644 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
3654fi
3655fi
3656ac_ct_CC=$ac_cv_prog_ac_ct_CC
3657if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3659$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664
Martin v. Löwiseba40652007-08-30 20:10:57 +00003665 if test "x$ac_ct_CC" = x; then
3666 CC=""
3667 else
3668 case $cross_compiling:$ac_tool_warned in
3669yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672ac_tool_warned=yes ;;
3673esac
3674 CC=$ac_ct_CC
3675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003678fi
3679
Jack Jansendd19cf82001-12-06 22:36:17 +00003680if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681 if test -n "$ac_tool_prefix"; then
3682 # 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 +00003683set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003686if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003688else
3689 if test -n "$CC"; then
3690 ac_cv_prog_CC="$CC" # Let the user override the test.
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 break 2
3702 fi
3703done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003705IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707fi
3708fi
3709CC=$ac_cv_prog_CC
3710if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3712$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717
Martin v. Löwiseba40652007-08-30 20:10:57 +00003718
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720fi
3721if test -z "$CC"; then
3722 # Extract the first word of "cc", so it can be a program name with args.
3723set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003726if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003728else
3729 if test -n "$CC"; then
3730 ac_cv_prog_CC="$CC" # Let the user override the test.
3731else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3741 ac_prog_rejected=yes
3742 continue
3743 fi
3744 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003749 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test $ac_prog_rejected = yes; then
3753 # We found a bogon in the path, so make sure we never use it.
3754 set dummy $ac_cv_prog_CC
3755 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 # We chose a different compiler from the bogus one.
3758 # However, it has the same basename, so the bogon will be chosen
3759 # first if we set CC to just the basename; use the full file name.
3760 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003761 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 fi
3763fi
3764fi
3765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003766CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773fi
3774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
3777if test -z "$CC"; then
3778 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 do
3781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003785if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003787else
3788 if test -n "$CC"; then
3789 ac_cv_prog_CC="$CC" # Let the user override the test.
3790else
Martin v. Löwis11437992002-04-12 09:54:03 +00003791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 $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 +00003800 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003805
3806fi
3807fi
3808CC=$ac_cv_prog_CC
3809if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$CC" && break
3819 done
3820fi
3821if test -z "$CC"; then
3822 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003823 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003824do
3825 # Extract the first word of "$ac_prog", so it can be a program name with args.
3826set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003829if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003831else
3832 if test -n "$ac_ct_CC"; then
3833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3834else
3835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 $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 +00003844 break 2
3845 fi
3846done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851fi
3852ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 test -n "$ac_ct_CC" && break
3863done
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Martin v. Löwiseba40652007-08-30 20:10:57 +00003865 if test "x$ac_ct_CC" = x; then
3866 CC=""
3867 else
3868 case $cross_compiling:$ac_tool_warned in
3869yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003872ac_tool_warned=yes ;;
3873esac
3874 CC=$ac_ct_CC
3875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
3877
3878fi
3879
3880
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003883as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003885
3886# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3888set X $ac_compile
3889ac_compiler=$2
3890for ac_option in --version -v -V -qversion; do
3891 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900 if test -s conftest.err; then
3901 sed '10a\
3902... rest of stderr output deleted ...
3903 10q' conftest.err >conftest.er1
3904 cat conftest.er1 >&5
3905 fi
3906 rm -f conftest.er1 conftest.err
3907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908 test $ac_status = 0; }
3909done
Martin v. Löwis11437992002-04-12 09:54:03 +00003910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003912/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003913
Martin v. Löwis11437992002-04-12 09:54:03 +00003914int
3915main ()
3916{
3917
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003924# Try to create an executable without -o first, disregard a.out.
3925# It will help us diagnose broken compilers, and finding out an intuition
3926# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3928$as_echo_n "checking whether the C compiler works... " >&6; }
3929ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3930
3931# The possible output files:
3932ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3933
Martin v. Löwiseba40652007-08-30 20:10:57 +00003934ac_rmfiles=
3935for ac_file in $ac_files
3936do
3937 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003939 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3940 esac
3941done
3942rm -f $ac_rmfiles
3943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003944if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003951 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003955 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3956# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3957# in a Makefile. We should not override ac_cv_exeext if it was cached,
3958# so that the user can short-circuit this test for compilers unknown to
3959# Autoconf.
3960for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003961do
3962 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003964 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003965 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003966 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967 # We found the default executable, but exeext='' is most
3968 # certainly right.
3969 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003970 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003971 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972 then :; else
3973 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974 fi
3975 # We set ac_cv_exeext here because the later test for it is not
3976 # safe: cross compilers may not add the suffix if given an `-o'
3977 # argument, so we may need to know it at that point already.
3978 # Even if this section looks crufty: it has the advantage of
3979 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003980 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003981 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003982 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 esac
3984done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003985test "$ac_cv_exeext" = no && ac_cv_exeext=
3986
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003987else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988 ac_file=''
3989fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990if test -z "$ac_file"; then :
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992$as_echo "no" >&6; }
3993$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003994sed 's/^/| /' conftest.$ac_ext >&5
3995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003996{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003998as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003999See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000else
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4002$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4005$as_echo_n "checking for C compiler default output file name... " >&6; }
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4007$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004008ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004009
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004010rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004011ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4013$as_echo_n "checking for suffix of executables... " >&6; }
4014if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004021 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4026# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4027# work properly (i.e., refer to `conftest.exe'), while it won't with
4028# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004029for ac_file in conftest.exe conftest conftest.*; do
4030 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004034 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004035 * ) break;;
4036 esac
4037done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004041as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004042See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004044rm -f conftest conftest$ac_cv_exeext
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4046$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
4048rm -f conftest.$ac_ext
4049EXEEXT=$ac_cv_exeext
4050ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052/* end confdefs.h. */
4053#include <stdio.h>
4054int
4055main ()
4056{
4057FILE *f = fopen ("conftest.out", "w");
4058 return ferror (f) || fclose (f) != 0;
4059
4060 ;
4061 return 0;
4062}
Skip Montanaro6dead952003-09-25 14:50:04 +00004063_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004064ac_clean_files="$ac_clean_files conftest.out"
4065# Check that the compiler produces executables we can run. If not, either
4066# the compiler is broken, or we cross compile.
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4068$as_echo_n "checking whether we are cross compiling... " >&6; }
4069if test "$cross_compiling" != yes; then
4070 { { ac_try="$ac_link"
4071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_link") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }
4081 if { ac_try='./conftest$ac_cv_exeext'
4082 { { case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
4086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
4088 (eval "$ac_try") 2>&5
4089 ac_status=$?
4090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; }; then
4092 cross_compiling=no
4093 else
4094 if test "$cross_compiling" = maybe; then
4095 cross_compiling=yes
4096 else
4097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004099as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004101See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004102 fi
4103 fi
4104fi
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4106$as_echo "$cross_compiling" >&6; }
4107
4108rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4109ac_clean_files=$ac_clean_files_save
4110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4111$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004112if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004113 $as_echo_n "(cached) " >&6
4114else
4115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004117
Martin v. Löwis11437992002-04-12 09:54:03 +00004118int
4119main ()
4120{
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
4126rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004128case "(($ac_try" in
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4131esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004134 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004138 for ac_file in conftest.o conftest.obj conftest.*; do
4139 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4143 break;;
4144 esac
4145done
4146else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004148sed 's/^/| /' conftest.$ac_ext >&5
4149
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004152as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004153See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004155rm -f conftest.$ac_cv_objext conftest.$ac_ext
4156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4158$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004159OBJEXT=$ac_cv_objext
4160ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4162$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004163if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
Martin v. Löwis11437992002-04-12 09:54:03 +00004169int
4170main ()
4171{
4172#ifndef __GNUC__
4173 choke me
4174#endif
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 ac_compiler_gnu=yes
4182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004183 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_cv_c_compiler_gnu=$ac_compiler_gnu
4187
4188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4190$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4191if test $ac_compiler_gnu = yes; then
4192 GCC=yes
4193else
4194 GCC=
4195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_test_CFLAGS=${CFLAGS+set}
4197ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4199$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004200if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004202else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004203 ac_save_c_werror_flag=$ac_c_werror_flag
4204 ac_c_werror_flag=yes
4205 ac_cv_prog_cc_g=no
4206 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
Martin v. Löwis11437992002-04-12 09:54:03 +00004210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004219 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004221 CFLAGS=""
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004235else
4236 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004237 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239/* end confdefs.h. */
4240
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 ac_c_werror_flag=$ac_save_c_werror_flag
4258fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4260$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263elif test $ac_cv_prog_cc_g = yes; then
4264 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004265 CFLAGS="-g -O2"
4266 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 fi
4269else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 if test "$GCC" = yes; then
4271 CFLAGS="-O2"
4272 else
4273 CFLAGS=
4274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4277$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004278if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004279 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004280else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004281 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004282ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* end confdefs.h. */
4285#include <stdarg.h>
4286#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004287struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4289struct buf { int x; };
4290FILE * (*rcsopen) (struct buf *, struct stat *, int);
4291static char *e (p, i)
4292 char **p;
4293 int i;
4294{
4295 return p[i];
4296}
4297static char *f (char * (*g) (char **, int), char **p, ...)
4298{
4299 char *s;
4300 va_list v;
4301 va_start (v,p);
4302 s = g (p, va_arg (v,int));
4303 va_end (v);
4304 return s;
4305}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306
4307/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4308 function prototypes and stuff, but not '\xHH' hex character constants.
4309 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004310 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4312 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004313 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4315
Martin v. Löwiseba40652007-08-30 20:10:57 +00004316/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4317 inside strings and character constants. */
4318#define FOO(x) 'x'
4319int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4320
Skip Montanaro6dead952003-09-25 14:50:04 +00004321int test (int i, double x);
4322struct s1 {int (*f) (int a);};
4323struct s2 {int (*f) (double a);};
4324int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4325int argc;
4326char **argv;
4327int
4328main ()
4329{
4330return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4331 ;
4332 return 0;
4333}
4334_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4336 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004337do
4338 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004339 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004342rm -f core conftest.err conftest.$ac_objext
4343 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004344done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004345rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004346CC=$ac_save_CC
4347
4348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004349# AC_CACHE_VAL
4350case "x$ac_cv_prog_cc_c89" in
4351 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4353$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004354 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4356$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004357 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4360$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004362if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004364fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004365
Martin v. Löwis11437992002-04-12 09:54:03 +00004366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004372if test ! -z "$preset_cflags"
4373then
4374 CFLAGS=$preset_cflags
4375fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004376
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004377
4378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4380$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004381
Martin v. Löwiseba40652007-08-30 20:10:57 +00004382# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004383if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004385
4386 case $withval in
4387 no) with_cxx_main=no
4388 MAINCC='$(CC)';;
4389 yes) with_cxx_main=yes
4390 MAINCC='$(CXX)';;
4391 *) with_cxx_main=yes
4392 MAINCC=$withval
4393 if test -z "$CXX"
4394 then
4395 CXX=$withval
4396 fi;;
4397 esac
4398else
4399
4400 with_cxx_main=no
4401 MAINCC='$(CC)'
4402
Martin v. Löwiseba40652007-08-30 20:10:57 +00004403fi
4404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4406$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004407
4408preset_cxx="$CXX"
4409if test -z "$CXX"
4410then
4411 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004412 gcc) if test -n "$ac_tool_prefix"; then
4413 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4414set dummy ${ac_tool_prefix}g++; ac_word=$2
4415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4416$as_echo_n "checking for $ac_word... " >&6; }
4417if ${ac_cv_path_CXX+:} false; then :
4418 $as_echo_n "(cached) " >&6
4419else
4420 case $CXX in
4421 [\\/]* | ?:[\\/]*)
4422 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4423 ;;
4424 *)
4425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4426for as_dir in notfound
4427do
4428 IFS=$as_save_IFS
4429 test -z "$as_dir" && as_dir=.
4430 for ac_exec_ext in '' $ac_executable_extensions; do
4431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4432 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4434 break 2
4435 fi
4436done
4437 done
4438IFS=$as_save_IFS
4439
4440 ;;
4441esac
4442fi
4443CXX=$ac_cv_path_CXX
4444if test -n "$CXX"; then
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4446$as_echo "$CXX" >&6; }
4447else
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4449$as_echo "no" >&6; }
4450fi
4451
4452
4453fi
4454if test -z "$ac_cv_path_CXX"; then
4455 ac_pt_CXX=$CXX
4456 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004457set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4459$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004460if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004461 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004462else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004463 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004464 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004465 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004466 ;;
4467 *)
4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4469for as_dir in notfound
4470do
4471 IFS=$as_save_IFS
4472 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004473 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004475 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004477 break 2
4478 fi
4479done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004482
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004483 ;;
4484esac
4485fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004486ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4487if test -n "$ac_pt_CXX"; then
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4489$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4492$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004495 if test "x$ac_pt_CXX" = x; then
4496 CXX="g++"
4497 else
4498 case $cross_compiling:$ac_tool_warned in
4499yes:)
4500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4502ac_tool_warned=yes ;;
4503esac
4504 CXX=$ac_pt_CXX
4505 fi
4506else
4507 CXX="$ac_cv_path_CXX"
4508fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004509 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004510 cc) if test -n "$ac_tool_prefix"; then
4511 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4512set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4514$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004515if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004516 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004517else
4518 case $CXX in
4519 [\\/]* | ?:[\\/]*)
4520 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4521 ;;
4522 *)
4523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4524for as_dir in notfound
4525do
4526 IFS=$as_save_IFS
4527 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004528 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004530 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004532 break 2
4533 fi
4534done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004536IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004537
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004538 ;;
4539esac
4540fi
4541CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004542if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4544$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4547$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004549
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004550
4551fi
4552if test -z "$ac_cv_path_CXX"; then
4553 ac_pt_CXX=$CXX
4554 # Extract the first word of "c++", so it can be a program name with args.
4555set dummy c++; ac_word=$2
4556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4557$as_echo_n "checking for $ac_word... " >&6; }
4558if ${ac_cv_path_ac_pt_CXX+:} false; then :
4559 $as_echo_n "(cached) " >&6
4560else
4561 case $ac_pt_CXX in
4562 [\\/]* | ?:[\\/]*)
4563 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4564 ;;
4565 *)
4566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4567for as_dir in notfound
4568do
4569 IFS=$as_save_IFS
4570 test -z "$as_dir" && as_dir=.
4571 for ac_exec_ext in '' $ac_executable_extensions; do
4572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4573 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4575 break 2
4576 fi
4577done
4578 done
4579IFS=$as_save_IFS
4580
4581 ;;
4582esac
4583fi
4584ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4585if test -n "$ac_pt_CXX"; then
4586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4587$as_echo "$ac_pt_CXX" >&6; }
4588else
4589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590$as_echo "no" >&6; }
4591fi
4592
4593 if test "x$ac_pt_CXX" = x; then
4594 CXX="c++"
4595 else
4596 case $cross_compiling:$ac_tool_warned in
4597yes:)
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4599$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4600ac_tool_warned=yes ;;
4601esac
4602 CXX=$ac_pt_CXX
4603 fi
4604else
4605 CXX="$ac_cv_path_CXX"
4606fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004607 ;;
4608 esac
4609 if test "$CXX" = "notfound"
4610 then
4611 CXX=""
4612 fi
4613fi
4614if test -z "$CXX"
4615then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004616 if test -n "$ac_tool_prefix"; then
4617 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4618 do
4619 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4620set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004623if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004624 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004625else
4626 if test -n "$CXX"; then
4627 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4628else
4629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in $PATH
4631do
4632 IFS=$as_save_IFS
4633 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004634 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004636 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004638 break 2
4639 fi
4640done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004641 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004642IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004643
4644fi
4645fi
4646CXX=$ac_cv_prog_CXX
4647if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4649$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004653fi
4654
Martin v. Löwiseba40652007-08-30 20:10:57 +00004655
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004656 test -n "$CXX" && break
4657 done
4658fi
4659if test -z "$CXX"; then
4660 ac_ct_CXX=$CXX
4661 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4662do
4663 # Extract the first word of "$ac_prog", so it can be a program name with args.
4664set dummy $ac_prog; ac_word=$2
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4666$as_echo_n "checking for $ac_word... " >&6; }
4667if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4668 $as_echo_n "(cached) " >&6
4669else
4670 if test -n "$ac_ct_CXX"; then
4671 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4672else
4673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in $PATH
4675do
4676 IFS=$as_save_IFS
4677 test -z "$as_dir" && as_dir=.
4678 for ac_exec_ext in '' $ac_executable_extensions; do
4679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4680 ac_cv_prog_ac_ct_CXX="$ac_prog"
4681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682 break 2
4683 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004684done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004685 done
4686IFS=$as_save_IFS
4687
4688fi
4689fi
4690ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4691if test -n "$ac_ct_CXX"; then
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4693$as_echo "$ac_ct_CXX" >&6; }
4694else
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699
4700 test -n "$ac_ct_CXX" && break
4701done
4702
4703 if test "x$ac_ct_CXX" = x; then
4704 CXX="notfound"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_ct_CXX
4713 fi
4714fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004715
4716 if test "$CXX" = "notfound"
4717 then
4718 CXX=""
4719 fi
4720fi
4721if test "$preset_cxx" != "$CXX"
4722then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004724
4725 By default, distutils will build C++ extension modules with \"$CXX\".
4726 If this is not intended, then set CXX on the configure command line.
4727 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004728$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004729
4730 By default, distutils will build C++ extension modules with \"$CXX\".
4731 If this is not intended, then set CXX on the configure command line.
4732 " >&2;}
4733fi
4734
doko@python.org4e63fbe2013-01-25 13:08:27 +01004735MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4736
4737
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004738
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004739# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004740
4741ac_ext=c
4742ac_cpp='$CPP $CPPFLAGS'
4743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4745ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4747$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004748# On Suns, sometimes $CPP names a directory.
4749if test -n "$CPP" && test -d "$CPP"; then
4750 CPP=
4751fi
4752if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004753 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004754 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004755else
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # Double quotes because CPP needs to be expanded
4757 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4758 do
4759 ac_preproc_ok=false
4760for ac_c_preproc_warn_flag in '' yes
4761do
4762 # Use a header file that comes with gcc, so configuring glibc
4763 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004764 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4765 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004766 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004769/* end confdefs.h. */
4770#ifdef __STDC__
4771# include <limits.h>
4772#else
4773# include <assert.h>
4774#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004775 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004779else
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # Broken: fails on valid input.
4781continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004782fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004783rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004784
Martin v. Löwiseba40652007-08-30 20:10:57 +00004785 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004786 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004789#include <ac_nonexistent.h>
4790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004791if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 # Broken: success on invalid input.
4793continue
4794else
Martin v. Löwis11437992002-04-12 09:54:03 +00004795 # Passes both tests.
4796ac_preproc_ok=:
4797break
4798fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004799rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004800
4801done
4802# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004803rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004804if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004805 break
4806fi
4807
4808 done
4809 ac_cv_prog_CPP=$CPP
4810
4811fi
4812 CPP=$ac_cv_prog_CPP
4813else
4814 ac_cv_prog_CPP=$CPP
4815fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4817$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004818ac_preproc_ok=false
4819for ac_c_preproc_warn_flag in '' yes
4820do
4821 # Use a header file that comes with gcc, so configuring glibc
4822 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004823 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4824 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004825 # On the NeXT, cc -E runs the code through the compiler's parser,
4826 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004828/* end confdefs.h. */
4829#ifdef __STDC__
4830# include <limits.h>
4831#else
4832# include <assert.h>
4833#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004834 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004838else
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 # Broken: fails on valid input.
4840continue
4841fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004842rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004843
Martin v. Löwiseba40652007-08-30 20:10:57 +00004844 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004847/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004848#include <ac_nonexistent.h>
4849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004850if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004851 # Broken: success on invalid input.
4852continue
4853else
Martin v. Löwis11437992002-04-12 09:54:03 +00004854 # Passes both tests.
4855ac_preproc_ok=:
4856break
4857fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004858rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004859
4860done
4861# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004862rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863if $ac_preproc_ok; then :
4864
Martin v. Löwis11437992002-04-12 09:54:03 +00004865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004868as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004869See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004870fi
4871
4872ac_ext=c
4873ac_cpp='$CPP $CPPFLAGS'
4874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4876ac_compiler_gnu=$ac_cv_c_compiler_gnu
4877
4878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4880$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004881if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004884 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004885 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886 # Loop through the user's path and test for each of PROGNAME-LIST
4887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004888for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4889do
4890 IFS=$as_save_IFS
4891 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004892 for ac_prog in grep ggrep; do
4893 for ac_exec_ext in '' $ac_executable_extensions; do
4894 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004895 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897 # Check for GNU $ac_path_GREP
4898case `"$ac_path_GREP" --version 2>&1` in
4899*GNU*)
4900 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4901*)
4902 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004903 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 while :
4905 do
4906 cat "conftest.in" "conftest.in" >"conftest.tmp"
4907 mv "conftest.tmp" "conftest.in"
4908 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004909 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004910 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4911 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004912 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4914 # Best one so far, save it but keep looking for a better one
4915 ac_cv_path_GREP="$ac_path_GREP"
4916 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004917 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918 # 10*(2^10) chars as input seems more than enough
4919 test $ac_count -gt 10 && break
4920 done
4921 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4922esac
4923
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004924 $ac_path_GREP_found && break 3
4925 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004929 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004930 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932else
4933 ac_cv_path_GREP=$GREP
4934fi
4935
Martin v. Löwiseba40652007-08-30 20:10:57 +00004936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4938$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939 GREP="$ac_cv_path_GREP"
4940
4941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4943$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004944if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004946else
4947 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4948 then ac_cv_path_EGREP="$GREP -E"
4949 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004950 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004951 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004952 # Loop through the user's path and test for each of PROGNAME-LIST
4953 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004954for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4955do
4956 IFS=$as_save_IFS
4957 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 for ac_prog in egrep; do
4959 for ac_exec_ext in '' $ac_executable_extensions; do
4960 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004961 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963 # Check for GNU $ac_path_EGREP
4964case `"$ac_path_EGREP" --version 2>&1` in
4965*GNU*)
4966 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4967*)
4968 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004969 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970 while :
4971 do
4972 cat "conftest.in" "conftest.in" >"conftest.tmp"
4973 mv "conftest.tmp" "conftest.in"
4974 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004975 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004976 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4977 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004978 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4980 # Best one so far, save it but keep looking for a better one
4981 ac_cv_path_EGREP="$ac_path_EGREP"
4982 ac_path_EGREP_max=$ac_count
4983 fi
4984 # 10*(2^10) chars as input seems more than enough
4985 test $ac_count -gt 10 && break
4986 done
4987 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4988esac
4989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004990 $ac_path_EGREP_found && break 3
4991 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004993 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004994IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004995 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004996 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004997 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998else
4999 ac_cv_path_EGREP=$EGREP
5000fi
5001
Martin v. Löwiseba40652007-08-30 20:10:57 +00005002 fi
5003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5005$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005006 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005007
5008
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5010$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005011if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005012 $as_echo_n "(cached) " >&6
5013else
5014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005015/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005016#include <stdlib.h>
5017#include <stdarg.h>
5018#include <string.h>
5019#include <float.h>
5020
5021int
5022main ()
5023{
5024
5025 ;
5026 return 0;
5027}
5028_ACEOF
5029if ac_fn_c_try_compile "$LINENO"; then :
5030 ac_cv_header_stdc=yes
5031else
5032 ac_cv_header_stdc=no
5033fi
5034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5035
5036if test $ac_cv_header_stdc = yes; then
5037 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5039/* end confdefs.h. */
5040#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005041
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005042_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005044 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005045
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005047 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005048fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005049rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005050
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005051fi
5052
5053if test $ac_cv_header_stdc = yes; then
5054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5056/* end confdefs.h. */
5057#include <stdlib.h>
5058
5059_ACEOF
5060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5061 $EGREP "free" >/dev/null 2>&1; then :
5062
5063else
5064 ac_cv_header_stdc=no
5065fi
5066rm -f conftest*
5067
5068fi
5069
5070if test $ac_cv_header_stdc = yes; then
5071 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5072 if test "$cross_compiling" = yes; then :
5073 :
5074else
5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5076/* end confdefs.h. */
5077#include <ctype.h>
5078#include <stdlib.h>
5079#if ((' ' & 0x0FF) == 0x020)
5080# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5081# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5082#else
5083# define ISLOWER(c) \
5084 (('a' <= (c) && (c) <= 'i') \
5085 || ('j' <= (c) && (c) <= 'r') \
5086 || ('s' <= (c) && (c) <= 'z'))
5087# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5088#endif
5089
5090#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5091int
5092main ()
5093{
5094 int i;
5095 for (i = 0; i < 256; i++)
5096 if (XOR (islower (i), ISLOWER (i))
5097 || toupper (i) != TOUPPER (i))
5098 return 2;
5099 return 0;
5100}
5101_ACEOF
5102if ac_fn_c_try_run "$LINENO"; then :
5103
5104else
5105 ac_cv_header_stdc=no
5106fi
5107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5108 conftest.$ac_objext conftest.beam conftest.$ac_ext
5109fi
5110
5111fi
5112fi
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5114$as_echo "$ac_cv_header_stdc" >&6; }
5115if test $ac_cv_header_stdc = yes; then
5116
5117$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5118
5119fi
5120
5121# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5122for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5123 inttypes.h stdint.h unistd.h
5124do :
5125 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5126ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5127"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005129 cat >>confdefs.h <<_ACEOF
5130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5131_ACEOF
5132
5133fi
5134
5135done
5136
5137
5138
5139 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01005140if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005141 MINIX=yes
5142else
5143 MINIX=
5144fi
5145
5146
5147 if test "$MINIX" = yes; then
5148
5149$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5150
5151
5152$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5153
5154
5155$as_echo "#define _MINIX 1" >>confdefs.h
5156
5157 fi
5158
5159
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5161$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005162if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005163 $as_echo_n "(cached) " >&6
5164else
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005168# define __EXTENSIONS__ 1
5169 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005170int
5171main ()
5172{
5173
5174 ;
5175 return 0;
5176}
5177_ACEOF
5178if ac_fn_c_try_compile "$LINENO"; then :
5179 ac_cv_safe_to_define___extensions__=yes
5180else
5181 ac_cv_safe_to_define___extensions__=no
5182fi
5183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5184fi
5185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5186$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5187 test $ac_cv_safe_to_define___extensions__ = yes &&
5188 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5189
5190 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5191
5192 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5193
5194 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5195
5196 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5197
5198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005200# Check for unsupported systems
5201case $ac_sys_system/$ac_sys_release in
5202atheos*|Linux*/1*)
5203 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5204 echo See README for details.
5205 exit 1;;
5206esac
5207
5208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5210$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211
5212# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005213if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214 withval=$with_suffix;
5215 case $withval in
5216 no) EXEEXT=;;
5217 yes) EXEEXT=.exe;;
5218 *) EXEEXT=$withval;;
5219 esac
5220fi
5221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5223$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224
5225# Test whether we're running on a non-case-sensitive system, in which
5226# case we give a warning if no ext is given
5227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5229$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005230if test ! -d CaseSensitiveTestDir; then
5231mkdir CaseSensitiveTestDir
5232fi
5233
5234if test -d casesensitivetestdir
5235then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5237$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238 BUILDEXEEXT=.exe
5239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242 BUILDEXEEXT=$EXEEXT
5243fi
5244rmdir CaseSensitiveTestDir
5245
5246case $MACHDEP in
5247bsdos*)
5248 case $CC in
5249 gcc) CC="$CC -D_HAVE_BSDI";;
5250 esac;;
5251esac
5252
5253case $ac_sys_system in
5254hp*|HP*)
5255 case $CC in
5256 cc|*/cc) CC="$CC -Ae";;
5257 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005258SunOS*)
5259 # Some functions have a prototype only with that define, e.g. confstr
5260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005261$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262
5263 ;;
5264esac
5265
5266
5267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5269$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270if test -z "$LIBRARY"
5271then
5272 LIBRARY='libpython$(VERSION).a'
5273fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5275$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005276
5277# LDLIBRARY is the name of the library to link against (as opposed to the
5278# name of the library into which to insert object files). BLDLIBRARY is also
5279# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5280# is blank as the main program is not linked directly against LDLIBRARY.
5281# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5282# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5283# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5284# DLLLIBRARY is the shared (i.e., DLL) library.
5285#
5286# RUNSHARED is used to run shared python without installed libraries
5287#
5288# INSTSONAME is the name of the shared library that will be use to install
5289# on the system - some systems like version suffix, others don't
5290
5291
5292
5293
5294
5295
5296LDLIBRARY="$LIBRARY"
5297BLDLIBRARY='$(LDLIBRARY)'
5298INSTSONAME='$(LDLIBRARY)'
5299DLLLIBRARY=''
5300LDLIBRARYDIR=''
5301RUNSHARED=''
5302
5303# LINKCC is the command that links the python executable -- default is $(CC).
5304# If CXX is set, and if it is needed to link a main function that was
5305# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5306# python might then depend on the C++ runtime
5307# This is altered for AIX in order to build the export list before
5308# linking.
5309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5311$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312if test -z "$LINKCC"
5313then
5314 LINKCC='$(PURIFY) $(MAINCC)'
5315 case $ac_sys_system in
5316 AIX*)
5317 exp_extra="\"\""
5318 if test $ac_sys_release -ge 5 -o \
5319 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5320 exp_extra="."
5321 fi
5322 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005323 QNX*)
5324 # qcc must be used because the other compilers do not
5325 # support -N.
5326 LINKCC=qcc;;
5327 esac
5328fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5330$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005331
5332# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5333# make sure we default having it set to "no": this is used by
5334# distutils.unixccompiler to know if it should add --enable-new-dtags
5335# to linker command lines, and failing to detect GNU ld simply results
5336# in the same bahaviour as before.
5337
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5339$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005340ac_prog=ld
5341if test "$GCC" = yes; then
5342 ac_prog=`$CC -print-prog-name=ld`
5343fi
5344case `"$ac_prog" -V 2>&1 < /dev/null` in
5345 *GNU*)
5346 GNULD=yes;;
5347 *)
5348 GNULD=no;;
5349esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5351$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5354$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005355# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005357 enableval=$enable_shared;
5358fi
5359
5360
5361if test -z "$enable_shared"
5362then
5363 case $ac_sys_system in
5364 CYGWIN* | atheos*)
5365 enable_shared="yes";;
5366 *)
5367 enable_shared="no";;
5368 esac
5369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5371$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5374$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005375# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005376if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005377 enableval=$enable_profiling;
5378fi
5379
5380if test "x$enable_profiling" = xyes; then
5381 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005382 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384/* end confdefs.h. */
5385int main() { return 0; }
5386_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005387if ac_fn_c_try_link "$LINENO"; then :
5388
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005390 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005392rm -f core conftest.err conftest.$ac_objext \
5393 conftest$ac_exeext conftest.$ac_ext
5394 CC="$ac_save_cc"
5395else
5396 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005397fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5399$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005400
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005401if test "x$enable_profiling" = xyes; then
5402 BASECFLAGS="-pg $BASECFLAGS"
5403 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005404fi
5405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5407$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408
5409# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5410# library that we build, but we do not want to link against it (we
5411# will find it with a -framework option). For this reason there is an
5412# extra variable BLDLIBRARY against which Python and the extension
5413# modules are linked, BLDLIBRARY. This is normally the same as
5414# LDLIBRARY, but empty for MacOSX framework builds.
5415if test "$enable_framework"
5416then
5417 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005418 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005419 BLDLIBRARY=''
5420else
5421 BLDLIBRARY='$(LDLIBRARY)'
5422fi
5423
5424# Other platforms follow
5425if test $enable_shared = "yes"; then
5426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005427$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428
5429 case $ac_sys_system in
5430 BeOS*)
5431 LDLIBRARY='libpython$(VERSION).so'
5432 ;;
5433 CYGWIN*)
5434 LDLIBRARY='libpython$(VERSION).dll.a'
5435 DLLLIBRARY='libpython$(VERSION).dll'
5436 ;;
5437 SunOS*)
5438 LDLIBRARY='libpython$(VERSION).so'
5439 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005440 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441 INSTSONAME="$LDLIBRARY".$SOVERSION
5442 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005443 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005444 LDLIBRARY='libpython$(VERSION).so'
5445 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005446 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005447 case $ac_sys_system in
5448 FreeBSD*)
5449 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5450 ;;
5451 esac
5452 INSTSONAME="$LDLIBRARY".$SOVERSION
5453 ;;
5454 hp*|HP*)
5455 case `uname -m` in
5456 ia64)
5457 LDLIBRARY='libpython$(VERSION).so'
5458 ;;
5459 *)
5460 LDLIBRARY='libpython$(VERSION).sl'
5461 ;;
5462 esac
5463 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005464 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005465 ;;
5466 OSF*)
5467 LDLIBRARY='libpython$(VERSION).so'
5468 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005469 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470 ;;
5471 atheos*)
5472 LDLIBRARY='libpython$(VERSION).so'
5473 BLDLIBRARY='-L. -lpython$(VERSION)'
5474 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5475 ;;
5476 Darwin*)
5477 LDLIBRARY='libpython$(VERSION).dylib'
5478 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005479 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005480 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005481 AIX*)
5482 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005483 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005484 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005485
5486 esac
5487else # shared is disabled
5488 case $ac_sys_system in
5489 CYGWIN*)
5490 BLDLIBRARY='$(LIBRARY)'
5491 LDLIBRARY='libpython$(VERSION).dll.a'
5492 ;;
5493 esac
5494fi
5495
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005496if test "$cross_compiling" = yes; then
5497 RUNSHARED=
5498fi
5499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5501$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005502
5503if test -n "$ac_tool_prefix"; then
5504 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5505set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005508if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005510else
5511 if test -n "$RANLIB"; then
5512 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5513else
5514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5515for as_dir in $PATH
5516do
5517 IFS=$as_save_IFS
5518 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005519 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005523 break 2
5524 fi
5525done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005526 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005527IFS=$as_save_IFS
5528
5529fi
5530fi
5531RANLIB=$ac_cv_prog_RANLIB
5532if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5534$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005538fi
5539
5540
5541fi
5542if test -z "$ac_cv_prog_RANLIB"; then
5543 ac_ct_RANLIB=$RANLIB
5544 # Extract the first word of "ranlib", so it can be a program name with args.
5545set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5547$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005548if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550else
5551 if test -n "$ac_ct_RANLIB"; then
5552 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5553else
5554as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5555for as_dir in $PATH
5556do
5557 IFS=$as_save_IFS
5558 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005559 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005560 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005561 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005562 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005563 break 2
5564 fi
5565done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005566 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005567IFS=$as_save_IFS
5568
5569fi
5570fi
5571ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5572if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5574$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5577$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005578fi
5579
5580 if test "x$ac_ct_RANLIB" = x; then
5581 RANLIB=":"
5582 else
5583 case $cross_compiling:$ac_tool_warned in
5584yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005587ac_tool_warned=yes ;;
5588esac
5589 RANLIB=$ac_ct_RANLIB
5590 fi
5591else
5592 RANLIB="$ac_cv_prog_RANLIB"
5593fi
5594
5595
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005596if test -n "$ac_tool_prefix"; then
5597 for ac_prog in ar aal
5598 do
5599 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5600set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5602$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005603if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005604 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605else
5606 if test -n "$AR"; then
5607 ac_cv_prog_AR="$AR" # Let the user override the test.
5608else
5609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612 IFS=$as_save_IFS
5613 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005614 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005616 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005618 break 2
5619 fi
5620done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005621 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005622IFS=$as_save_IFS
5623
5624fi
5625fi
5626AR=$ac_cv_prog_AR
5627if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5629$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005633fi
5634
5635
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005636 test -n "$AR" && break
5637 done
5638fi
5639if test -z "$AR"; then
5640 ac_ct_AR=$AR
5641 for ac_prog in ar aal
5642do
5643 # Extract the first word of "$ac_prog", so it can be a program name with args.
5644set dummy $ac_prog; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_prog_ac_ct_AR+:} false; then :
5648 $as_echo_n "(cached) " >&6
5649else
5650 if test -n "$ac_ct_AR"; then
5651 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5652else
5653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5654for as_dir in $PATH
5655do
5656 IFS=$as_save_IFS
5657 test -z "$as_dir" && as_dir=.
5658 for ac_exec_ext in '' $ac_executable_extensions; do
5659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5660 ac_cv_prog_ac_ct_AR="$ac_prog"
5661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5662 break 2
5663 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005664done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005665 done
5666IFS=$as_save_IFS
5667
5668fi
5669fi
5670ac_ct_AR=$ac_cv_prog_ac_ct_AR
5671if test -n "$ac_ct_AR"; then
5672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5673$as_echo "$ac_ct_AR" >&6; }
5674else
5675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5676$as_echo "no" >&6; }
5677fi
5678
5679
5680 test -n "$ac_ct_AR" && break
5681done
5682
5683 if test "x$ac_ct_AR" = x; then
5684 AR="ar"
5685 else
5686 case $cross_compiling:$ac_tool_warned in
5687yes:)
5688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5690ac_tool_warned=yes ;;
5691esac
5692 AR=$ac_ct_AR
5693 fi
5694fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005695
5696
5697# tweak ARFLAGS only if the user didn't set it on the command line
5698
5699if test -z "$ARFLAGS"
5700then
5701 ARFLAGS="rc"
5702fi
5703
5704
5705# Extract the first word of "svnversion", so it can be a program name with args.
5706set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5708$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005709if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005710 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711else
5712 if test -n "$SVNVERSION"; then
5713 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5714else
5715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5716for as_dir in $PATH
5717do
5718 IFS=$as_save_IFS
5719 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005720 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005721 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005723 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724 break 2
5725 fi
5726done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005727 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005728IFS=$as_save_IFS
5729
5730 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5731fi
5732fi
5733SVNVERSION=$ac_cv_prog_SVNVERSION
5734if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5736$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5739$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005740fi
5741
5742
5743if test $SVNVERSION = found
5744then
5745 SVNVERSION="svnversion \$(srcdir)"
5746else
5747 SVNVERSION="echo Unversioned directory"
5748fi
5749
Trent Nelsond86ceec2012-10-16 09:42:45 -04005750
Trent Nelsonabf20512012-10-17 04:32:49 -04005751if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005752 # If we're building out-of-tree make sure Include (in the current dir)
5753 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5754 # and graminit.h to get picked up from the correct directory.
5755 # (A side effect of this is that these resources will automatically be
5756 # regenerated when building out-of-tree, regardless of whether or not
5757 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5758 # off.)
5759 BASECPPFLAGS="-IInclude"
5760else
5761 BASECPPFLAGS=""
5762fi
5763
Georg Brandl3a5508e2011-03-06 10:42:21 +01005764
5765
5766
5767# Extract the first word of "hg", so it can be a program name with args.
5768set dummy hg; ac_word=$2
5769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5770$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005771if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005772 $as_echo_n "(cached) " >&6
5773else
5774 if test -n "$HAS_HG"; then
5775 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5776else
5777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5778for as_dir in $PATH
5779do
5780 IFS=$as_save_IFS
5781 test -z "$as_dir" && as_dir=.
5782 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005784 ac_cv_prog_HAS_HG="found"
5785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5786 break 2
5787 fi
5788done
5789 done
5790IFS=$as_save_IFS
5791
5792 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5793fi
5794fi
5795HAS_HG=$ac_cv_prog_HAS_HG
5796if test -n "$HAS_HG"; then
5797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5798$as_echo "$HAS_HG" >&6; }
5799else
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5801$as_echo "no" >&6; }
5802fi
5803
5804
5805if test $HAS_HG = found
5806then
5807 HGVERSION="hg id -i \$(srcdir)"
5808 HGTAG="hg id -t \$(srcdir)"
5809 HGBRANCH="hg id -b \$(srcdir)"
5810else
5811 HGVERSION=""
5812 HGTAG=""
5813 HGBRANCH=""
5814fi
5815
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816case $MACHDEP in
5817bsdos*|hp*|HP*)
5818 # install -d does not work on BSDI or HP-UX
5819 if test -z "$INSTALL"
5820 then
5821 INSTALL="${srcdir}/install-sh -c"
5822 fi
5823esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005824# Find a good install program. We prefer a C program (faster),
5825# so one script is as good as another. But avoid the broken or
5826# incompatible versions:
5827# SysV /etc/install, /usr/sbin/install
5828# SunOS /usr/etc/install
5829# IRIX /sbin/install
5830# AIX /bin/install
5831# AmigaOS /C/install, which installs bootblocks on floppy discs
5832# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5833# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5834# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5835# OS/2's system install, which has a completely different semantic
5836# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005837# Reject install programs that cannot install multiple files.
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5839$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005840if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005841if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005842 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005843else
5844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5845for as_dir in $PATH
5846do
5847 IFS=$as_save_IFS
5848 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005849 # Account for people who put trailing slashes in PATH elements.
5850case $as_dir/ in #((
5851 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005853 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005854 /usr/ucb/* ) ;;
5855 *)
5856 # OSF1 and SCO ODT 3.0 have their own names for install.
5857 # Don't use installbsd from OSF since it installs stuff as root
5858 # by default.
5859 for ac_prog in ginstall scoinst install; do
5860 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005861 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005862 if test $ac_prog = install &&
5863 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5864 # AIX install. It has an incompatible calling convention.
5865 :
5866 elif test $ac_prog = install &&
5867 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5868 # program-specific install script used by HP pwplus--don't use.
5869 :
5870 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005871 rm -rf conftest.one conftest.two conftest.dir
5872 echo one > conftest.one
5873 echo two > conftest.two
5874 mkdir conftest.dir
5875 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5876 test -s conftest.one && test -s conftest.two &&
5877 test -s conftest.dir/conftest.one &&
5878 test -s conftest.dir/conftest.two
5879 then
5880 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5881 break 3
5882 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883 fi
5884 fi
5885 done
5886 done
5887 ;;
5888esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005889
5890 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005891IFS=$as_save_IFS
5892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005893rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005894
5895fi
5896 if test "${ac_cv_path_install+set}" = set; then
5897 INSTALL=$ac_cv_path_install
5898 else
5899 # As a last resort, use the slow shell script. Don't cache a
5900 # value for INSTALL within a source directory, because that will
5901 # break other packages using the cache if that directory is
5902 # removed, or if the value is a relative name.
5903 INSTALL=$ac_install_sh
5904 fi
5905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5907$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005908
5909# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5910# It thinks the first close brace ends the variable substitution.
5911test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5912
5913test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5914
5915test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5916
Trent Nelsonf6407a12012-08-30 14:56:13 +00005917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5918$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5919if test -z "$MKDIR_P"; then
5920 if ${ac_cv_path_mkdir+:} false; then :
5921 $as_echo_n "(cached) " >&6
5922else
5923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5924for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5925do
5926 IFS=$as_save_IFS
5927 test -z "$as_dir" && as_dir=.
5928 for ac_prog in mkdir gmkdir; do
5929 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005930 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005931 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5932 'mkdir (GNU coreutils) '* | \
5933 'mkdir (coreutils) '* | \
5934 'mkdir (fileutils) '4.1*)
5935 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5936 break 3;;
5937 esac
5938 done
5939 done
5940 done
5941IFS=$as_save_IFS
5942
5943fi
5944
5945 test -d ./--version && rmdir ./--version
5946 if test "${ac_cv_path_mkdir+set}" = set; then
5947 MKDIR_P="$ac_cv_path_mkdir -p"
5948 else
5949 # As a last resort, use the slow shell script. Don't cache a
5950 # value for MKDIR_P within a source directory, because that will
5951 # break other packages using the cache if that directory is
5952 # removed, or if the value is a relative name.
5953 MKDIR_P="$ac_install_sh -d"
5954 fi
5955fi
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5957$as_echo "$MKDIR_P" >&6; }
5958
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005959
5960# Not every filesystem supports hard links
5961
5962if test -z "$LN" ; then
5963 case $ac_sys_system in
5964 BeOS*) LN="ln -s";;
5965 CYGWIN*) LN="ln -s";;
5966 atheos*) LN="ln -s";;
5967 *) LN=ln;;
5968 esac
5969fi
5970
5971# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5973$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005974
5975# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005976if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977 withval=$with_pydebug;
5978if test "$withval" != no
5979then
5980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005981$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5984$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005986else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005988fi
5989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005992fi
5993
5994
5995# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5996# merged with this chunk of code?
5997
5998# Optimizer/debugger flags
5999# ------------------------
6000# (The following bit of code is complicated enough - please keep things
6001# indented properly. Just pretend you're editing Python code. ;-)
6002
6003# There are two parallel sets of case statements below, one that checks to
6004# see if OPT was set and one that does BASECFLAGS setting based upon
6005# compiler and platform. BASECFLAGS tweaks need to be made even if the
6006# user set OPT.
6007
6008# tweak OPT based on compiler and platform, only if the user didn't set
6009# it on the command line
6010
Benjamin Petersond4b721b2010-03-23 20:58:37 +00006011if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006012then
6013 case $GCC in
6014 yes)
6015 if test "$CC" != 'g++' ; then
6016 STRICT_PROTO="-Wstrict-prototypes"
6017 fi
6018 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6019 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6020 WRAP="-fwrapv"
6021 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006022
6023 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006024 case $CC in
6025 *clang*) WRAP="-fwrapv"
6026 ;;
6027 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006028
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029 case $ac_cv_prog_cc_g in
6030 yes)
6031 if test "$Py_DEBUG" = 'true' ; then
6032 # Optimization messes up debuggers, so turn it off for
6033 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006034 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006035 else
6036 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6037 fi
6038 ;;
6039 *)
6040 OPT="-O3 -Wall $STRICT_PROTO"
6041 ;;
6042 esac
6043 case $ac_sys_system in
6044 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6045 ;;
6046 esac
6047 ;;
6048
6049 *)
6050 OPT="-O"
6051 ;;
6052 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053fi
6054
6055
6056
6057# The -arch flags for universal builds on OSX
6058UNIVERSAL_ARCH_FLAGS=
6059
6060
6061# tweak BASECFLAGS based on compiler and platform
6062case $GCC in
6063yes)
6064 # Python violates C99 rules, by casting between incompatible
6065 # pointer types. GCC may generate bad code as a result of that,
6066 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6068$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069 ac_save_cc="$CC"
6070 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006071 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006072 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006075/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006076
6077int
6078main ()
6079{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006080
Gregory P. Smith373469a2009-11-01 21:03:38 +00006081 ;
6082 return 0;
6083}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006084_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006085if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006086 ac_cv_no_strict_aliasing_ok=yes
6087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006088 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006089fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006091fi
6092
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006093 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6095$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006096 if test $ac_cv_no_strict_aliasing_ok = yes
6097 then
6098 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6099 fi
6100
6101 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6102 # support. Without this, treatment of subnormals doesn't follow
6103 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006104 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006105 alpha*)
6106 BASECFLAGS="$BASECFLAGS -mieee"
6107 ;;
6108 esac
6109
6110 case $ac_sys_system in
6111 SCO_SV*)
6112 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6113 ;;
6114 # is there any other compiler on Darwin besides gcc?
6115 Darwin*)
6116 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6117 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006118 if test "${CC}" = gcc
6119 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6121$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006122 case "${UNIVERSALSDK}" in
6123 */MacOSX10.4u.sdk)
6124 # Build using 10.4 SDK, force usage of gcc when the
6125 # compiler is gcc, otherwise the user will get very
6126 # confusing error messages when building on OSX 10.6
6127 CC=gcc-4.0
6128 CPP=cpp-4.0
6129 ;;
6130 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6132$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006133 fi
6134
6135 # Calculate the right deployment target for this build.
6136 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006137 cur_target_major=`sw_vers -productVersion | \
6138 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6139 cur_target_minor=`sw_vers -productVersion | \
6140 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6141 cur_target="${cur_target_major}.${cur_target_minor}"
6142 if test ${cur_target_major} -eq 10 && \
6143 test ${cur_target_minor} -ge 3
6144 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006145 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006146 if test ${enable_universalsdk}; then
6147 if test "${UNIVERSAL_ARCHS}" = "all"; then
6148 # Ensure that the default platform for a
6149 # 4-way universal build is OSX 10.5,
6150 # that's the first OS release where
6151 # 4-way builds make sense.
6152 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006153
6154 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6155 cur_target='10.5'
6156
6157 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6158 cur_target='10.5'
6159
6160 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6161 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006162 fi
6163 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006164 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006165 # On Intel macs default to a deployment
6166 # target of 10.4, that's the first OSX
6167 # release with Intel support.
6168 cur_target="10.4"
6169 fi
6170 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006171 fi
6172 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6173
6174 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6175 # environment with a value that is the same as what we'll use
6176 # in the Makefile to ensure that we'll get the same compiler
6177 # environment during configure and build time.
6178 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6179 export MACOSX_DEPLOYMENT_TARGET
6180 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6181
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006182 if test "${enable_universalsdk}"; then
6183 UNIVERSAL_ARCH_FLAGS=""
6184 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6185 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6186 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006187 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006188
6189 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6190 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6191 LIPO_32BIT_FLAGS=""
6192 ARCH_RUN_32BIT="true"
6193
6194 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6195 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6196 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006197 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006198
6199 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6200 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6201 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006202 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006203
6204 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6205 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6206 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006207 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006208
6209 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006210 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006211
6212 fi
6213
6214
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006215 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6216 if test "${UNIVERSALSDK}" != "/"
6217 then
6218 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6219 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6220 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006221 fi
6222
6223 fi
6224
6225
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006226 ;;
6227 OSF*)
6228 BASECFLAGS="$BASECFLAGS -mieee"
6229 ;;
6230 esac
6231 ;;
6232
6233*)
6234 case $ac_sys_system in
6235 OpenUNIX*|UnixWare*)
6236 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6237 ;;
6238 OSF*)
6239 BASECFLAGS="$BASECFLAGS -ieee -std"
6240 ;;
6241 SCO_SV*)
6242 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6243 ;;
6244 esac
6245 ;;
6246esac
6247
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006248# ICC needs -fp-model strict or floats behave badly
6249case "$CC" in
6250*icc*)
6251 BASECFLAGS="$BASECFLAGS -fp-model strict"
6252 ;;
6253esac
6254
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006255if test "$Py_DEBUG" = 'true'; then
6256 :
6257else
6258 OPT="-DNDEBUG $OPT"
6259fi
6260
6261if test "$ac_arch_flags"
6262then
6263 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6264fi
6265
6266# disable check for icc since it seems to pass, but generates a warning
6267if test "$CC" = icc
6268then
6269 ac_cv_opt_olimit_ok=no
6270fi
6271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6273$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006274if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006275 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276else
6277 ac_save_cc="$CC"
6278CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006281
6282int
6283main ()
6284{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006285
Gregory P. Smith373469a2009-11-01 21:03:38 +00006286 ;
6287 return 0;
6288}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006289_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291 ac_cv_opt_olimit_ok=yes
6292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006293 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006294
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006295fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006297CC="$ac_save_cc"
6298fi
6299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6301$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006302if test $ac_cv_opt_olimit_ok = yes; then
6303 case $ac_sys_system in
6304 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6305 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6306 # environment?
6307 Darwin*)
6308 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006309 # XXX thankfully this useless troublemaker of a flag has been
6310 # eradicated in the 3.x line. For now, make sure it isn't picked
6311 # up by any of our other platforms that use CC.
6312 AIX*|SunOS*|HP-UX*|IRIX*)
6313 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006314 *)
6315 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6316 ;;
6317 esac
6318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6320$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006321 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006323else
6324 ac_save_cc="$CC"
6325 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006328
6329int
6330main ()
6331{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006332
Gregory P. Smith373469a2009-11-01 21:03:38 +00006333 ;
6334 return 0;
6335}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338 ac_cv_olimit_ok=yes
6339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006340 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006341
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006344 CC="$ac_save_cc"
6345fi
6346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6348$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006349 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006350 case $ac_sys_system in
6351 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6352 HP-UX*)
6353 ;;
6354 *)
6355 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6356 ;;
6357 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358 fi
6359fi
6360
6361# Check whether GCC supports PyArg_ParseTuple format
6362if test "$GCC" = "yes"
6363then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6365$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006367 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369/* end confdefs.h. */
6370
6371 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006372int
6373main ()
6374{
6375
6376 ;
6377 return 0;
6378}
Matthias Klosec511b472010-05-08 11:01:39 +00006379
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006382
Matthias Klosec511b472010-05-08 11:01:39 +00006383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006384$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006385
Matthias Klosec511b472010-05-08 11:01:39 +00006386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006387$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006388
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006389else
Matthias Klosec511b472010-05-08 11:01:39 +00006390
6391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006392$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006393
6394fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6396 CFLAGS=$save_CFLAGS
6397fi
6398
Brett Cannon4ff151a2015-09-18 15:09:42 -07006399
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006400# Enable optimization flags
6401
6402
6403Py_OPT='false'
6404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6405$as_echo_n "checking for --with-optimizations... " >&6; }
6406
6407# Check whether --with-optimizations was given.
6408if test "${with_optimizations+set}" = set; then :
6409 withval=$with_optimizations;
6410if test "$withval" != no
6411then
6412 Py_OPT='true'
6413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6414$as_echo "yes" >&6; };
6415else
6416 Py_OPT='false'
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6418$as_echo "no" >&6; };
6419fi
6420else
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6422$as_echo "no" >&6; }
6423fi
6424
6425if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006426 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6427 # compile working code using it and both test_distutils and test_gdb are
6428 # broken when you do managed to get a toolchain that works with it. People
6429 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006430 Py_LTO='true'
6431 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006432 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006433 DEF_MAKE_RULE="build_all"
6434else
6435 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006436 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006437 DEF_MAKE_RULE="all"
6438fi
6439
6440
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006441# Enable LTO flags
6442
6443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6444$as_echo_n "checking for --with-lto... " >&6; }
6445
6446# Check whether --with-lto was given.
6447if test "${with_lto+set}" = set; then :
6448 withval=$with_lto;
6449if test "$withval" != no
6450then
6451 Py_LTO='true'
6452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6453$as_echo "yes" >&6; };
6454else
6455 Py_LTO='false'
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; };
6458fi
6459else
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; }
6462fi
6463
6464if test "$Py_LTO" = 'true' ; then
6465 case $CC in
6466 *clang*)
6467 # Any changes made here should be reflected in the GCC+Darwin case below
6468 LTOFLAGS="-flto"
6469 ;;
6470 *gcc*)
6471 case $ac_sys_system in
6472 Darwin*)
6473 LTOFLAGS="-flto"
6474 ;;
6475 *)
6476 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6477 ;;
6478 esac
6479 ;;
6480 esac
6481fi
6482
6483
Brett Cannon4ff151a2015-09-18 15:09:42 -07006484# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006485
6486
6487
6488
6489
Gregory P. Smith794b2912016-09-08 00:07:40 -07006490# Make this work on systems where llvm tools are not installed with their
6491# normal names in the default $PATH (ie: Ubuntu). They exist under the
6492# non-suffixed name in their versioned llvm directory.
6493llvm_bin_dir=''
6494llvm_path="${PATH}"
6495if test "${CC}" = "clang"
6496then
6497 clang_bin=`which clang`
6498 # Some systems install clang elsewhere as a symlink to the real path
6499 # which is where the related llvm tools are located.
6500 if test -L "${clang_bin}"
6501 then
6502 clang_dir=`dirname "${clang_bin}"`
6503 clang_bin=`readlink "${clang_bin}"`
6504 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6505 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6506 fi
6507fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006508
Gregory P. Smith794b2912016-09-08 00:07:40 -07006509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6510$as_echo_n "checking target system type... " >&6; }
6511if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006512 $as_echo_n "(cached) " >&6
6513else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006514 if test "x$target_alias" = x; then
6515 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006516else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006517 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6518 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6519fi
6520
6521fi
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6523$as_echo "$ac_cv_target" >&6; }
6524case $ac_cv_target in
6525*-*-*) ;;
6526*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6527esac
6528target=$ac_cv_target
6529ac_save_IFS=$IFS; IFS='-'
6530set x $ac_cv_target
6531shift
6532target_cpu=$1
6533target_vendor=$2
6534shift; shift
6535# Remember, the first character of IFS is used to create $*,
6536# except with old shells:
6537target_os=$*
6538IFS=$ac_save_IFS
6539case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6540
6541
6542# The aliases save the names the user supplied, while $host etc.
6543# will get canonicalized.
6544test -n "$target_alias" &&
6545 test "$program_prefix$program_suffix$program_transform_name" = \
6546 NONENONEs,x,x, &&
6547 program_prefix=${target_alias}-
6548# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6549set dummy $target_alias-llvm-profdata; ac_word=$2
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6551$as_echo_n "checking for $ac_word... " >&6; }
6552if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6553 $as_echo_n "(cached) " >&6
6554else
6555 case $LLVM_PROFDATA in
6556 [\\/]* | ?:[\\/]*)
6557 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6558 ;;
6559 *)
6560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006562do
6563 IFS=$as_save_IFS
6564 test -z "$as_dir" && as_dir=.
6565 for ac_exec_ext in '' $ac_executable_extensions; do
6566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006567 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569 break 2
6570 fi
6571done
6572 done
6573IFS=$as_save_IFS
6574
Gregory P. Smith794b2912016-09-08 00:07:40 -07006575 ;;
6576esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006577fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006578LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6579if test -n "$LLVM_PROFDATA"; then
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6581$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006582else
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587
Gregory P. Smith794b2912016-09-08 00:07:40 -07006588if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6589 if test "$build" = "$target"; then
6590 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6591 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6592set dummy llvm-profdata; ac_word=$2
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6594$as_echo_n "checking for $ac_word... " >&6; }
6595if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6596 $as_echo_n "(cached) " >&6
6597else
6598 case $ac_pt_LLVM_PROFDATA in
6599 [\\/]* | ?:[\\/]*)
6600 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6601 ;;
6602 *)
6603 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6604for as_dir in ${llvm_path}
6605do
6606 IFS=$as_save_IFS
6607 test -z "$as_dir" && as_dir=.
6608 for ac_exec_ext in '' $ac_executable_extensions; do
6609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6610 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6612 break 2
6613 fi
6614done
6615 done
6616IFS=$as_save_IFS
6617
6618 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6619 ;;
6620esac
6621fi
6622ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6623if test -n "$ac_pt_LLVM_PROFDATA"; then
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6625$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6626else
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6628$as_echo "no" >&6; }
6629fi
6630
6631 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6632 else
6633 LLVM_PROFDATA="''"
6634 fi
6635else
6636 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6637fi
6638
6639
6640if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6641then
6642 LLVM_PROF_FOUND="found"
6643else
6644 LLVM_PROF_FOUND="not-found"
6645fi
6646if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6647then
6648 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6649 if test -n "${found_llvm_profdata}"
6650 then
6651 # llvm-profdata isn't directly in $PATH in some cases.
6652 # https://apple.stackexchange.com/questions/197053/
6653 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6654 LLVM_PROF_FOUND=found
6655 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6656$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6657 fi
6658fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006659LLVM_PROF_ERR=no
6660case $CC in
6661 *clang*)
6662 # Any changes made here should be reflected in the GCC+Darwin case below
6663 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6664 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006665 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006666 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6667 if test $LLVM_PROF_FOUND = not-found
6668 then
6669 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006670 if test "${REQUIRE_PGO}" = "yes"
6671 then
6672 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6673 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006674 fi
6675 ;;
6676 *gcc*)
6677 case $ac_sys_system in
6678 Darwin*)
6679 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6680 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006681 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006682 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006683 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006684 then
6685 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006686 if test "${REQUIRE_PGO}" = "yes"
6687 then
6688 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6689 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006690 fi
6691 ;;
6692 *)
6693 PGO_PROF_GEN_FLAG="-fprofile-generate"
6694 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6695 LLVM_PROF_MERGER="true"
6696 LLVM_PROF_FILE=""
6697 ;;
6698 esac
6699 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006700 *icc*)
6701 PGO_PROF_GEN_FLAG="-prof-gen"
6702 PGO_PROF_USE_FLAG="-prof-use"
6703 LLVM_PROF_MERGER="true"
6704 LLVM_PROF_FILE=""
6705 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006706esac
6707
6708
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006709# On some compilers, pthreads are available without further options
6710# (e.g. MacOS X). On some of these systems, the compiler will not
6711# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6712# So we have to see first whether pthreads are available without
6713# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6715$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006716if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006720 ac_cv_pthread_is_default=no
6721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006723/* end confdefs.h. */
6724
Stefan Krahae66ca62012-11-22 22:36:57 +01006725#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006726#include <pthread.h>
6727
6728void* routine(void* p){return NULL;}
6729
6730int main(){
6731 pthread_t p;
6732 if(pthread_create(&p,NULL,routine,NULL)!=0)
6733 return 1;
6734 (void)pthread_detach(p);
6735 return 0;
6736}
6737
6738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006740
6741 ac_cv_pthread_is_default=yes
6742 ac_cv_kthread=no
6743 ac_cv_pthread=no
6744
6745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750fi
6751
6752
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753fi
6754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6756$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006757
6758
6759if test $ac_cv_pthread_is_default = yes
6760then
6761 ac_cv_kpthread=no
6762else
6763# -Kpthread, if available, provides the right #defines
6764# and linker options to make pthread_create available
6765# Some compilers won't report that they do not support -Kpthread,
6766# so we need to run a program to see whether it really made the
6767# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6769$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006770if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006772else
6773 ac_save_cc="$CC"
6774CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006775if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006776 ac_cv_kpthread=no
6777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006779/* end confdefs.h. */
6780
Stefan Krahae66ca62012-11-22 22:36:57 +01006781#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006782#include <pthread.h>
6783
6784void* routine(void* p){return NULL;}
6785
6786int main(){
6787 pthread_t p;
6788 if(pthread_create(&p,NULL,routine,NULL)!=0)
6789 return 1;
6790 (void)pthread_detach(p);
6791 return 0;
6792}
6793
6794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006795if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006796 ac_cv_kpthread=yes
6797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006798 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6801 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006802fi
6803
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804CC="$ac_save_cc"
6805fi
6806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6808$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006809fi
6810
6811if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6812then
6813# -Kthread, if available, provides the right #defines
6814# and linker options to make pthread_create available
6815# Some compilers won't report that they do not support -Kthread,
6816# so we need to run a program to see whether it really made the
6817# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6819$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006820if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006822else
6823 ac_save_cc="$CC"
6824CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006825if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006826 ac_cv_kthread=no
6827else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006829/* end confdefs.h. */
6830
Stefan Krahae66ca62012-11-22 22:36:57 +01006831#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006832#include <pthread.h>
6833
6834void* routine(void* p){return NULL;}
6835
6836int main(){
6837 pthread_t p;
6838 if(pthread_create(&p,NULL,routine,NULL)!=0)
6839 return 1;
6840 (void)pthread_detach(p);
6841 return 0;
6842}
6843
6844_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006846 ac_cv_kthread=yes
6847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006848 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006852fi
6853
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006854CC="$ac_save_cc"
6855fi
6856
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6858$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006859fi
6860
6861if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6862then
6863# -pthread, if available, provides the right #defines
6864# and linker options to make pthread_create available
6865# Some compilers won't report that they do not support -pthread,
6866# so we need to run a program to see whether it really made the
6867# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6869$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006870if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006872else
6873 ac_save_cc="$CC"
6874CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006875if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006876 ac_cv_pthread=no
6877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879/* end confdefs.h. */
6880
Stefan Krahae66ca62012-11-22 22:36:57 +01006881#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006882#include <pthread.h>
6883
6884void* routine(void* p){return NULL;}
6885
6886int main(){
6887 pthread_t p;
6888 if(pthread_create(&p,NULL,routine,NULL)!=0)
6889 return 1;
6890 (void)pthread_detach(p);
6891 return 0;
6892}
6893
6894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006895if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006896 ac_cv_pthread=yes
6897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006898 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006899fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006902fi
6903
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006904CC="$ac_save_cc"
6905fi
6906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6908$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006909fi
6910
6911# If we have set a CC compiler flag for thread support then
6912# check if it works for CXX, too.
6913ac_cv_cxx_thread=no
6914if test ! -z "$CXX"
6915then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6917$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006918ac_save_cxx="$CXX"
6919
6920if test "$ac_cv_kpthread" = "yes"
6921then
6922 CXX="$CXX -Kpthread"
6923 ac_cv_cxx_thread=yes
6924elif test "$ac_cv_kthread" = "yes"
6925then
6926 CXX="$CXX -Kthread"
6927 ac_cv_cxx_thread=yes
6928elif test "$ac_cv_pthread" = "yes"
6929then
6930 CXX="$CXX -pthread"
6931 ac_cv_cxx_thread=yes
6932fi
6933
6934if test $ac_cv_cxx_thread = yes
6935then
6936 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6937 $CXX -c conftest.$ac_ext 2>&5
6938 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6939 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6940 then
6941 ac_cv_cxx_thread=yes
6942 else
6943 ac_cv_cxx_thread=no
6944 fi
6945 rm -fr conftest*
6946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6948$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006949fi
6950CXX="$ac_save_cxx"
6951
6952
6953# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6955$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006956if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006957 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006960/* end confdefs.h. */
6961#include <stdlib.h>
6962#include <stdarg.h>
6963#include <string.h>
6964#include <float.h>
6965
6966int
6967main ()
6968{
6969
6970 ;
6971 return 0;
6972}
6973_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006975 ac_cv_header_stdc=yes
6976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006978fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6980
6981if test $ac_cv_header_stdc = yes; then
6982 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006984/* end confdefs.h. */
6985#include <string.h>
6986
6987_ACEOF
6988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 $EGREP "memchr" >/dev/null 2>&1; then :
6990
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006991else
6992 ac_cv_header_stdc=no
6993fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006994rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006995
6996fi
6997
6998if test $ac_cv_header_stdc = yes; then
6999 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007001/* end confdefs.h. */
7002#include <stdlib.h>
7003
7004_ACEOF
7005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007006 $EGREP "free" >/dev/null 2>&1; then :
7007
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007008else
7009 ac_cv_header_stdc=no
7010fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007011rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007012
7013fi
7014
7015if test $ac_cv_header_stdc = yes; then
7016 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007017 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007018 :
7019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007021/* end confdefs.h. */
7022#include <ctype.h>
7023#include <stdlib.h>
7024#if ((' ' & 0x0FF) == 0x020)
7025# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7026# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7027#else
7028# define ISLOWER(c) \
7029 (('a' <= (c) && (c) <= 'i') \
7030 || ('j' <= (c) && (c) <= 'r') \
7031 || ('s' <= (c) && (c) <= 'z'))
7032# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7033#endif
7034
7035#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7036int
7037main ()
7038{
7039 int i;
7040 for (i = 0; i < 256; i++)
7041 if (XOR (islower (i), ISLOWER (i))
7042 || toupper (i) != TOUPPER (i))
7043 return 2;
7044 return 0;
7045}
7046_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047if ac_fn_c_try_run "$LINENO"; then :
7048
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7053 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007054fi
7055
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007056fi
7057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7059$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007060if test $ac_cv_header_stdc = yes; then
7061
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007062$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007063
7064fi
7065
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007066for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007067fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007068ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007069shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007070unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007071sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7072sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007073sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007074sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007075sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00007076sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007077bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078do :
7079 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7080ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007081if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007084_ACEOF
7085
7086fi
7087
Guido van Rossum627b2d71993-12-24 10:39:16 +00007088done
7089
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007090ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007091for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007092 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7094$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007095if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007099/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100#include <sys/types.h>
7101#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007102
Martin v. Löwis11437992002-04-12 09:54:03 +00007103int
7104main ()
7105{
7106if ((DIR *) 0)
7107return 0;
7108 ;
7109 return 0;
7110}
7111_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007112if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007113 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007115 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007119eval ac_res=\$$as_ac_Header
7120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7121$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007122if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007125_ACEOF
7126
7127ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007128fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007130done
7131# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7132if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7134$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007135if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137else
Martin v. Löwis11437992002-04-12 09:54:03 +00007138 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007141
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142/* Override any GCC internal prototype to avoid an error.
7143 Use char because int might match the return type of a GCC
7144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007145#ifdef __cplusplus
7146extern "C"
7147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007148char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007149int
7150main ()
7151{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007152return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007153 ;
7154 return 0;
7155}
7156_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157for ac_lib in '' dir; do
7158 if test -z "$ac_lib"; then
7159 ac_res="none required"
7160 else
7161 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007162 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007165 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007166fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007167rm -f core conftest.err conftest.$ac_objext \
7168 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007169 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007172done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007173if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007174
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175else
7176 ac_cv_search_opendir=no
7177fi
7178rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007179LIBS=$ac_func_search_save_LIBS
7180fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7182$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007183ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007184if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007186
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007187fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007188
Michael W. Hudson54241132001-12-07 15:38:26 +00007189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7191$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007192if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007194else
7195 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007198
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199/* Override any GCC internal prototype to avoid an error.
7200 Use char because int might match the return type of a GCC
7201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007202#ifdef __cplusplus
7203extern "C"
7204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007205char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007206int
7207main ()
7208{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007209return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007210 ;
7211 return 0;
7212}
7213_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214for ac_lib in '' x; do
7215 if test -z "$ac_lib"; then
7216 ac_res="none required"
7217 else
7218 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007219 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007220 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007221 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007222 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007223fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224rm -f core conftest.err conftest.$ac_objext \
7225 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007226 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007228fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007229done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007230if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231
Martin v. Löwiseba40652007-08-30 20:10:57 +00007232else
7233 ac_cv_search_opendir=no
7234fi
7235rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007236LIBS=$ac_func_search_save_LIBS
7237fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7239$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007240ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007243
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007244fi
7245
7246fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007247
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7249$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007250if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007252else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007254/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007255#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007256int
7257main ()
7258{
7259return makedev(0, 0);
7260 ;
7261 return 0;
7262}
7263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007264if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007265 ac_cv_header_sys_types_h_makedev=yes
7266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007267 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007268fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269rm -f core conftest.err conftest.$ac_objext \
7270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007271
7272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7274$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007275
7276if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007277ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007278if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007279
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007281
7282fi
7283
7284
7285
7286 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007287 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007288if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007290$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007291
7292fi
7293
7294
7295 fi
7296fi
7297
Michael W. Hudson54241132001-12-07 15:38:26 +00007298
Martin v. Löwis11017b12006-01-14 18:12:57 +00007299# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007300for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007301do :
7302 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 +00007303#ifdef HAVE_ASM_TYPES_H
7304#include <asm/types.h>
7305#endif
7306#ifdef HAVE_SYS_SOCKET_H
7307#include <sys/socket.h>
7308#endif
7309
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007310"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007311if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007312 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007314_ACEOF
7315
7316fi
7317
7318done
7319
7320
Guido van Rossum627b2d71993-12-24 10:39:16 +00007321# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007322was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7324$as_echo_n "checking for clock_t in time.h... " >&6; }
7325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007326/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007327#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007328
7329_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007330if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007331 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007332 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007333else
Martin v. Löwis11437992002-04-12 09:54:03 +00007334
7335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007336$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007337
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007338
Guido van Rossum627b2d71993-12-24 10:39:16 +00007339fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007340rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7343$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007344
Neal Norwitz11690112002-07-30 01:08:28 +00007345# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7347$as_echo_n "checking for makedev... " >&6; }
7348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007349/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007350
7351#if defined(MAJOR_IN_MKDEV)
7352#include <sys/mkdev.h>
7353#elif defined(MAJOR_IN_SYSMACROS)
7354#include <sys/sysmacros.h>
7355#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007356#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007357#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007358int
7359main ()
7360{
7361 makedev(0, 0)
7362 ;
7363 return 0;
7364}
7365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007367 ac_cv_has_makedev=yes
7368else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007371rm -f core conftest.err conftest.$ac_objext \
7372 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007373if test "$ac_cv_has_makedev" = "no"; then
7374 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007376/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007377
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007378#define _OSF_SOURCE 1
7379#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007380
Neal Norwitz11690112002-07-30 01:08:28 +00007381int
7382main ()
7383{
7384 makedev(0, 0)
7385 ;
7386 return 0;
7387}
7388_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007389if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007390 ac_cv_has_makedev=yes
7391else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007393fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007394rm -f core conftest.err conftest.$ac_objext \
7395 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007396 if test "$ac_cv_has_makedev" = "yes"; then
7397
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007398$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007399
7400 fi
7401fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7403$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007404if test "$ac_cv_has_makedev" = "yes"; then
7405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007406$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007407
7408fi
7409
Martin v. Löwis399a6892002-10-04 10:22:02 +00007410# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7411# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7412# defined, but the compiler does not support pragma redefine_extname,
7413# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7414# structures (such as rlimit64) without declaring them. As a
7415# work-around, disable LFS on such configurations
7416
7417use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7419$as_echo_n "checking Solaris LFS bug... " >&6; }
7420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007421/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007422
7423#define _LARGEFILE_SOURCE 1
7424#define _FILE_OFFSET_BITS 64
7425#include <sys/resource.h>
7426
Martin v. Löwis399a6892002-10-04 10:22:02 +00007427int
7428main ()
7429{
7430struct rlimit foo;
7431 ;
7432 return 0;
7433}
7434_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007436 sol_lfs_bug=no
7437else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007438 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7442$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007443if test "$sol_lfs_bug" = "yes"; then
7444 use_lfs=no
7445fi
7446
7447if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007448# Two defines needed to enable largefile support on various platforms
7449# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007450case $ac_sys_system/$ac_sys_release in
7451AIX*)
7452
7453$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7454
7455 ;;
7456esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007457
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
7460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007461$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007462
Martin v. Löwis399a6892002-10-04 10:22:02 +00007463fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007464
Guido van Rossum84e7b241996-08-19 21:59:00 +00007465# Add some code to confdefs.h so that the test for off_t works on SCO
7466cat >> confdefs.h <<\EOF
7467#if defined(SCO_DS)
7468#undef _OFF_T
7469#endif
7470EOF
7471
Guido van Rossumef2255b2000-03-10 22:30:29 +00007472# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007473ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007474if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007475
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007476else
Martin v. Löwis11437992002-04-12 09:54:03 +00007477
7478cat >>confdefs.h <<_ACEOF
7479#define mode_t int
7480_ACEOF
7481
7482fi
7483
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007484ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007485if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007486
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007487else
Martin v. Löwis11437992002-04-12 09:54:03 +00007488
7489cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007491_ACEOF
7492
7493fi
7494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007495ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007497
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007498else
Martin v. Löwis11437992002-04-12 09:54:03 +00007499
7500cat >>confdefs.h <<_ACEOF
7501#define pid_t int
7502_ACEOF
7503
7504fi
7505
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007506
Martin v. Löwis11437992002-04-12 09:54:03 +00007507cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007508#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007509_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007511ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007512if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007513
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514else
Martin v. Löwis11437992002-04-12 09:54:03 +00007515
7516cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007517#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007518_ACEOF
7519
7520fi
7521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7523$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007524if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007525 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007528/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007529#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007530
7531_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534 ac_cv_type_uid_t=yes
7535else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007536 ac_cv_type_uid_t=no
7537fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007538rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007540fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7542$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007543if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007544
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007545$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007546
7547
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007549
7550fi
7551
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007552
7553# There are two separate checks for each of the exact-width integer types we
7554# need. First we check whether the type is available using the usual
7555# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7556# and <stdint.h> where available). We then also use the special type checks of
7557# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7558# directly, #define's uint32_t to be a suitable type.
7559
7560ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7561if test "x$ac_cv_type_uint32_t" = xyes; then :
7562
7563$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7564
7565fi
7566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007567ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7568case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007569 no|yes) ;; #(
7570 *)
7571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007572$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007573
7574
7575cat >>confdefs.h <<_ACEOF
7576#define uint32_t $ac_cv_c_uint32_t
7577_ACEOF
7578;;
7579 esac
7580
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007581
7582ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7583if test "x$ac_cv_type_uint64_t" = xyes; then :
7584
7585$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7586
7587fi
7588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007589ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7590case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007591 no|yes) ;; #(
7592 *)
7593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007594$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007595
7596
7597cat >>confdefs.h <<_ACEOF
7598#define uint64_t $ac_cv_c_uint64_t
7599_ACEOF
7600;;
7601 esac
7602
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007603
7604ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7605if test "x$ac_cv_type_int32_t" = xyes; then :
7606
7607$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7608
7609fi
7610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007611ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7612case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007613 no|yes) ;; #(
7614 *)
7615
7616cat >>confdefs.h <<_ACEOF
7617#define int32_t $ac_cv_c_int32_t
7618_ACEOF
7619;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007620esac
7621
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007622
7623ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7624if test "x$ac_cv_type_int64_t" = xyes; then :
7625
7626$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7627
7628fi
7629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7631case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007632 no|yes) ;; #(
7633 *)
7634
7635cat >>confdefs.h <<_ACEOF
7636#define int64_t $ac_cv_c_int64_t
7637_ACEOF
7638;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007639esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007640
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007641
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007642ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007643if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007646
7647fi
7648
Jack Jansendd19cf82001-12-06 22:36:17 +00007649
Michael W. Hudson54241132001-12-07 15:38:26 +00007650# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007651# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007652# The cast to long int works around a bug in the HP C Compiler
7653# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7654# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7655# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7657$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007658if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007659 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007660else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661 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 +00007662
Martin v. Löwis11437992002-04-12 09:54:03 +00007663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664 if test "$ac_cv_type_int" = yes; then
7665 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7666$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007667as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007668See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 else
7670 ac_cv_sizeof_int=0
7671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007673
Martin v. Löwis11437992002-04-12 09:54:03 +00007674fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7676$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677
7678
7679
Martin v. Löwis11437992002-04-12 09:54:03 +00007680cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007681#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007682_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007683
7684
Martin v. Löwiseba40652007-08-30 20:10:57 +00007685# The cast to long int works around a bug in the HP C Compiler
7686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7688# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7690$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007691if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694 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 +00007695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697 if test "$ac_cv_type_long" = yes; then
7698 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7699$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007700as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007701See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007702 else
7703 ac_cv_sizeof_long=0
7704 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007706
Martin v. Löwis11437992002-04-12 09:54:03 +00007707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7709$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710
7711
7712
Martin v. Löwis11437992002-04-12 09:54:03 +00007713cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007714#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007715_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007716
7717
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718# The cast to long int works around a bug in the HP C Compiler
7719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7721# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7723$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007724if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007725 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727 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 +00007728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 if test "$ac_cv_type_void_p" = yes; then
7731 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007733as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007734See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007735 else
7736 ac_cv_sizeof_void_p=0
7737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007739
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7742$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743
7744
7745
Martin v. Löwis11437992002-04-12 09:54:03 +00007746cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007747#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007748_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007749
7750
Martin v. Löwiseba40652007-08-30 20:10:57 +00007751# The cast to long int works around a bug in the HP C Compiler
7752# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7753# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7754# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7756$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007757if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007758 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760 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 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763 if test "$ac_cv_type_short" = yes; then
7764 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7765$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007766as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007767See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768 else
7769 ac_cv_sizeof_short=0
7770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007772
Martin v. Löwis11437992002-04-12 09:54:03 +00007773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7775$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776
7777
7778
Martin v. Löwis11437992002-04-12 09:54:03 +00007779cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007780#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007781_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007782
7783
Martin v. Löwiseba40652007-08-30 20:10:57 +00007784# The cast to long int works around a bug in the HP C Compiler
7785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7787# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7789$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007790if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 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 +00007794
Martin v. Löwis11437992002-04-12 09:54:03 +00007795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 if test "$ac_cv_type_float" = yes; then
7797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007799as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007800See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801 else
7802 ac_cv_sizeof_float=0
7803 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805
Martin v. Löwis11437992002-04-12 09:54:03 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7808$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007809
7810
7811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007813#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007814_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007815
7816
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817# The cast to long int works around a bug in the HP C Compiler
7818# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7819# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7820# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7822$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007823if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826 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 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829 if test "$ac_cv_type_double" = yes; then
7830 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007832as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007833See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007834 else
7835 ac_cv_sizeof_double=0
7836 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007837fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007838
Martin v. Löwis11437992002-04-12 09:54:03 +00007839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7841$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007842
7843
7844
Martin v. Löwis11437992002-04-12 09:54:03 +00007845cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007846#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007847_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007848
7849
Martin v. Löwiseba40652007-08-30 20:10:57 +00007850# The cast to long int works around a bug in the HP C Compiler
7851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7853# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7855$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007856if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859 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 +00007860
Martin v. Löwis11437992002-04-12 09:54:03 +00007861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862 if test "$ac_cv_type_fpos_t" = yes; then
7863 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7864$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007865as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007866See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867 else
7868 ac_cv_sizeof_fpos_t=0
7869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7874$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007875
7876
7877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007879#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007880_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007881
Michael W. Hudson54241132001-12-07 15:38:26 +00007882
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883# The cast to long int works around a bug in the HP C Compiler
7884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7886# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7888$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007889if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892 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 +00007893
Martin v. Löwis18e16552006-02-15 17:27:45 +00007894else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895 if test "$ac_cv_type_size_t" = yes; then
7896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007898as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007899See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900 else
7901 ac_cv_sizeof_size_t=0
7902 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007903fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007904
Martin v. Löwis18e16552006-02-15 17:27:45 +00007905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7907$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908
7909
7910
Martin v. Löwis18e16552006-02-15 17:27:45 +00007911cat >>confdefs.h <<_ACEOF
7912#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7913_ACEOF
7914
7915
Christian Heimes951cc0f2008-01-31 23:08:23 +00007916# The cast to long int works around a bug in the HP C Compiler
7917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7919# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7921$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007922if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007923 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes951cc0f2008-01-31 23:08:23 +00007926
Christian Heimes951cc0f2008-01-31 23:08:23 +00007927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928 if test "$ac_cv_type_pid_t" = yes; then
7929 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7930$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007931as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007932See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007933 else
7934 ac_cv_sizeof_pid_t=0
7935 fi
7936fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007937
Christian Heimes951cc0f2008-01-31 23:08:23 +00007938fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7940$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007941
7942
7943
7944cat >>confdefs.h <<_ACEOF
7945#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7946_ACEOF
7947
7948
Michael W. Hudson54241132001-12-07 15:38:26 +00007949
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7951$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007952have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007955
Martin v. Löwis11437992002-04-12 09:54:03 +00007956int
7957main ()
7958{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007959long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 ;
7961 return 0;
7962}
7963_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007965
7966
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007967$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007969 have_long_long=yes
7970
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7974$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007975if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976# The cast to long int works around a bug in the HP C Compiler
7977# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7978# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7979# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7981$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007982if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007984else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985 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 +00007986
Martin v. Löwis11437992002-04-12 09:54:03 +00007987else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007988 if test "$ac_cv_type_long_long" = yes; then
7989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007991as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007992See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007993 else
7994 ac_cv_sizeof_long_long=0
7995 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997
Martin v. Löwis11437992002-04-12 09:54:03 +00007998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8000$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008001
8002
8003
Martin v. Löwis11437992002-04-12 09:54:03 +00008004cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008005#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008006_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008007
Michael W. Hudson54241132001-12-07 15:38:26 +00008008
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008009fi
8010
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8012$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008013have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008015/* end confdefs.h. */
8016
8017int
8018main ()
8019{
Matthias Klosec511b472010-05-08 11:01:39 +00008020long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008021 ;
8022 return 0;
8023}
8024_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008026
8027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008028$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008029
8030 have_long_double=yes
8031
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008032fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8035$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008036if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008037# The cast to long int works around a bug in the HP C Compiler
8038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8040# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8042$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008043if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008046 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008047
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008049 if test "$ac_cv_type_long_double" = yes; then
8050 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8051$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008052as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008053See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008054 else
8055 ac_cv_sizeof_long_double=0
8056 fi
8057fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8061$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008062
8063
8064
8065cat >>confdefs.h <<_ACEOF
8066#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8067_ACEOF
8068
8069
8070fi
8071
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8073$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008074have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008076/* end confdefs.h. */
8077
8078int
8079main ()
8080{
8081_Bool x; x = (_Bool)0;
8082 ;
8083 return 0;
8084}
8085_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008087
8088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008090
8091 have_c99_bool=yes
8092
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8096$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008097if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008098# The cast to long int works around a bug in the HP C Compiler
8099# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8100# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8101# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8103$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008104if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008107 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008108
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110 if test "$ac_cv_type__Bool" = yes; then
8111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008113as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008114See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008115 else
8116 ac_cv_sizeof__Bool=0
8117 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008118fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8122$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008123
8124
8125
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008126cat >>confdefs.h <<_ACEOF
8127#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8128_ACEOF
8129
8130
8131fi
8132
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00008134 #include <stdint.h>
8135 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008136 #ifdef HAVE_INTTYPES_H
8137 #include <inttypes.h>
8138 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008140if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008141
8142cat >>confdefs.h <<_ACEOF
8143#define HAVE_UINTPTR_T 1
8144_ACEOF
8145
Martin v. Löwiseba40652007-08-30 20:10:57 +00008146# The cast to long int works around a bug in the HP C Compiler
8147# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8148# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8149# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8151$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008152if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008155 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 +00008156
Martin v. Löwis11437992002-04-12 09:54:03 +00008157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158 if test "$ac_cv_type_uintptr_t" = yes; then
8159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8160$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008161as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008162See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008163 else
8164 ac_cv_sizeof_uintptr_t=0
8165 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167
Martin v. Löwis11437992002-04-12 09:54:03 +00008168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8170$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171
8172
8173
Martin v. Löwis11437992002-04-12 09:54:03 +00008174cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008175#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008176_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008177
Michael W. Hudson54241132001-12-07 15:38:26 +00008178
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008179fi
8180
Martin v. Löwisebe26702006-10-02 14:55:51 +00008181
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008182# The cast to long int works around a bug in the HP C Compiler
8183# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8184# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8185# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8187$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008188if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008190else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008191 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008192#ifdef HAVE_SYS_TYPES_H
8193#include <sys/types.h>
8194#endif
8195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008197
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008198else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199 if test "$ac_cv_type_off_t" = yes; then
8200 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8201$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008202as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008203See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008204 else
8205 ac_cv_sizeof_off_t=0
8206 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008207fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008208
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008209fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8211$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008212
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008213
8214
Martin v. Löwis11437992002-04-12 09:54:03 +00008215cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008216#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008217_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008218
Michael W. Hudson54241132001-12-07 15:38:26 +00008219
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8222$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008223if test "$have_long_long" = yes
8224then
8225if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008226 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008227
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008228$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8231$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8234$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008235fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8238$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008239fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008240
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008241# The cast to long int works around a bug in the HP C Compiler
8242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8244# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8246$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008247if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008248 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008251#ifdef HAVE_SYS_TYPES_H
8252#include <sys/types.h>
8253#endif
8254#ifdef HAVE_TIME_H
8255#include <time.h>
8256#endif
8257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008258"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008259
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008261 if test "$ac_cv_type_time_t" = yes; then
8262 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8263$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008264as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008265See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008266 else
8267 ac_cv_sizeof_time_t=0
8268 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008270
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8273$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008274
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008275
8276
Martin v. Löwis11437992002-04-12 09:54:03 +00008277cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008278#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008280
Michael W. Hudson54241132001-12-07 15:38:26 +00008281
8282
Trent Mick635f6fb2000-08-23 21:33:05 +00008283# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008284ac_save_cc="$CC"
8285if test "$ac_cv_kpthread" = "yes"
8286then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008287elif test "$ac_cv_kthread" = "yes"
8288then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008289elif test "$ac_cv_pthread" = "yes"
8290then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008291fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8293$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008294have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008296/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008297
8298 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008299int
8300main ()
8301{
Guido van Rossum12580492000-09-24 16:47:19 +00008302pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008303 ;
8304 return 0;
8305}
Matthias Klosec511b472010-05-08 11:01:39 +00008306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008309 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8313$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008314if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008316# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8317# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8318# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8320$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008321if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008325#ifdef HAVE_PTHREAD_H
8326#include <pthread.h>
8327#endif
8328
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008329"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008330
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008331else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008332 if test "$ac_cv_type_pthread_t" = yes; then
8333 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8334$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008335as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008336See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008337 else
8338 ac_cv_sizeof_pthread_t=0
8339 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008340fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008341
Trent Mick635f6fb2000-08-23 21:33:05 +00008342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8344$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008345
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008346
8347
Martin v. Löwis11437992002-04-12 09:54:03 +00008348cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008349#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008350_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008351
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008352
Trent Mick635f6fb2000-08-23 21:33:05 +00008353fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008354CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8357$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008358# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008359if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008360 enableval=$enable_toolbox_glue;
8361fi
Jack Jansene578a632001-08-15 01:27:14 +00008362
8363
8364if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008365then
Jack Jansene578a632001-08-15 01:27:14 +00008366 case $ac_sys_system/$ac_sys_release in
8367 Darwin/*)
8368 enable_toolbox_glue="yes";;
8369 *)
8370 enable_toolbox_glue="no";;
8371 esac
8372fi
8373case "$enable_toolbox_glue" in
8374yes)
Jack Jansene578a632001-08-15 01:27:14 +00008375 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008376 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008378$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008379
8380 ;;
8381*)
Jack Jansene578a632001-08-15 01:27:14 +00008382 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008383 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008384 ;;
8385esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8387$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008388
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008389
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008390
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008391case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008392 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008393 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8394 ;;
8395 Darwin/*)
8396 OTHER_LIBTOOL_OPT=""
8397 ;;
8398esac
8399
8400
Ronald Oussoren25967582009-09-06 10:00:26 +00008401
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008402case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008403 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008404 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8405 if test "${enable_universalsdk}"; then
8406 :
8407 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008408 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008409 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008410 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008411 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008412 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008413 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008414 if test ${gcc_version} '<' 4.0
8415 then
8416 LIBTOOL_CRUFT="-lcc_dynamic"
8417 else
8418 LIBTOOL_CRUFT=""
8419 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008420 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008421 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008424/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008425
Ronald Oussoren25967582009-09-06 10:00:26 +00008426 #include <unistd.h>
8427 int main(int argc, char*argv[])
8428 {
8429 if (sizeof(long) == 4) {
8430 return 0;
8431 } else {
8432 return 1;
8433 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008434 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008435
Ronald Oussoren25967582009-09-06 10:00:26 +00008436_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008437if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008438 ac_osx_32bit=yes
8439else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008440 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8443 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008444fi
8445
8446
Ronald Oussoren25967582009-09-06 10:00:26 +00008447 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008448 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008449 i386)
8450 MACOSX_DEFAULT_ARCH="i386"
8451 ;;
8452 ppc)
8453 MACOSX_DEFAULT_ARCH="ppc"
8454 ;;
8455 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008456 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008457 ;;
8458 esac
8459 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008460 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008461 i386)
8462 MACOSX_DEFAULT_ARCH="x86_64"
8463 ;;
8464 ppc)
8465 MACOSX_DEFAULT_ARCH="ppc64"
8466 ;;
8467 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008468 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008469 ;;
8470 esac
8471
8472 #ARCH_RUN_32BIT="true"
8473 fi
8474
8475 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008476 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008477 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008478esac
8479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8481$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008482if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008483then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008484 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008486 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008487
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008488$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8491$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008492 if test $enable_shared = "yes"
8493 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008494 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." "$LINENO" 5
Ronald Oussoren450d5612009-06-08 21:12:41 +00008495 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008496else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008499fi
8500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8502$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008503case $ac_sys_system/$ac_sys_release in
8504 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008505
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008506$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008507
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8509$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008510 ;;
8511 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8513$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008514 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008515esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008516
Guido van Rossum0a516c91994-09-12 10:58:40 +00008517# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008518
Michael W. Hudson54241132001-12-07 15:38:26 +00008519
8520
8521
8522
Ronald Oussoren75912852010-04-08 08:13:31 +00008523
Guido van Rossum0a516c91994-09-12 10:58:40 +00008524# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008525# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8527$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008528if test -z "$SO"
8529then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008530 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008531 hp*|HP*)
8532 case `uname -m` in
8533 ia64) SO=.so;;
8534 *) SO=.sl;;
8535 esac
8536 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008537 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008538 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008539 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008540else
8541 # this might also be a termcap variable, see #610332
8542 echo
8543 echo '====================================================================='
8544 echo '+ +'
8545 echo '+ WARNING: You have set SO in your environment. +'
8546 echo '+ Do you really mean to change the extension for shared libraries? +'
8547 echo '+ Continuing in 10 seconds to let you to ponder. +'
8548 echo '+ +'
8549 echo '====================================================================='
8550 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8553$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008554
Ronald Oussoren79f90492009-01-02 10:44:46 +00008555
Neal Norwitz58e28882006-05-19 07:00:58 +00008556cat >>confdefs.h <<_ACEOF
8557#define SHLIB_EXT "$SO"
8558_ACEOF
8559
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008561# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008562# (Shared libraries in this instance are shared modules to be loaded into
8563# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8565$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008566if test -z "$LDSHARED"
8567then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008568 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008569 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008570 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008571 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008572 ;;
8573 BeOS*)
8574 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008575 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008576 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008577 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008578 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008579 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008580 if test "$GCC" = "yes" ; then
8581 LDSHARED='$(CC) -shared'
8582 LDCXXSHARED='$(CXX) -shared'
8583 else
8584 LDSHARED='$(CC) -G'
8585 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008586 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008587 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008588 if test "$GCC" = "yes" ; then
8589 LDSHARED='$(CC) -shared'
8590 LDCXXSHARED='$(CXX) -shared'
8591 else
8592 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008593 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008594 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008595 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008596 LDSHARED='$(CC) -bundle'
8597 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008598 if test "$enable_framework" ; then
8599 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008600 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8601 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008602 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008603 else
8604 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008605 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008606 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008607 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008608 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008609 LDSHARED='$(CC) -bundle'
8610 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008611 if test "$enable_framework" ; then
8612 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008613 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8614 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008615 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008616 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008617 # No framework, use the Python app as bundle-loader
8618 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008619 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008620 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008621 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008622 Darwin/*)
8623 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8624 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008625
Ned Deilyc40b9032014-06-25 13:48:46 -07008626 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8627 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8628 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8629 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8630 if test ${dep_target_major} -eq 10 && \
8631 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008632 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008633 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008634 LDSHARED='$(CC) -bundle'
8635 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008636 if test "$enable_framework" ; then
8637 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008638 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8639 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008640 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008641 else
8642 # No framework, use the Python app as bundle-loader
8643 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8644 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008645 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008646 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008647 else
8648 # building for OS X 10.3 and later
8649 if test "${enable_universalsdk}"; then
8650 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8651 fi
8652 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8653 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8654 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008655 fi
8656 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008657 Linux*|GNU*|QNX*)
8658 LDSHARED='$(CC) -shared'
8659 LDCXXSHARED='$(CXX) -shared';;
8660 BSD/OS*/4*)
8661 LDSHARED="gcc -shared"
8662 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008663 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008664 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008665 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008666 LDSHARED='$(CC) -shared'
8667 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008668 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008669 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008670 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008671 OpenBSD*)
8672 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8673 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008674 LDSHARED='$(CC) -shared $(CCSHARED)'
8675 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008676 else
8677 case `uname -r` in
8678 [01].* | 2.[0-7] | 2.[0-7].*)
8679 LDSHARED="ld -Bshareable ${LDFLAGS}"
8680 ;;
8681 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008682 LDSHARED='$(CC) -shared $(CCSHARED)'
8683 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008684 ;;
8685 esac
8686 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008687 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008688 LDSHARED='$(CC) -shared'
8689 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008690 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008691 if test "$GCC" = "yes" ; then
8692 LDSHARED='$(CC) -shared'
8693 LDCXXSHARED='$(CXX) -shared'
8694 else
8695 LDSHARED='$(CC) -G'
8696 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008697 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008698 SCO_SV*)
8699 LDSHARED='$(CC) -Wl,-G,-Bexport'
8700 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8701 CYGWIN*)
8702 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8703 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8704 atheos*)
8705 LDSHARED="gcc -shared"
8706 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008707 *) LDSHARED="ld";;
8708 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8711$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008712LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008713BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008714# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008715# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8717$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008718if test -z "$CCSHARED"
8719then
Guido van Rossum07397971997-04-29 21:49:50 +00008720 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008721 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008722 then CCSHARED="-fPIC";
8723 elif test `uname -p` = sparc;
8724 then CCSHARED="-xcode=pic32";
8725 else CCSHARED="-Kpic";
8726 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008727 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008728 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008729 else CCSHARED="+z";
8730 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008731 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008732 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008733 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008734 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008735 if test "$GCC" = "yes"
8736 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008737 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008738 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008739 SCO_SV*)
8740 if test "$GCC" = "yes"
8741 then CCSHARED="-fPIC"
8742 else CCSHARED="-Kpic -belf"
8743 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008744 IRIX*/6*) case $CC in
8745 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008746 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008747 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008748 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008749 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008750fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8752$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008753# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008754# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8756$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008757if test -z "$LINKFORSHARED"
8758then
Guido van Rossum07397971997-04-29 21:49:50 +00008759 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008760 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008761 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008762 LINKFORSHARED="-Wl,-E -Wl,+s";;
8763# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008764 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008765 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008766 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008767 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008768 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8769 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008770 # not used by the core itself but which needs to be in the core so
8771 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008772 # -prebind is no longer used, because it actually seems to give a
8773 # slowdown in stead of a speedup, maybe due to the large number of
8774 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008775
8776 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008777 if test "$enable_framework"
8778 then
Jack Jansenda49e192005-01-07 13:08:22 +00008779 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008780 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008781 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008782 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008783 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008784 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008785 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008786 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8787 then
8788 LINKFORSHARED="-Wl,--export-dynamic"
8789 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008790 SunOS/5*) case $CC in
8791 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008792 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008793 then
8794 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008795 fi;;
8796 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008797 CYGWIN*)
8798 if test $enable_shared = "no"
8799 then
8800 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8801 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008802 QNX*)
8803 # -Wl,-E causes the symbols to be added to the dynamic
8804 # symbol table so that they can be found when a module
8805 # is loaded. -N 2048K causes the stack size to be set
8806 # to 2048 kilobytes so that the stack doesn't overflow
8807 # when running test_compile.py.
8808 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008809 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8812$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008813
Michael W. Hudson54241132001-12-07 15:38:26 +00008814
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008815
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8817$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008818if test ! "$LIBRARY" = "$LDLIBRARY"
8819then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008820 case $ac_sys_system in
8821 CYGWIN*)
8822 # Cygwin needs CCSHARED when building extension DLLs
8823 # but not when building the interpreter DLL.
8824 CFLAGSFORSHARED='';;
8825 *)
8826 CFLAGSFORSHARED='$(CCSHARED)'
8827 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8830$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008831
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008832# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8833# library (with --enable-shared).
8834# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008835# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8836# if it is not required, since it creates a dependency of the shared library
8837# to LIBS. This, in turn, means that applications linking the shared libpython
8838# don't need to link LIBS explicitly. The default should be only changed
8839# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008840
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8842$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008843case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008844 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008845 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008846esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8848$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008849
8850
Guido van Rossum627b2d71993-12-24 10:39:16 +00008851# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8853$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008854if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008855 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008856else
Martin v. Löwis11437992002-04-12 09:54:03 +00008857 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008858LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008860/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008861
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862/* Override any GCC internal prototype to avoid an error.
8863 Use char because int might match the return type of a GCC
8864 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008865#ifdef __cplusplus
8866extern "C"
8867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008868char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008869int
8870main ()
8871{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ;
8874 return 0;
8875}
8876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008880 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882rm -f core conftest.err conftest.$ac_objext \
8883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008884LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8887$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008888if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 cat >>confdefs.h <<_ACEOF
8890#define HAVE_LIBDL 1
8891_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008892
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008893 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008895fi
8896 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8898$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008899if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008901else
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008903LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008906
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907/* Override any GCC internal prototype to avoid an error.
8908 Use char because int might match the return type of a GCC
8909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008910#ifdef __cplusplus
8911extern "C"
8912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008913char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008914int
8915main ()
8916{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ;
8919 return 0;
8920}
8921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927rm -f core conftest.err conftest.$ac_objext \
8928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008929LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8932$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008933if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 cat >>confdefs.h <<_ACEOF
8935#define HAVE_LIBDLD 1
8936_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008937
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008938 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008939
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008940fi
8941 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008942
Ronald Oussoren79f90492009-01-02 10:44:46 +00008943# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008944if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8946$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008947if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008949else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008950 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008953
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954/* Override any GCC internal prototype to avoid an error.
8955 Use char because int might match the return type of a GCC
8956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008957#ifdef __cplusplus
8958extern "C"
8959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008960char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008961int
8962main ()
8963{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008964return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008965 ;
8966 return 0;
8967}
8968_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969for ac_lib in '' pthread rt posix4; do
8970 if test -z "$ac_lib"; then
8971 ac_res="none required"
8972 else
8973 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008974 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008976 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008978fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008979rm -f core conftest.err conftest.$ac_objext \
8980 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008981 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008985if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008986
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987else
8988 ac_cv_search_sem_init=no
8989fi
8990rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008991LIBS=$ac_func_search_save_LIBS
8992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8994$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008996if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008998
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008999fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009000 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009001 # posix4 on Solaris 2.6
9002 # pthread (first!) on Linux
9003fi
9004
Martin v. Löwis19d17342003-06-14 21:03:05 +00009005# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9007$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009008if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009010else
9011 ac_check_lib_save_LIBS=$LIBS
9012LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009014/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009015
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016/* Override any GCC internal prototype to avoid an error.
9017 Use char because int might match the return type of a GCC
9018 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009019#ifdef __cplusplus
9020extern "C"
9021#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009022char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009023int
9024main ()
9025{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009027 ;
9028 return 0;
9029}
9030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009032 ac_cv_lib_intl_textdomain=yes
9033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009034 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009035fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036rm -f core conftest.err conftest.$ac_objext \
9037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009038LIBS=$ac_check_lib_save_LIBS
9039fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9041$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009042if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009045
9046fi
9047
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009048
9049# checks for system dependent C++ extensions support
9050case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9052$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009055
Georg Brandl94800df2011-02-25 11:09:02 +00009056 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009057int
9058main ()
9059{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009060loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009061 ;
9062 return 0;
9063}
Matthias Klosec511b472010-05-08 11:01:39 +00009064
Martin v. Löwis11437992002-04-12 09:54:03 +00009065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009066if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009067
Matthias Klosec511b472010-05-08 11:01:39 +00009068
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009070
Matthias Klosec511b472010-05-08 11:01:39 +00009071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009073
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009074else
Matthias Klosec511b472010-05-08 11:01:39 +00009075
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009077$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009078
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009080rm -f core conftest.err conftest.$ac_objext \
9081 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009082 *) ;;
9083esac
9084
Guido van Rossum70c7f481998-03-26 18:44:10 +00009085# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009086# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9088$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009089if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009091else
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009093LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009096
Martin v. Löwiseba40652007-08-30 20:10:57 +00009097/* Override any GCC internal prototype to avoid an error.
9098 Use char because int might match the return type of a GCC
9099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009100#ifdef __cplusplus
9101extern "C"
9102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009103char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009104int
9105main ()
9106{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009108 ;
9109 return 0;
9110}
9111_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009114else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009116fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009117rm -f core conftest.err conftest.$ac_objext \
9118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009119LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009120fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9122$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009123if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009124 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009125fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009126 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9128$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009129if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009130 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009131else
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009133LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009135/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009136
Martin v. Löwiseba40652007-08-30 20:10:57 +00009137/* Override any GCC internal prototype to avoid an error.
9138 Use char because int might match the return type of a GCC
9139 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009140#ifdef __cplusplus
9141extern "C"
9142#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009143char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009144int
9145main ()
9146{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 ;
9149 return 0;
9150}
9151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009152if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009153 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009155 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009157rm -f core conftest.err conftest.$ac_objext \
9158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009159LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9162$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009163if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009164 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009165fi
9166 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009167
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009168case "$ac_sys_system" in
9169BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9171$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009172if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009174else
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009176LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009179
Martin v. Löwiseba40652007-08-30 20:10:57 +00009180/* Override any GCC internal prototype to avoid an error.
9181 Use char because int might match the return type of a GCC
9182 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009183#ifdef __cplusplus
9184extern "C"
9185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009186char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009187int
9188main ()
9189{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 ;
9192 return 0;
9193}
9194_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009199fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009200rm -f core conftest.err conftest.$ac_objext \
9201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009202LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9205$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009206if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009207 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009208fi
9209 # BeOS
9210;;
9211esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9214$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009215
Martin v. Löwiseba40652007-08-30 20:10:57 +00009216# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009217if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009218 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9220$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009221LIBS="$withval $LIBS"
9222
9223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9225$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009226fi
9227
Guido van Rossum7f43da71994-08-01 12:15:30 +00009228
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009229
9230
9231
9232
9233
9234
9235
9236if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9237 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009238 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9239set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9241$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009242if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009243 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009244else
9245 case $PKG_CONFIG in
9246 [\\/]* | ?:[\\/]*)
9247 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9248 ;;
9249 *)
9250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9251for as_dir in $PATH
9252do
9253 IFS=$as_save_IFS
9254 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009257 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009259 break 2
9260 fi
9261done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009262 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009263IFS=$as_save_IFS
9264
9265 ;;
9266esac
9267fi
9268PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9269if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9271$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9274$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009275fi
9276
9277
9278fi
9279if test -z "$ac_cv_path_PKG_CONFIG"; then
9280 ac_pt_PKG_CONFIG=$PKG_CONFIG
9281 # Extract the first word of "pkg-config", so it can be a program name with args.
9282set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9284$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009285if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009287else
9288 case $ac_pt_PKG_CONFIG in
9289 [\\/]* | ?:[\\/]*)
9290 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9291 ;;
9292 *)
9293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9294for as_dir in $PATH
9295do
9296 IFS=$as_save_IFS
9297 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009299 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009300 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009302 break 2
9303 fi
9304done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009306IFS=$as_save_IFS
9307
9308 ;;
9309esac
9310fi
9311ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9312if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9314$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009315else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009318fi
9319
9320 if test "x$ac_pt_PKG_CONFIG" = x; then
9321 PKG_CONFIG=""
9322 else
9323 case $cross_compiling:$ac_tool_warned in
9324yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009325{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9326$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009327ac_tool_warned=yes ;;
9328esac
9329 PKG_CONFIG=$ac_pt_PKG_CONFIG
9330 fi
9331else
9332 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9333fi
9334
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009335fi
9336if test -n "$PKG_CONFIG"; then
9337 _pkg_min_version=0.9.0
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9339$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9340 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9342$as_echo "yes" >&6; }
9343 else
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346 PKG_CONFIG=""
9347 fi
9348fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009349
9350# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9352$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009353
9354# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009356 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009357else
9358 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009359fi
9360
9361
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9363$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009364
9365# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9367$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009368
9369# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009370if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009371 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009372else
9373 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009374fi
9375
9376
9377if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009378 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9379else
9380 LIBFFI_INCLUDEDIR=""
9381fi
9382
9383
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9385$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009386
Ned Deilya2a9f572013-10-25 00:30:10 -07009387# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9388
9389
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9391$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9392
9393# Check whether --with-tcltk-includes was given.
9394if test "${with_tcltk_includes+set}" = set; then :
9395 withval=$with_tcltk_includes;
9396else
9397 with_tcltk_includes="default"
9398fi
9399
9400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9401$as_echo "$with_tcltk_includes" >&6; }
9402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9403$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9404
9405# Check whether --with-tcltk-libs was given.
9406if test "${with_tcltk_libs+set}" = set; then :
9407 withval=$with_tcltk_libs;
9408else
9409 with_tcltk_libs="default"
9410fi
9411
9412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9413$as_echo "$with_tcltk_libs" >&6; }
9414if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9415then
9416 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9417 then
9418 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9419 fi
9420 TCLTK_INCLUDES=""
9421 TCLTK_LIBS=""
9422else
9423 TCLTK_INCLUDES="$with_tcltk_includes"
9424 TCLTK_LIBS="$with_tcltk_libs"
9425fi
9426
Benjamin Peterson867475c2009-04-29 20:36:25 +00009427# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9429$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009430
9431# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009432if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009433 withval=$with_dbmliborder;
9434if test x$with_dbmliborder = xyes
9435then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009436as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009437else
9438 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9439 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9440 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009441 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009442 fi
9443 done
9444fi
9445fi
9446
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9448$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009449
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009450# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009451
9452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9454$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009455
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 withval=$with_signal_module;
9459fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009460
9461
9462if test -z "$with_signal_module"
9463then with_signal_module="yes"
9464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9466$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009467
9468if test "${with_signal_module}" = "yes"; then
9469 USE_SIGNAL_MODULE=""
9470 SIGNAL_OBJS=""
9471else
9472 USE_SIGNAL_MODULE="#"
9473 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9474fi
9475
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009476# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009477
Barry Warsawc0d24d82000-06-29 16:12:00 +00009478USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9481$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
Guido van Rossumec2f0731997-01-22 20:54:01 +00009483
Martin v. Löwiseba40652007-08-30 20:10:57 +00009484# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009486 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9488$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009489LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009490if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009491 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009492fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009496fi
9497
Martin v. Löwis11437992002-04-12 09:54:03 +00009498
9499# Templates for things AC_DEFINEd more than once.
9500# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009501
9502
Martin v. Löwis11437992002-04-12 09:54:03 +00009503
9504
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9506$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009507
Martin v. Löwiseba40652007-08-30 20:10:57 +00009508# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009509if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510 withval=$with_threads;
9511fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009512
9513
Barry Warsawc0d24d82000-06-29 16:12:00 +00009514# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009515
Martin v. Löwiseba40652007-08-30 20:10:57 +00009516# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009518 withval=$with_thread; with_threads=$with_thread
9519fi
9520
Barry Warsawc0d24d82000-06-29 16:12:00 +00009521
9522if test -z "$with_threads"
9523then with_threads="yes"
9524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9526$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009527
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009528
Barry Warsawc0d24d82000-06-29 16:12:00 +00009529if test "$with_threads" = "no"
9530then
9531 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009532elif test "$ac_cv_pthread_is_default" = yes
9533then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009534 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009535
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009536 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009538
9539 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009541elif test "$ac_cv_kpthread" = "yes"
9542then
9543 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009544 if test "$ac_cv_cxx_thread" = "yes"; then
9545 CXX="$CXX -Kpthread"
9546 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009548
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009549 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009550 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009551elif test "$ac_cv_kthread" = "yes"
9552then
9553 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009554 if test "$ac_cv_cxx_thread" = "yes"; then
9555 CXX="$CXX -Kthread"
9556 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009558
9559 posix_threads=yes
9560 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009561elif test "$ac_cv_pthread" = "yes"
9562then
9563 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009564 if test "$ac_cv_cxx_thread" = "yes"; then
9565 CXX="$CXX -pthread"
9566 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009568
9569 posix_threads=yes
9570 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009571else
9572 if test ! -z "$with_threads" -a -d "$with_threads"
9573 then LDFLAGS="$LDFLAGS -L$with_threads"
9574 fi
9575 if test ! -z "$withval" -a -d "$withval"
9576 then LDFLAGS="$LDFLAGS -L$withval"
9577 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009578
9579 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009580 # define _POSIX_THREADS in unistd.h. Some apparently don't
9581 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9583$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009585/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009586
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009587#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009588#ifdef _POSIX_THREADS
9589yes
9590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009591
9592_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009595 unistd_defines_pthreads=yes
9596else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009597 unistd_defines_pthreads=no
9598fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009599rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9602$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009605
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009607if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009611
Martin v. Löwis11437992002-04-12 09:54:03 +00009612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009614
9615 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009616 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009617else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009618
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009619 ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009620if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009621 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009622
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009623 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009624
Martin v. Löwis11437992002-04-12 09:54:03 +00009625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009627
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009628 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009629else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009630
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9632$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009633
Martin v. Löwiseba40652007-08-30 20:10:57 +00009634# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635if test "${with_pth+set}" = set; then :
9636 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9637$as_echo "$withval" >&6; }
9638 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009639
9640
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009642
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009643 LIBS="-lpth $LIBS"
9644 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009648
9649 # Just looking for pthread_create in libpthread is not enough:
9650 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9651 # So we really have to include pthread.h, and then link.
9652 _libs=$LIBS
9653 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9655$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009657/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009658
9659#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009660#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009661
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009662void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009663int
9664main ()
9665{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009666
9667pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009673
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9675$as_echo "yes" >&6; }
9676 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009677
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009678 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009679 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009680else
Martin v. Löwis11437992002-04-12 09:54:03 +00009681
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009682 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009684if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009686
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009687 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009688 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009689else
Guido van Rossumad678af1998-10-02 14:42:15 +00009690
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691 ac_fn_c_check_header_mongrel "$LINENO" "atheos/threads.h" "ac_cv_header_atheos_threads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009692if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009693 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009694
9695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009696$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009697
9698 THREADOBJ="Python/thread.o"
9699else
9700
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009701 ac_fn_c_check_header_mongrel "$LINENO" "kernel/OS.h" "ac_cv_header_kernel_OS_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009702if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
9705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009707
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009708 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009709else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009710
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9712$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009713if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009714 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715else
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009717LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721/* Override any GCC internal prototype to avoid an error.
9722 Use char because int might match the return type of a GCC
9723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009724#ifdef __cplusplus
9725extern "C"
9726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009727char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009728int
9729main ()
9730{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009731return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ;
9733 return 0;
9734}
9735_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009739 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009741rm -f core conftest.err conftest.$ac_objext \
9742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009743LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9746$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009747if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009748 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009749
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009750 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009751 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009752 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009753else
Greg Steinadf63d62000-07-05 10:38:09 +00009754
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9756$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009757if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009759else
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009761LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009764
Martin v. Löwiseba40652007-08-30 20:10:57 +00009765/* Override any GCC internal prototype to avoid an error.
9766 Use char because int might match the return type of a GCC
9767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009768#ifdef __cplusplus
9769extern "C"
9770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009771char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009772int
9773main ()
9774{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009775return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ;
9777 return 0;
9778}
9779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009781 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009782else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009783 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009785rm -f core conftest.err conftest.$ac_objext \
9786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9790$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009791if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009792 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009793
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009794 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009795 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009796 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009797else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009798
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9800$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009801if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009805LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009808
Martin v. Löwiseba40652007-08-30 20:10:57 +00009809/* Override any GCC internal prototype to avoid an error.
9810 Use char because int might match the return type of a GCC
9811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009812#ifdef __cplusplus
9813extern "C"
9814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009815char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009816int
9817main ()
9818{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ;
9821 return 0;
9822}
9823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009825 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009827 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009829rm -f core conftest.err conftest.$ac_objext \
9830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009831LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009832fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9834$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009835if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009836 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009837
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009838 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009839 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009840 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009841else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009842
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9844$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009845if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009846 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009847else
Martin v. Löwis11437992002-04-12 09:54:03 +00009848 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009849LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853/* Override any GCC internal prototype to avoid an error.
9854 Use char because int might match the return type of a GCC
9855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009856#ifdef __cplusplus
9857extern "C"
9858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009859char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009860int
9861main ()
9862{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009863return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ;
9865 return 0;
9866}
9867_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009868if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009871 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009873rm -f core conftest.err conftest.$ac_objext \
9874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009875LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9878$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009879if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009880 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009881
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009882 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009883 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009884 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009885else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009886
Martin v. Löwis130fb172001-07-19 11:00:41 +00009887 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009888fi
9889
Guido van Rossum627b2d71993-12-24 10:39:16 +00009890
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009891fi
9892
Guido van Rossum0be3e491997-05-22 20:33:33 +00009893fi
9894
Guido van Rossum49545951997-12-02 19:28:29 +00009895fi
9896
Guido van Rossumb93a8621998-05-07 13:27:32 +00009897fi
9898
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009899
Michael W. Hudson54241132001-12-07 15:38:26 +00009900fi
9901
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009902
9903fi
9904
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009906rm -f core conftest.err conftest.$ac_objext \
9907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908fi
9909
Martin v. Löwis11437992002-04-12 09:54:03 +00009910fi
9911
9912
9913fi
9914
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009915
Michael W. Hudson54241132001-12-07 15:38:26 +00009916
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9918$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009919if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009920 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009921else
Martin v. Löwis11437992002-04-12 09:54:03 +00009922 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009923LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009926
Martin v. Löwiseba40652007-08-30 20:10:57 +00009927/* Override any GCC internal prototype to avoid an error.
9928 Use char because int might match the return type of a GCC
9929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009930#ifdef __cplusplus
9931extern "C"
9932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009933char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009934int
9935main ()
9936{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009937return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 ;
9939 return 0;
9940}
9941_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009942if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009943 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009945 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947rm -f core conftest.err conftest.$ac_objext \
9948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009949LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9952$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009953if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009954 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009955
Martin v. Löwis130fb172001-07-19 11:00:41 +00009956 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009957 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009958 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009959fi
9960
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009961
Neal Norwitza978ab02002-11-02 16:58:05 +00009962 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9964$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009965if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009966 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009967else
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009969LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009972
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973/* Override any GCC internal prototype to avoid an error.
9974 Use char because int might match the return type of a GCC
9975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009976#ifdef __cplusplus
9977extern "C"
9978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009979char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009980int
9981main ()
9982{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009983return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 ;
9985 return 0;
9986}
9987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009991 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993rm -f core conftest.err conftest.$ac_objext \
9994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9998$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009999if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010001
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010002 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010003 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010004 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010005fi
10006
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010007 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010008
Martin v. Löwis130fb172001-07-19 11:00:41 +000010009 if test "$USE_THREAD_MODULE" != "#"
10010 then
10011 # If the above checks didn't disable threads, (at least) OSF1
10012 # needs this '-threads' argument during linking.
10013 case $ac_sys_system in
10014 OSF1) LDLAST=-threads;;
10015 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010016 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010018
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019if test "$posix_threads" = "yes"; then
10020 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010023
10024 fi
10025
10026 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10027 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010028 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010030
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010031 ;;
10032 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010034
10035 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010036 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010037$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010038
10039 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040 esac
10041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10043$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010044 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010047 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010048 ac_cv_pthread_system_supported=no
10049else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010052
10053 #include <stdio.h>
10054 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010055 void *foo(void *parm) {
10056 return NULL;
10057 }
10058 main() {
10059 pthread_attr_t attr;
10060 pthread_t id;
10061 if (pthread_attr_init(&attr)) exit(-1);
10062 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10063 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10064 exit(0);
10065 }
10066_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010068 ac_cv_pthread_system_supported=yes
10069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010070 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010071fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010074fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010075
Martin v. Löwiseba40652007-08-30 20:10:57 +000010076
Guido van Rossum627b2d71993-12-24 10:39:16 +000010077fi
10078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10080$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010081 if test "$ac_cv_pthread_system_supported" = "yes"; then
10082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010083$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010084
10085 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010086 for ac_func in pthread_sigmask
10087do :
10088 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010089if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010090 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010092_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010093 case $ac_sys_system in
10094 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010095
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010096$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010097
10098 ;;
10099 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010100fi
10101done
10102
Christian Heimes0d604cf2013-08-21 13:26:05 +020010103 for ac_func in pthread_atfork
10104do :
10105 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10106if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10107 cat >>confdefs.h <<_ACEOF
10108#define HAVE_PTHREAD_ATFORK 1
10109_ACEOF
10110
10111fi
10112done
10113
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010114fi
10115
10116
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10120$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010122if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10126$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127 ipv6=no
10128 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010129 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10130$as_echo "yes" >&6; }
10131 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132
10133 ipv6=yes
10134 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010135 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010136else
Martin v. Löwis11437992002-04-12 09:54:03 +000010137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010140 /* AF_INET6 available check */
10141#include <sys/types.h>
10142#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010143int
10144main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010145{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010146int domain = AF_INET6;
10147 ;
10148 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010149}
Martin v. Löwis11437992002-04-12 09:54:03 +000010150_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010151if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10154$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010155 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010156
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010157else
Matthias Klosec511b472010-05-08 11:01:39 +000010158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10160$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010161 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010162
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010163fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010165
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010166if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10168$as_echo_n "checking if RFC2553 API is available... " >&6; }
10169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010170/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010171
10172 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010173#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010174int
10175main ()
10176{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010177struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010178 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010179 ;
10180 return 0;
10181}
Matthias Klosec511b472010-05-08 11:01:39 +000010182
Martin v. Löwis11437992002-04-12 09:54:03 +000010183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010185
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010188 ipv6=yes
10189
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010190else
Matthias Klosec511b472010-05-08 11:01:39 +000010191
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010193$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010194 ipv6=no
10195
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010198fi
10199
10200if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010201 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010202
10203fi
10204
Martin v. Löwiseba40652007-08-30 20:10:57 +000010205fi
10206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207
10208ipv6type=unknown
10209ipv6lib=none
10210ipv6trylibc=no
10211
10212if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10214$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010215 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10216 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217 case $i in
10218 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010220/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010221
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222#include <netinet/in.h>
10223#ifdef IPV6_INRIA_VERSION
10224yes
10225#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010226_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010228 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010229 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010230fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010231rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010232
10233 ;;
10234 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010237
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010238#include <netinet/in.h>
10239#ifdef __KAME__
10240yes
10241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010242_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010243if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010244 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010245 ipv6type=$i;
10246 ipv6lib=inet6
10247 ipv6libdir=/usr/local/v6/lib
10248 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010250rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010251
10252 ;;
10253 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010255/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010256
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010257#include <features.h>
10258#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10259yes
10260#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010261_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010263 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010264 ipv6type=$i;
10265 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010267rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268
10269 ;;
10270 linux-inet6)
10271 if test -d /usr/inet6; then
10272 ipv6type=$i
10273 ipv6lib=inet6
10274 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010275 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010276 fi
10277 ;;
10278 solaris)
10279 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010280 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010281 ipv6type=$i
10282 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010283 fi
10284 fi
10285 ;;
10286 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010288/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010289
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010290#include <sys/param.h>
10291#ifdef _TOSHIBA_INET6
10292yes
10293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010294_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010297 ipv6type=$i;
10298 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010299 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010301rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010302
10303 ;;
10304 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010306/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010307
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010308#include </usr/local/v6/include/sys/v6config.h>
10309#ifdef __V6D__
10310yes
10311#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010312_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010313if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010315 ipv6type=$i;
10316 ipv6lib=v6;
10317 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010318 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010320rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010321
10322 ;;
10323 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010325/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010326
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010327#include <sys/param.h>
10328#ifdef _ZETA_MINAMI_INET6
10329yes
10330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010331_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010333 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010334 ipv6type=$i;
10335 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010336 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010337fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010338rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010339
10340 ;;
10341 esac
10342 if test "$ipv6type" != "unknown"; then
10343 break
10344 fi
10345 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10347$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010348fi
10349
10350if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10351 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10352 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10353 echo "using lib$ipv6lib"
10354 else
10355 if test $ipv6trylibc = "yes"; then
10356 echo "using libc"
10357 else
10358 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10359 echo "You need to fetch lib$ipv6lib.a from appropriate"
10360 echo 'ipv6 kit and compile beforehand.'
10361 exit 1
10362 fi
10363 fi
10364fi
10365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10367$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010369/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010370
10371 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010372int
10373main ()
10374{
10375FSIORefNum fRef = 0
10376 ;
10377 return 0;
10378}
Mark Dickinson0712b562010-05-08 19:13:21 +000010379
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010380_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010381if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010382
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10387$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010388
Mark Dickinson0712b562010-05-08 19:13:21 +000010389else
10390
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
10393
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010394fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10396
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010397# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10399$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010400
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010403 withval=$with_doc_strings;
10404fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010405
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010406
10407if test -z "$with_doc_strings"
10408then with_doc_strings="yes"
10409fi
10410if test "$with_doc_strings" != "no"
10411then
10412
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010413$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010414
10415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10417$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010418
Neil Schemenauera35c6882001-02-27 04:45:05 +000010419# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10421$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010422
Martin v. Löwiseba40652007-08-30 20:10:57 +000010423# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010426if test "$withval" != no
10427then
10428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10432$as_echo "yes" >&6; }
10433else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010435fi
10436else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10438$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010439fi
10440
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010441
10442# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10444$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010445
Martin v. Löwiseba40652007-08-30 20:10:57 +000010446# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010448 withval=$with_pymalloc;
10449fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010450
Neil Schemenauera35c6882001-02-27 04:45:05 +000010451
Neil Schemenauer16c22972002-03-22 15:34:49 +000010452if test -z "$with_pymalloc"
10453then with_pymalloc="yes"
10454fi
10455if test "$with_pymalloc" != "no"
10456then
Martin v. Löwis11437992002-04-12 09:54:03 +000010457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010458$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010459
10460fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10462$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010463
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010464# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10466$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010467
10468# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010470 withval=$with_valgrind;
10471else
10472 with_valgrind=no
10473fi
10474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10476$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010477if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010478 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010479if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010482
10483else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010484 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010485
10486fi
10487
10488
10489fi
10490
Barry Warsawef82cd72000-06-30 16:21:01 +000010491# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10493$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010494
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010497 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010498if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010499then
10500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10504$as_echo "yes" >&6; }
10505else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010507fi
10508else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10510$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010511fi
10512
Barry Warsawef82cd72000-06-30 16:21:01 +000010513
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010514# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010515
Guido van Rossum98935bf2001-09-05 19:13:16 +000010516DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010517
Guido van Rossume97ee181999-12-20 21:27:22 +000010518# the dlopen() function means we might want to use dynload_shlib.o. some
10519# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010520for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521do :
10522 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010523if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010524 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010526_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010527
Guido van Rossume97ee181999-12-20 21:27:22 +000010528fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010529done
Guido van Rossume97ee181999-12-20 21:27:22 +000010530
Michael W. Hudson54241132001-12-07 15:38:26 +000010531
Guido van Rossume97ee181999-12-20 21:27:22 +000010532# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10533# loading of modules.
10534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10536$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010537if test -z "$DYNLOADFILE"
10538then
10539 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010540 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10541 if test "$ac_cv_func_dlopen" = yes
10542 then DYNLOADFILE="dynload_shlib.o"
10543 else DYNLOADFILE="dynload_aix.o"
10544 fi
10545 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010546 BeOS*) DYNLOADFILE="dynload_beos.o";;
10547 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010548 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10549 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010550 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010551 *)
10552 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10553 # out any dynamic loading
10554 if test "$ac_cv_func_dlopen" = yes
10555 then DYNLOADFILE="dynload_shlib.o"
10556 else DYNLOADFILE="dynload_stub.o"
10557 fi
10558 ;;
10559 esac
10560fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10562$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010563if test "$DYNLOADFILE" != "dynload_stub.o"
10564then
Martin v. Löwis11437992002-04-12 09:54:03 +000010565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010567
10568fi
10569
Neil Schemenauer4e425612001-06-19 15:44:15 +000010570# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10571
Michael W. Hudson54241132001-12-07 15:38:26 +000010572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10574$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010575if test -z "$MACHDEP_OBJS"
10576then
Jack Jansene578a632001-08-15 01:27:14 +000010577 MACHDEP_OBJS=$extra_machdep_objs
10578else
10579 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10582$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010583
Guido van Rossum627b2d71993-12-24 10:39:16 +000010584# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010585for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10586 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010587 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10588 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010589 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010590 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010591 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010592 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010593 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10594 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010595 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010596 setlocale setregid setreuid setresuid setresgid \
10597 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010598 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010599 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010600 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601do :
10602 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10603ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010604if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010606#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010607_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010608
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010609fi
10610done
10611
Michael W. Hudson54241132001-12-07 15:38:26 +000010612
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010613# For some functions, having a definition is not sufficient, since
10614# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10616$as_echo_n "checking for chroot... " >&6; }
10617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010619#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010620int
10621main ()
10622{
10623void *x=chroot
10624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010629
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631
Matthias Klosec511b472010-05-08 11:01:39 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010634else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010637
10638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10641$as_echo_n "checking for link... " >&6; }
10642cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010643/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010644#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010645int
10646main ()
10647{
10648void *x=link
10649 ;
10650 return 0;
10651}
10652_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010653if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010656
Matthias Klosec511b472010-05-08 11:01:39 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010658$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010662
10663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10666$as_echo_n "checking for symlink... " >&6; }
10667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010669#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010670int
10671main ()
10672{
10673void *x=symlink
10674 ;
10675 return 0;
10676}
10677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010681
Matthias Klosec511b472010-05-08 11:01:39 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010683$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010687
10688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10691$as_echo_n "checking for fchdir... " >&6; }
10692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010693/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010694#include <unistd.h>
10695int
10696main ()
10697{
10698void *x=fchdir
10699 ;
10700 return 0;
10701}
10702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010703if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010704
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010706
Matthias Klosec511b472010-05-08 11:01:39 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010708$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10711$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010712
10713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10716$as_echo_n "checking for fsync... " >&6; }
10717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010718/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010719#include <unistd.h>
10720int
10721main ()
10722{
10723void *x=fsync
10724 ;
10725 return 0;
10726}
10727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010728if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010731
Matthias Klosec511b472010-05-08 11:01:39 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010733$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10736$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010737
10738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10741$as_echo_n "checking for fdatasync... " >&6; }
10742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010743/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010744#include <unistd.h>
10745int
10746main ()
10747{
10748void *x=fdatasync
10749 ;
10750 return 0;
10751}
10752_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010753if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010754
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010756
Matthias Klosec511b472010-05-08 11:01:39 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010758$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010762
10763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10766$as_echo_n "checking for epoll... " >&6; }
10767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010768/* end confdefs.h. */
10769#include <sys/epoll.h>
10770int
10771main ()
10772{
10773void *x=epoll_create
10774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010780$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010781
Matthias Klosec511b472010-05-08 11:01:39 +000010782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010783$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010784else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10786$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010787
10788fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10791$as_echo_n "checking for kqueue... " >&6; }
10792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010793/* end confdefs.h. */
10794
10795#include <sys/types.h>
10796#include <sys/event.h>
10797
10798int
10799main ()
10800{
10801int x=kqueue()
10802 ;
10803 return 0;
10804}
10805_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010806if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010808$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010809
Matthias Klosec511b472010-05-08 11:01:39 +000010810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10814$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010815
10816fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010818# On some systems (eg. FreeBSD 5), we would find a definition of the
10819# functions ctermid_r, setgroups in the library, but no prototype
10820# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10821# address to avoid compiler warnings and potential miscompilations
10822# because of the missing prototypes.
10823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10825$as_echo_n "checking for ctermid_r... " >&6; }
10826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010827/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010828
Martin v. Löwisd5843682002-11-21 20:41:28 +000010829#include <stdio.h>
10830
Martin v. Löwisd5843682002-11-21 20:41:28 +000010831int
10832main ()
10833{
10834void* p = ctermid_r
10835 ;
10836 return 0;
10837}
10838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010842
Matthias Klosec511b472010-05-08 11:01:39 +000010843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010844$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10847$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010848
10849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10851
Antoine Pitroub170f172010-09-10 18:47:36 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10853$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010854if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010855 $as_echo_n "(cached) " >&6
10856else
10857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010859#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010860int
10861main ()
10862{
10863void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010864
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010865 ;
10866 return 0;
10867}
10868_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010870 ac_cv_flock_decl=yes
10871else
10872 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010873
10874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010876
Antoine Pitroub170f172010-09-10 18:47:36 +000010877fi
10878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10879$as_echo "$ac_cv_flock_decl" >&6; }
10880if test "x${ac_cv_flock_decl}" = xyes; then
10881 for ac_func in flock
10882do :
10883 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010884if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010885 cat >>confdefs.h <<_ACEOF
10886#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010887_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010888
Antoine Pitrou85729812010-09-07 14:55:24 +000010889else
Antoine Pitroub170f172010-09-10 18:47:36 +000010890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010891$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010892if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010893 $as_echo_n "(cached) " >&6
10894else
10895 ac_check_lib_save_LIBS=$LIBS
10896LIBS="-lbsd $LIBS"
10897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10898/* end confdefs.h. */
10899
10900/* Override any GCC internal prototype to avoid an error.
10901 Use char because int might match the return type of a GCC
10902 builtin and then its argument prototype would still apply. */
10903#ifdef __cplusplus
10904extern "C"
10905#endif
10906char flock ();
10907int
10908main ()
10909{
10910return flock ();
10911 ;
10912 return 0;
10913}
10914_ACEOF
10915if ac_fn_c_try_link "$LINENO"; then :
10916 ac_cv_lib_bsd_flock=yes
10917else
10918 ac_cv_lib_bsd_flock=no
10919fi
10920rm -f core conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
10922LIBS=$ac_check_lib_save_LIBS
10923fi
10924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10925$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010926if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010927 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010928
10929
10930$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10931
10932
10933fi
10934
10935
10936fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010937done
10938
Antoine Pitrou85729812010-09-07 14:55:24 +000010939fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10942$as_echo_n "checking for getpagesize... " >&6; }
10943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010944/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010945
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010946#include <unistd.h>
10947
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010948int
10949main ()
10950{
10951void* p = getpagesize
10952 ;
10953 return 0;
10954}
10955_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010957
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010958$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010959
Matthias Klosec511b472010-05-08 11:01:39 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010965
10966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010968
Charles-François Natali93a11752011-11-27 13:01:35 +010010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10970$as_echo_n "checking for broken unsetenv... " >&6; }
10971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10972/* end confdefs.h. */
10973
10974#include <stdlib.h>
10975
10976int
10977main ()
10978{
10979int res = unsetenv("DUMMY")
10980 ;
10981 return 0;
10982}
10983_ACEOF
10984if ac_fn_c_try_compile "$LINENO"; then :
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10986$as_echo "no" >&6; }
10987else
10988
10989$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10990
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10992$as_echo "yes" >&6; }
10993
10994fi
10995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10996
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010997for ac_prog in true
10998do
10999 # Extract the first word of "$ac_prog", so it can be a program name with args.
11000set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11002$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011003if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011005else
11006 if test -n "$TRUE"; then
11007 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11008else
11009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11010for as_dir in $PATH
11011do
11012 IFS=$as_save_IFS
11013 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011014 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011016 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011017 $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 +000011018 break 2
11019 fi
11020done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011021 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011023
11024fi
11025fi
11026TRUE=$ac_cv_prog_TRUE
11027if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11029$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11032$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011033fi
11034
Martin v. Löwiseba40652007-08-30 20:10:57 +000011035
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011036 test -n "$TRUE" && break
11037done
11038test -n "$TRUE" || TRUE="/bin/true"
11039
11040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11042$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011043if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011045else
11046 ac_check_lib_save_LIBS=$LIBS
11047LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011050
Martin v. Löwiseba40652007-08-30 20:10:57 +000011051/* Override any GCC internal prototype to avoid an error.
11052 Use char because int might match the return type of a GCC
11053 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011054#ifdef __cplusplus
11055extern "C"
11056#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011057char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011058int
11059main ()
11060{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011062 ;
11063 return 0;
11064}
11065_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011066if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011067 ac_cv_lib_c_inet_aton=yes
11068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011069 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071rm -f core conftest.err conftest.$ac_objext \
11072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073LIBS=$ac_check_lib_save_LIBS
11074fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11076$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011077if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011078 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11081$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011082if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084else
11085 ac_check_lib_save_LIBS=$LIBS
11086LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011088/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011089
Martin v. Löwiseba40652007-08-30 20:10:57 +000011090/* Override any GCC internal prototype to avoid an error.
11091 Use char because int might match the return type of a GCC
11092 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011093#ifdef __cplusplus
11094extern "C"
11095#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011096char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011097int
11098main ()
11099{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011100return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011101 ;
11102 return 0;
11103}
11104_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011106 ac_cv_lib_resolv_inet_aton=yes
11107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011109fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110rm -f core conftest.err conftest.$ac_objext \
11111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011112LIBS=$ac_check_lib_save_LIBS
11113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11115$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011116if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011117 cat >>confdefs.h <<_ACEOF
11118#define HAVE_LIBRESOLV 1
11119_ACEOF
11120
11121 LIBS="-lresolv $LIBS"
11122
11123fi
11124
11125
11126fi
11127
11128
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011129# On Tru64, chflags seems to be present, but calling it will
11130# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11132$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011133if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011136 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011137 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011140/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011141
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011142#include <sys/stat.h>
11143#include <unistd.h>
11144int main(int argc, char*argv[])
11145{
11146 if(chflags(argv[0], 0) != 0)
11147 return 1;
11148 return 0;
11149}
Ned Deily43e10542011-06-27 23:41:53 -070011150
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011152if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011153 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11158 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011159fi
11160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011161
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011162fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11164$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011165if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011166 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011167if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011168 ac_cv_have_chflags="yes"
11169else
11170 ac_cv_have_chflags="no"
11171fi
11172
11173fi
11174if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011177
11178fi
11179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11181$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011182if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011183 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011186 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011189/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011190
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011191#include <sys/stat.h>
11192#include <unistd.h>
11193int main(int argc, char*argv[])
11194{
11195 if(lchflags(argv[0], 0) != 0)
11196 return 1;
11197 return 0;
11198}
Ned Deily43e10542011-06-27 23:41:53 -070011199
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011200_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011201if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011202 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011205fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011208fi
11209
11210
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11213$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011214if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011216if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011217 ac_cv_have_lchflags="yes"
11218else
11219 ac_cv_have_lchflags="no"
11220fi
11221
11222fi
11223if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011226
11227fi
11228
Ronald Oussorenf8752642006-07-06 10:13:35 +000011229case $ac_sys_system/$ac_sys_release in
11230Darwin/*)
11231 _CUR_CFLAGS="${CFLAGS}"
11232 _CUR_LDFLAGS="${LDFLAGS}"
11233 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11234 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11235 ;;
11236esac
11237
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11239$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011240if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011242else
11243 ac_check_lib_save_LIBS=$LIBS
11244LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011246/* end confdefs.h. */
11247
Martin v. Löwiseba40652007-08-30 20:10:57 +000011248/* Override any GCC internal prototype to avoid an error.
11249 Use char because int might match the return type of a GCC
11250 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011251#ifdef __cplusplus
11252extern "C"
11253#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011254char inflateCopy ();
11255int
11256main ()
11257{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011258return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011259 ;
11260 return 0;
11261}
11262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011263if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011264 ac_cv_lib_z_inflateCopy=yes
11265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011266 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011267fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268rm -f core conftest.err conftest.$ac_objext \
11269 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011270LIBS=$ac_check_lib_save_LIBS
11271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11273$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011274if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011277
11278fi
11279
11280
Ronald Oussorenf8752642006-07-06 10:13:35 +000011281case $ac_sys_system/$ac_sys_release in
11282Darwin/*)
11283 CFLAGS="${_CUR_CFLAGS}"
11284 LDFLAGS="${_CUR_LDFLAGS}"
11285 ;;
11286esac
11287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11289$as_echo_n "checking for hstrerror... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011292
Martin v. Löwise9416172003-05-03 10:12:45 +000011293#include <netdb.h>
11294
Martin v. Löwise9416172003-05-03 10:12:45 +000011295int
11296main ()
11297{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011298void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011299 ;
11300 return 0;
11301}
11302_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011306
Matthias Klosec511b472010-05-08 11:01:39 +000011307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011309else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11311$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011312
11313fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011314rm -f core conftest.err conftest.$ac_objext \
11315 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011316
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11318$as_echo_n "checking for inet_aton... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011321
Martin v. Löwis86d66262006-02-17 08:40:11 +000011322#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011323#include <sys/socket.h>
11324#include <netinet/in.h>
11325#include <arpa/inet.h>
11326
Martin v. Löwise9416172003-05-03 10:12:45 +000011327int
11328main ()
11329{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011330void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011331 ;
11332 return 0;
11333}
11334_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011335if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011338
Matthias Klosec511b472010-05-08 11:01:39 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011340$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11343$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011344
11345fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346rm -f core conftest.err conftest.$ac_objext \
11347 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11350$as_echo_n "checking for inet_pton... " >&6; }
11351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011352/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011353
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011354#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011355#include <sys/socket.h>
11356#include <netinet/in.h>
11357#include <arpa/inet.h>
11358
Martin v. Löwise9416172003-05-03 10:12:45 +000011359int
11360main ()
11361{
11362void* p = inet_pton
11363 ;
11364 return 0;
11365}
11366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011369$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011370
Matthias Klosec511b472010-05-08 11:01:39 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11375$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011376
11377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011379
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011380# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11382$as_echo_n "checking for setgroups... " >&6; }
11383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011385
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011386#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011387#ifdef HAVE_GRP_H
11388#include <grp.h>
11389#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390
Martin v. Löwisd5843682002-11-21 20:41:28 +000011391int
11392main ()
11393{
11394void* p = setgroups
11395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011402
Matthias Klosec511b472010-05-08 11:01:39 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011408
11409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011411
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011412# check for openpty and forkpty
11413
11414for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011415do :
11416 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011417if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011418 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011420_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011421
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11424$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011425if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011427else
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011429LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011432
Martin v. Löwiseba40652007-08-30 20:10:57 +000011433/* Override any GCC internal prototype to avoid an error.
11434 Use char because int might match the return type of a GCC
11435 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011436#ifdef __cplusplus
11437extern "C"
11438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011439char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011440int
11441main ()
11442{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011444 ;
11445 return 0;
11446}
11447_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011449 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011450else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011452fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453rm -f core conftest.err conftest.$ac_objext \
11454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011455LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011456fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11458$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011459if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011461 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11464$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011465if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011467else
11468 ac_check_lib_save_LIBS=$LIBS
11469LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011471/* end confdefs.h. */
11472
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473/* Override any GCC internal prototype to avoid an error.
11474 Use char because int might match the return type of a GCC
11475 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011476#ifdef __cplusplus
11477extern "C"
11478#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011479char openpty ();
11480int
11481main ()
11482{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011483return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011489 ac_cv_lib_bsd_openpty=yes
11490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493rm -f core conftest.err conftest.$ac_objext \
11494 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011495LIBS=$ac_check_lib_save_LIBS
11496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11498$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011499if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011501 LIBS="$LIBS -lbsd"
11502fi
11503
11504
11505fi
11506
Fred Drake8cef4cf2000-06-28 16:40:38 +000011507
11508fi
11509done
11510
11511for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011512do :
11513 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011514if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011515 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011517_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011518
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11521$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011522if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011523 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011524else
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011526LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Martin v. Löwiseba40652007-08-30 20:10:57 +000011530/* Override any GCC internal prototype to avoid an error.
11531 Use char because int might match the return type of a GCC
11532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011533#ifdef __cplusplus
11534extern "C"
11535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011536char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011537int
11538main ()
11539{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011540return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011541 ;
11542 return 0;
11543}
11544_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011549fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550rm -f core conftest.err conftest.$ac_objext \
11551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011552LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11555$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011556if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011557 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011558 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11561$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011562if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011563 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011564else
11565 ac_check_lib_save_LIBS=$LIBS
11566LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011568/* end confdefs.h. */
11569
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570/* Override any GCC internal prototype to avoid an error.
11571 Use char because int might match the return type of a GCC
11572 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011573#ifdef __cplusplus
11574extern "C"
11575#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011576char forkpty ();
11577int
11578main ()
11579{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011580return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011581 ;
11582 return 0;
11583}
11584_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011586 ac_cv_lib_bsd_forkpty=yes
11587else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011588 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011589fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590rm -f core conftest.err conftest.$ac_objext \
11591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011592LIBS=$ac_check_lib_save_LIBS
11593fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11595$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011596if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011598 LIBS="$LIBS -lbsd"
11599fi
11600
11601
11602fi
11603
Fred Drake8cef4cf2000-06-28 16:40:38 +000011604
11605fi
11606done
11607
Jack Jansendd19cf82001-12-06 22:36:17 +000011608
Brett Cannonaa5778d2008-03-18 04:09:00 +000011609# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011610for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611do :
11612 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011613if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011614 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011615#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011616_ACEOF
11617
11618fi
11619done
11620
11621
Michael W. Hudson54241132001-12-07 15:38:26 +000011622# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011623for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011624do :
11625 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11626ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011627if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011630_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011631
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011632fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011633done
11634
Michael W. Hudson54241132001-12-07 15:38:26 +000011635
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011636ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011637if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011638 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011639
Martin v. Löwis1142de32002-03-29 16:28:31 +000011640else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011641 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011642 *" dup2.$ac_objext "* ) ;;
11643 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011644 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011645esac
11646
Martin v. Löwis1142de32002-03-29 16:28:31 +000011647fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011648
11649ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011650if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011651 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11652
11653else
11654 case " $LIBOBJS " in
11655 *" getcwd.$ac_objext "* ) ;;
11656 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11657 ;;
11658esac
11659
11660fi
11661
11662ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011663if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011664 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11665
11666else
11667 case " $LIBOBJS " in
11668 *" strdup.$ac_objext "* ) ;;
11669 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11670 ;;
11671esac
11672
11673fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011674
11675
11676for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677do :
11678 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011679if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011682_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011684/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011685#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011686int
11687main ()
11688{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011689getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 ;
11691 return 0;
11692}
11693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011695
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011697
Guido van Rossum627b2d71993-12-24 10:39:16 +000011698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011700
Guido van Rossum627b2d71993-12-24 10:39:16 +000011701fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011702done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011703
Jack Jansen150753c2003-03-29 22:07:47 +000011704for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011705do :
11706 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011707if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011708 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011709#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011712/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011713#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011714int
11715main ()
11716{
11717setpgrp(0,0);
11718 ;
11719 return 0;
11720}
11721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011723
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011725
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011728
11729fi
11730done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011731
Thomas Wouters3a584202000-08-05 23:28:51 +000011732for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733do :
11734 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011735if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011736 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011737#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011740/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011741#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011742int
11743main ()
11744{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011745gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011746 ;
11747 return 0;
11748}
11749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011750if ac_fn_c_try_compile "$LINENO"; then :
11751
Guido van Rossum627b2d71993-12-24 10:39:16 +000011752else
Skip Montanaro6dead952003-09-25 14:50:04 +000011753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011755
Martin v. Löwis11437992002-04-12 09:54:03 +000011756
Guido van Rossum627b2d71993-12-24 10:39:16 +000011757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011760fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011761done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762
Michael W. Hudson54241132001-12-07 15:38:26 +000011763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11765$as_echo_n "checking for major... " >&6; }
11766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011767/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011768
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011769#if defined(MAJOR_IN_MKDEV)
11770#include <sys/mkdev.h>
11771#elif defined(MAJOR_IN_SYSMACROS)
11772#include <sys/sysmacros.h>
11773#else
11774#include <sys/types.h>
11775#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011776
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011777int
11778main ()
11779{
11780
11781 makedev(major(0),minor(0));
11782
11783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011787if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011788
11789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011790$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11793$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011794
11795else
Skip Montanaro6dead952003-09-25 14:50:04 +000011796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11798$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011799
11800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801rm -f core conftest.err conftest.$ac_objext \
11802 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011803
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011804# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011805# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11807$as_echo_n "checking for getaddrinfo... " >&6; }
11808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011809/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011810
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011811#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011812#include <sys/socket.h>
11813#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011814#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011815
Martin v. Löwis11437992002-04-12 09:54:03 +000011816int
11817main ()
11818{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011819getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 ;
11821 return 0;
11822}
11823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011825 have_getaddrinfo=yes
11826else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011827 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829rm -f core conftest.err conftest.$ac_objext \
11830 conftest$ac_exeext conftest.$ac_ext
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11832$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011833if test $have_getaddrinfo = yes
11834then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11836$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011837 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011838 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011841
11842if test "${enable_ipv6+set}" = set; then
11843 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11844else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011845 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011846fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011847else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011849/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011850
Stefan Krah0afe4e42012-11-22 23:56:51 +010011851#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011852#include <sys/types.h>
11853#include <netdb.h>
11854#include <string.h>
11855#include <sys/socket.h>
11856#include <netinet/in.h>
11857
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011858int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011859{
11860 int passive, gaierr, inet4 = 0, inet6 = 0;
11861 struct addrinfo hints, *ai, *aitop;
11862 char straddr[INET6_ADDRSTRLEN], strport[16];
11863
11864 for (passive = 0; passive <= 1; passive++) {
11865 memset(&hints, 0, sizeof(hints));
11866 hints.ai_family = AF_UNSPEC;
11867 hints.ai_flags = passive ? AI_PASSIVE : 0;
11868 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011869 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011870 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11871 (void)gai_strerror(gaierr);
11872 goto bad;
11873 }
11874 for (ai = aitop; ai; ai = ai->ai_next) {
11875 if (ai->ai_addr == NULL ||
11876 ai->ai_addrlen == 0 ||
11877 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11878 straddr, sizeof(straddr), strport, sizeof(strport),
11879 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11880 goto bad;
11881 }
11882 switch (ai->ai_family) {
11883 case AF_INET:
11884 if (strcmp(strport, "54321") != 0) {
11885 goto bad;
11886 }
11887 if (passive) {
11888 if (strcmp(straddr, "0.0.0.0") != 0) {
11889 goto bad;
11890 }
11891 } else {
11892 if (strcmp(straddr, "127.0.0.1") != 0) {
11893 goto bad;
11894 }
11895 }
11896 inet4++;
11897 break;
11898 case AF_INET6:
11899 if (strcmp(strport, "54321") != 0) {
11900 goto bad;
11901 }
11902 if (passive) {
11903 if (strcmp(straddr, "::") != 0) {
11904 goto bad;
11905 }
11906 } else {
11907 if (strcmp(straddr, "::1") != 0) {
11908 goto bad;
11909 }
11910 }
11911 inet6++;
11912 break;
11913 case AF_UNSPEC:
11914 goto bad;
11915 break;
11916 default:
11917 /* another family support? */
11918 break;
11919 }
11920 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011921 freeaddrinfo(aitop);
11922 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923 }
11924
11925 if (!(inet4 == 0 || inet4 == 2))
11926 goto bad;
11927 if (!(inet6 == 0 || inet6 == 2))
11928 goto bad;
11929
11930 if (aitop)
11931 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011932 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011933
11934 bad:
11935 if (aitop)
11936 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011937 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011938}
11939
Martin v. Löwis11437992002-04-12 09:54:03 +000011940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011942 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011949
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011950fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011953
Benjamin Peterson75fed812010-11-01 01:47:19 +000011954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11955$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11956
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011957if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011958then
11959 if test $ipv6 = yes
11960 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011961 echo 'Fatal: You must get working getaddrinfo() function.'
11962 echo ' or you can specify "--disable-ipv6"'.
11963 exit 1
11964 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011965else
Martin v. Löwis11437992002-04-12 09:54:03 +000011966
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011967$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011968
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011969fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011970
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011971for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972do :
11973 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011974if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011977_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011978
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011979fi
11980done
11981
Michael W. Hudson54241132001-12-07 15:38:26 +000011982
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011983# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11985$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011986if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011991#include <sys/types.h>
11992#include <sys/time.h>
11993#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011994
Martin v. Löwis11437992002-04-12 09:54:03 +000011995int
11996main ()
11997{
11998if ((struct tm *) 0)
11999return 0;
12000 ;
12001 return 0;
12002}
12003_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012005 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12012$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012013if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012015$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016
12017fi
12018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12020$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012021if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012025/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012026#include <sys/types.h>
12027#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
Martin v. Löwis11437992002-04-12 09:54:03 +000012029int
12030main ()
12031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012032struct tm tm;
12033 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012034 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012035 ;
12036 return 0;
12037}
12038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012040 ac_cv_struct_tm=time.h
12041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12047$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012048if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012050$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012051
12052fi
12053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054ac_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 +000012055#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012057"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012058if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012059
12060cat >>confdefs.h <<_ACEOF
12061#define HAVE_STRUCT_TM_TM_ZONE 1
12062_ACEOF
12063
12064
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012065fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012066
Martin v. Löwis11437992002-04-12 09:54:03 +000012067if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012070
12071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12073"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012074if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012077 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012078fi
12079
Martin v. Löwiseba40652007-08-30 20:10:57 +000012080cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082_ACEOF
12083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12085$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012086if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012087 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012090/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012091#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012092#if !HAVE_DECL_TZNAME
12093extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
Martin v. Löwis11437992002-04-12 09:54:03 +000012096int
12097main ()
12098{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012099return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 ;
12101 return 0;
12102}
12103_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105 ac_cv_var_tzname=yes
12106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012107 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012108fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109rm -f core conftest.err conftest.$ac_objext \
12110 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012111fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12113$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012114 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012117
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012118 fi
12119fi
12120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012122if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012123
12124cat >>confdefs.h <<_ACEOF
12125#define HAVE_STRUCT_STAT_ST_RDEV 1
12126_ACEOF
12127
12128
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012129fi
12130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012131ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012132if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012133
Martin v. Löwis11437992002-04-12 09:54:03 +000012134cat >>confdefs.h <<_ACEOF
12135#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12136_ACEOF
12137
12138
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012139fi
12140
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012141ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012142if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012143
12144cat >>confdefs.h <<_ACEOF
12145#define HAVE_STRUCT_STAT_ST_FLAGS 1
12146_ACEOF
12147
12148
12149fi
12150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012151ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012152if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012153
12154cat >>confdefs.h <<_ACEOF
12155#define HAVE_STRUCT_STAT_ST_GEN 1
12156_ACEOF
12157
12158
12159fi
12160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012162if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012163
12164cat >>confdefs.h <<_ACEOF
12165#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12166_ACEOF
12167
12168
12169fi
12170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012172if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012173
Martin v. Löwis11437992002-04-12 09:54:03 +000012174cat >>confdefs.h <<_ACEOF
12175#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12176_ACEOF
12177
12178
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012179fi
12180
Michael W. Hudson54241132001-12-07 15:38:26 +000012181
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12183$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012184if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012185 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012186else
Matthias Klosec511b472010-05-08 11:01:39 +000012187
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012189/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012190#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012191int
12192main ()
12193{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012194return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 ;
12196 return 0;
12197}
12198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200 ac_cv_header_time_altzone=yes
12201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012205
Martin v. Löwiseba40652007-08-30 20:10:57 +000012206fi
12207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12209$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012210if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012212$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012213
12214fi
12215
Guido van Rossumda88dad1995-01-26 00:46:29 +000012216was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12218$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012220/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012221
12222#include <sys/types.h>
12223#include <sys/select.h>
12224#include <sys/time.h>
12225
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229;
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 ;
12231 return 0;
12232}
12233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
12236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012238
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012239 was_it_defined=yes
12240
Martin v. Löwiseba40652007-08-30 20:10:57 +000012241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12244$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12247$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012248if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012252/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012253#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012254int
12255main ()
12256{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012257struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 ;
12259 return 0;
12260}
12261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263 ac_cv_struct_addrinfo=yes
12264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12268fi
12269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12271$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012272if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012274$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012275
12276fi
12277
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12279$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012280if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012285
12286# include <sys/types.h>
12287# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012288int
12289main ()
12290{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012291struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012292 ;
12293 return 0;
12294}
12295_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012297 ac_cv_struct_sockaddr_storage=yes
12298else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012300fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12302fi
12303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12305$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012306if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012309
12310fi
12311
Guido van Rossum627b2d71993-12-24 10:39:16 +000012312# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12315$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012316if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012317 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012321$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012322int
12323main ()
12324{
12325static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012326test_array [0] = 0;
12327return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012328
12329 ;
12330 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012331}
Martin v. Löwis11437992002-04-12 09:54:03 +000012332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012333if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012334 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012336 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012339fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12341$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012343 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344
12345fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12348$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012349if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012350 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012351else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012353/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355int
12356main ()
12357{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012358
Martin v. Löwis11437992002-04-12 09:54:03 +000012359#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012360 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012362 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012363 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012364 char const *const *pcpcc;
12365 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 /* NEC SVR4.0.2 mips cc rejects this. */
12367 struct point {int x, y;};
12368 static struct point const zero = {0,0};
12369 /* AIX XL C 1.02.0.0 rejects this.
12370 It does not let you subtract one const X* pointer from another in
12371 an arm of an if-expression whose if-part is not a constant
12372 expression */
12373 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012374 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012375 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376 ++pcpcc;
12377 ppc = (char**) pcpcc;
12378 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012379 { /* SCO 3.2v4 cc rejects this sort of thing. */
12380 char tx;
12381 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 }
12387 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12388 int x[] = {25, 17};
12389 const int *foo = &x[0];
12390 ++foo;
12391 }
12392 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12393 typedef const int *iptr;
12394 iptr p = 0;
12395 ++p;
12396 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012397 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012398 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012399 struct s { int j; const int *ap[3]; } bx;
12400 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012401 }
12402 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12403 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012404 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012405 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012406 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012407#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 ;
12410 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012411}
Martin v. Löwis11437992002-04-12 09:54:03 +000012412_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012413if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012414 ac_cv_c_const=yes
12415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12421$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012422if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012424$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425
12426fi
12427
Michael W. Hudson54241132001-12-07 15:38:26 +000012428
Guido van Rossumda88dad1995-01-26 00:46:29 +000012429works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12431$as_echo_n "checking for working volatile... " >&6; }
12432cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012434
Martin v. Löwis11437992002-04-12 09:54:03 +000012435int
12436main ()
12437{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012444 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012445else
Skip Montanaro6dead952003-09-25 14:50:04 +000012446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012448
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012449
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12453$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012454
Guido van Rossumda88dad1995-01-26 00:46:29 +000012455works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12457$as_echo_n "checking for working signed char... " >&6; }
12458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012459/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461int
12462main ()
12463{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012464signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 ;
12466 return 0;
12467}
12468_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012469if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012470 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012471else
Skip Montanaro6dead952003-09-25 14:50:04 +000012472
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012473$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012474
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012475
Guido van Rossum7f43da71994-08-01 12:15:30 +000012476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12479$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012480
Guido van Rossumda88dad1995-01-26 00:46:29 +000012481have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12483$as_echo_n "checking for prototypes... " >&6; }
12484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012485/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012486int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012487int
12488main ()
12489{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012491 ;
12492 return 0;
12493}
12494_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012497$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012498
Matthias Klosec511b472010-05-08 11:01:39 +000012499 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12503$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504
Guido van Rossumda88dad1995-01-26 00:46:29 +000012505works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12507$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012509/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012510
12511#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012512int foo(int x, ...) {
12513 va_list va;
12514 va_start(va, x);
12515 va_arg(va, int);
12516 va_arg(va, char *);
12517 va_arg(va, double);
12518 return 0;
12519}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012520
Martin v. Löwis11437992002-04-12 09:54:03 +000012521int
12522main ()
12523{
Guido van Rossum90eea071996-08-30 20:58:57 +000012524return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
12531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012534 works=yes
12535
Guido van Rossum627b2d71993-12-24 10:39:16 +000012536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12539$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012540
Martin v. Löwisd6320502004-08-12 13:45:08 +000012541# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12543$as_echo_n "checking for socketpair... " >&6; }
12544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012545/* end confdefs.h. */
12546
12547#include <sys/types.h>
12548#include <sys/socket.h>
12549
12550int
12551main ()
12552{
12553void *x=socketpair
12554 ;
12555 return 0;
12556}
12557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012560$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012561
Matthias Klosec511b472010-05-08 11:01:39 +000012562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012563$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012564else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12566$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012567
12568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012570
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012571# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12573$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012576#include <sys/types.h>
12577#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012578int
12579main ()
12580{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012581struct sockaddr x;
12582x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 ;
12584 return 0;
12585}
12586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012587if ac_fn_c_try_compile "$LINENO"; then :
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12589$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012591$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012592
12593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12595$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012596
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012599
Guido van Rossumda88dad1995-01-26 00:46:29 +000012600va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12602$as_echo_n "checking whether va_list is an array... " >&6; }
12603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
12606#ifdef HAVE_STDARG_PROTOTYPES
12607#include <stdarg.h>
12608#else
12609#include <varargs.h>
12610#endif
12611
Martin v. Löwis11437992002-04-12 09:54:03 +000012612int
12613main ()
12614{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012615va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 ;
12617 return 0;
12618}
12619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012620if ac_fn_c_try_compile "$LINENO"; then :
12621
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012622else
Skip Montanaro6dead952003-09-25 14:50:04 +000012623
Martin v. Löwis11437992002-04-12 09:54:03 +000012624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012625$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012626
Guido van Rossumda88dad1995-01-26 00:46:29 +000012627 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012628
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12632$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012634# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012635
12636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012638if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12643$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012644 OLD_CFLAGS=$CFLAGS
12645 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012647/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012648
12649# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012650
Martin v. Löwis11437992002-04-12 09:54:03 +000012651int
12652main ()
12653{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012654
12655 char *name;
12656 struct hostent *he, *res;
12657 char buffer[2048];
12658 int buflen = 2048;
12659 int h_errnop;
12660
12661 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
12663 ;
12664 return 0;
12665}
12666_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012669 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012670
Martin v. Löwis11437992002-04-12 09:54:03 +000012671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012672$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12675$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012676
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012677else
Skip Montanaro6dead952003-09-25 14:50:04 +000012678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
12681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12682$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012684/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012685
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012686# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012687
Martin v. Löwis11437992002-04-12 09:54:03 +000012688int
12689main ()
12690{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012691
12692 char *name;
12693 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012694 char buffer[2048];
12695 int buflen = 2048;
12696 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012697
Matthias Klosec511b472010-05-08 11:01:39 +000012698 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012699
12700 ;
12701 return 0;
12702}
12703_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012704if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012707
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Matthias Klosec511b472010-05-08 11:01:39 +000012709$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12712$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012714else
Skip Montanaro6dead952003-09-25 14:50:04 +000012715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12717$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12719$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721/* end confdefs.h. */
12722
12723# include <netdb.h>
12724
12725int
12726main ()
12727{
12728
12729 char *name;
12730 struct hostent *he;
12731 struct hostent_data data;
12732
12733 (void) gethostbyname_r(name, he, &data);
12734
12735 ;
12736 return 0;
12737}
12738_ACEOF
12739if ac_fn_c_try_compile "$LINENO"; then :
12740
12741 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12742
12743
12744$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12745
12746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12747$as_echo "yes" >&6; }
12748
12749else
12750
12751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12752$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012759
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012760fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012762 CFLAGS=$OLD_CFLAGS
12763
12764else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 for ac_func in gethostbyname
12767do :
12768 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012769if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012772_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012773
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012774fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012775done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012776
Michael W. Hudson54241132001-12-07 15:38:26 +000012777
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012778fi
12779
Michael W. Hudson54241132001-12-07 15:38:26 +000012780
12781
12782
12783
12784
12785
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786# checks for system services
12787# (none yet)
12788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012791if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012792
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12795$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012796if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012797 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798else
Martin v. Löwis11437992002-04-12 09:54:03 +000012799 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012800LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012803
Martin v. Löwiseba40652007-08-30 20:10:57 +000012804/* Override any GCC internal prototype to avoid an error.
12805 Use char because int might match the return type of a GCC
12806 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012807#ifdef __cplusplus
12808extern "C"
12809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012810char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012811int
12812main ()
12813{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012814return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ;
12816 return 0;
12817}
12818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012820 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012821else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012822 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012823fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824rm -f core conftest.err conftest.$ac_objext \
12825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012826LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012827fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12829$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012830if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012831 cat >>confdefs.h <<_ACEOF
12832#define HAVE_LIBIEEE 1
12833_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012834
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012835 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012836
Guido van Rossum627b2d71993-12-24 10:39:16 +000012837fi
12838
Michael W. Hudson54241132001-12-07 15:38:26 +000012839
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012840fi
12841
Michael W. Hudson54241132001-12-07 15:38:26 +000012842
Guido van Rossum7f253911997-05-09 02:42:48 +000012843# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12845$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012850if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012851then
12852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012854
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12856$as_echo "yes" >&6; }
12857else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12858$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012859fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12862$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863fi
12864
Guido van Rossum7f253911997-05-09 02:42:48 +000012865
Guido van Rossum7f43da71994-08-01 12:15:30 +000012866# check for --with-libm=...
12867
Guido van Rossum563e7081996-09-10 18:20:48 +000012868case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012869Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012870BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012871*) LIBM=-lm
12872esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12874$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012875
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012879if test "$withval" = no
12880then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12882$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012883elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012884then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12886$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012887else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012888fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12891$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012892fi
12893
Guido van Rossum7f43da71994-08-01 12:15:30 +000012894
12895# check for --with-libc=...
12896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12898$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012899
Martin v. Löwiseba40652007-08-30 20:10:57 +000012900# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012902 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012903if test "$withval" = no
12904then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12906$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012907elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012908then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12910$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012911else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012912fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12915$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916fi
12917
Guido van Rossum7f43da71994-08-01 12:15:30 +000012918
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012919# **************************************************
12920# * Check for various properties of floating point *
12921# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12924$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012925if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012926 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012927else
12928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012930 ac_cv_little_endian_double=no
12931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012933/* end confdefs.h. */
12934
12935#include <string.h>
12936int main() {
12937 double x = 9006104071832581.0;
12938 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12939 return 0;
12940 else
12941 return 1;
12942}
12943
12944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012946 ac_cv_little_endian_double=yes
12947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012952fi
12953
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012954fi
12955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12957$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012958if test "$ac_cv_little_endian_double" = yes
12959then
12960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012962
12963fi
12964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12966$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012967if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012968 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012969else
12970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012972 ac_cv_big_endian_double=no
12973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012975/* end confdefs.h. */
12976
12977#include <string.h>
12978int main() {
12979 double x = 9006104071832581.0;
12980 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12981 return 0;
12982 else
12983 return 1;
12984}
12985
12986_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012988 ac_cv_big_endian_double=yes
12989else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012990 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012994fi
12995
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012996fi
12997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12999$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013000if test "$ac_cv_big_endian_double" = yes
13001then
13002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013004
13005fi
13006
13007# Some ARM platforms use a mixed-endian representation for doubles.
13008# While Python doesn't currently have full support for these platforms
13009# (see e.g., issue 1762561), we can at least make sure that float <-> string
13010# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13012$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013013if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013015else
13016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013017if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013018 ac_cv_mixed_endian_double=no
13019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013021/* end confdefs.h. */
13022
13023#include <string.h>
13024int main() {
13025 double x = 9006104071832581.0;
13026 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13027 return 0;
13028 else
13029 return 1;
13030}
13031
13032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013033if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013034 ac_cv_mixed_endian_double=yes
13035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013036 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13039 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013040fi
13041
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013042fi
13043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13045$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013046if test "$ac_cv_mixed_endian_double" = yes
13047then
13048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013050
13051fi
13052
13053# The short float repr introduced in Python 3.1 requires the
13054# correctly-rounded string <-> double conversion functions from
13055# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13056# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013057# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013058# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013059
13060# This inline assembler syntax may also work for suncc and icc,
13061# so we try it on all platforms.
13062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13064$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013066/* end confdefs.h. */
13067
13068int
13069main ()
13070{
13071
Mark Dickinsona548dee2009-11-15 13:12:43 +000013072 unsigned short cw;
13073 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13074 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013075
13076 ;
13077 return 0;
13078}
13079_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013080if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013081 have_gcc_asm_for_x87=yes
13082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013084fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013085rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13088$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013089if test "$have_gcc_asm_for_x87" = yes
13090then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013092$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013093
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013094fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013095
Mark Dickinson04b27232009-01-04 12:29:36 +000013096# Detect whether system arithmetic is subject to x87-style double
13097# rounding issues. The result of this test has little meaning on non
13098# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13099# mode is round-to-nearest and double rounding issues are present, and
13100# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13102$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013103# $BASECFLAGS may affect the result
13104ac_save_cc="$CC"
13105CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013107 ac_cv_x87_double_rounding=no
13108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013110/* end confdefs.h. */
13111
13112#include <stdlib.h>
13113#include <math.h>
13114int main() {
13115 volatile double x, y, z;
13116 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13117 x = 0.99999999999999989; /* 1-2**-53 */
13118 y = 1./x;
13119 if (y != 1.)
13120 exit(0);
13121 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13122 x = 1e16;
13123 y = 2.99999;
13124 z = x + y;
13125 if (z != 1e16+4.)
13126 exit(0);
13127 /* both tests show evidence of double rounding */
13128 exit(1);
13129}
13130
13131_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013133 ac_cv_x87_double_rounding=no
13134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013136fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13138 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013139fi
13140
Mark Dickinson99abd142009-10-24 13:44:16 +000013141CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13143$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013144if test "$ac_cv_x87_double_rounding" = yes
13145then
13146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013147$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013148
13149fi
13150
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013151# ************************************
13152# * Check for mathematical functions *
13153# ************************************
13154
13155LIBS_SAVE=$LIBS
13156LIBS="$LIBS $LIBM"
13157
Mark Dickinson265d7382008-04-21 22:32:24 +000013158# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13159# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13161$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013162if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013164else
13165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013167 ac_cv_tanh_preserves_zero_sign=no
13168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013170/* end confdefs.h. */
13171
13172#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013173#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013174int main() {
13175 /* return 0 if either negative zeros don't exist
13176 on this platform or if negative zeros exist
13177 and tanh(-0.) == -0. */
13178 if (atan2(0., -1.) == atan2(-0., -1.) ||
13179 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13180 else exit(1);
13181}
13182
13183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013184if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013185 ac_cv_tanh_preserves_zero_sign=yes
13186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013187 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013191fi
13192
Mark Dickinson265d7382008-04-21 22:32:24 +000013193fi
13194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13196$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013197if test "$ac_cv_tanh_preserves_zero_sign" = yes
13198then
13199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013201
13202fi
13203
Mark Dickinson65898e02009-09-05 10:27:00 +000013204for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013205do :
13206 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13207ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013208if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013209 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013211_ACEOF
13212
13213fi
13214done
13215
Mark Dickinson65898e02009-09-05 10:27:00 +000013216for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217do :
13218 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13219ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013220if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013221 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013223_ACEOF
13224
13225fi
13226done
13227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013228ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13229"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013230if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013231 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013234fi
13235
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013236cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13240"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013241if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013242 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013245fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013246
13247cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013248#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013249_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13251"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013252if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013253 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013256fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013257
13258cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013259#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013260_ACEOF
13261
13262
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013263LIBS=$LIBS_SAVE
13264
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013265# For multiprocessing module, check that sem_open
13266# actually works. For FreeBSD versions <= 7.2,
13267# the kernel module that provides POSIX semaphores
13268# isn't loaded by default, so an attempt to call
13269# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13271$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013272if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013274else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013276 ac_cv_posix_semaphores_enabled=yes
13277else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013279/* end confdefs.h. */
13280
13281#include <unistd.h>
13282#include <fcntl.h>
13283#include <stdio.h>
13284#include <semaphore.h>
13285#include <sys/stat.h>
13286
13287int main(void) {
13288 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13289 if (a == SEM_FAILED) {
13290 perror("sem_open");
13291 return 1;
13292 }
13293 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013294 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013295 return 0;
13296}
13297
13298_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013299if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013300 ac_cv_posix_semaphores_enabled=yes
13301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13305 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013306fi
13307
13308
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013309fi
13310
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13312$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013313if test $ac_cv_posix_semaphores_enabled = no
13314then
13315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013316$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013317
13318fi
13319
13320# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13322$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013323if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013324 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013327 ac_cv_broken_sem_getvalue=yes
13328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013330/* end confdefs.h. */
13331
13332#include <unistd.h>
13333#include <fcntl.h>
13334#include <stdio.h>
13335#include <semaphore.h>
13336#include <sys/stat.h>
13337
13338int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013339 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013340 int count;
13341 int res;
13342 if(a==SEM_FAILED){
13343 perror("sem_open");
13344 return 1;
13345
13346 }
13347 res = sem_getvalue(a, &count);
13348 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013349 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013350 return res==-1 ? 1 : 0;
13351}
13352
13353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013354if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013355 ac_cv_broken_sem_getvalue=no
13356else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013357 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013359rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13360 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013361fi
13362
13363
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013364fi
13365
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13367$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013368if test $ac_cv_broken_sem_getvalue = yes
13369then
13370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013372
13373fi
13374
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013375# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13377$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013378# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013380 enableval=$enable_big_digits; case $enable_big_digits in
13381yes)
13382 enable_big_digits=30 ;;
13383no)
13384 enable_big_digits=15 ;;
1338515|30)
13386 ;;
13387*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013388 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013389esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13391$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013392
13393cat >>confdefs.h <<_ACEOF
13394#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13395_ACEOF
13396
13397
13398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13400$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013401fi
13402
13403
Guido van Rossumef2255b2000-03-10 22:30:29 +000013404# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013406if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
13408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013409$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013411 wchar_h="yes"
13412
Guido van Rossumef2255b2000-03-10 22:30:29 +000013413else
Martin v. Löwis11437992002-04-12 09:54:03 +000013414 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013415
13416fi
13417
Michael W. Hudson54241132001-12-07 15:38:26 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013420# determine wchar_t size
13421if test "$wchar_h" = yes
13422then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013423 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013424# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13425# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13426# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13428$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013429if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013431else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13433"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013436 if test "$ac_cv_type_wchar_t" = yes; then
13437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013439as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013440See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013441 else
13442 ac_cv_sizeof_wchar_t=0
13443 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013444fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013445
Martin v. Löwis11437992002-04-12 09:54:03 +000013446fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13448$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013449
13450
13451
Martin v. Löwis11437992002-04-12 09:54:03 +000013452cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013453#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013454_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013455
Michael W. Hudson54241132001-12-07 15:38:26 +000013456
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013457fi
13458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13460$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013461have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013463/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013464
13465#include <tcl.h>
13466#if TCL_UTF_MAX != 6
13467# error "NOT UCS4_TCL"
13468#endif
13469int
13470main ()
13471{
13472
13473 ;
13474 return 0;
13475}
13476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013478
13479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013481
13482 have_ucs4_tcl=yes
13483
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13487$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013488
Skip Montanaro6dead952003-09-25 14:50:04 +000013489# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013490if test "$wchar_h" = yes
13491then
13492 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13494$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013495 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013497else
13498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013500 ac_cv_wchar_t_signed=yes
13501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013503/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013504
13505 #include <wchar.h>
13506 int main()
13507 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013508 /* Success: exit code 0 */
13509 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013510 }
13511
13512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013513if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013514 ac_cv_wchar_t_signed=yes
13515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013516 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13519 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013520fi
13521
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013522fi
13523
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13525$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013526fi
13527
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13529$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013530# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013531if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013533else
13534 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013535fi
13536
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013537
13538if test $enable_unicode = yes
13539then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013540 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013541 case "$have_ucs4_tcl" in
13542 yes) enable_unicode="ucs4"
13543 ;;
13544 *) enable_unicode="ucs2"
13545 ;;
13546 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013547fi
13548
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013549
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013550case "$enable_unicode" in
13551ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013552 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013553
13554 ;;
13555ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013557
13558 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013559no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013560*) as_fn_error $? "invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." "$LINENO" 5 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013561esac
13562
Michael W. Hudson54241132001-12-07 15:38:26 +000013563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564
13565
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013566if test "$enable_unicode" = "no"
13567then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013568 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13570$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013571else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013572 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013573
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013575
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013576
13577 # wchar_t is only usable if it maps to an unsigned type
13578 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013579 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013580 then
13581 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013582
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013583$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013586
13587 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13588 then
13589 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013591
13592 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13593 then
13594 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013596
13597 else
13598 PY_UNICODE_TYPE="no type found"
13599 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13601$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013602fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013603
13604# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13606$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013607if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 ac_cv_c_bigendian=unknown
13611 # See if we're dealing with a universal compiler.
13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613/* end confdefs.h. */
13614#ifndef __APPLE_CC__
13615 not a universal capable compiler
13616 #endif
13617 typedef int dummy;
13618
Skip Montanaro6dead952003-09-25 14:50:04 +000013619_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620if ac_fn_c_try_compile "$LINENO"; then :
13621
13622 # Check for potential -arch flags. It is not universal unless
13623 # there are at least two -arch flags with different values.
13624 ac_arch=
13625 ac_prev=
13626 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13627 if test -n "$ac_prev"; then
13628 case $ac_word in
13629 i?86 | x86_64 | ppc | ppc64)
13630 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13631 ac_arch=$ac_word
13632 else
13633 ac_cv_c_bigendian=universal
13634 break
13635 fi
13636 ;;
13637 esac
13638 ac_prev=
13639 elif test "x$ac_word" = "x-arch"; then
13640 ac_prev=arch
13641 fi
13642 done
13643fi
13644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13645 if test $ac_cv_c_bigendian = unknown; then
13646 # See if sys/param.h defines the BYTE_ORDER macro.
13647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013648/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013649#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
13653main ()
13654{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13656 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13657 && LITTLE_ENDIAN)
13658 bogus endian macros
13659 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013660
13661 ;
13662 return 0;
13663}
13664_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013665if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013666 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013668/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013669#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013671
Martin v. Löwis11437992002-04-12 09:54:03 +000013672int
13673main ()
13674{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013675#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676 not big endian
13677 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013678
13679 ;
13680 return 0;
13681}
13682_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013684 ac_cv_c_bigendian=yes
13685else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013686 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689fi
13690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13691 fi
13692 if test $ac_cv_c_bigendian = unknown; then
13693 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013695/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013696#include <limits.h>
13697
Martin v. Löwis11437992002-04-12 09:54:03 +000013698int
13699main ()
13700{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13702 bogus endian macros
13703 #endif
13704
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 ;
13706 return 0;
13707}
13708_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013709if ac_fn_c_try_compile "$LINENO"; then :
13710 # It does; now see whether it defined to _BIG_ENDIAN or not.
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712/* end confdefs.h. */
13713#include <limits.h>
13714
13715int
13716main ()
13717{
13718#ifndef _BIG_ENDIAN
13719 not big endian
13720 #endif
13721
13722 ;
13723 return 0;
13724}
13725_ACEOF
13726if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013728else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013730fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13732fi
13733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13734 fi
13735 if test $ac_cv_c_bigendian = unknown; then
13736 # Compile a test program.
13737 if test "$cross_compiling" = yes; then :
13738 # Try to guess by grepping values from an object file.
13739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740/* end confdefs.h. */
13741short int ascii_mm[] =
13742 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13743 short int ascii_ii[] =
13744 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13745 int use_ascii (int i) {
13746 return ascii_mm[i] + ascii_ii[i];
13747 }
13748 short int ebcdic_ii[] =
13749 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13750 short int ebcdic_mm[] =
13751 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13752 int use_ebcdic (int i) {
13753 return ebcdic_mm[i] + ebcdic_ii[i];
13754 }
13755 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013757int
13758main ()
13759{
13760return use_ascii (foo) == use_ebcdic (foo);
13761 ;
13762 return 0;
13763}
13764_ACEOF
13765if ac_fn_c_try_compile "$LINENO"; then :
13766 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13767 ac_cv_c_bigendian=yes
13768 fi
13769 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13770 if test "$ac_cv_c_bigendian" = unknown; then
13771 ac_cv_c_bigendian=no
13772 else
13773 # finding both strings is unlikely to happen, but who knows?
13774 ac_cv_c_bigendian=unknown
13775 fi
13776 fi
13777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013781/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013782$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013783int
13784main ()
13785{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013787 /* Are we little or big endian? From Harbison&Steele. */
13788 union
13789 {
13790 long int l;
13791 char c[sizeof (long int)];
13792 } u;
13793 u.l = 1;
13794 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013795
13796 ;
13797 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013798}
Martin v. Löwis11437992002-04-12 09:54:03 +000013799_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013800if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013801 ac_cv_c_bigendian=no
13802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13812$as_echo "$ac_cv_c_bigendian" >&6; }
13813 case $ac_cv_c_bigendian in #(
13814 yes)
13815 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13816;; #(
13817 no)
13818 ;; #(
13819 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013820
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013821$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823 ;; #(
13824 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013825 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013826 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013828
Michael W. Hudson54241132001-12-07 15:38:26 +000013829
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013830# Check whether right shifting a negative integer extends the sign bit
13831# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13833$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013834if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013836else
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013839 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013842/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013843
13844int main()
13845{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013846 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013847}
13848
Martin v. Löwis11437992002-04-12 09:54:03 +000013849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013851 ac_cv_rshift_extends_sign=yes
13852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013853 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013857fi
13858
Martin v. Löwiseba40652007-08-30 20:10:57 +000013859fi
13860
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13862$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013863if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013864then
Martin v. Löwis11437992002-04-12 09:54:03 +000013865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013866$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013867
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013868fi
13869
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013870# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13872$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013873if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013875else
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013878/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013879#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013880int
13881main ()
13882{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013883
13884 FILE *f = fopen("/dev/null", "r");
13885 flockfile(f);
13886 getc_unlocked(f);
13887 funlockfile(f);
13888
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 ;
13890 return 0;
13891}
13892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013894 ac_cv_have_getc_unlocked=yes
13895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013896 ac_cv_have_getc_unlocked=no
13897fi
13898rm -f core conftest.err conftest.$ac_objext \
13899 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13903$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013904if test "$ac_cv_have_getc_unlocked" = yes
13905then
Martin v. Löwis11437992002-04-12 09:54:03 +000013906
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013907$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013908
13909fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013910
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013911# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013912# save the value of LIBS so we don't actually link Python with readline
13913LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013914
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013915# On some systems we need to link readline to a termcap compatible
13916# library. NOTE: Keep the precedence of listed libraries synchronised
13917# with setup.py.
13918py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13920$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013921for py_libtermcap in "" ncursesw ncurses curses termcap; do
13922 if test -z "$py_libtermcap"; then
13923 READLINE_LIBS="-lreadline"
13924 else
13925 READLINE_LIBS="-lreadline -l$py_libtermcap"
13926 fi
13927 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013929/* end confdefs.h. */
13930
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931/* Override any GCC internal prototype to avoid an error.
13932 Use char because int might match the return type of a GCC
13933 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013934#ifdef __cplusplus
13935extern "C"
13936#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013937char readline ();
13938int
13939main ()
13940{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013942 ;
13943 return 0;
13944}
13945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013947 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013948fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949rm -f core conftest.err conftest.$ac_objext \
13950 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013951 if test $py_cv_lib_readline = yes; then
13952 break
13953 fi
13954done
13955# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13956#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013957if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13959$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13962$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013963
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013964$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013965
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013966fi
13967
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013968# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13970$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013971if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013972 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013973else
13974 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013975LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013976cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013977/* end confdefs.h. */
13978
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979/* Override any GCC internal prototype to avoid an error.
13980 Use char because int might match the return type of a GCC
13981 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013982#ifdef __cplusplus
13983extern "C"
13984#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013985char rl_callback_handler_install ();
13986int
13987main ()
13988{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013989return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013990 ;
13991 return 0;
13992}
13993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013994if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013995 ac_cv_lib_readline_rl_callback_handler_install=yes
13996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999rm -f core conftest.err conftest.$ac_objext \
14000 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014001LIBS=$ac_check_lib_save_LIBS
14002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14004$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014005if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014007$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014008
14009fi
14010
14011
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014012# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014014/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014015#include <readline/readline.h>
14016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014018 have_readline=yes
14019else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014020 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014021
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014022fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014023rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014024if test $have_readline = yes
14025then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014027/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014028#include <readline/readline.h>
14029
14030_ACEOF
14031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014032 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014034$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014035
14036fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014037rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014040/* end confdefs.h. */
14041#include <readline/readline.h>
14042
14043_ACEOF
14044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014047$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014048
14049fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014050rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014051
14052fi
14053
Martin v. Löwis0daad592001-09-30 21:09:59 +000014054# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14056$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014057if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014058 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014059else
Martin v. Löwis11437992002-04-12 09:54:03 +000014060 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014061LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014063/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014064
Martin v. Löwiseba40652007-08-30 20:10:57 +000014065/* Override any GCC internal prototype to avoid an error.
14066 Use char because int might match the return type of a GCC
14067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014068#ifdef __cplusplus
14069extern "C"
14070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014071char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014072int
14073main ()
14074{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014076 ;
14077 return 0;
14078}
14079_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014083 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014085rm -f core conftest.err conftest.$ac_objext \
14086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014087LIBS=$ac_check_lib_save_LIBS
14088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14090$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014091if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014094
Martin v. Löwis0daad592001-09-30 21:09:59 +000014095fi
14096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014098# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14100$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014101if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014102 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014103else
14104 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014105LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014107/* end confdefs.h. */
14108
14109/* Override any GCC internal prototype to avoid an error.
14110 Use char because int might match the return type of a GCC
14111 builtin and then its argument prototype would still apply. */
14112#ifdef __cplusplus
14113extern "C"
14114#endif
14115char rl_completion_display_matches_hook ();
14116int
14117main ()
14118{
14119return rl_completion_display_matches_hook ();
14120 ;
14121 return 0;
14122}
14123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014125 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014127 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014129rm -f core conftest.err conftest.$ac_objext \
14130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014131LIBS=$ac_check_lib_save_LIBS
14132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14134$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014135if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014137$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014138
14139fi
14140
14141
Martin Pantera70c3232016-04-03 02:54:58 +000014142# also in 4.0, but not in editline
14143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14144$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14145if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14146 $as_echo_n "(cached) " >&6
14147else
14148 ac_check_lib_save_LIBS=$LIBS
14149LIBS="-lreadline $READLINE_LIBS $LIBS"
14150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14151/* end confdefs.h. */
14152
14153/* Override any GCC internal prototype to avoid an error.
14154 Use char because int might match the return type of a GCC
14155 builtin and then its argument prototype would still apply. */
14156#ifdef __cplusplus
14157extern "C"
14158#endif
14159char rl_resize_terminal ();
14160int
14161main ()
14162{
14163return rl_resize_terminal ();
14164 ;
14165 return 0;
14166}
14167_ACEOF
14168if ac_fn_c_try_link "$LINENO"; then :
14169 ac_cv_lib_readline_rl_resize_terminal=yes
14170else
14171 ac_cv_lib_readline_rl_resize_terminal=no
14172fi
14173rm -f core conftest.err conftest.$ac_objext \
14174 conftest$ac_exeext conftest.$ac_ext
14175LIBS=$ac_check_lib_save_LIBS
14176fi
14177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14178$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14179if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14180
14181$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14182
14183fi
14184
14185
Martin v. Löwis0daad592001-09-30 21:09:59 +000014186# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14188$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014189if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014190 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014191else
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014193LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197/* Override any GCC internal prototype to avoid an error.
14198 Use char because int might match the return type of a GCC
14199 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014200#ifdef __cplusplus
14201extern "C"
14202#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014203char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014204int
14205main ()
14206{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014207return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 ;
14209 return 0;
14210}
14211_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014213 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014216fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014217rm -f core conftest.err conftest.$ac_objext \
14218 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014219LIBS=$ac_check_lib_save_LIBS
14220fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14222$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014223if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014225$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014226
Guido van Rossum353ae582001-07-10 16:45:32 +000014227fi
14228
Jack Jansendd19cf82001-12-06 22:36:17 +000014229
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014230# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014232/* end confdefs.h. */
14233#include <readline/readline.h>
14234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014236 have_readline=yes
14237else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014238 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014239
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014240fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014241rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014242if test $have_readline = yes
14243then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014245/* end confdefs.h. */
14246#include <readline/readline.h>
14247
14248_ACEOF
14249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014251
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014252$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014253
14254fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014255rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014256
14257fi
14258
Martin v. Löwis82bca632006-02-10 20:49:30 +000014259# End of readline checks: restore LIBS
14260LIBS=$LIBS_no_readline
14261
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14263$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014264if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014266else
Martin v. Löwis11437992002-04-12 09:54:03 +000014267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014269 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014272/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014273
14274int main()
14275{
14276 int val1 = nice(1);
14277 if (val1 != -1 && val1 == nice(2))
14278 exit(0);
14279 exit(1);
14280}
14281
Martin v. Löwis11437992002-04-12 09:54:03 +000014282_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014284 ac_cv_broken_nice=yes
14285else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014286 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014290fi
14291
Martin v. Löwiseba40652007-08-30 20:10:57 +000014292fi
14293
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14295$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014296if test "$ac_cv_broken_nice" = yes
14297then
Martin v. Löwis11437992002-04-12 09:54:03 +000014298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014299$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014300
14301fi
14302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14304$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014305if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014306 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014309 ac_cv_broken_poll=no
14310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014312/* end confdefs.h. */
14313
14314#include <poll.h>
14315
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014316int main()
14317{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014318 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014319 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014320
14321 close (42);
14322
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014323 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014324 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014325 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014326 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014327 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014328 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014329 return 1;
14330}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014331
14332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014333if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014334 ac_cv_broken_poll=yes
14335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014336 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014337fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014342fi
14343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14345$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014346if test "$ac_cv_broken_poll" = yes
14347then
14348
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014350
14351fi
14352
Brett Cannon43802422005-02-10 20:48:03 +000014353# 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 +000014354# (which is not required by ISO C or UNIX spec) and/or if we support
14355# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356ac_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 +000014357#include <$ac_cv_struct_tm>
14358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014360if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014361
14362cat >>confdefs.h <<_ACEOF
14363#define HAVE_STRUCT_TM_TM_ZONE 1
14364_ACEOF
14365
14366
14367fi
14368
14369if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014371$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014372
14373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014374 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14375"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014376if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014379 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380fi
14381
Martin v. Löwiseba40652007-08-30 20:10:57 +000014382cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384_ACEOF
14385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14387$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014388if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014390else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014392/* end confdefs.h. */
14393#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014394#if !HAVE_DECL_TZNAME
14395extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014396#endif
14397
14398int
14399main ()
14400{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014401return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014402 ;
14403 return 0;
14404}
14405_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014407 ac_cv_var_tzname=yes
14408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014409 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014410fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014411rm -f core conftest.err conftest.$ac_objext \
14412 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14415$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014416 if test $ac_cv_var_tzname = yes; then
14417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014419
14420 fi
14421fi
14422
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014423
Martin v. Löwis1d459062005-03-14 21:23:33 +000014424# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14426$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014427if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014428 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014429else
14430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014431if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014432 ac_cv_working_tzset=no
14433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014435/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014436
14437#include <stdlib.h>
14438#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014439#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014440
14441#if HAVE_TZNAME
14442extern char *tzname[];
14443#endif
14444
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014445int main()
14446{
Brett Cannon18367812003-09-19 00:59:16 +000014447 /* Note that we need to ensure that not only does tzset(3)
14448 do 'something' with localtime, but it works as documented
14449 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014450 This includes making sure that tzname is set properly if
14451 tm->tm_zone does not exist since it is the alternative way
14452 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014453
14454 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014455 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014456 */
14457
Martin v. Löwis1d459062005-03-14 21:23:33 +000014458 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014459 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14460
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014461 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014462 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014463 if (localtime(&groundhogday)->tm_hour != 0)
14464 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014465#if HAVE_TZNAME
14466 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14467 if (strcmp(tzname[0], "UTC") ||
14468 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14469 exit(1);
14470#endif
Brett Cannon18367812003-09-19 00:59:16 +000014471
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014472 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014473 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014474 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014475 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014476#if HAVE_TZNAME
14477 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14478 exit(1);
14479#endif
Brett Cannon18367812003-09-19 00:59:16 +000014480
14481 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14482 tzset();
14483 if (localtime(&groundhogday)->tm_hour != 11)
14484 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014485#if HAVE_TZNAME
14486 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14487 exit(1);
14488#endif
14489
14490#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014491 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14492 exit(1);
14493 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14494 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014495#endif
Brett Cannon18367812003-09-19 00:59:16 +000014496
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014497 exit(0);
14498}
14499
14500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014502 ac_cv_working_tzset=yes
14503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014504 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014505fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014508fi
14509
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510fi
14511
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14513$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014514if test "$ac_cv_working_tzset" = yes
14515then
14516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014518
14519fi
14520
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014521# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14523$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014524if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014526else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014528/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014529#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014530int
14531main ()
14532{
14533
14534struct stat st;
14535st.st_mtim.tv_nsec = 1;
14536
14537 ;
14538 return 0;
14539}
14540_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014542 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014543else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14547fi
14548
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14550$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014551if test "$ac_cv_stat_tv_nsec" = yes
14552then
14553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014554$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014555
14556fi
14557
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014558# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14560$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014561if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014565/* end confdefs.h. */
14566#include <sys/stat.h>
14567int
14568main ()
14569{
14570
14571struct stat st;
14572st.st_mtimespec.tv_nsec = 1;
14573
14574 ;
14575 return 0;
14576}
14577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014579 ac_cv_stat_tv_nsec2=yes
14580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014581 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14584fi
14585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14587$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014588if test "$ac_cv_stat_tv_nsec2" = yes
14589then
14590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014591$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014592
14593fi
14594
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014595# first curses configure check
14596ac_save_cppflags="$CPPFLAGS"
14597CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14598
14599for ac_header in curses.h ncurses.h
14600do :
14601 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14602ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14603if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14604 cat >>confdefs.h <<_ACEOF
14605#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14606_ACEOF
14607
14608fi
14609
14610done
14611
14612
14613# On Solaris, term.h requires curses.h
14614for ac_header in term.h
14615do :
14616 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14617#ifdef HAVE_CURSES_H
14618#include <curses.h>
14619#endif
14620
14621"
14622if test "x$ac_cv_header_term_h" = xyes; then :
14623 cat >>confdefs.h <<_ACEOF
14624#define HAVE_TERM_H 1
14625_ACEOF
14626
14627fi
14628
14629done
14630
14631
Jack Jansen666b1e72001-10-31 12:11:48 +000014632# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14634$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014635if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014639/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014640#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014641int
14642main ()
14643{
Jack Jansen666b1e72001-10-31 12:11:48 +000014644
14645 int rtn;
14646 rtn = mvwdelch(0,0,0);
14647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 ;
14649 return 0;
14650}
14651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014652if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014653 ac_cv_mvwdelch_is_expression=yes
14654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014655 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14658fi
14659
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14661$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014662
14663if test "$ac_cv_mvwdelch_is_expression" = yes
14664then
Martin v. Löwis11437992002-04-12 09:54:03 +000014665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014666$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014667
14668fi
14669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14671$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014672if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014673 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014676/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014677#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014678int
14679main ()
14680{
Jack Jansen666b1e72001-10-31 12:11:48 +000014681
14682 WINDOW *w;
14683 w->_flags = 0;
14684
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 ;
14686 return 0;
14687}
14688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014690 ac_cv_window_has_flags=yes
14691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014692 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14695fi
14696
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14698$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014699
Jack Jansen666b1e72001-10-31 12:11:48 +000014700
14701if test "$ac_cv_window_has_flags" = yes
14702then
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014704$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014705
14706fi
14707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14709$as_echo_n "checking for is_term_resized... " >&6; }
14710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014711/* end confdefs.h. */
14712#include <curses.h>
14713int
14714main ()
14715{
14716void *x=is_term_resized
14717 ;
14718 return 0;
14719}
14720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014721if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014722
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014723$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014724
Matthias Klosec511b472010-05-08 11:01:39 +000014725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014726$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14729$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014730
14731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14735$as_echo_n "checking for resize_term... " >&6; }
14736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014737/* end confdefs.h. */
14738#include <curses.h>
14739int
14740main ()
14741{
14742void *x=resize_term
14743 ;
14744 return 0;
14745}
14746_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014747if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014750
Matthias Klosec511b472010-05-08 11:01:39 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14755$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014756
14757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14761$as_echo_n "checking for resizeterm... " >&6; }
14762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014763/* end confdefs.h. */
14764#include <curses.h>
14765int
14766main ()
14767{
14768void *x=resizeterm
14769 ;
14770 return 0;
14771}
14772_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014773if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014775$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014776
Matthias Klosec511b472010-05-08 11:01:39 +000014777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014778$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14781$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014782
14783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014785# last curses configure check
14786CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014787
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14789$as_echo "$as_me: checking for device files" >&6;}
14790
14791if test "x$cross_compiling" = xyes; then
14792 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14794$as_echo_n "checking for /dev/ptmx... " >&6; }
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14796$as_echo "not set" >&6; }
14797 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14798 fi
14799 if test "${ac_cv_file__dev_ptc+set}" != set; then
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14801$as_echo_n "checking for /dev/ptc... " >&6; }
14802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14803$as_echo "not set" >&6; }
14804 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14805 fi
14806fi
14807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14809$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014810if ${ac_cv_file__dev_ptmx+:} false; then :
14811 $as_echo_n "(cached) " >&6
14812else
14813 test "$cross_compiling" = yes &&
14814 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14815if test -r "/dev/ptmx"; then
14816 ac_cv_file__dev_ptmx=yes
14817else
14818 ac_cv_file__dev_ptmx=no
14819fi
14820fi
14821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14822$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14823if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014824
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014825fi
14826
14827if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014828
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014829$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014830
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014831fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14833$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014834if ${ac_cv_file__dev_ptc+:} false; then :
14835 $as_echo_n "(cached) " >&6
14836else
14837 test "$cross_compiling" = yes &&
14838 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14839if test -r "/dev/ptc"; then
14840 ac_cv_file__dev_ptc=yes
14841else
14842 ac_cv_file__dev_ptc=no
14843fi
14844fi
14845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14846$as_echo "$ac_cv_file__dev_ptc" >&6; }
14847if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014848
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014849fi
14850
14851if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014853$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014854
Neal Norwitz865400f2003-03-21 01:42:58 +000014855fi
14856
Mark Dickinson82864d12009-11-15 16:18:58 +000014857if test "$have_long_long" = yes
14858then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14860$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014861 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014862 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014864 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014865 ac_cv_have_long_long_format="cross -- assuming no"
14866 if test x$GCC = xyes; then
14867 save_CFLAGS=$CFLAGS
14868 CFLAGS="$CFLAGS -Werror -Wformat"
14869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14870/* end confdefs.h. */
14871
14872 #include <stdio.h>
14873 #include <stddef.h>
14874
14875int
14876main ()
14877{
14878
14879 char *buffer;
14880 sprintf(buffer, "%lld", (long long)123);
14881 sprintf(buffer, "%lld", (long long)-123);
14882 sprintf(buffer, "%llu", (unsigned long long)123);
14883
14884 ;
14885 return 0;
14886}
14887_ACEOF
14888if ac_fn_c_try_compile "$LINENO"; then :
14889 ac_cv_have_long_long_format=yes
14890
14891fi
14892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14893 CFLAGS=$save_CFLAGS
14894 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014897/* end confdefs.h. */
14898
14899 #include <stdio.h>
14900 #include <stddef.h>
14901 #include <string.h>
14902
14903 #ifdef HAVE_SYS_TYPES_H
14904 #include <sys/types.h>
14905 #endif
14906
14907 int main()
14908 {
14909 char buffer[256];
14910
14911 if (sprintf(buffer, "%lld", (long long)123) < 0)
14912 return 1;
14913 if (strcmp(buffer, "123"))
14914 return 1;
14915
14916 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14917 return 1;
14918 if (strcmp(buffer, "-123"))
14919 return 1;
14920
14921 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14922 return 1;
14923 if (strcmp(buffer, "123"))
14924 return 1;
14925
14926 return 0;
14927 }
14928
14929_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014930if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014931 ac_cv_have_long_long_format=yes
14932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014933 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014937fi
14938
14939
Mark Dickinson82864d12009-11-15 16:18:58 +000014940fi
14941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14943$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014944fi
14945
Mark Dickinson5ce84742009-12-31 20:48:04 +000014946if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014947then
14948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014949$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014950
14951fi
14952
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014953if test $ac_sys_system = Darwin
14954then
14955 LIBS="$LIBS -framework CoreFoundation"
14956fi
14957
Mark Dickinson82864d12009-11-15 16:18:58 +000014958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14960$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014961if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014962 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014964 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014965 ac_cv_have_size_t_format="cross -- assuming yes"
14966
Brett Cannon09d12362006-05-11 05:11:33 +000014967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014969/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014970
Brett Cannon09d12362006-05-11 05:11:33 +000014971#include <stdio.h>
14972#include <stddef.h>
14973#include <string.h>
14974
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014975#ifdef HAVE_SYS_TYPES_H
14976#include <sys/types.h>
14977#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014978
14979#ifdef HAVE_SSIZE_T
14980typedef ssize_t Py_ssize_t;
14981#elif SIZEOF_VOID_P == SIZEOF_LONG
14982typedef long Py_ssize_t;
14983#else
14984typedef int Py_ssize_t;
14985#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014986
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014987int main()
14988{
14989 char buffer[256];
14990
Brett Cannon09d12362006-05-11 05:11:33 +000014991 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14992 return 1;
14993
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014994 if (strcmp(buffer, "123"))
14995 return 1;
14996
14997 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14998 return 1;
14999
15000 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000015001 return 1;
15002
15003 return 0;
15004}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015005
Brett Cannon09d12362006-05-11 05:11:33 +000015006_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015007if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015008 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015010 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015012rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15013 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000015014fi
15015
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15018$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015019if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015021$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015022
15023fi
15024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015025ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015026#ifdef HAVE_SYS_TYPES_H
15027#include <sys/types.h>
15028#endif
15029#ifdef HAVE_SYS_SOCKET_H
15030#include <sys/socket.h>
15031#endif
15032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015033"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015034if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015035
Martin v. Löwis11437992002-04-12 09:54:03 +000015036else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015038$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015039
15040fi
15041
Michael W. Hudson54241132001-12-07 15:38:26 +000015042
Benjamin Peterson7497e912010-10-16 00:53:39 +000015043case $ac_sys_system in
15044AIX*)
15045
15046$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15047 ;;
15048esac
15049
15050
Michael W. Hudson54241132001-12-07 15:38:26 +000015051
15052
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015053for h in `(cd $srcdir;echo Python/thread_*.h)`
15054do
15055 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15056done
15057
Michael W. Hudson54241132001-12-07 15:38:26 +000015058
Neal Norwitzd24499d2005-12-18 21:36:39 +000015059SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15061$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015062for dir in $SRCDIRS; do
15063 if test ! -d $dir; then
15064 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015065 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015066done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015067
15068# BEGIN_COMPUTED_GOTO
15069# Check for --with-computed-gotos
15070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15071$as_echo_n "checking for --with-computed-gotos... " >&6; }
15072
15073# Check whether --with-computed-gotos was given.
15074if test "${with_computed_gotos+set}" = set; then :
15075 withval=$with_computed_gotos;
15076if test "$withval" = yes
15077then
15078
15079$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15080
15081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15082$as_echo "yes" >&6; }
15083fi
15084if test "$withval" = no
15085then
15086
15087$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15088
15089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15090$as_echo "no" >&6; }
15091fi
15092
15093else
15094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15095$as_echo "no value specified" >&6; }
15096fi
15097
15098
15099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15100$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15101if ${ac_cv_computed_gotos+:} false; then :
15102 $as_echo_n "(cached) " >&6
15103else
15104 if test "$cross_compiling" = yes; then :
15105 if test "${with_computed_gotos+set}" = set; then
15106 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15107 else
15108 ac_cv_computed_gotos=no
15109 fi
15110else
15111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15112/* end confdefs.h. */
15113
15114int main(int argc, char **argv)
15115{
15116 static void *targets[1] = { &&LABEL1 };
15117 goto LABEL2;
15118LABEL1:
15119 return 0;
15120LABEL2:
15121 goto *targets[0];
15122 return 1;
15123}
15124
15125_ACEOF
15126if ac_fn_c_try_run "$LINENO"; then :
15127 ac_cv_computed_gotos=yes
15128else
15129 ac_cv_computed_gotos=no
15130fi
15131rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15132 conftest.$ac_objext conftest.beam conftest.$ac_ext
15133fi
15134
15135fi
15136
15137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15138$as_echo "$ac_cv_computed_gotos" >&6; }
15139case "$ac_cv_computed_gotos" in yes*)
15140
15141$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15142
15143esac
15144# END_COMPUTED_GOTO
15145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15147$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015148
Ned Deily3f1d0b32014-11-20 02:11:03 -080015149# ensurepip option
15150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15151$as_echo_n "checking for ensurepip... " >&6; }
15152
15153# Check whether --with-ensurepip was given.
15154if test "${with_ensurepip+set}" = set; then :
15155 withval=$with_ensurepip;
15156else
15157 with_ensurepip=no
15158fi
15159
15160case $with_ensurepip in #(
15161 yes|upgrade) :
15162 ENSUREPIP=upgrade ;; #(
15163 install) :
15164 ENSUREPIP=install ;; #(
15165 no) :
15166 ENSUREPIP=no ;; #(
15167 *) :
15168 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15169esac
15170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15171$as_echo "$ENSUREPIP" >&6; }
15172
15173
Guido van Rossum627b2d71993-12-24 10:39:16 +000015174# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015175ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015176
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015177ac_config_files="$ac_config_files Modules/ld_so_aix"
15178
Martin v. Löwis11437992002-04-12 09:54:03 +000015179cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015180# This file is a shell script that caches the results of configure
15181# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015182# scripts and configure runs, see configure's option --config-cache.
15183# It is not useful on other systems. If it contains results you don't
15184# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015185#
Martin v. Löwis11437992002-04-12 09:54:03 +000015186# config.status only pays attention to the cache file if you give it
15187# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015188#
Skip Montanaro6dead952003-09-25 14:50:04 +000015189# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015190# loading this file, other *unset* `ac_cv_foo' will be assigned the
15191# following values.
15192
15193_ACEOF
15194
Guido van Rossumf78abae1997-01-21 22:02:36 +000015195# The following way of writing the cache mishandles newlines in values,
15196# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015198# Ultrix sh set writes to stderr and can't be redirected directly,
15199# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200(
15201 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15202 eval ac_val=\$$ac_var
15203 case $ac_val in #(
15204 *${as_nl}*)
15205 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015206 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15207$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 esac
15209 case $ac_var in #(
15210 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015211 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15212 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 esac ;;
15214 esac
15215 done
15216
Martin v. Löwis11437992002-04-12 09:54:03 +000015217 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15219 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220 # `set' does not quote correctly, so add quotes: double-quote
15221 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015223 "s/'/'\\\\''/g;
15224 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 *)
15227 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015228 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015229 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015230 esac |
15231 sort
15232) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015233 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015234 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15238 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015239 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15240 :end' >>confcache
15241if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15242 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015243 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015244 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15245$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015246 if test ! -f "$cache_file" || test -h "$cache_file"; then
15247 cat confcache >"$cache_file"
15248 else
15249 case $cache_file in #(
15250 */* | ?:*)
15251 mv -f confcache "$cache_file"$$ &&
15252 mv -f "$cache_file"$$ "$cache_file" ;; #(
15253 *)
15254 mv -f confcache "$cache_file" ;;
15255 esac
15256 fi
15257 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015258 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015259 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15260$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015261 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015262fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015263rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015264
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015265test "x$prefix" = xNONE && prefix=$ac_default_prefix
15266# Let make expand exec_prefix.
15267test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015268
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015269DEFS=-DHAVE_CONFIG_H
15270
Skip Montanaro6dead952003-09-25 14:50:04 +000015271ac_libobjs=
15272ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015273U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015274for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15275 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015276 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015277 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15279 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015280 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15281 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015282done
15283LIBOBJS=$ac_libobjs
15284
15285LTLIBOBJS=$ac_ltlibobjs
15286
15287
Martin v. Löwis11437992002-04-12 09:54:03 +000015288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015289
Matthias Klose3cef2a92012-03-14 23:39:33 +010015290: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015291ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015292ac_clean_files_save=$ac_clean_files
15293ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015294{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15295$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15296as_write_fail=0
15297cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015298#! $SHELL
15299# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015300# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015301# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015302# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015303
Martin v. Löwis11437992002-04-12 09:54:03 +000015304debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015305ac_cs_recheck=false
15306ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015308SHELL=\${CONFIG_SHELL-$SHELL}
15309export SHELL
15310_ASEOF
15311cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15312## -------------------- ##
15313## M4sh Initialization. ##
15314## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015315
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316# Be more Bourne compatible
15317DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015318if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015319 emulate sh
15320 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015321 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015322 # is contrary to our usage. Disable this feature.
15323 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015326 case `(set -o) 2>/dev/null` in #(
15327 *posix*) :
15328 set -o posix ;; #(
15329 *) :
15330 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015331esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015332fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015333
Skip Montanaro6dead952003-09-25 14:50:04 +000015334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015335as_nl='
15336'
15337export as_nl
15338# Printing a long string crashes Solaris 7 /usr/bin/printf.
15339as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15340as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15341as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15342# Prefer a ksh shell builtin over an external printf program on Solaris,
15343# but without wasting forks for bash or zsh.
15344if test -z "$BASH_VERSION$ZSH_VERSION" \
15345 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15346 as_echo='print -r --'
15347 as_echo_n='print -rn --'
15348elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15349 as_echo='printf %s\n'
15350 as_echo_n='printf %s'
15351else
15352 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15353 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15354 as_echo_n='/usr/ucb/echo -n'
15355 else
15356 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15357 as_echo_n_body='eval
15358 arg=$1;
15359 case $arg in #(
15360 *"$as_nl"*)
15361 expr "X$arg" : "X\\(.*\\)$as_nl";
15362 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15363 esac;
15364 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15365 '
15366 export as_echo_n_body
15367 as_echo_n='sh -c $as_echo_n_body as_echo'
15368 fi
15369 export as_echo_body
15370 as_echo='sh -c $as_echo_body as_echo'
15371fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015372
15373# The user is always right.
15374if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015375 PATH_SEPARATOR=:
15376 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15377 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15378 PATH_SEPARATOR=';'
15379 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015381
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382
15383# IFS
15384# We need space, tab and new line, in precisely that order. Quoting is
15385# there to prevent editors from complaining about space-tab.
15386# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15387# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388IFS=" "" $as_nl"
15389
15390# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015391as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015392case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015393 *[\\/]* ) as_myself=$0 ;;
15394 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015395for as_dir in $PATH
15396do
15397 IFS=$as_save_IFS
15398 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015399 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15400 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015402
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403 ;;
15404esac
15405# We did not find ourselves, most probably we were run as `sh COMMAND'
15406# in which case we are not to be found in the path.
15407if test "x$as_myself" = x; then
15408 as_myself=$0
15409fi
15410if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015411 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15412 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015413fi
15414
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015415# Unset variables that we do not need and which cause bugs (e.g. in
15416# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15417# suppresses any "Segmentation fault" message there. '((' could
15418# trigger a bug in pdksh 5.2.14.
15419for as_var in BASH_ENV ENV MAIL MAILPATH
15420do eval test x\${$as_var+set} = xset \
15421 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422done
15423PS1='$ '
15424PS2='> '
15425PS4='+ '
15426
15427# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015428LC_ALL=C
15429export LC_ALL
15430LANGUAGE=C
15431export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015433# CDPATH.
15434(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15435
15436
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015437# as_fn_error STATUS ERROR [LINENO LOG_FD]
15438# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015439# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15440# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015441# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015442as_fn_error ()
15443{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015444 as_status=$1; test $as_status -eq 0 && as_status=1
15445 if test "$4"; then
15446 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15447 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015448 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015449 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015450 as_fn_exit $as_status
15451} # as_fn_error
15452
15453
15454# as_fn_set_status STATUS
15455# -----------------------
15456# Set $? to STATUS, without forking.
15457as_fn_set_status ()
15458{
15459 return $1
15460} # as_fn_set_status
15461
15462# as_fn_exit STATUS
15463# -----------------
15464# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15465as_fn_exit ()
15466{
15467 set +e
15468 as_fn_set_status $1
15469 exit $1
15470} # as_fn_exit
15471
15472# as_fn_unset VAR
15473# ---------------
15474# Portably unset VAR.
15475as_fn_unset ()
15476{
15477 { eval $1=; unset $1;}
15478}
15479as_unset=as_fn_unset
15480# as_fn_append VAR VALUE
15481# ----------------------
15482# Append the text in VALUE to the end of the definition contained in VAR. Take
15483# advantage of any shell optimizations that allow amortized linear growth over
15484# repeated appends, instead of the typical quadratic growth present in naive
15485# implementations.
15486if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15487 eval 'as_fn_append ()
15488 {
15489 eval $1+=\$2
15490 }'
15491else
15492 as_fn_append ()
15493 {
15494 eval $1=\$$1\$2
15495 }
15496fi # as_fn_append
15497
15498# as_fn_arith ARG...
15499# ------------------
15500# Perform arithmetic evaluation on the ARGs, and store the result in the
15501# global $as_val. Take advantage of shells that can avoid forks. The arguments
15502# must be portable across $(()) and expr.
15503if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15504 eval 'as_fn_arith ()
15505 {
15506 as_val=$(( $* ))
15507 }'
15508else
15509 as_fn_arith ()
15510 {
15511 as_val=`expr "$@" || test $? -eq 1`
15512 }
15513fi # as_fn_arith
15514
15515
Martin v. Löwiseba40652007-08-30 20:10:57 +000015516if expr a : '\(a\)' >/dev/null 2>&1 &&
15517 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15518 as_expr=expr
15519else
15520 as_expr=false
15521fi
15522
15523if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15524 as_basename=basename
15525else
15526 as_basename=false
15527fi
15528
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015529if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15530 as_dirname=dirname
15531else
15532 as_dirname=false
15533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535as_me=`$as_basename -- "$0" ||
15536$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15537 X"$0" : 'X\(//\)$' \| \
15538 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015539$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540 sed '/^.*\/\([^/][^/]*\)\/*$/{
15541 s//\1/
15542 q
15543 }
15544 /^X\/\(\/\/\)$/{
15545 s//\1/
15546 q
15547 }
15548 /^X\/\(\/\).*/{
15549 s//\1/
15550 q
15551 }
15552 s/.*/./; q'`
15553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015554# Avoid depending upon Character Ranges.
15555as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15556as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15557as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15558as_cr_digits='0123456789'
15559as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560
15561ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015562case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015563-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015564 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566 xy) ECHO_C='\c';;
15567 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15568 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569 esac;;
15570*)
15571 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015573
Martin v. Löwis11437992002-04-12 09:54:03 +000015574rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015575if test -d conf$$.dir; then
15576 rm -f conf$$.dir/conf$$.file
15577else
15578 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015579 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015581if (echo >conf$$.file) 2>/dev/null; then
15582 if ln -s conf$$.file conf$$ 2>/dev/null; then
15583 as_ln_s='ln -s'
15584 # ... but there are two gotchas:
15585 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15586 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015587 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015588 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015589 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015590 elif ln conf$$.file conf$$ 2>/dev/null; then
15591 as_ln_s=ln
15592 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015593 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015595else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015596 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15599rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015601
15602# as_fn_mkdir_p
15603# -------------
15604# Create "$as_dir" as a directory, including parents if necessary.
15605as_fn_mkdir_p ()
15606{
15607
15608 case $as_dir in #(
15609 -*) as_dir=./$as_dir;;
15610 esac
15611 test -d "$as_dir" || eval $as_mkdir_p || {
15612 as_dirs=
15613 while :; do
15614 case $as_dir in #(
15615 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15616 *) as_qdir=$as_dir;;
15617 esac
15618 as_dirs="'$as_qdir' $as_dirs"
15619 as_dir=`$as_dirname -- "$as_dir" ||
15620$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15621 X"$as_dir" : 'X\(//\)[^/]' \| \
15622 X"$as_dir" : 'X\(//\)$' \| \
15623 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15624$as_echo X"$as_dir" |
15625 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15626 s//\1/
15627 q
15628 }
15629 /^X\(\/\/\)[^/].*/{
15630 s//\1/
15631 q
15632 }
15633 /^X\(\/\/\)$/{
15634 s//\1/
15635 q
15636 }
15637 /^X\(\/\).*/{
15638 s//\1/
15639 q
15640 }
15641 s/.*/./; q'`
15642 test -d "$as_dir" && break
15643 done
15644 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015645 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015646
15647
15648} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015649if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015650 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015651else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015652 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015653 as_mkdir_p=false
15654fi
15655
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015656
15657# as_fn_executable_p FILE
15658# -----------------------
15659# Test if FILE is an executable regular file.
15660as_fn_executable_p ()
15661{
15662 test -f "$1" && test -x "$1"
15663} # as_fn_executable_p
15664as_test_x='test -x'
15665as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015666
15667# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015668as_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 +000015669
15670# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015671as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015672
15673
Martin v. Löwis11437992002-04-12 09:54:03 +000015674exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015675## ----------------------------------- ##
15676## Main body of $CONFIG_STATUS script. ##
15677## ----------------------------------- ##
15678_ASEOF
15679test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15682# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015683# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015684# values after options handling.
15685ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015686This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015687generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015688
15689 CONFIG_FILES = $CONFIG_FILES
15690 CONFIG_HEADERS = $CONFIG_HEADERS
15691 CONFIG_LINKS = $CONFIG_LINKS
15692 CONFIG_COMMANDS = $CONFIG_COMMANDS
15693 $ $0 $@
15694
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695on `(hostname || uname -n) 2>/dev/null | sed 1q`
15696"
15697
Martin v. Löwis11437992002-04-12 09:54:03 +000015698_ACEOF
15699
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015700case $ac_config_files in *"
15701"*) set x $ac_config_files; shift; ac_config_files=$*;;
15702esac
15703
15704case $ac_config_headers in *"
15705"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15706esac
15707
15708
15709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015710# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015711config_files="$ac_config_files"
15712config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015713
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015716cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015717ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718\`$as_me' instantiates files and other configuration actions
15719from templates according to the current configuration. Unless the files
15720and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015722Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
15724 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015725 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015726 --config print configuration, then exit
15727 -q, --quiet, --silent
15728 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015729 -d, --debug don't remove temporary files
15730 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015731 --file=FILE[:TEMPLATE]
15732 instantiate the configuration file FILE
15733 --header=FILE[:TEMPLATE]
15734 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
15736Configuration files:
15737$config_files
15738
15739Configuration headers:
15740$config_headers
15741
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015742Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015743
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015745cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15746ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015747ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015748python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015749configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015750 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015751
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015752Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015753This config.status script is free software; the Free Software Foundation
15754gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755
15756ac_pwd='$ac_pwd'
15757srcdir='$srcdir'
15758INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015759MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015760test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015761_ACEOF
15762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015763cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15764# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015765ac_need_defaults=:
15766while test $# != 0
15767do
15768 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015769 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15771 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015772 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015773 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015774 --*=)
15775 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15776 ac_optarg=
15777 ac_shift=:
15778 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015780 ac_option=$1
15781 ac_optarg=$2
15782 ac_shift=shift
15783 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015784 esac
15785
Skip Montanaro6dead952003-09-25 14:50:04 +000015786 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015788 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15789 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015790 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015791 $as_echo "$ac_cs_version"; exit ;;
15792 --config | --confi | --conf | --con | --co | --c )
15793 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 debug=: ;;
15796 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015797 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015798 case $ac_optarg in
15799 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015800 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015801 esac
15802 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015803 ac_need_defaults=false;;
15804 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015805 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015806 case $ac_optarg in
15807 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15808 esac
15809 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 --he | --h)
15812 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015813 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015814Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015815 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015816 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015817 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15818 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15819 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
15821 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015822 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015823Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015827
15828 esac
15829 shift
15830done
15831
Skip Montanaro6dead952003-09-25 14:50:04 +000015832ac_configure_extra_args=
15833
15834if $ac_cs_silent; then
15835 exec 6>/dev/null
15836 ac_configure_extra_args="$ac_configure_extra_args --silent"
15837fi
15838
15839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015841if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015842 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015843 shift
15844 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15845 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015848fi
15849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015851cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852exec 5>>config.log
15853{
15854 echo
15855 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15856## Running $as_me. ##
15857_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015858 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015860
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015862cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015863_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015866
15867# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015868for ac_config_target in $ac_config_targets
15869do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015870 case $ac_config_target in
15871 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15872 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15873 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15874 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015875 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15876 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15878 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015879 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015880 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015881
Matthias Klose3cef2a92012-03-14 23:39:33 +010015882 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015883 esac
15884done
15885
Martin v. Löwiseba40652007-08-30 20:10:57 +000015886
Martin v. Löwis11437992002-04-12 09:54:03 +000015887# If the user did not use the arguments to specify the items to instantiate,
15888# then the envvar interface is used. Set only those that are not.
15889# We use the long form for the default assignment because of an extremely
15890# bizarre bug on SunOS 4.1.3.
15891if $ac_need_defaults; then
15892 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15893 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15894fi
15895
Skip Montanaro6dead952003-09-25 14:50:04 +000015896# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015898# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899# Hook for its removal unless debugging.
15900# Note that there is a small window in which the directory will not be cleaned:
15901# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015902$debug ||
15903{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015904 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015906 : "${ac_tmp:=$tmp}"
15907 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015908' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015909 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015910}
Martin v. Löwis11437992002-04-12 09:54:03 +000015911# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015914 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015915 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015916} ||
15917{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918 tmp=./conf$$-$RANDOM
15919 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015920} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015921ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015922
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015923# Set up the scripts for CONFIG_FILES section.
15924# No need to generate them if there are no CONFIG_FILES.
15925# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015928
15929ac_cr=`echo X | tr X '\015'`
15930# On cygwin, bash can eat \r inside `` if the user requested igncr.
15931# But we know of no other shell where ac_cr would be empty at this
15932# point, so we can use a bashism as a fallback.
15933if test "x$ac_cr" = x; then
15934 eval ac_cr=\$\'\\r\'
15935fi
15936ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15937if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015938 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015939else
15940 ac_cs_awk_cr=$ac_cr
15941fi
15942
Matthias Klose3cef2a92012-03-14 23:39:33 +010015943echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015944_ACEOF
15945
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015947{
15948 echo "cat >conf$$subs.awk <<_ACEOF" &&
15949 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15950 echo "_ACEOF"
15951} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015952 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15953ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015954ac_delim='%!_!# '
15955for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015956 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015957 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015958
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015959 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15960 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015961 break
15962 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015963 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015964 else
15965 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015967done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015968rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015970cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015971cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015973sed -n '
15974h
15975s/^/S["/; s/!.*/"]=/
15976p
15977g
15978s/^[^!]*!//
15979:repl
15980t repl
15981s/'"$ac_delim"'$//
15982t delim
15983:nl
15984h
15985s/\(.\{148\}\)..*/\1/
15986t more1
15987s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15988p
15989n
15990b repl
15991:more1
15992s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15993p
15994g
15995s/.\{148\}//
15996t nl
15997:delim
15998h
15999s/\(.\{148\}\)..*/\1/
16000t more2
16001s/["\\]/\\&/g; s/^/"/; s/$/"/
16002p
16003b
16004:more2
16005s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16006p
16007g
16008s/.\{148\}//
16009t delim
16010' <conf$$subs.awk | sed '
16011/^[^""]/{
16012 N
16013 s/\n//
16014}
16015' >>$CONFIG_STATUS || ac_write_fail=1
16016rm -f conf$$subs.awk
16017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16018_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016019cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016020 for (key in S) S_is_set[key] = 1
16021 FS = ""
16022
16023}
16024{
16025 line = $ 0
16026 nfields = split(line, field, "@")
16027 substed = 0
16028 len = length(field[1])
16029 for (i = 2; i < nfields; i++) {
16030 key = field[i]
16031 keylen = length(key)
16032 if (S_is_set[key]) {
16033 value = S[key]
16034 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16035 len += length(value) + length(field[++i])
16036 substed = 1
16037 } else
16038 len += 1 + keylen
16039 }
16040
16041 print line
16042}
16043
16044_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016045_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016046cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16047if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16048 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16049else
16050 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016051fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016052 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016053_ACEOF
16054
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016055# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16056# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016057# trailing colons and then remove the whole line if VPATH becomes empty
16058# (actually we leave an empty line to preserve line numbers).
16059if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016060 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16061h
16062s///
16063s/^/:/
16064s/[ ]*$/:/
16065s/:\$(srcdir):/:/g
16066s/:\${srcdir}:/:/g
16067s/:@srcdir@:/:/g
16068s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016069s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016070x
16071s/\(=[ ]*\).*/\1/
16072G
16073s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016074s/^[^=]*=[ ]*$//
16075}'
16076fi
16077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016078cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016079fi # test -n "$CONFIG_FILES"
16080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016081# Set up the scripts for CONFIG_HEADERS section.
16082# No need to generate them if there are no CONFIG_HEADERS.
16083# This happens for instance with `./config.status Makefile'.
16084if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016085cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016086BEGIN {
16087_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016088
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016089# Transform confdefs.h into an awk script `defines.awk', embedded as
16090# here-document in config.status, that substitutes the proper values into
16091# config.h.in to produce config.h.
16092
16093# Create a delimiter string that does not exist in confdefs.h, to ease
16094# handling of long lines.
16095ac_delim='%!_!# '
16096for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016097 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16098 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016099 break
16100 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016101 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016102 else
16103 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16104 fi
16105done
16106
16107# For the awk script, D is an array of macro values keyed by name,
16108# likewise P contains macro parameters if any. Preserve backslash
16109# newline sequences.
16110
16111ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16112sed -n '
16113s/.\{148\}/&'"$ac_delim"'/g
16114t rset
16115:rset
16116s/^[ ]*#[ ]*define[ ][ ]*/ /
16117t def
16118d
16119:def
16120s/\\$//
16121t bsnl
16122s/["\\]/\\&/g
16123s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16124D["\1"]=" \3"/p
16125s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16126d
16127:bsnl
16128s/["\\]/\\&/g
16129s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16130D["\1"]=" \3\\\\\\n"\\/p
16131t cont
16132s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16133t cont
16134d
16135:cont
16136n
16137s/.\{148\}/&'"$ac_delim"'/g
16138t clear
16139:clear
16140s/\\$//
16141t bsnlc
16142s/["\\]/\\&/g; s/^/"/; s/$/"/p
16143d
16144:bsnlc
16145s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16146b cont
16147' <confdefs.h | sed '
16148s/'"$ac_delim"'/"\\\
16149"/g' >>$CONFIG_STATUS || ac_write_fail=1
16150
16151cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16152 for (key in D) D_is_set[key] = 1
16153 FS = ""
16154}
16155/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16156 line = \$ 0
16157 split(line, arg, " ")
16158 if (arg[1] == "#") {
16159 defundef = arg[2]
16160 mac1 = arg[3]
16161 } else {
16162 defundef = substr(arg[1], 2)
16163 mac1 = arg[2]
16164 }
16165 split(mac1, mac2, "(") #)
16166 macro = mac2[1]
16167 prefix = substr(line, 1, index(line, defundef) - 1)
16168 if (D_is_set[macro]) {
16169 # Preserve the white space surrounding the "#".
16170 print prefix "define", macro P[macro] D[macro]
16171 next
16172 } else {
16173 # Replace #undef with comments. This is necessary, for example,
16174 # in the case of _POSIX_SOURCE, which is predefined and required
16175 # on some systems where configure will not decide to define it.
16176 if (defundef == "undef") {
16177 print "/*", prefix defundef, macro, "*/"
16178 next
16179 }
16180 }
16181}
16182{ print }
16183_ACAWK
16184_ACEOF
16185cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016186 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016187fi # test -n "$CONFIG_HEADERS"
16188
16189
16190eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16191shift
16192for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193do
16194 case $ac_tag in
16195 :[FHLC]) ac_mode=$ac_tag; continue;;
16196 esac
16197 case $ac_mode$ac_tag in
16198 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016199 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016200 :[FH]-) ac_tag=-:-;;
16201 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16202 esac
16203 ac_save_IFS=$IFS
16204 IFS=:
16205 set x $ac_tag
16206 IFS=$ac_save_IFS
16207 shift
16208 ac_file=$1
16209 shift
16210
16211 case $ac_mode in
16212 :L) ac_source=$1;;
16213 :[FH])
16214 ac_file_inputs=
16215 for ac_f
16216 do
16217 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016218 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219 *) # Look for the file first in the build tree, then in the source tree
16220 # (if the path is not absolute). The absolute path cannot be DOS-style,
16221 # because $ac_f cannot contain `:'.
16222 test -f "$ac_f" ||
16223 case $ac_f in
16224 [\\/$]*) false;;
16225 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16226 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016227 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016229 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16230 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231 done
16232
16233 # Let's still pretend it is `configure' which instantiates (i.e., don't
16234 # use $as_me), people would be surprised to read:
16235 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016236 configure_input='Generated from '`
16237 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16238 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016239 if test x"$ac_file" != x-; then
16240 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016241 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16242$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016244 # Neutralize special characters interpreted by sed in replacement strings.
16245 case $configure_input in #(
16246 *\&* | *\|* | *\\* )
16247 ac_sed_conf_input=`$as_echo "$configure_input" |
16248 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16249 *) ac_sed_conf_input=$configure_input;;
16250 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251
16252 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016253 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16254 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016255 esac
16256 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 esac
16258
Martin v. Löwiseba40652007-08-30 20:10:57 +000016259 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016260$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016261 X"$ac_file" : 'X\(//\)[^/]' \| \
16262 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016264$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016265 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16266 s//\1/
16267 q
16268 }
16269 /^X\(\/\/\)[^/].*/{
16270 s//\1/
16271 q
16272 }
16273 /^X\(\/\/\)$/{
16274 s//\1/
16275 q
16276 }
16277 /^X\(\/\).*/{
16278 s//\1/
16279 q
16280 }
16281 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016282 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016283 ac_builddir=.
16284
Martin v. Löwiseba40652007-08-30 20:10:57 +000016285case "$ac_dir" in
16286.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16287*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016288 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016289 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016290 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016291 case $ac_top_builddir_sub in
16292 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16293 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16294 esac ;;
16295esac
16296ac_abs_top_builddir=$ac_pwd
16297ac_abs_builddir=$ac_pwd$ac_dir_suffix
16298# for backward compatibility:
16299ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016300
16301case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016304 ac_top_srcdir=$ac_top_builddir_sub
16305 ac_abs_top_srcdir=$ac_pwd ;;
16306 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016307 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308 ac_top_srcdir=$srcdir
16309 ac_abs_top_srcdir=$srcdir ;;
16310 *) # Relative name.
16311 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16312 ac_top_srcdir=$ac_top_build_prefix$srcdir
16313 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016314esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016315ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016316
Martin v. Löwis11437992002-04-12 09:54:03 +000016317
Martin v. Löwiseba40652007-08-30 20:10:57 +000016318 case $ac_mode in
16319 :F)
16320 #
16321 # CONFIG_FILE
16322 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016323
16324 case $INSTALL in
16325 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016326 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016328 ac_MKDIR_P=$MKDIR_P
16329 case $MKDIR_P in
16330 [\\/$]* | ?:[\\/]* ) ;;
16331 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16332 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016333_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016334
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016336# If the template does not know about datarootdir, expand it.
16337# FIXME: This hack should be removed a few years after 2.60.
16338ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016339ac_sed_dataroot='
16340/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341 p
16342 q
16343}
16344/@datadir@/p
16345/@docdir@/p
16346/@infodir@/p
16347/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016348/@mandir@/p'
16349case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016350*datarootdir*) ac_datarootdir_seen=yes;;
16351*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16353$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016354_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016356 ac_datarootdir_hack='
16357 s&@datadir@&$datadir&g
16358 s&@docdir@&$docdir&g
16359 s&@infodir@&$infodir&g
16360 s&@localedir@&$localedir&g
16361 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016362 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016363esac
16364_ACEOF
16365
16366# Neutralize VPATH when `$srcdir' = `.'.
16367# Shell code in configure.ac might set extrasub.
16368# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16370ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016371$extrasub
16372_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016373cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016374:t
16375/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016376s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016378s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379s&@srcdir@&$ac_srcdir&;t t
16380s&@abs_srcdir@&$ac_abs_srcdir&;t t
16381s&@top_srcdir@&$ac_top_srcdir&;t t
16382s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16383s&@builddir@&$ac_builddir&;t t
16384s&@abs_builddir@&$ac_abs_builddir&;t t
16385s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16386s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016387s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016388$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016389"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016390eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16391 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016392
Martin v. Löwiseba40652007-08-30 20:10:57 +000016393test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016394 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16395 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16396 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016397 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016398which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016399$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016400which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016401
Matthias Klose3cef2a92012-03-14 23:39:33 +010016402 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016404 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16405 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016406 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016407 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016408 ;;
16409 :H)
16410 #
16411 # CONFIG_HEADER
16412 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016414 {
16415 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016416 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16417 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016418 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016419 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016420 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16421$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016423 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016424 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016425 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 fi
16427 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016428 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016429 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016430 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016432 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016433
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434
16435 esac
16436
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016437
16438 case $ac_file$ac_mode in
16439 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16440
16441 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016442done # for ac_tag
16443
Guido van Rossum627b2d71993-12-24 10:39:16 +000016444
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016445as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016446_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016447ac_clean_files=$ac_clean_files_save
16448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016449test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016450 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016451
Martin v. Löwis11437992002-04-12 09:54:03 +000016452
16453# configure is writing to config.log, and then calls config.status.
16454# config.status does its own redirection, appending to config.log.
16455# Unfortunately, on DOS this fails, as config.log is still kept open
16456# by configure, so config.status won't be able to write to it; its
16457# output is simply discarded. So we exec the FD to /dev/null,
16458# effectively closing config.log, so it can be properly (re)opened and
16459# appended to by config.status. When coming back to configure, we
16460# need to make the FD available again.
16461if test "$no_create" != yes; then
16462 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016463 ac_config_status_args=
16464 test "$silent" = yes &&
16465 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016467 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 exec 5>>config.log
16469 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16470 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016471 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016472fi
16473if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16474 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16475$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016476fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016477
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016478
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016479echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016480if test ! -f Modules/Setup
16481then
16482 cp $srcdir/Modules/Setup.dist Modules/Setup
16483fi
16484
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016485echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016486if test ! -f Modules/Setup.local
16487then
16488 echo "# Edit this file for local setup changes" >Modules/Setup.local
16489fi
16490
16491echo "creating Makefile"
16492$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16493 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016494 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016495
16496case $ac_sys_system in
16497BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016499
16500 Support for BeOS is deprecated as of Python 2.6.
16501 See PEP 11 for the gory details.
16502 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016503$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016504
16505 Support for BeOS is deprecated as of Python 2.6.
16506 See PEP 11 for the gory details.
16507 " >&2;}
16508 ;;
16509*) ;;
16510esac
16511
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016512mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016513
16514if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16515 echo "" >&6
16516 echo "" >&6
16517 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
16518 echo "please run ./configure --with-optimizations" >&6
16519 echo "" >&6
16520 echo "" >&6
16521fi