blob: 40549d0299d72bacaf1fd5472c73c0ed1095d8ad [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
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690SVNVERSION
691ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100692ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000693AR
694RANLIB
695GNULD
696LINKCC
697RUNSHARED
698INSTSONAME
699LDLIBRARYDIR
700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
706GREP
707CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100708MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100709ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000710MAINCC
711CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719EXPORT_MACOSX_DEPLOYMENT_TARGET
720CONFIGURE_MACOSX_DEPLOYMENT_TARGET
721EXTRAMACHDEPPATH
722EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200723PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000724SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100725_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000726MACHDEP
727FRAMEWORKINSTALLAPPSPREFIX
728FRAMEWORKUNIXTOOLSPREFIX
729FRAMEWORKALTINSTALLLAST
730FRAMEWORKALTINSTALLFIRST
731FRAMEWORKINSTALLLAST
732FRAMEWORKINSTALLFIRST
733PYTHONFRAMEWORKINSTALLDIR
734PYTHONFRAMEWORKPREFIX
735PYTHONFRAMEWORKDIR
736PYTHONFRAMEWORKIDENTIFIER
737PYTHONFRAMEWORK
738LIPO_32BIT_FLAGS
739ARCH_RUN_32BIT
740UNIVERSALSDK
741CONFIG_ARGS
742SOVERSION
743VERSION
Martin Panterbc82de02016-07-29 05:52:32 +0000744GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100745PYTHON_FOR_BUILD
746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000754target_alias
755host_alias
756build_alias
757LIBS
758ECHO_T
759ECHO_N
760ECHO_C
761DEFS
762mandir
763localedir
764libdir
765psdir
766pdfdir
767dvidir
768htmldir
769infodir
770docdir
771oldincludedir
772includedir
773localstatedir
774sharedstatedir
775sysconfdir
776datadir
777datarootdir
778libexecdir
779sbindir
780bindir
781program_transform_name
782prefix
783exec_prefix
784PACKAGE_URL
785PACKAGE_BUGREPORT
786PACKAGE_STRING
787PACKAGE_VERSION
788PACKAGE_TARNAME
789PACKAGE_NAME
790PATH_SEPARATOR
791SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000792ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000793ac_user_opts='
794enable_option_checking
795enable_universalsdk
796with_universal_archs
797with_framework_name
798enable_framework
799with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600800with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000801with_cxx_main
802with_suffix
803enable_shared
804enable_profiling
805with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +0000806enable_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000807with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000808enable_toolbox_glue
809with_libs
810with_system_expat
811with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700812with_tcltk_includes
813with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000814with_dbmliborder
815with_signal_module
816with_dec_threads
817with_threads
818with_thread
819with_pth
820enable_ipv6
821with_doc_strings
822with_tsc
823with_pymalloc
824with_valgrind
825with_wctype_functions
826with_fpectl
827with_libm
828with_libc
829enable_big_digits
830enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500831with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800832with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000833'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000834 ac_precious_vars='build_alias
835host_alias
836target_alias
837CC
838CFLAGS
839LDFLAGS
840LIBS
841CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500842CPP
843PKG_CONFIG
844PKG_CONFIG_PATH
845PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000846
Guido van Rossum627b2d71993-12-24 10:39:16 +0000847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000849ac_init_help=
850ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000851ac_unrecognized_opts=
852ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# The variables have the same names as the options, with
854# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000855cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858no_recursion=
859prefix=NONE
860program_prefix=NONE
861program_suffix=NONE
862program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867x_includes=NONE
868x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000869
870# Installation directory options.
871# These are left unexpanded so users can "make install exec_prefix=/foo"
872# and all the variables that are supposed to be based on exec_prefix
873# by default will actually change.
874# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876bindir='${exec_prefix}/bin'
877sbindir='${exec_prefix}/sbin'
878libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000879datarootdir='${prefix}/share'
880datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881sysconfdir='${prefix}/etc'
882sharedstatedir='${prefix}/com'
883localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884includedir='${prefix}/include'
885oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000886docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
887infodir='${datarootdir}/info'
888htmldir='${docdir}'
889dvidir='${docdir}'
890pdfdir='${docdir}'
891psdir='${docdir}'
892libdir='${exec_prefix}/lib'
893localedir='${datarootdir}/locale'
894mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000895
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000897ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 # If the previous option needs an argument, assign it.
901 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903 ac_prev=
904 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906
Martin v. Löwiseba40652007-08-30 20:10:57 +0000907 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000908 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
909 *=) ac_optarg= ;;
910 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000911 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913 # Accept the important Cygnus configure options, so we can diagnose typos.
914
Martin v. Löwiseba40652007-08-30 20:10:57 +0000915 case $ac_dashdash$ac_option in
916 --)
917 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 -bindir | --bindir | --bindi | --bind | --bin | --bi)
920 ac_prev=bindir ;;
921 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 -cache-file | --cache-file | --cache-fil | --cache-fi \
930 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
931 ac_prev=cache_file ;;
932 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
933 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 cache_file=$ac_optarg ;;
935
936 --config-cache | -C)
937 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000943
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
945 | --dataroo | --dataro | --datar)
946 ac_prev=datarootdir ;;
947 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
948 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
949 datarootdir=$ac_optarg ;;
950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000955 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 ac_useropt_orig=$ac_useropt
957 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
958 case $ac_user_opts in
959 *"
960"enable_$ac_useropt"
961"*) ;;
962 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
963 ac_unrecognized_sep=', ';;
964 esac
965 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000966
967 -docdir | --docdir | --docdi | --doc | --do)
968 ac_prev=docdir ;;
969 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
970 docdir=$ac_optarg ;;
971
972 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
973 ac_prev=dvidir ;;
974 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
975 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000978 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000979 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000980 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000981 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000982 ac_useropt_orig=$ac_useropt
983 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
984 case $ac_user_opts in
985 *"
986"enable_$ac_useropt"
987"*) ;;
988 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
989 ac_unrecognized_sep=', ';;
990 esac
991 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
994 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
995 | --exec | --exe | --ex)
996 ac_prev=exec_prefix ;;
997 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
998 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
999 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001000 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
1002 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 # Obsolete; use --with-gas.
1004 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 -help | --help | --hel | --he | -h)
1007 ac_init_help=long ;;
1008 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1009 ac_init_help=recursive ;;
1010 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1011 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
Martin v. Löwiseba40652007-08-30 20:10:57 +00001018 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1019 ac_prev=htmldir ;;
1020 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1021 | --ht=*)
1022 htmldir=$ac_optarg ;;
1023
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024 -includedir | --includedir | --includedi | --included | --include \
1025 | --includ | --inclu | --incl | --inc)
1026 ac_prev=includedir ;;
1027 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1028 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030
1031 -infodir | --infodir | --infodi | --infod | --info | --inf)
1032 ac_prev=infodir ;;
1033 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -libdir | --libdir | --libdi | --libd)
1037 ac_prev=libdir ;;
1038 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1042 | --libexe | --libex | --libe)
1043 ac_prev=libexecdir ;;
1044 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1045 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Martin v. Löwiseba40652007-08-30 20:10:57 +00001048 -localedir | --localedir | --localedi | --localed | --locale)
1049 ac_prev=localedir ;;
1050 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1051 localedir=$ac_optarg ;;
1052
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001054 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 ac_prev=localstatedir ;;
1056 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001057 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
1060 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1061 ac_prev=mandir ;;
1062 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 # Obsolete; use --without-fp.
1067 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001068
1069 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 no_create=yes ;;
1072
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1074 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1075 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1078 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1079 | --oldin | --oldi | --old | --ol | --o)
1080 ac_prev=oldincludedir ;;
1081 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1082 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1083 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001085
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1087 ac_prev=prefix ;;
1088 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
1091 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1092 | --program-pre | --program-pr | --program-p)
1093 ac_prev=program_prefix ;;
1094 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1095 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1099 | --program-suf | --program-su | --program-s)
1100 ac_prev=program_suffix ;;
1101 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1102 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-transform-name | --program-transform-name \
1106 | --program-transform-nam | --program-transform-na \
1107 | --program-transform-n | --program-transform- \
1108 | --program-transform | --program-transfor \
1109 | --program-transfo | --program-transf \
1110 | --program-trans | --program-tran \
1111 | --progr-tra | --program-tr | --program-t)
1112 ac_prev=program_transform_name ;;
1113 -program-transform-name=* | --program-transform-name=* \
1114 | --program-transform-nam=* | --program-transform-na=* \
1115 | --program-transform-n=* | --program-transform-=* \
1116 | --program-transform=* | --program-transfor=* \
1117 | --program-transfo=* | --program-transf=* \
1118 | --program-trans=* | --program-tran=* \
1119 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001121
Martin v. Löwiseba40652007-08-30 20:10:57 +00001122 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1123 ac_prev=pdfdir ;;
1124 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1125 pdfdir=$ac_optarg ;;
1126
1127 -psdir | --psdir | --psdi | --psd | --ps)
1128 ac_prev=psdir ;;
1129 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1130 psdir=$ac_optarg ;;
1131
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1133 | -silent | --silent | --silen | --sile | --sil)
1134 silent=yes ;;
1135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1137 ac_prev=sbindir ;;
1138 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1139 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141
1142 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1143 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1144 | --sharedst | --shareds | --shared | --share | --shar \
1145 | --sha | --sh)
1146 ac_prev=sharedstatedir ;;
1147 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1148 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1149 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1150 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001153 -site | --site | --sit)
1154 ac_prev=site ;;
1155 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1159 ac_prev=srcdir ;;
1160 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1164 | --syscon | --sysco | --sysc | --sys | --sy)
1165 ac_prev=sysconfdir ;;
1166 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1167 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001169
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1176 verbose=yes ;;
1177
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 -version | --version | --versio | --versi | --vers | -V)
1179 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
1181 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001182 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001183 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001184 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001185 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001186 ac_useropt_orig=$ac_useropt
1187 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1188 case $ac_user_opts in
1189 *"
1190"with_$ac_useropt"
1191"*) ;;
1192 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1193 ac_unrecognized_sep=', ';;
1194 esac
1195 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 --x)
1214 # Obsolete; use --with-x.
1215 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1218 | --x-incl | --x-inc | --x-in | --x-i)
1219 ac_prev=x_includes ;;
1220 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1221 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
1224 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1225 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1226 ac_prev=x_libraries ;;
1227 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1228 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001231 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1232Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233 ;;
1234
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 *=*)
1236 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1237 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001238 case $ac_envvar in #(
1239 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001240 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001241 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001242 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 export $ac_envvar ;;
1244
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001245 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001247 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001249 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001250 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
1253 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001254done
1255
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001258 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259fi
1260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001261if test -n "$ac_unrecognized_opts"; then
1262 case $enable_option_checking in
1263 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001264 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001265 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1266 esac
1267fi
1268
1269# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001270for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1271 datadir sysconfdir sharedstatedir localstatedir includedir \
1272 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naoki6a04ef72017-03-29 01:50:48 +09001273 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001274do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001275 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001276 # Remove trailing slashes.
1277 case $ac_val in
1278 */ )
1279 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1280 eval $ac_var=\$ac_val;;
1281 esac
1282 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001283 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001284 [\\/$]* | ?:[\\/]* ) continue;;
1285 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001287 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001288done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001289
Martin v. Löwis11437992002-04-12 09:54:03 +00001290# There might be people who depend on the old broken behavior: `$host'
1291# used to hold the argument of --host etc.
1292# FIXME: To remove some day.
1293build=$build_alias
1294host=$host_alias
1295target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296
Martin v. Löwis11437992002-04-12 09:54:03 +00001297# FIXME: To remove some day.
1298if test "x$host_alias" != x; then
1299 if test "x$build_alias" = x; then
1300 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 elif test "x$build_alias" != "x$host_alias"; then
1302 cross_compiling=yes
1303 fi
1304fi
1305
1306ac_tool_prefix=
1307test -n "$host_alias" && ac_tool_prefix=$host_alias-
1308
1309test "$silent" = yes && exec 6>/dev/null
1310
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwiseba40652007-08-30 20:10:57 +00001312ac_pwd=`pwd` && test -n "$ac_pwd" &&
1313ac_ls_di=`ls -di .` &&
1314ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001315 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001316test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001317 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001318
1319
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320# Find the source files, if location was not specified.
1321if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001322 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001323 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001324 ac_confdir=`$as_dirname -- "$as_myself" ||
1325$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1326 X"$as_myself" : 'X\(//\)[^/]' \| \
1327 X"$as_myself" : 'X\(//\)$' \| \
1328 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1329$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001330 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1331 s//\1/
1332 q
1333 }
1334 /^X\(\/\/\)[^/].*/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)$/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\).*/{
1343 s//\1/
1344 q
1345 }
1346 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001347 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001348 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001349 srcdir=..
1350 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351else
1352 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001354if test ! -r "$srcdir/$ac_unique_file"; then
1355 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001356 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1359ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001360 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001361 pwd)`
1362# When building in place, set srcdir=.
1363if test "$ac_abs_confdir" = "$ac_pwd"; then
1364 srcdir=.
1365fi
1366# Remove unnecessary trailing slashes from srcdir.
1367# Double slashes in file names in object file debugging info
1368# mess up M-x gdb in Emacs.
1369case $srcdir in
1370*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1371esac
1372for ac_var in $ac_precious_vars; do
1373 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1374 eval ac_env_${ac_var}_value=\$${ac_var}
1375 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1376 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1377done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001378
Martin v. Löwis11437992002-04-12 09:54:03 +00001379#
1380# Report the --help message.
1381#
1382if test "$ac_init_help" = "long"; then
1383 # Omit some internal or obsolete options to make the list less imposing.
1384 # This message is too long to be a string in the A/UX 3.1 sh.
1385 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001386\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001387
1388Usage: $0 [OPTION]... [VAR=VALUE]...
1389
1390To assign environment variables (e.g., CC, CFLAGS...), specify them as
1391VAR=VALUE. See below for descriptions of some of the useful variables.
1392
1393Defaults for the options are specified in brackets.
1394
1395Configuration:
1396 -h, --help display this help and exit
1397 --help=short display options specific to this package
1398 --help=recursive display the short help of all the included packages
1399 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001400 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001401 --cache-file=FILE cache test results in FILE [disabled]
1402 -C, --config-cache alias for \`--cache-file=config.cache'
1403 -n, --no-create do not create output files
1404 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1405
Martin v. Löwis11437992002-04-12 09:54:03 +00001406Installation directories:
1407 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001408 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001409 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001410 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412By default, \`make install' will install all the files in
1413\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1414an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1415for instance \`--prefix=\$HOME'.
1416
1417For better control, use the options below.
1418
1419Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001420 --bindir=DIR user executables [EPREFIX/bin]
1421 --sbindir=DIR system admin executables [EPREFIX/sbin]
1422 --libexecdir=DIR program executables [EPREFIX/libexec]
1423 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1424 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1425 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1426 --libdir=DIR object code libraries [EPREFIX/lib]
1427 --includedir=DIR C header files [PREFIX/include]
1428 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1429 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1430 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1431 --infodir=DIR info documentation [DATAROOTDIR/info]
1432 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1433 --mandir=DIR man documentation [DATAROOTDIR/man]
1434 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1435 --htmldir=DIR html documentation [DOCDIR]
1436 --dvidir=DIR dvi documentation [DOCDIR]
1437 --pdfdir=DIR pdf documentation [DOCDIR]
1438 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001439_ACEOF
1440
1441 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001442
1443System types:
1444 --build=BUILD configure for building on BUILD [guessed]
1445 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001446 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001447_ACEOF
1448fi
1449
1450if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001451 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001452 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001453 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001454 cat <<\_ACEOF
1455
1456Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001457 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1459 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001460 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001461 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --enable-framework[=INSTALLDIR]
1463 Build (MacOSX|Darwin) framework
1464 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001465 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00001466 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1467 etc). Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1469 --enable-ipv6 Enable ipv6 (with ipv4) support
1470 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001471 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001472 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001474 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476Optional Packages:
1477 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1478 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001479 --with-universal-archs=ARCH
1480 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001481 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001482 --with-framework-name=FRAMEWORK
1483 specify an alternate name of the framework built
1484 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001486 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001487 --with-cxx-main=<compiler>
1488 compile main() and link python executable with C++
1489 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with-suffix=.exe set executable suffix
1491 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001492 --with-lto Enable Link Time Optimization in PGO builds.
1493 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001494 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001495 --with-system-expat build pyexpat module using an installed expat
1496 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001497 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001498 --with-tcltk-includes='-I...'
1499 override search for Tcl and Tk include files
1500 --with-tcltk-libs='-L...'
1501 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001502 --with-dbmliborder=db1:db2:...
1503 order to check db backends for dbm. Valid value is a
1504 colon separated string with the backend names
1505 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-signal-module disable/enable signal module
1507 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1508 --with(out)-threads[=DIRECTORY]
1509 disable/enable thread support
1510 --with(out)-thread[=DIRECTORY]
1511 deprecated; use --with(out)-threads
1512 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001514 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001516 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-fpectl enable SIGFPE catching
1519 --with-libm=STRING math library
1520 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001521 --with(out)-computed-gotos
1522 Use computed gotos in evaluation loop (enabled by
1523 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001524 --with(out)-ensurepip=[=OPTION]
1525 "install" or "upgrade" using bundled pip, default is
1526 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528Some influential environment variables:
1529 CC C compiler command
1530 CFLAGS C compiler flags
1531 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1532 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001533 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001534 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001536 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001537 PKG_CONFIG path to pkg-config utility
1538 PKG_CONFIG_PATH
1539 directories to add to pkg-config's search path
1540 PKG_CONFIG_LIBDIR
1541 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001542
1543Use these variables to override the choices made by `configure' or to help
1544it to find libraries and programs with nonstandard names/locations.
1545
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001546Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001548ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001549fi
1550
1551if test "$ac_init_help" = "recursive"; then
1552 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001554 test -d "$ac_dir" ||
1555 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1556 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 ac_builddir=.
1558
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559case "$ac_dir" in
1560.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1561*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001562 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001564 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001565 case $ac_top_builddir_sub in
1566 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1567 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1568 esac ;;
1569esac
1570ac_abs_top_builddir=$ac_pwd
1571ac_abs_builddir=$ac_pwd$ac_dir_suffix
1572# for backward compatibility:
1573ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001574
1575case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 ac_top_srcdir=$ac_top_builddir_sub
1579 ac_abs_top_srcdir=$ac_pwd ;;
1580 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 ac_top_srcdir=$srcdir
1583 ac_abs_top_srcdir=$srcdir ;;
1584 *) # Relative name.
1585 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1586 ac_top_srcdir=$ac_top_build_prefix$srcdir
1587 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001588esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001590
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 cd "$ac_dir" || { ac_status=$?; continue; }
1592 # Check for guested configure.
1593 if test -f "$ac_srcdir/configure.gnu"; then
1594 echo &&
1595 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1596 elif test -f "$ac_srcdir/configure"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001599 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001600 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 fi || ac_status=$?
1602 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 done
1604fi
1605
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001607if $ac_init_version; then
1608 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001609python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001610generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001611
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001612Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613This configure script is free software; the Free Software Foundation
1614gives unlimited permission to copy, distribute and modify it.
1615_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001618
1619## ------------------------ ##
1620## Autoconf initialization. ##
1621## ------------------------ ##
1622
1623# ac_fn_c_try_compile LINENO
1624# --------------------------
1625# Try to compile conftest.$ac_ext, and return whether this succeeded.
1626ac_fn_c_try_compile ()
1627{
1628 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629 rm -f conftest.$ac_objext
1630 if { { ac_try="$ac_compile"
1631case "(($ac_try" in
1632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633 *) ac_try_echo=$ac_try;;
1634esac
1635eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636$as_echo "$ac_try_echo"; } >&5
1637 (eval "$ac_compile") 2>conftest.err
1638 ac_status=$?
1639 if test -s conftest.err; then
1640 grep -v '^ *+' conftest.err >conftest.er1
1641 cat conftest.er1 >&5
1642 mv -f conftest.er1 conftest.err
1643 fi
1644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1645 test $ac_status = 0; } && {
1646 test -z "$ac_c_werror_flag" ||
1647 test ! -s conftest.err
1648 } && test -s conftest.$ac_objext; then :
1649 ac_retval=0
1650else
1651 $as_echo "$as_me: failed program was:" >&5
1652sed 's/^/| /' conftest.$ac_ext >&5
1653
1654 ac_retval=1
1655fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001656 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001657 as_fn_set_status $ac_retval
1658
1659} # ac_fn_c_try_compile
1660
1661# ac_fn_c_try_cpp LINENO
1662# ----------------------
1663# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1664ac_fn_c_try_cpp ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 if { { ac_try="$ac_cpp conftest.$ac_ext"
1668case "(($ac_try" in
1669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1670 *) ac_try_echo=$ac_try;;
1671esac
1672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1673$as_echo "$ac_try_echo"; } >&5
1674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1675 ac_status=$?
1676 if test -s conftest.err; then
1677 grep -v '^ *+' conftest.err >conftest.er1
1678 cat conftest.er1 >&5
1679 mv -f conftest.er1 conftest.err
1680 fi
1681 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001682 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001683 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1684 test ! -s conftest.err
1685 }; then :
1686 ac_retval=0
1687else
1688 $as_echo "$as_me: failed program was:" >&5
1689sed 's/^/| /' conftest.$ac_ext >&5
1690
1691 ac_retval=1
1692fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001693 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001694 as_fn_set_status $ac_retval
1695
1696} # ac_fn_c_try_cpp
1697
1698# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1699# -------------------------------------------------------
1700# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1701# the include files in INCLUDES and setting the cache variable VAR
1702# accordingly.
1703ac_fn_c_check_header_mongrel ()
1704{
1705 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001706 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1708$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001709if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001710 $as_echo_n "(cached) " >&6
1711fi
1712eval ac_res=\$$3
1713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1714$as_echo "$ac_res" >&6; }
1715else
1716 # Is the header compilable?
1717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1718$as_echo_n "checking $2 usability... " >&6; }
1719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720/* end confdefs.h. */
1721$4
1722#include <$2>
1723_ACEOF
1724if ac_fn_c_try_compile "$LINENO"; then :
1725 ac_header_compiler=yes
1726else
1727 ac_header_compiler=no
1728fi
1729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1731$as_echo "$ac_header_compiler" >&6; }
1732
1733# Is the header present?
1734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1735$as_echo_n "checking $2 presence... " >&6; }
1736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1737/* end confdefs.h. */
1738#include <$2>
1739_ACEOF
1740if ac_fn_c_try_cpp "$LINENO"; then :
1741 ac_header_preproc=yes
1742else
1743 ac_header_preproc=no
1744fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001745rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1747$as_echo "$ac_header_preproc" >&6; }
1748
1749# So? What about this header?
1750case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1751 yes:no: )
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1753$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1755$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1756 ;;
1757 no:yes:* )
1758 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1759$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1761$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1763$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1765$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001768( $as_echo "## --------------------------------------- ##
1769## Report this to https://bugs.python.org/ ##
1770## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001771 ) | sed "s/^/$as_me: WARNING: /" >&2
1772 ;;
1773esac
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001776if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001777 $as_echo_n "(cached) " >&6
1778else
1779 eval "$3=\$ac_header_compiler"
1780fi
1781eval ac_res=\$$3
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1783$as_echo "$ac_res" >&6; }
1784fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001786
1787} # ac_fn_c_check_header_mongrel
1788
1789# ac_fn_c_try_run LINENO
1790# ----------------------
1791# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1792# that executables *can* be run.
1793ac_fn_c_try_run ()
1794{
1795 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1796 if { { ac_try="$ac_link"
1797case "(($ac_try" in
1798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1799 *) ac_try_echo=$ac_try;;
1800esac
1801eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1802$as_echo "$ac_try_echo"; } >&5
1803 (eval "$ac_link") 2>&5
1804 ac_status=$?
1805 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1806 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1807 { { case "(($ac_try" in
1808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1809 *) ac_try_echo=$ac_try;;
1810esac
1811eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1812$as_echo "$ac_try_echo"; } >&5
1813 (eval "$ac_try") 2>&5
1814 ac_status=$?
1815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816 test $ac_status = 0; }; }; then :
1817 ac_retval=0
1818else
1819 $as_echo "$as_me: program exited with status $ac_status" >&5
1820 $as_echo "$as_me: failed program was:" >&5
1821sed 's/^/| /' conftest.$ac_ext >&5
1822
1823 ac_retval=$ac_status
1824fi
1825 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001827 as_fn_set_status $ac_retval
1828
1829} # ac_fn_c_try_run
1830
1831# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1832# -------------------------------------------------------
1833# Tests whether HEADER exists and can be compiled using the include files in
1834# INCLUDES, setting the cache variable VAR accordingly.
1835ac_fn_c_check_header_compile ()
1836{
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1839$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001840if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001841 $as_echo_n "(cached) " >&6
1842else
1843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1844/* end confdefs.h. */
1845$4
1846#include <$2>
1847_ACEOF
1848if ac_fn_c_try_compile "$LINENO"; then :
1849 eval "$3=yes"
1850else
1851 eval "$3=no"
1852fi
1853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1854fi
1855eval ac_res=\$$3
1856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1857$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001859
1860} # ac_fn_c_check_header_compile
1861
1862# ac_fn_c_try_link LINENO
1863# -----------------------
1864# Try to link conftest.$ac_ext, and return whether this succeeded.
1865ac_fn_c_try_link ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 rm -f conftest.$ac_objext conftest$ac_exeext
1869 if { { ac_try="$ac_link"
1870case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_link") 2>conftest.err
1877 ac_status=$?
1878 if test -s conftest.err; then
1879 grep -v '^ *+' conftest.err >conftest.er1
1880 cat conftest.er1 >&5
1881 mv -f conftest.er1 conftest.err
1882 fi
1883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1884 test $ac_status = 0; } && {
1885 test -z "$ac_c_werror_flag" ||
1886 test ! -s conftest.err
1887 } && test -s conftest$ac_exeext && {
1888 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001889 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001890 }; then :
1891 ac_retval=0
1892else
1893 $as_echo "$as_me: failed program was:" >&5
1894sed 's/^/| /' conftest.$ac_ext >&5
1895
1896 ac_retval=1
1897fi
1898 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1899 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1900 # interfere with the next link command; also delete a directory that is
1901 # left behind by Apple's compiler. We do this before executing the actions.
1902 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001903 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001904 as_fn_set_status $ac_retval
1905
1906} # ac_fn_c_try_link
1907
1908# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1909# -------------------------------------------
1910# Tests whether TYPE exists after having included INCLUDES, setting cache
1911# variable VAR accordingly.
1912ac_fn_c_check_type ()
1913{
1914 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1916$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001917if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001918 $as_echo_n "(cached) " >&6
1919else
1920 eval "$3=no"
1921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1922/* end confdefs.h. */
1923$4
1924int
1925main ()
1926{
1927if (sizeof ($2))
1928 return 0;
1929 ;
1930 return 0;
1931}
1932_ACEOF
1933if ac_fn_c_try_compile "$LINENO"; then :
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
1948else
1949 eval "$3=yes"
1950fi
1951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1952fi
1953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1954fi
1955eval ac_res=\$$3
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1957$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001958 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001959
1960} # ac_fn_c_check_type
1961
1962# ac_fn_c_find_uintX_t LINENO BITS VAR
1963# ------------------------------------
1964# Finds an unsigned integer type with width BITS, setting cache variable VAR
1965# accordingly.
1966ac_fn_c_find_uintX_t ()
1967{
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1970$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001971if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001972 $as_echo_n "(cached) " >&6
1973else
1974 eval "$3=no"
1975 # Order is important - never check a type that is potentially smaller
1976 # than half of the expected target width.
1977 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1978 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$ac_includes_default
1982int
1983main ()
1984{
1985static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001986test_array [0] = 0;
1987return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001988
1989 ;
1990 return 0;
1991}
1992_ACEOF
1993if ac_fn_c_try_compile "$LINENO"; then :
1994 case $ac_type in #(
1995 uint$2_t) :
1996 eval "$3=yes" ;; #(
1997 *) :
1998 eval "$3=\$ac_type" ;;
1999esac
2000fi
2001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002002 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002003
2004else
2005 break
2006fi
2007 done
2008fi
2009eval ac_res=\$$3
2010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002012 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002013
2014} # ac_fn_c_find_uintX_t
2015
2016# ac_fn_c_find_intX_t LINENO BITS VAR
2017# -----------------------------------
2018# Finds a signed integer type with width BITS, setting cache variable VAR
2019# accordingly.
2020ac_fn_c_find_intX_t ()
2021{
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2024$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002025if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002026 $as_echo_n "(cached) " >&6
2027else
2028 eval "$3=no"
2029 # Order is important - never check a type that is potentially smaller
2030 # than half of the expected target width.
2031 for ac_type in int$2_t 'int' 'long int' \
2032 'long long int' 'short int' 'signed char'; do
2033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2034/* end confdefs.h. */
2035$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002036 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002037int
2038main ()
2039{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002040static 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 +01002041test_array [0] = 0;
2042return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002043
2044 ;
2045 return 0;
2046}
2047_ACEOF
2048if ac_fn_c_try_compile "$LINENO"; then :
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002052 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002053int
2054main ()
2055{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002056static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002057 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002058test_array [0] = 0;
2059return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060
2061 ;
2062 return 0;
2063}
2064_ACEOF
2065if ac_fn_c_try_compile "$LINENO"; then :
2066
2067else
2068 case $ac_type in #(
2069 int$2_t) :
2070 eval "$3=yes" ;; #(
2071 *) :
2072 eval "$3=\$ac_type" ;;
2073esac
2074fi
2075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002078 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002079
2080else
2081 break
2082fi
2083 done
2084fi
2085eval ac_res=\$$3
2086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2087$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002088 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002089
2090} # ac_fn_c_find_intX_t
2091
2092# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2093# --------------------------------------------
2094# Tries to find the compile-time value of EXPR in a program that includes
2095# INCLUDES, setting VAR accordingly. Returns whether the value could be
2096# computed
2097ac_fn_c_compute_int ()
2098{
2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100 if test "$cross_compiling" = yes; then
2101 # Depending upon the size, compute the lo and hi bounds.
2102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002109test_array [0] = 0;
2110return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_lo=0 ac_mid=0
2118 while :; do
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002126test_array [0] = 0;
2127return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_hi=$ac_mid; break
2135else
2136 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2137 if test $ac_lo -le $ac_mid; then
2138 ac_lo= ac_hi=
2139 break
2140 fi
2141 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 done
2145else
2146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2147/* end confdefs.h. */
2148$4
2149int
2150main ()
2151{
2152static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002153test_array [0] = 0;
2154return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002155
2156 ;
2157 return 0;
2158}
2159_ACEOF
2160if ac_fn_c_try_compile "$LINENO"; then :
2161 ac_hi=-1 ac_mid=-1
2162 while :; do
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164/* end confdefs.h. */
2165$4
2166int
2167main ()
2168{
2169static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002170test_array [0] = 0;
2171return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002172
2173 ;
2174 return 0;
2175}
2176_ACEOF
2177if ac_fn_c_try_compile "$LINENO"; then :
2178 ac_lo=$ac_mid; break
2179else
2180 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2181 if test $ac_mid -le $ac_hi; then
2182 ac_lo= ac_hi=
2183 break
2184 fi
2185 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2186fi
2187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2188 done
2189else
2190 ac_lo= ac_hi=
2191fi
2192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195# Binary search between lo and hi bounds.
2196while test "x$ac_lo" != "x$ac_hi"; do
2197 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h. */
2200$4
2201int
2202main ()
2203{
2204static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002205test_array [0] = 0;
2206return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002207
2208 ;
2209 return 0;
2210}
2211_ACEOF
2212if ac_fn_c_try_compile "$LINENO"; then :
2213 ac_hi=$ac_mid
2214else
2215 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218done
2219case $ac_lo in #((
2220?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2221'') ac_retval=1 ;;
2222esac
2223 else
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226$4
2227static long int longval () { return $2; }
2228static unsigned long int ulongval () { return $2; }
2229#include <stdio.h>
2230#include <stdlib.h>
2231int
2232main ()
2233{
2234
2235 FILE *f = fopen ("conftest.val", "w");
2236 if (! f)
2237 return 1;
2238 if (($2) < 0)
2239 {
2240 long int i = longval ();
2241 if (i != ($2))
2242 return 1;
2243 fprintf (f, "%ld", i);
2244 }
2245 else
2246 {
2247 unsigned long int i = ulongval ();
2248 if (i != ($2))
2249 return 1;
2250 fprintf (f, "%lu", i);
2251 }
2252 /* Do not output a trailing newline, as this causes \r\n confusion
2253 on some platforms. */
2254 return ferror (f) || fclose (f) != 0;
2255
2256 ;
2257 return 0;
2258}
2259_ACEOF
2260if ac_fn_c_try_run "$LINENO"; then :
2261 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2262else
2263 ac_retval=1
2264fi
2265rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2266 conftest.$ac_objext conftest.beam conftest.$ac_ext
2267rm -f conftest.val
2268
2269 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002270 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002271 as_fn_set_status $ac_retval
2272
2273} # ac_fn_c_compute_int
2274
2275# ac_fn_c_check_func LINENO FUNC VAR
2276# ----------------------------------
2277# Tests whether FUNC exists, setting the cache variable VAR accordingly
2278ac_fn_c_check_func ()
2279{
2280 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2282$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002283if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002284 $as_echo_n "(cached) " >&6
2285else
2286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2287/* end confdefs.h. */
2288/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2289 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2290#define $2 innocuous_$2
2291
2292/* System header to define __stub macros and hopefully few prototypes,
2293 which can conflict with char $2 (); below.
2294 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2295 <limits.h> exists even on freestanding compilers. */
2296
2297#ifdef __STDC__
2298# include <limits.h>
2299#else
2300# include <assert.h>
2301#endif
2302
2303#undef $2
2304
2305/* Override any GCC internal prototype to avoid an error.
2306 Use char because int might match the return type of a GCC
2307 builtin and then its argument prototype would still apply. */
2308#ifdef __cplusplus
2309extern "C"
2310#endif
2311char $2 ();
2312/* The GNU C library defines this for functions which it implements
2313 to always fail with ENOSYS. Some functions are actually named
2314 something starting with __ and the normal name is an alias. */
2315#if defined __stub_$2 || defined __stub___$2
2316choke me
2317#endif
2318
2319int
2320main ()
2321{
2322return $2 ();
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_link "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext \
2333 conftest$ac_exeext conftest.$ac_ext
2334fi
2335eval ac_res=\$$3
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002338 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002339
2340} # ac_fn_c_check_func
2341
2342# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2343# ----------------------------------------------------
2344# Tries to find if the field MEMBER exists in type AGGR, after including
2345# INCLUDES, setting cache variable VAR accordingly.
2346ac_fn_c_check_member ()
2347{
2348 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2350$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002351if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002352 $as_echo_n "(cached) " >&6
2353else
2354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2355/* end confdefs.h. */
2356$5
2357int
2358main ()
2359{
2360static $2 ac_aggr;
2361if (ac_aggr.$3)
2362return 0;
2363 ;
2364 return 0;
2365}
2366_ACEOF
2367if ac_fn_c_try_compile "$LINENO"; then :
2368 eval "$4=yes"
2369else
2370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2371/* end confdefs.h. */
2372$5
2373int
2374main ()
2375{
2376static $2 ac_aggr;
2377if (sizeof ac_aggr.$3)
2378return 0;
2379 ;
2380 return 0;
2381}
2382_ACEOF
2383if ac_fn_c_try_compile "$LINENO"; then :
2384 eval "$4=yes"
2385else
2386 eval "$4=no"
2387fi
2388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391fi
2392eval ac_res=\$$4
2393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2394$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002395 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002396
2397} # ac_fn_c_check_member
2398
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002399# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2400# ---------------------------------------------
2401# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2402# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002403ac_fn_c_check_decl ()
2404{
2405 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002406 as_decl_name=`echo $2|sed 's/ *(.*//'`
2407 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2409$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002410if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002411 $as_echo_n "(cached) " >&6
2412else
2413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2414/* end confdefs.h. */
2415$4
2416int
2417main ()
2418{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002419#ifndef $as_decl_name
2420#ifdef __cplusplus
2421 (void) $as_decl_use;
2422#else
2423 (void) $as_decl_name;
2424#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002425#endif
2426
2427 ;
2428 return 0;
2429}
2430_ACEOF
2431if ac_fn_c_try_compile "$LINENO"; then :
2432 eval "$3=yes"
2433else
2434 eval "$3=no"
2435fi
2436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2437fi
2438eval ac_res=\$$3
2439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2440$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002441 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002442
2443} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002444cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002445This file contains any messages produced by compilers while
2446running configure, to aid debugging if configure makes a mistake.
2447
Martin v. Löwis174440b2008-10-03 08:59:41 +00002448It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002449generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002450
2451 $ $0 $@
2452
2453_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002455{
2456cat <<_ASUNAME
2457## --------- ##
2458## Platform. ##
2459## --------- ##
2460
2461hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2462uname -m = `(uname -m) 2>/dev/null || echo unknown`
2463uname -r = `(uname -r) 2>/dev/null || echo unknown`
2464uname -s = `(uname -s) 2>/dev/null || echo unknown`
2465uname -v = `(uname -v) 2>/dev/null || echo unknown`
2466
2467/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2468/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2469
2470/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2471/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2472/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002474/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2475/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2476/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2477
2478_ASUNAME
2479
2480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2481for as_dir in $PATH
2482do
2483 IFS=$as_save_IFS
2484 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002485 $as_echo "PATH: $as_dir"
2486 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002487IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002488
2489} >&5
2490
2491cat >&5 <<_ACEOF
2492
2493
2494## ----------- ##
2495## Core tests. ##
2496## ----------- ##
2497
2498_ACEOF
2499
2500
2501# Keep a trace of the command line.
2502# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002503# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002504# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002505# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002506ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002507ac_configure_args0=
2508ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002509ac_must_keep_next=false
2510for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002511do
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 for ac_arg
2513 do
2514 case $ac_arg in
2515 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2516 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2517 | -silent | --silent | --silen | --sile | --sil)
2518 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002520 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 esac
2522 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002523 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002525 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002527 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002529 case $ac_arg in
2530 *=* | --config-cache | -C | -disable-* | --disable-* \
2531 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2532 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2533 | -with-* | --with-* | -without-* | --without-* | --x)
2534 case "$ac_configure_args0 " in
2535 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2536 esac
2537 ;;
2538 -* ) ac_must_keep_next=true ;;
2539 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002541 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002542 ;;
2543 esac
2544 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002545done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002546{ ac_configure_args0=; unset ac_configure_args0;}
2547{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002548
2549# When interrupted or exit'd, cleanup temporary files, and complete
2550# config.log. We remove comments because anyway the quotes in there
2551# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552# WARNING: Use '\'' to represent an apostrophe within the trap.
2553# 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 +00002554trap 'exit_status=$?
2555 # Save into config.log some information that might help in debugging.
2556 {
2557 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002558
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002559 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002560## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002561## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 echo
2563 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564(
2565 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2566 eval ac_val=\$$ac_var
2567 case $ac_val in #(
2568 *${as_nl}*)
2569 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002570 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2571$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 esac
2573 case $ac_var in #(
2574 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002575 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2576 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577 esac ;;
2578 esac
2579 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002581 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2582 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 "s/'\''/'\''\\\\'\'''\''/g;
2585 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2586 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002587 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002589 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 esac |
2591 sort
2592)
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002594
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002595 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002596## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002597## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002598 echo
2599 for ac_var in $ac_subst_vars
2600 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 eval ac_val=\$$ac_var
2602 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002603 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002605 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002606 done | sort
2607 echo
2608
2609 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002610 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002612## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 echo
2614 for ac_var in $ac_subst_files
2615 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 eval ac_val=\$$ac_var
2617 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002620 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002621 done | sort
2622 echo
2623 fi
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002626 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002627## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002628## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 echo
2632 fi
2633 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002634 $as_echo "$as_me: caught signal $ac_signal"
2635 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 rm -f core *.core core.conftest.* &&
2638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002641for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002642 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002643done
2644ac_signal=0
2645
2646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002648
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002649$as_echo "/* confdefs.h */" > confdefs.h
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651# Predefined preprocessor variables.
2652
2653cat >>confdefs.h <<_ACEOF
2654#define PACKAGE_NAME "$PACKAGE_NAME"
2655_ACEOF
2656
Martin v. Löwis11437992002-04-12 09:54:03 +00002657cat >>confdefs.h <<_ACEOF
2658#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2659_ACEOF
2660
Martin v. Löwis11437992002-04-12 09:54:03 +00002661cat >>confdefs.h <<_ACEOF
2662#define PACKAGE_VERSION "$PACKAGE_VERSION"
2663_ACEOF
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_STRING "$PACKAGE_STRING"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2671_ACEOF
2672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_URL "$PACKAGE_URL"
2675_ACEOF
2676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677
2678# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679# Prefer an explicitly selected file to automatically selected ones.
2680ac_site_file1=NONE
2681ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002683 # We do not want a PATH search for config.site.
2684 case $CONFIG_SITE in #((
2685 -*) ac_site_file1=./$CONFIG_SITE;;
2686 */*) ac_site_file1=$CONFIG_SITE;;
2687 *) ac_site_file1=./$CONFIG_SITE;;
2688 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002690 ac_site_file1=$prefix/share/config.site
2691 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002693 ac_site_file1=$ac_default_prefix/share/config.site
2694 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002696for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002697do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002698 test "x$ac_site_file" = xNONE && continue
2699 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2701$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002703 . "$ac_site_file" \
2704 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2705$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2706as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002707See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708 fi
2709done
2710
2711if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002712 # Some versions of bash will fail to source /dev/null (special files
2713 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2714 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2716$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2719 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 esac
2721 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002723 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2724$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 >$cache_file
2726fi
2727
2728# Check that the precious variables saved in the cache have kept the same
2729# value.
2730ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002731for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2733 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2735 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 case $ac_old_set,$ac_new_set in
2737 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2739$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 +00002740 ac_cache_corrupted=: ;;
2741 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2743$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 ac_cache_corrupted=: ;;
2745 ,);;
2746 *)
2747 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002748 # differences in whitespace do not lead to failure.
2749 ac_old_val_w=`echo x $ac_old_val`
2750 ac_new_val_w=`echo x $ac_new_val`
2751 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2753$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2754 ac_cache_corrupted=:
2755 else
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2757$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2758 eval $ac_var=\$ac_old_val
2759 fi
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2761$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2762 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2763$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002764 fi;;
2765 esac
2766 # Pass precious variables to config.status.
2767 if test "$ac_new_set" = set; then
2768 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002769 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 *) ac_arg=$ac_var=$ac_new_val ;;
2771 esac
2772 case " $ac_configure_args " in
2773 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002774 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 esac
2776 fi
2777done
2778if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002779 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2780$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2781 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2782$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002783 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002785## -------------------- ##
2786## Main body of script. ##
2787## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002788
Guido van Rossum7f43da71994-08-01 12:15:30 +00002789ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002790ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2793ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794
Guido van Rossum627b2d71993-12-24 10:39:16 +00002795
Michael W. Hudson54241132001-12-07 15:38:26 +00002796
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002798
2799
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002800ac_aux_dir=
2801for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2802 if test -f "$ac_dir/install-sh"; then
2803 ac_aux_dir=$ac_dir
2804 ac_install_sh="$ac_aux_dir/install-sh -c"
2805 break
2806 elif test -f "$ac_dir/install.sh"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/install.sh -c"
2809 break
2810 elif test -f "$ac_dir/shtool"; then
2811 ac_aux_dir=$ac_dir
2812 ac_install_sh="$ac_aux_dir/shtool install -c"
2813 break
2814 fi
2815done
2816if test -z "$ac_aux_dir"; then
2817 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2818fi
2819
2820# These three variables are undocumented and unsupported,
2821# and are intended to be withdrawn in a future Autoconf release.
2822# They can cause serious problems if a builder's source tree is in a directory
2823# whose full name contains unusual characters.
2824ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2825ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2826ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2827
2828
2829# Make sure we can run config.sub.
2830$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2831 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2832
2833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2834$as_echo_n "checking build system type... " >&6; }
2835if ${ac_cv_build+:} false; then :
2836 $as_echo_n "(cached) " >&6
2837else
2838 ac_build_alias=$build_alias
2839test "x$ac_build_alias" = x &&
2840 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2841test "x$ac_build_alias" = x &&
2842 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2843ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2845
2846fi
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2848$as_echo "$ac_cv_build" >&6; }
2849case $ac_cv_build in
2850*-*-*) ;;
2851*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2852esac
2853build=$ac_cv_build
2854ac_save_IFS=$IFS; IFS='-'
2855set x $ac_cv_build
2856shift
2857build_cpu=$1
2858build_vendor=$2
2859shift; shift
2860# Remember, the first character of IFS is used to create $*,
2861# except with old shells:
2862build_os=$*
2863IFS=$ac_save_IFS
2864case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2865
2866
2867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2868$as_echo_n "checking host system type... " >&6; }
2869if ${ac_cv_host+:} false; then :
2870 $as_echo_n "(cached) " >&6
2871else
2872 if test "x$host_alias" = x; then
2873 ac_cv_host=$ac_cv_build
2874else
2875 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2876 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2877fi
2878
2879fi
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2881$as_echo "$ac_cv_host" >&6; }
2882case $ac_cv_host in
2883*-*-*) ;;
2884*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2885esac
2886host=$ac_cv_host
2887ac_save_IFS=$IFS; IFS='-'
2888set x $ac_cv_host
2889shift
2890host_cpu=$1
2891host_vendor=$2
2892shift; shift
2893# Remember, the first character of IFS is used to create $*,
2894# except with old shells:
2895host_os=$*
2896IFS=$ac_save_IFS
2897case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2898
2899
2900
2901
2902
Ned Deily983df862014-08-22 13:30:59 -07002903# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2904rm -f pybuilddir.txt
2905
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002906if test "$cross_compiling" = yes; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2908$as_echo_n "checking for python interpreter for cross build... " >&6; }
2909 if test -z "$PYTHON_FOR_BUILD"; then
2910 for interp in python$PACKAGE_VERSION python2 python; do
2911 which $interp >/dev/null 2>&1 || continue
2912 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2913 break
2914 fi
2915 interp=
2916 done
2917 if test x$interp = x; then
2918 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2919 fi
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2921$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002922 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 +01002923 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002924 # Used to comment out stuff for rebuilding generated files
2925 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002926elif test "$cross_compiling" = maybe; then
2927 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2928else
2929 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002930 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002931fi
2932
2933
Martin v. Löwis11437992002-04-12 09:54:03 +00002934
Martin Panter801110b2016-07-28 01:28:27 +00002935
Georg Brandlbcd64a32009-03-31 21:45:18 +00002936if test "$prefix" != "/"; then
2937 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2938fi
2939
2940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
2942
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002943# We don't use PACKAGE_ variables, and they cause conflicts
2944# with other autoconf-based packages that include Python.h
2945grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2946rm confdefs.h
2947mv confdefs.h.new confdefs.h
2948
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002949
Martin v. Löwis174440b2008-10-03 08:59:41 +00002950VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002951
Martin v. Löwis1142de32002-03-29 16:28:31 +00002952
2953SOVERSION=1.0
2954
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002955# The later defininition of _XOPEN_SOURCE disables certain features
2956# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2957
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002958$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002959
2960
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002961# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2962# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2963# them.
2964
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002965$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002966
2967
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002968# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2969# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2970# them.
2971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002972$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002973
2974
Martin v. Löwisd6320502004-08-12 13:45:08 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2977
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002978$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002979
2980
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2983# them.
2984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002985$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002986
2987
2988
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002989define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002990
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002991# Arguments passed to configure.
2992
2993CONFIG_ARGS="$ac_configure_args"
2994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2996$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002997# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002998if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002999 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003000 case $enableval in
3001 yes)
3002 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003003 if test ! -d "${enableval}"
3004 then
3005 enableval=/
3006 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003007 ;;
3008 esac
3009 case $enableval in
3010 no)
3011 UNIVERSALSDK=
3012 enable_universalsdk=
3013 ;;
3014 *)
3015 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003016 if test ! -d "${UNIVERSALSDK}"
3017 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003018 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003019 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003020 ;;
3021 esac
3022
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003023
Ronald Oussoren988117f2006-04-29 11:31:35 +00003024else
3025
3026 UNIVERSALSDK=
3027 enable_universalsdk=
3028
Martin v. Löwiseba40652007-08-30 20:10:57 +00003029fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003030
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003031if test -n "${UNIVERSALSDK}"
3032then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3034$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3037$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003038fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003039
Martin v. Löwiseba40652007-08-30 20:10:57 +00003040
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003041
Ned Deily8e60f6e2013-05-30 00:14:29 -07003042ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003043
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003044UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003045
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3047$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003048
3049# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003050if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003051 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3053$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003054 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003055 if test "${enable_universalsdk}" ; then
3056 :
3057 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003058 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003059 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003060
3061else
3062
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3064$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003065
3066fi
3067
3068
3069
3070
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003071
3072# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003073if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003074 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003075 if test "${enable_framework}"; then
3076 :
3077 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003078 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003079 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003080 PYTHONFRAMEWORK=${withval}
3081 PYTHONFRAMEWORKDIR=${withval}.framework
3082 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3083
3084else
3085
3086 PYTHONFRAMEWORK=Python
3087 PYTHONFRAMEWORKDIR=Python.framework
3088 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3089
3090fi
3091
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003093if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003094 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003095 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003096 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003097 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003098 esac
3099 case $enableval in
3100 no)
3101 PYTHONFRAMEWORK=
3102 PYTHONFRAMEWORKDIR=no-framework
3103 PYTHONFRAMEWORKPREFIX=
3104 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003105 FRAMEWORKINSTALLFIRST=
3106 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003107 FRAMEWORKALTINSTALLFIRST=
3108 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003109 if test "x${prefix}" = "xNONE"; then
3110 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3111 else
3112 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3113 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003115 ;;
3116 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003117 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003118 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003119 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003120 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003121 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3122 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003123 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003124
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003125 if test "x${prefix}" = "xNONE" ; then
3126 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003127
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003128 else
3129 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3130 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003131
3132 case "${enableval}" in
3133 /System*)
3134 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3135 if test "${prefix}" = "NONE" ; then
3136 # See below
3137 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3138 fi
3139 ;;
3140
3141 /Library*)
3142 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3143 ;;
3144
3145 */Library/Frameworks)
3146 MDIR="`dirname "${enableval}"`"
3147 MDIR="`dirname "${MDIR}"`"
3148 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3149
3150 if test "${prefix}" = "NONE"; then
3151 # User hasn't specified the
3152 # --prefix option, but wants to install
3153 # the framework in a non-default location,
3154 # ensure that the compatibility links get
3155 # installed relative to that prefix as well
3156 # instead of in /usr/local.
3157 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3158 fi
3159 ;;
3160
3161 *)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164 esac
3165
Jack Jansen127e56e2001-09-11 14:41:54 +00003166 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003167
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003168 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003169 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003170 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003171
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003173
Martin v. Löwiseba40652007-08-30 20:10:57 +00003174 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003175
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003176 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3177
3178 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3179
Jack Jansene578a632001-08-15 01:27:14 +00003180 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003181
Guido van Rossum563e7081996-09-10 18:20:48 +00003182else
Martin v. Löwis11437992002-04-12 09:54:03 +00003183
Jack Jansene578a632001-08-15 01:27:14 +00003184 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003186 PYTHONFRAMEWORKPREFIX=
3187 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003188 FRAMEWORKINSTALLFIRST=
3189 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003190 FRAMEWORKALTINSTALLFIRST=
3191 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003192 if test "x${prefix}" = "xNONE" ; then
3193 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3194 else
3195 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3196 fi
Jack Jansene578a632001-08-15 01:27:14 +00003197 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003198
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003199
Martin v. Löwiseba40652007-08-30 20:10:57 +00003200fi
3201
Michael W. Hudson54241132001-12-07 15:38:26 +00003202
3203
3204
3205
Jack Jansene578a632001-08-15 01:27:14 +00003206
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003207
3208
Ronald Oussoren5b787322006-06-06 19:50:24 +00003209
3210
3211
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003212
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003215## AS_HELP_STRING([--with-dyld],
3216## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003217##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003218# Set name for machine-dependent library files
3219
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3221$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003222if test -z "$MACHDEP"
3223then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003224 # avoid using uname for cross builds
3225 if test "$cross_compiling" = yes; then
3226 # ac_sys_system and ac_sys_release are only used for setting
3227 # `define_xopen_source' in the case statement below. For the
3228 # current supported cross builds, this macro is not adjusted.
3229 case "$host" in
3230 *-*-linux*)
3231 ac_sys_system=Linux
3232 ;;
3233 *-*-cygwin*)
3234 ac_sys_system=Cygwin
3235 ;;
3236 *)
3237 # for now, limit cross builds to known configurations
3238 MACHDEP="unknown"
3239 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3240 esac
3241 ac_sys_release=
3242 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003243 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003244 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003245 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003246 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003248 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003250 fi
3251 ac_md_system=`echo $ac_sys_system |
3252 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3253 ac_md_release=`echo $ac_sys_release |
3254 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3255 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003256
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003257 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003258 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003259 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003260 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003261 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003262 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003263 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003264 esac
3265fi
3266
3267
3268if test "$cross_compiling" = yes; then
3269 case "$host" in
3270 *-*-linux*)
3271 case "$host_cpu" in
3272 arm*)
3273 _host_cpu=arm
3274 ;;
3275 *)
3276 _host_cpu=$host_cpu
3277 esac
3278 ;;
3279 *-*-cygwin*)
3280 _host_cpu=
3281 ;;
3282 *)
3283 # for now, limit cross builds to known configurations
3284 MACHDEP="unknown"
3285 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003286 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003287 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288fi
Guido van Rossum91922671997-10-09 20:24:13 +00003289
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003290# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3291# disable features if it is defined, without any means to access these
3292# features as extensions. For these systems, we skip the definition of
3293# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3294# some feature, make sure there is no alternative way to access this
3295# feature. Also, when using wildcards, make sure you have verified the
3296# need for not defining _XOPEN_SOURCE on all systems matching the
3297# wildcard, and that the wildcard does not include future systems
3298# (which may remove their limitations).
3299case $ac_sys_system/$ac_sys_release in
3300 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3301 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003302 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003303 # In addition, Stefan Krah confirms that issue #1244610 exists through
3304 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003305 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003306 define_xopen_source=no
3307 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3308 # also defined. This can be overridden by defining _BSD_SOURCE
3309 # As this has a different meaning on Linux, only define it on OpenBSD
3310
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003311$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003312
3313 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003314 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003315 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3316 # also defined. This can be overridden by defining _BSD_SOURCE
3317 # As this has a different meaning on Linux, only define it on OpenBSD
3318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003319$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003320
3321 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003322 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3323 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3324 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003325 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 +00003326 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003327 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3328 # request to enable features supported by the standard as a request
3329 # to disable features not supported by the standard. The best way
3330 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3331 # entirely and define __EXTENSIONS__ instead.
3332 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003333 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003334 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3335 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003336 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003337 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003338 define_xopen_source=no;;
3339 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003340 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003341 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003342 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003343 # On FreeBSD 4, the math functions C89 does not cover are never defined
3344 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3345 FreeBSD/4.*)
3346 define_xopen_source=no;;
3347 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3348 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3349 # identifies itself as Darwin/7.*
3350 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3351 # disables platform specific features beyond repair.
3352 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3353 # has no effect, don't bother defining them
3354 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003355 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003356 Darwin/1[0-9].*)
3357 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003358 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3359 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3360 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003361 AIX/4)
3362 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003363 AIX/5)
3364 if test `uname -r` -eq 1; then
3365 define_xopen_source=no
3366 fi
3367 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003368 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3369 # defining NI_NUMERICHOST.
3370 QNX/6.3.2)
3371 define_xopen_source=no
3372 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003373
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003374esac
3375
3376if test $define_xopen_source = yes
3377then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003378
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003379$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003380
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003381
3382 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3383 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3384 # several APIs are not declared. Since this is also needed in some
3385 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003386
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003387$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003388
3389
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003391$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003392
3393
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394fi
3395
Guido van Rossum91922671997-10-09 20:24:13 +00003396#
3397# SGI compilers allow the specification of the both the ABI and the
3398# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003399# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003400#
3401# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3402# thus supply support for various ABI/ISA combinations. The MACHDEP
3403# variable is also adjusted.
3404#
3405
3406if test ! -z "$SGI_ABI"
3407then
3408 CC="cc $SGI_ABI"
3409 LDFLAGS="$SGI_ABI $LDFLAGS"
3410 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3411fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3413$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003414
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003415
3416PLATDIR=plat-$MACHDEP
3417
Jack Jansen83f898c2002-12-30 22:23:40 +00003418# And add extra plat-mac for darwin
3419
Jack Jansen7b59b422003-03-17 15:44:10 +00003420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3422$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003423if test -z "$EXTRAPLATDIR"
3424then
3425 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003426 darwin)
3427 EXTRAPLATDIR="\$(PLATMACDIRS)"
3428 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3429 ;;
3430 *)
3431 EXTRAPLATDIR=""
3432 EXTRAMACHDEPPATH=""
3433 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003434 esac
3435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3437$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3440# it may influence the way we can build extensions, so distutils
3441# needs to check it
3442
Ronald Oussoren988117f2006-04-29 11:31:35 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003445EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003446
Guido van Rossum627b2d71993-12-24 10:39:16 +00003447# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003448
3449# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3450# for debug/optimization stuff. BASECFLAGS is for flags that are required
3451# just to get things to compile and link. Users are free to override OPT
3452# when running configure or make. The build should not break if they do.
3453# BASECFLAGS should generally not be messed with, however.
3454
3455# XXX shouldn't some/most/all of this code be merged with the stuff later
3456# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3458$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003459
Martin v. Löwiseba40652007-08-30 20:10:57 +00003460# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003462 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003463 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003464 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003465 without_gcc=yes;;
3466 yes) CC=gcc
3467 without_gcc=no;;
3468 *) CC=$withval
3469 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003470 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471else
Martin v. Löwis11437992002-04-12 09:54:03 +00003472
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003473 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003474 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003475 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003476 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003477 case $BE_HOST_CPU in
3478 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003479 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003480 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003481 BASECFLAGS="$BASECFLAGS -export pragma"
3482 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003483 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003484 ;;
3485 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003486 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003487 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003488 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003489 ;;
3490 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003491 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003492 ;;
3493 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003494 AR="\$(srcdir)/Modules/ar_beos"
3495 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003496 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003497 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003498 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003499fi
3500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3502$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003503
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3505$as_echo_n "checking for --with-icc... " >&6; }
3506
3507# Check whether --with-icc was given.
3508if test "${with_icc+set}" = set; then :
3509 withval=$with_icc;
3510 case $withval in
3511 no) CC=${CC:-cc}
3512 with_icc=no;;
3513 yes) CC=icc
3514 CXX=icpc
3515 with_icc=yes;;
3516 *) CC=$withval
3517 with_icc=$withval;;
3518 esac
3519else
3520
3521 with_icc=no
3522fi
3523
3524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3525$as_echo "$with_icc" >&6; }
3526
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527# If the user switches compilers, we can't believe the cache
3528if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3529then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003530 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003531(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003532fi
3533
Trent Nelson15daa352012-12-13 06:46:39 +00003534if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3535 # Normally, MIPSpro CC treats #error directives as warnings, which means
3536 # a successful exit code is returned (0). This is a problem because IRIX
3537 # has a bunch of system headers with this guard at the top:
3538 #
3539 # #ifndef __c99
3540 # #error This header file is to be used only for c99 mode compilations
3541 # #else
3542 #
3543 # When autoconf tests for such a header, like stdint.h, this happens:
3544 #
3545 # configure:4619: cc -c conftest.c >&5
3546 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3547 # #error directive: This header file is to be used only for c99 mode
3548 # compilations
3549 #
3550 # #error This header file is to be used only for c99 mode compilations
3551 # ^
3552 #
3553 # configure:4619: $? = 0
3554 # configure:4619: result: yes
3555 #
3556 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3557 # warning as an error, which causes cc to return a non-zero result,
3558 # which autoconf can interpret correctly.
3559 CFLAGS="$CFLAGS -diag_error 1035"
3560 # Whilst we're here, we might as well make sure CXX defaults to something
3561 # sensible if we're not using gcc.
3562 if test -z "$CXX"; then
3563 CXX="CC"
3564 fi
3565fi
3566
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003567# If the user set CFLAGS, use this instead of the automatically
3568# determined setting
3569preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003570ac_ext=c
3571ac_cpp='$CPP $CPPFLAGS'
3572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3574ac_compiler_gnu=$ac_cv_c_compiler_gnu
3575if test -n "$ac_tool_prefix"; then
3576 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3577set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003580if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003582else
3583 if test -n "$CC"; then
3584 ac_cv_prog_CC="$CC" # Let the user override the test.
3585else
Martin v. Löwis11437992002-04-12 09:54:03 +00003586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003591 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 $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 +00003595 break 2
3596 fi
3597done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003599IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Jack Jansendd19cf82001-12-06 22:36:17 +00003601fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003604if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3606$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610fi
3611
Martin v. Löwiseba40652007-08-30 20:10:57 +00003612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614if test -z "$ac_cv_prog_CC"; then
3615 ac_ct_CC=$CC
3616 # Extract the first word of "gcc", so it can be a program name with args.
3617set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003620if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 if test -n "$ac_ct_CC"; then
3624 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3625else
3626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 $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 +00003635 break 2
3636 fi
3637done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
3641fi
3642fi
3643ac_ct_CC=$ac_cv_prog_ac_ct_CC
3644if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3646$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Martin v. Löwiseba40652007-08-30 20:10:57 +00003652 if test "x$ac_ct_CC" = x; then
3653 CC=""
3654 else
3655 case $cross_compiling:$ac_tool_warned in
3656yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003659ac_tool_warned=yes ;;
3660esac
3661 CC=$ac_ct_CC
3662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
3664 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003665fi
3666
Jack Jansendd19cf82001-12-06 22:36:17 +00003667if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003668 if test -n "$ac_tool_prefix"; then
3669 # 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 +00003670set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003673if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003675else
3676 if test -n "$CC"; then
3677 ac_cv_prog_CC="$CC" # Let the user override the test.
3678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 $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 +00003688 break 2
3689 fi
3690done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003691 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003693
3694fi
3695fi
3696CC=$ac_cv_prog_CC
3697if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3699$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703fi
3704
Martin v. Löwiseba40652007-08-30 20:10:57 +00003705
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708if test -z "$CC"; then
3709 # Extract the first word of "cc", so it can be a program name with args.
3710set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003713if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3728 ac_prog_rejected=yes
3729 continue
3730 fi
3731 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003733 break 2
3734 fi
3735done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003736 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739if test $ac_prog_rejected = yes; then
3740 # We found a bogon in the path, so make sure we never use it.
3741 set dummy $ac_cv_prog_CC
3742 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 # We chose a different compiler from the bogus one.
3745 # However, it has the same basename, so the bogon will be chosen
3746 # first if we set CC to just the basename; use the full file name.
3747 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 fi
3750fi
3751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760fi
3761
Martin v. Löwiseba40652007-08-30 20:10:57 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$CC"; then
3765 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003766 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 do
3768 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003772if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 $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 +00003787 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003802fi
3803
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 test -n "$CC" && break
3806 done
3807fi
3808if test -z "$CC"; then
3809 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003811do
3812 # Extract the first word of "$ac_prog", so it can be a program name with args.
3813set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003816if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
3819 if test -n "$ac_ct_CC"; then
3820 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3821else
3822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003827 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 $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 +00003831 break 2
3832 fi
3833done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003835IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
3838fi
3839ac_ct_CC=$ac_cv_prog_ac_ct_CC
3840if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3842$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Martin v. Löwiseba40652007-08-30 20:10:57 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 test -n "$ac_ct_CC" && break
3850done
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Martin v. Löwiseba40652007-08-30 20:10:57 +00003852 if test "x$ac_ct_CC" = x; then
3853 CC=""
3854 else
3855 case $cross_compiling:$ac_tool_warned in
3856yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859ac_tool_warned=yes ;;
3860esac
3861 CC=$ac_ct_CC
3862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864
3865fi
3866
3867
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003868test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003870as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
3873# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003874$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3875set X $ac_compile
3876ac_compiler=$2
3877for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884$as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003887 if test -s conftest.err; then
3888 sed '10a\
3889... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3892 fi
3893 rm -f conftest.er1 conftest.err
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896done
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003899/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003900
Martin v. Löwis11437992002-04-12 09:54:03 +00003901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
3909ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003911# Try to create an executable without -o first, disregard a.out.
3912# It will help us diagnose broken compilers, and finding out an intuition
3913# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3915$as_echo_n "checking whether the C compiler works... " >&6; }
3916ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3917
3918# The possible output files:
3919ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3920
Martin v. Löwiseba40652007-08-30 20:10:57 +00003921ac_rmfiles=
3922for ac_file in $ac_files
3923do
3924 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003925 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003926 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3927 esac
3928done
3929rm -f $ac_rmfiles
3930
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003931if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003932case "(($ac_try" in
3933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3934 *) ac_try_echo=$ac_try;;
3935esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3937$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003938 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003940 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3941 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003942 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3943# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3944# in a Makefile. We should not override ac_cv_exeext if it was cached,
3945# so that the user can short-circuit this test for compilers unknown to
3946# Autoconf.
3947for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003948do
3949 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003952 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003953 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003954 # We found the default executable, but exeext='' is most
3955 # certainly right.
3956 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003957 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003958 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003959 then :; else
3960 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3961 fi
3962 # We set ac_cv_exeext here because the later test for it is not
3963 # safe: cross compilers may not add the suffix if given an `-o'
3964 # argument, so we may need to know it at that point already.
3965 # Even if this section looks crufty: it has the advantage of
3966 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003967 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003968 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003969 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 esac
3971done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972test "$ac_cv_exeext" = no && ac_cv_exeext=
3973
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003974else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975 ac_file=''
3976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003977if test -z "$ac_file"; then :
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
3980$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003981sed 's/^/| /' conftest.$ac_ext >&5
3982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003983{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003985as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003986See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003987else
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3989$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3992$as_echo_n "checking for C compiler default output file name... " >&6; }
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3994$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003995ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003997rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003998ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4000$as_echo_n "checking for suffix of executables... " >&6; }
4001if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004009 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4013# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4014# work properly (i.e., refer to `conftest.exe'), while it won't with
4015# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004016for ac_file in conftest.exe conftest conftest.*; do
4017 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004018 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004019 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004021 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 * ) break;;
4023 esac
4024done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004028as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004029See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031rm -f conftest conftest$ac_cv_exeext
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4033$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004034
4035rm -f conftest.$ac_ext
4036EXEEXT=$ac_cv_exeext
4037ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4039/* end confdefs.h. */
4040#include <stdio.h>
4041int
4042main ()
4043{
4044FILE *f = fopen ("conftest.out", "w");
4045 return ferror (f) || fclose (f) != 0;
4046
4047 ;
4048 return 0;
4049}
Skip Montanaro6dead952003-09-25 14:50:04 +00004050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004051ac_clean_files="$ac_clean_files conftest.out"
4052# Check that the compiler produces executables we can run. If not, either
4053# the compiler is broken, or we cross compile.
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4055$as_echo_n "checking whether we are cross compiling... " >&6; }
4056if test "$cross_compiling" != yes; then
4057 { { ac_try="$ac_link"
4058case "(($ac_try" in
4059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060 *) ac_try_echo=$ac_try;;
4061esac
4062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063$as_echo "$ac_try_echo"; } >&5
4064 (eval "$ac_link") 2>&5
4065 ac_status=$?
4066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067 test $ac_status = 0; }
4068 if { ac_try='./conftest$ac_cv_exeext'
4069 { { case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
4073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074$as_echo "$ac_try_echo"; } >&5
4075 (eval "$ac_try") 2>&5
4076 ac_status=$?
4077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }; }; then
4079 cross_compiling=no
4080 else
4081 if test "$cross_compiling" = maybe; then
4082 cross_compiling=yes
4083 else
4084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004086as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004087If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004088See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004089 fi
4090 fi
4091fi
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4093$as_echo "$cross_compiling" >&6; }
4094
4095rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4096ac_clean_files=$ac_clean_files_save
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4098$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004099if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004100 $as_echo_n "(cached) " >&6
4101else
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105int
4106main ()
4107{
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
4113rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004114if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004115case "(($ac_try" in
4116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4117 *) ac_try_echo=$ac_try;;
4118esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4120$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004121 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4124 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004125 for ac_file in conftest.o conftest.obj conftest.*; do
4126 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004128 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4130 break;;
4131 esac
4132done
4133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004135sed 's/^/| /' conftest.$ac_ext >&5
4136
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004139as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004140See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004142rm -f conftest.$ac_cv_objext conftest.$ac_ext
4143fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4145$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004146OBJEXT=$ac_cv_objext
4147ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4149$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004150if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159#ifndef __GNUC__
4160 choke me
4161#endif
4162
4163 ;
4164 return 0;
4165}
4166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 ac_compiler_gnu=yes
4169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173ac_cv_c_compiler_gnu=$ac_compiler_gnu
4174
4175fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4177$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4178if test $ac_compiler_gnu = yes; then
4179 GCC=yes
4180else
4181 GCC=
4182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004183ac_test_CFLAGS=${CFLAGS+set}
4184ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4186$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004187if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004190 ac_save_c_werror_flag=$ac_c_werror_flag
4191 ac_c_werror_flag=yes
4192 ac_cv_prog_cc_g=no
4193 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004196
Martin v. Löwis11437992002-04-12 09:54:03 +00004197int
4198main ()
4199{
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004205if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004206 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004208 CFLAGS=""
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004222else
4223 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004237 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244 ac_c_werror_flag=$ac_save_c_werror_flag
4245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4247$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250elif test $ac_cv_prog_cc_g = yes; then
4251 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004252 CFLAGS="-g -O2"
4253 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255 fi
4256else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 if test "$GCC" = yes; then
4258 CFLAGS="-O2"
4259 else
4260 CFLAGS=
4261 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4264$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004265if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004269ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004271/* end confdefs.h. */
4272#include <stdarg.h>
4273#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004274struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4276struct buf { int x; };
4277FILE * (*rcsopen) (struct buf *, struct stat *, int);
4278static char *e (p, i)
4279 char **p;
4280 int i;
4281{
4282 return p[i];
4283}
4284static char *f (char * (*g) (char **, int), char **p, ...)
4285{
4286 char *s;
4287 va_list v;
4288 va_start (v,p);
4289 s = g (p, va_arg (v,int));
4290 va_end (v);
4291 return s;
4292}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293
4294/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4295 function prototypes and stuff, but not '\xHH' hex character constants.
4296 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004297 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004298 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4299 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004300 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4302
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4304 inside strings and character constants. */
4305#define FOO(x) 'x'
4306int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4307
Skip Montanaro6dead952003-09-25 14:50:04 +00004308int test (int i, double x);
4309struct s1 {int (*f) (int a);};
4310struct s2 {int (*f) (double a);};
4311int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4312int argc;
4313char **argv;
4314int
4315main ()
4316{
4317return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4318 ;
4319 return 0;
4320}
4321_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004322for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4323 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004324do
4325 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004326 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329rm -f core conftest.err conftest.$ac_objext
4330 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004331done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333CC=$ac_save_CC
4334
4335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004336# AC_CACHE_VAL
4337case "x$ac_cv_prog_cc_c89" in
4338 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4340$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004341 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4343$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004345 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4347$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004349if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Martin v. Löwis11437992002-04-12 09:54:03 +00004353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004359if test ! -z "$preset_cflags"
4360then
4361 CFLAGS=$preset_cflags
4362fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004363
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004364
4365
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4367$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004368
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004370if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004372
4373 case $withval in
4374 no) with_cxx_main=no
4375 MAINCC='$(CC)';;
4376 yes) with_cxx_main=yes
4377 MAINCC='$(CXX)';;
4378 *) with_cxx_main=yes
4379 MAINCC=$withval
4380 if test -z "$CXX"
4381 then
4382 CXX=$withval
4383 fi;;
4384 esac
4385else
4386
4387 with_cxx_main=no
4388 MAINCC='$(CC)'
4389
Martin v. Löwiseba40652007-08-30 20:10:57 +00004390fi
4391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4393$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004394
4395preset_cxx="$CXX"
4396if test -z "$CXX"
4397then
4398 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004399 gcc) if test -n "$ac_tool_prefix"; then
4400 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4401set dummy ${ac_tool_prefix}g++; ac_word=$2
4402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4403$as_echo_n "checking for $ac_word... " >&6; }
4404if ${ac_cv_path_CXX+:} false; then :
4405 $as_echo_n "(cached) " >&6
4406else
4407 case $CXX in
4408 [\\/]* | ?:[\\/]*)
4409 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4410 ;;
4411 *)
4412 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4413for as_dir in notfound
4414do
4415 IFS=$as_save_IFS
4416 test -z "$as_dir" && as_dir=.
4417 for ac_exec_ext in '' $ac_executable_extensions; do
4418 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4419 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4420 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4421 break 2
4422 fi
4423done
4424 done
4425IFS=$as_save_IFS
4426
4427 ;;
4428esac
4429fi
4430CXX=$ac_cv_path_CXX
4431if test -n "$CXX"; then
4432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4433$as_echo "$CXX" >&6; }
4434else
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4436$as_echo "no" >&6; }
4437fi
4438
4439
4440fi
4441if test -z "$ac_cv_path_CXX"; then
4442 ac_pt_CXX=$CXX
4443 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004444set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4446$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004447if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004448 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004449else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004450 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004451 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004452 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 +00004453 ;;
4454 *)
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in notfound
4457do
4458 IFS=$as_save_IFS
4459 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004462 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004463 $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 +00004464 break 2
4465 fi
4466done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004467 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004468IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004469
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004470 ;;
4471esac
4472fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004473ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4474if test -n "$ac_pt_CXX"; then
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4476$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004477else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4479$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004482 if test "x$ac_pt_CXX" = x; then
4483 CXX="g++"
4484 else
4485 case $cross_compiling:$ac_tool_warned in
4486yes:)
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4488$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4489ac_tool_warned=yes ;;
4490esac
4491 CXX=$ac_pt_CXX
4492 fi
4493else
4494 CXX="$ac_cv_path_CXX"
4495fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004496 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004497 cc) if test -n "$ac_tool_prefix"; then
4498 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4499set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4501$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004502if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004504else
4505 case $CXX in
4506 [\\/]* | ?:[\\/]*)
4507 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4508 ;;
4509 *)
4510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4511for as_dir in notfound
4512do
4513 IFS=$as_save_IFS
4514 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004515 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004516 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004517 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004518 $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 +00004519 break 2
4520 fi
4521done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004522 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004523IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004524
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004525 ;;
4526esac
4527fi
4528CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004529if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4531$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4534$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004536
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004537
4538fi
4539if test -z "$ac_cv_path_CXX"; then
4540 ac_pt_CXX=$CXX
4541 # Extract the first word of "c++", so it can be a program name with args.
4542set dummy c++; ac_word=$2
4543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4544$as_echo_n "checking for $ac_word... " >&6; }
4545if ${ac_cv_path_ac_pt_CXX+:} false; then :
4546 $as_echo_n "(cached) " >&6
4547else
4548 case $ac_pt_CXX in
4549 [\\/]* | ?:[\\/]*)
4550 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4551 ;;
4552 *)
4553 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4554for as_dir in notfound
4555do
4556 IFS=$as_save_IFS
4557 test -z "$as_dir" && as_dir=.
4558 for ac_exec_ext in '' $ac_executable_extensions; do
4559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4560 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4562 break 2
4563 fi
4564done
4565 done
4566IFS=$as_save_IFS
4567
4568 ;;
4569esac
4570fi
4571ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4572if test -n "$ac_pt_CXX"; then
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4574$as_echo "$ac_pt_CXX" >&6; }
4575else
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4577$as_echo "no" >&6; }
4578fi
4579
4580 if test "x$ac_pt_CXX" = x; then
4581 CXX="c++"
4582 else
4583 case $cross_compiling:$ac_tool_warned in
4584yes:)
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4586$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4587ac_tool_warned=yes ;;
4588esac
4589 CXX=$ac_pt_CXX
4590 fi
4591else
4592 CXX="$ac_cv_path_CXX"
4593fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004594 ;;
4595 esac
4596 if test "$CXX" = "notfound"
4597 then
4598 CXX=""
4599 fi
4600fi
4601if test -z "$CXX"
4602then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004603 if test -n "$ac_tool_prefix"; then
4604 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4605 do
4606 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4607set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4609$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004610if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004611 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004612else
4613 if test -n "$CXX"; then
4614 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4615else
4616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4617for as_dir in $PATH
4618do
4619 IFS=$as_save_IFS
4620 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004621 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004622 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004623 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004624 $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 +00004625 break 2
4626 fi
4627done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004628 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004629IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004630
4631fi
4632fi
4633CXX=$ac_cv_prog_CXX
4634if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4636$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4639$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004640fi
4641
Martin v. Löwiseba40652007-08-30 20:10:57 +00004642
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004643 test -n "$CXX" && break
4644 done
4645fi
4646if test -z "$CXX"; then
4647 ac_ct_CXX=$CXX
4648 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4649do
4650 # Extract the first word of "$ac_prog", so it can be a program name with args.
4651set dummy $ac_prog; ac_word=$2
4652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4653$as_echo_n "checking for $ac_word... " >&6; }
4654if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4655 $as_echo_n "(cached) " >&6
4656else
4657 if test -n "$ac_ct_CXX"; then
4658 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4659else
4660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4661for as_dir in $PATH
4662do
4663 IFS=$as_save_IFS
4664 test -z "$as_dir" && as_dir=.
4665 for ac_exec_ext in '' $ac_executable_extensions; do
4666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4667 ac_cv_prog_ac_ct_CXX="$ac_prog"
4668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4669 break 2
4670 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004671done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004672 done
4673IFS=$as_save_IFS
4674
4675fi
4676fi
4677ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4678if test -n "$ac_ct_CXX"; then
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4680$as_echo "$ac_ct_CXX" >&6; }
4681else
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4683$as_echo "no" >&6; }
4684fi
4685
4686
4687 test -n "$ac_ct_CXX" && break
4688done
4689
4690 if test "x$ac_ct_CXX" = x; then
4691 CXX="notfound"
4692 else
4693 case $cross_compiling:$ac_tool_warned in
4694yes:)
4695{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4696$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4697ac_tool_warned=yes ;;
4698esac
4699 CXX=$ac_ct_CXX
4700 fi
4701fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004702
4703 if test "$CXX" = "notfound"
4704 then
4705 CXX=""
4706 fi
4707fi
4708if test "$preset_cxx" != "$CXX"
4709then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004710 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004711
4712 By default, distutils will build C++ extension modules with \"$CXX\".
4713 If this is not intended, then set CXX on the configure command line.
4714 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004715$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004716
4717 By default, distutils will build C++ extension modules with \"$CXX\".
4718 If this is not intended, then set CXX on the configure command line.
4719 " >&2;}
4720fi
4721
doko@python.org4e63fbe2013-01-25 13:08:27 +01004722MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4723
4724
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004725
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004726# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004727
4728ac_ext=c
4729ac_cpp='$CPP $CPPFLAGS'
4730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4732ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4734$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004735# On Suns, sometimes $CPP names a directory.
4736if test -n "$CPP" && test -d "$CPP"; then
4737 CPP=
4738fi
4739if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004740 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004741 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004742else
Martin v. Löwis11437992002-04-12 09:54:03 +00004743 # Double quotes because CPP needs to be expanded
4744 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4745 do
4746 ac_preproc_ok=false
4747for ac_c_preproc_warn_flag in '' yes
4748do
4749 # Use a header file that comes with gcc, so configuring glibc
4750 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004751 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4752 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004753 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004754 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004756/* end confdefs.h. */
4757#ifdef __STDC__
4758# include <limits.h>
4759#else
4760# include <assert.h>
4761#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004762 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004763_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004764if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004765
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004766else
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 # Broken: fails on valid input.
4768continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004769fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004770rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004771
Martin v. Löwiseba40652007-08-30 20:10:57 +00004772 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004773 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004776#include <ac_nonexistent.h>
4777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004778if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004779 # Broken: success on invalid input.
4780continue
4781else
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 # Passes both tests.
4783ac_preproc_ok=:
4784break
4785fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004786rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004787
4788done
4789# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004790rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004791if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004792 break
4793fi
4794
4795 done
4796 ac_cv_prog_CPP=$CPP
4797
4798fi
4799 CPP=$ac_cv_prog_CPP
4800else
4801 ac_cv_prog_CPP=$CPP
4802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4804$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004805ac_preproc_ok=false
4806for ac_c_preproc_warn_flag in '' yes
4807do
4808 # Use a header file that comes with gcc, so configuring glibc
4809 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004810 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4811 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 # On the NeXT, cc -E runs the code through the compiler's parser,
4813 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004815/* end confdefs.h. */
4816#ifdef __STDC__
4817# include <limits.h>
4818#else
4819# include <assert.h>
4820#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004821 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004823if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004824
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825else
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 # Broken: fails on valid input.
4827continue
4828fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004829rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004830
Martin v. Löwiseba40652007-08-30 20:10:57 +00004831 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004832 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004835#include <ac_nonexistent.h>
4836_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004837if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 # Broken: success on invalid input.
4839continue
4840else
Martin v. Löwis11437992002-04-12 09:54:03 +00004841 # Passes both tests.
4842ac_preproc_ok=:
4843break
4844fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004845rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004846
4847done
4848# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004849rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004850if $ac_preproc_ok; then :
4851
Martin v. Löwis11437992002-04-12 09:54:03 +00004852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004855as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004856See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004857fi
4858
4859ac_ext=c
4860ac_cpp='$CPP $CPPFLAGS'
4861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4863ac_compiler_gnu=$ac_cv_c_compiler_gnu
4864
4865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4867$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004868if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004870else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004872 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873 # Loop through the user's path and test for each of PROGNAME-LIST
4874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004875for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004879 for ac_prog in grep ggrep; do
4880 for ac_exec_ext in '' $ac_executable_extensions; do
4881 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004882 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004883# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 # Check for GNU $ac_path_GREP
4885case `"$ac_path_GREP" --version 2>&1` in
4886*GNU*)
4887 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4888*)
4889 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004890 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004891 while :
4892 do
4893 cat "conftest.in" "conftest.in" >"conftest.tmp"
4894 mv "conftest.tmp" "conftest.in"
4895 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4898 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004900 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4901 # Best one so far, save it but keep looking for a better one
4902 ac_cv_path_GREP="$ac_path_GREP"
4903 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004904 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905 # 10*(2^10) chars as input seems more than enough
4906 test $ac_count -gt 10 && break
4907 done
4908 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4909esac
4910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911 $ac_path_GREP_found && break 3
4912 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004913 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004914 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004915IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004916 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004917 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 +00004918 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004919else
4920 ac_cv_path_GREP=$GREP
4921fi
4922
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4925$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926 GREP="$ac_cv_path_GREP"
4927
4928
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4930$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004931if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004932 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004933else
4934 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4935 then ac_cv_path_EGREP="$GREP -E"
4936 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004937 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 # Loop through the user's path and test for each of PROGNAME-LIST
4940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004941for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4942do
4943 IFS=$as_save_IFS
4944 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004945 for ac_prog in egrep; do
4946 for ac_exec_ext in '' $ac_executable_extensions; do
4947 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004948 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004950 # Check for GNU $ac_path_EGREP
4951case `"$ac_path_EGREP" --version 2>&1` in
4952*GNU*)
4953 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4954*)
4955 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004956 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004957 while :
4958 do
4959 cat "conftest.in" "conftest.in" >"conftest.tmp"
4960 mv "conftest.tmp" "conftest.in"
4961 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4964 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004965 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4967 # Best one so far, save it but keep looking for a better one
4968 ac_cv_path_EGREP="$ac_path_EGREP"
4969 ac_path_EGREP_max=$ac_count
4970 fi
4971 # 10*(2^10) chars as input seems more than enough
4972 test $ac_count -gt 10 && break
4973 done
4974 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4975esac
4976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 $ac_path_EGREP_found && break 3
4978 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004979 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004983 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 +00004984 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004985else
4986 ac_cv_path_EGREP=$EGREP
4987fi
4988
Martin v. Löwiseba40652007-08-30 20:10:57 +00004989 fi
4990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4992$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004993 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004994
4995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4997$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004998if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004999 $as_echo_n "(cached) " >&6
5000else
5001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005002/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003#include <stdlib.h>
5004#include <stdarg.h>
5005#include <string.h>
5006#include <float.h>
5007
5008int
5009main ()
5010{
5011
5012 ;
5013 return 0;
5014}
5015_ACEOF
5016if ac_fn_c_try_compile "$LINENO"; then :
5017 ac_cv_header_stdc=yes
5018else
5019 ac_cv_header_stdc=no
5020fi
5021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5022
5023if test $ac_cv_header_stdc = yes; then
5024 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5026/* end confdefs.h. */
5027#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005028
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005029_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005030if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005034 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005035fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005036rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005038fi
5039
5040if test $ac_cv_header_stdc = yes; then
5041 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5043/* end confdefs.h. */
5044#include <stdlib.h>
5045
5046_ACEOF
5047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5048 $EGREP "free" >/dev/null 2>&1; then :
5049
5050else
5051 ac_cv_header_stdc=no
5052fi
5053rm -f conftest*
5054
5055fi
5056
5057if test $ac_cv_header_stdc = yes; then
5058 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5059 if test "$cross_compiling" = yes; then :
5060 :
5061else
5062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5063/* end confdefs.h. */
5064#include <ctype.h>
5065#include <stdlib.h>
5066#if ((' ' & 0x0FF) == 0x020)
5067# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5068# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5069#else
5070# define ISLOWER(c) \
5071 (('a' <= (c) && (c) <= 'i') \
5072 || ('j' <= (c) && (c) <= 'r') \
5073 || ('s' <= (c) && (c) <= 'z'))
5074# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5075#endif
5076
5077#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5078int
5079main ()
5080{
5081 int i;
5082 for (i = 0; i < 256; i++)
5083 if (XOR (islower (i), ISLOWER (i))
5084 || toupper (i) != TOUPPER (i))
5085 return 2;
5086 return 0;
5087}
5088_ACEOF
5089if ac_fn_c_try_run "$LINENO"; then :
5090
5091else
5092 ac_cv_header_stdc=no
5093fi
5094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5095 conftest.$ac_objext conftest.beam conftest.$ac_ext
5096fi
5097
5098fi
5099fi
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5101$as_echo "$ac_cv_header_stdc" >&6; }
5102if test $ac_cv_header_stdc = yes; then
5103
5104$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5105
5106fi
5107
5108# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5109for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5110 inttypes.h stdint.h unistd.h
5111do :
5112 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5113ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5114"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005115if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005116 cat >>confdefs.h <<_ACEOF
5117#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5118_ACEOF
5119
5120fi
5121
5122done
5123
5124
5125
5126 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 +01005127if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005128 MINIX=yes
5129else
5130 MINIX=
5131fi
5132
5133
5134 if test "$MINIX" = yes; then
5135
5136$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5137
5138
5139$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5140
5141
5142$as_echo "#define _MINIX 1" >>confdefs.h
5143
5144 fi
5145
5146
5147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5148$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005149if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005150 $as_echo_n "(cached) " >&6
5151else
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5153/* end confdefs.h. */
5154
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005155# define __EXTENSIONS__ 1
5156 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157int
5158main ()
5159{
5160
5161 ;
5162 return 0;
5163}
5164_ACEOF
5165if ac_fn_c_try_compile "$LINENO"; then :
5166 ac_cv_safe_to_define___extensions__=yes
5167else
5168 ac_cv_safe_to_define___extensions__=no
5169fi
5170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5171fi
5172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5173$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5174 test $ac_cv_safe_to_define___extensions__ = yes &&
5175 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5176
5177 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5178
5179 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5180
5181 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5182
5183 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5184
5185
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005186
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187# Check for unsupported systems
5188case $ac_sys_system/$ac_sys_release in
5189atheos*|Linux*/1*)
5190 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5191 echo See README for details.
5192 exit 1;;
5193esac
5194
5195
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5197$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198
5199# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005200if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005201 withval=$with_suffix;
5202 case $withval in
5203 no) EXEEXT=;;
5204 yes) EXEEXT=.exe;;
5205 *) EXEEXT=$withval;;
5206 esac
5207fi
5208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5210$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211
5212# Test whether we're running on a non-case-sensitive system, in which
5213# case we give a warning if no ext is given
5214
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5216$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005217if test ! -d CaseSensitiveTestDir; then
5218mkdir CaseSensitiveTestDir
5219fi
5220
5221if test -d casesensitivetestdir
5222then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5224$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225 BUILDEXEEXT=.exe
5226else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5228$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005229 BUILDEXEEXT=$EXEEXT
5230fi
5231rmdir CaseSensitiveTestDir
5232
5233case $MACHDEP in
5234bsdos*)
5235 case $CC in
5236 gcc) CC="$CC -D_HAVE_BSDI";;
5237 esac;;
5238esac
5239
5240case $ac_sys_system in
5241hp*|HP*)
5242 case $CC in
5243 cc|*/cc) CC="$CC -Ae";;
5244 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005245SunOS*)
5246 # Some functions have a prototype only with that define, e.g. confstr
5247
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005248$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005249
5250 ;;
5251esac
5252
5253
5254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5256$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257if test -z "$LIBRARY"
5258then
5259 LIBRARY='libpython$(VERSION).a'
5260fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5262$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005263
5264# LDLIBRARY is the name of the library to link against (as opposed to the
5265# name of the library into which to insert object files). BLDLIBRARY is also
5266# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5267# is blank as the main program is not linked directly against LDLIBRARY.
5268# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5269# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5270# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5271# DLLLIBRARY is the shared (i.e., DLL) library.
5272#
5273# RUNSHARED is used to run shared python without installed libraries
5274#
5275# INSTSONAME is the name of the shared library that will be use to install
5276# on the system - some systems like version suffix, others don't
5277
5278
5279
5280
5281
5282
5283LDLIBRARY="$LIBRARY"
5284BLDLIBRARY='$(LDLIBRARY)'
5285INSTSONAME='$(LDLIBRARY)'
5286DLLLIBRARY=''
5287LDLIBRARYDIR=''
5288RUNSHARED=''
5289
5290# LINKCC is the command that links the python executable -- default is $(CC).
5291# If CXX is set, and if it is needed to link a main function that was
5292# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5293# python might then depend on the C++ runtime
5294# This is altered for AIX in order to build the export list before
5295# linking.
5296
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5298$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005299if test -z "$LINKCC"
5300then
5301 LINKCC='$(PURIFY) $(MAINCC)'
5302 case $ac_sys_system in
5303 AIX*)
5304 exp_extra="\"\""
5305 if test $ac_sys_release -ge 5 -o \
5306 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5307 exp_extra="."
5308 fi
5309 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005310 QNX*)
5311 # qcc must be used because the other compilers do not
5312 # support -N.
5313 LINKCC=qcc;;
5314 esac
5315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5317$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005318
5319# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5320# make sure we default having it set to "no": this is used by
5321# distutils.unixccompiler to know if it should add --enable-new-dtags
5322# to linker command lines, and failing to detect GNU ld simply results
5323# in the same bahaviour as before.
5324
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5326$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005327ac_prog=ld
5328if test "$GCC" = yes; then
5329 ac_prog=`$CC -print-prog-name=ld`
5330fi
5331case `"$ac_prog" -V 2>&1 < /dev/null` in
5332 *GNU*)
5333 GNULD=yes;;
5334 *)
5335 GNULD=no;;
5336esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5338$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5341$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005343if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005344 enableval=$enable_shared;
5345fi
5346
5347
5348if test -z "$enable_shared"
5349then
5350 case $ac_sys_system in
5351 CYGWIN* | atheos*)
5352 enable_shared="yes";;
5353 *)
5354 enable_shared="no";;
5355 esac
5356fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5358$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005359
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5361$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005362# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005363if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005364 enableval=$enable_profiling;
5365fi
5366
5367if test "x$enable_profiling" = xyes; then
5368 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005369 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371/* end confdefs.h. */
5372int main() { return 0; }
5373_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005374if ac_fn_c_try_link "$LINENO"; then :
5375
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005376else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005377 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005379rm -f core conftest.err conftest.$ac_objext \
5380 conftest$ac_exeext conftest.$ac_ext
5381 CC="$ac_save_cc"
5382else
5383 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5386$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005388if test "x$enable_profiling" = xyes; then
5389 BASECFLAGS="-pg $BASECFLAGS"
5390 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391fi
5392
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5394$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005395
5396# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5397# library that we build, but we do not want to link against it (we
5398# will find it with a -framework option). For this reason there is an
5399# extra variable BLDLIBRARY against which Python and the extension
5400# modules are linked, BLDLIBRARY. This is normally the same as
5401# LDLIBRARY, but empty for MacOSX framework builds.
5402if test "$enable_framework"
5403then
5404 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005405 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005406 BLDLIBRARY=''
5407else
5408 BLDLIBRARY='$(LDLIBRARY)'
5409fi
5410
5411# Other platforms follow
5412if test $enable_shared = "yes"; then
5413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005414$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005415
5416 case $ac_sys_system in
5417 BeOS*)
5418 LDLIBRARY='libpython$(VERSION).so'
5419 ;;
5420 CYGWIN*)
5421 LDLIBRARY='libpython$(VERSION).dll.a'
5422 DLLLIBRARY='libpython$(VERSION).dll'
5423 ;;
5424 SunOS*)
5425 LDLIBRARY='libpython$(VERSION).so'
5426 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005427 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005428 INSTSONAME="$LDLIBRARY".$SOVERSION
5429 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005430 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431 LDLIBRARY='libpython$(VERSION).so'
5432 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005433 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005434 case $ac_sys_system in
5435 FreeBSD*)
5436 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5437 ;;
5438 esac
5439 INSTSONAME="$LDLIBRARY".$SOVERSION
5440 ;;
5441 hp*|HP*)
5442 case `uname -m` in
5443 ia64)
5444 LDLIBRARY='libpython$(VERSION).so'
5445 ;;
5446 *)
5447 LDLIBRARY='libpython$(VERSION).sl'
5448 ;;
5449 esac
5450 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005451 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452 ;;
5453 OSF*)
5454 LDLIBRARY='libpython$(VERSION).so'
5455 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005456 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005457 ;;
5458 atheos*)
5459 LDLIBRARY='libpython$(VERSION).so'
5460 BLDLIBRARY='-L. -lpython$(VERSION)'
5461 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5462 ;;
5463 Darwin*)
5464 LDLIBRARY='libpython$(VERSION).dylib'
5465 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005466 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005467 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005468 AIX*)
5469 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005470 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005471 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005472
5473 esac
5474else # shared is disabled
5475 case $ac_sys_system in
5476 CYGWIN*)
5477 BLDLIBRARY='$(LIBRARY)'
5478 LDLIBRARY='libpython$(VERSION).dll.a'
5479 ;;
5480 esac
5481fi
5482
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005483if test "$cross_compiling" = yes; then
5484 RUNSHARED=
5485fi
5486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5488$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005489
5490if test -n "$ac_tool_prefix"; then
5491 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5492set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5494$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005495if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005496 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497else
5498 if test -n "$RANLIB"; then
5499 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5500else
5501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5502for as_dir in $PATH
5503do
5504 IFS=$as_save_IFS
5505 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005506 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005508 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005510 break 2
5511 fi
5512done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005513 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005514IFS=$as_save_IFS
5515
5516fi
5517fi
5518RANLIB=$ac_cv_prog_RANLIB
5519if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5521$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005522else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5524$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525fi
5526
5527
5528fi
5529if test -z "$ac_cv_prog_RANLIB"; then
5530 ac_ct_RANLIB=$RANLIB
5531 # Extract the first word of "ranlib", so it can be a program name with args.
5532set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5534$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005535if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005536 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005537else
5538 if test -n "$ac_ct_RANLIB"; then
5539 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5540else
5541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5542for as_dir in $PATH
5543do
5544 IFS=$as_save_IFS
5545 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005546 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005548 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550 break 2
5551 fi
5552done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005553 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005554IFS=$as_save_IFS
5555
5556fi
5557fi
5558ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5559if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5561$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5564$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005565fi
5566
5567 if test "x$ac_ct_RANLIB" = x; then
5568 RANLIB=":"
5569 else
5570 case $cross_compiling:$ac_tool_warned in
5571yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005574ac_tool_warned=yes ;;
5575esac
5576 RANLIB=$ac_ct_RANLIB
5577 fi
5578else
5579 RANLIB="$ac_cv_prog_RANLIB"
5580fi
5581
5582
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005583if test -n "$ac_tool_prefix"; then
5584 for ac_prog in ar aal
5585 do
5586 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5589$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005590if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005591 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005592else
5593 if test -n "$AR"; then
5594 ac_cv_prog_AR="$AR" # Let the user override the test.
5595else
5596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597for as_dir in $PATH
5598do
5599 IFS=$as_save_IFS
5600 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005601 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005603 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605 break 2
5606 fi
5607done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005608 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005609IFS=$as_save_IFS
5610
5611fi
5612fi
5613AR=$ac_cv_prog_AR
5614if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5616$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5619$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005620fi
5621
5622
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005623 test -n "$AR" && break
5624 done
5625fi
5626if test -z "$AR"; then
5627 ac_ct_AR=$AR
5628 for ac_prog in ar aal
5629do
5630 # Extract the first word of "$ac_prog", so it can be a program name with args.
5631set dummy $ac_prog; ac_word=$2
5632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5633$as_echo_n "checking for $ac_word... " >&6; }
5634if ${ac_cv_prog_ac_ct_AR+:} false; then :
5635 $as_echo_n "(cached) " >&6
5636else
5637 if test -n "$ac_ct_AR"; then
5638 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5639else
5640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5641for as_dir in $PATH
5642do
5643 IFS=$as_save_IFS
5644 test -z "$as_dir" && as_dir=.
5645 for ac_exec_ext in '' $ac_executable_extensions; do
5646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5647 ac_cv_prog_ac_ct_AR="$ac_prog"
5648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5649 break 2
5650 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005651done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005652 done
5653IFS=$as_save_IFS
5654
5655fi
5656fi
5657ac_ct_AR=$ac_cv_prog_ac_ct_AR
5658if test -n "$ac_ct_AR"; then
5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5660$as_echo "$ac_ct_AR" >&6; }
5661else
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5663$as_echo "no" >&6; }
5664fi
5665
5666
5667 test -n "$ac_ct_AR" && break
5668done
5669
5670 if test "x$ac_ct_AR" = x; then
5671 AR="ar"
5672 else
5673 case $cross_compiling:$ac_tool_warned in
5674yes:)
5675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5677ac_tool_warned=yes ;;
5678esac
5679 AR=$ac_ct_AR
5680 fi
5681fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005682
5683
5684# tweak ARFLAGS only if the user didn't set it on the command line
5685
5686if test -z "$ARFLAGS"
5687then
5688 ARFLAGS="rc"
5689fi
5690
5691
5692# Extract the first word of "svnversion", so it can be a program name with args.
5693set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005696if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005697 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005698else
5699 if test -n "$SVNVERSION"; then
5700 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705 IFS=$as_save_IFS
5706 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005707 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005709 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711 break 2
5712 fi
5713done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005714 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005715IFS=$as_save_IFS
5716
5717 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5718fi
5719fi
5720SVNVERSION=$ac_cv_prog_SVNVERSION
5721if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5723$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5726$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727fi
5728
5729
5730if test $SVNVERSION = found
5731then
5732 SVNVERSION="svnversion \$(srcdir)"
5733else
5734 SVNVERSION="echo Unversioned directory"
5735fi
5736
Trent Nelsond86ceec2012-10-16 09:42:45 -04005737
Georg Brandl3a5508e2011-03-06 10:42:21 +01005738
5739
5740# Extract the first word of "hg", so it can be a program name with args.
5741set dummy hg; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005744if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005745 $as_echo_n "(cached) " >&6
5746else
5747 if test -n "$HAS_HG"; then
5748 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5749else
5750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5751for as_dir in $PATH
5752do
5753 IFS=$as_save_IFS
5754 test -z "$as_dir" && as_dir=.
5755 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005756 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005757 ac_cv_prog_HAS_HG="found"
5758 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5759 break 2
5760 fi
5761done
5762 done
5763IFS=$as_save_IFS
5764
5765 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5766fi
5767fi
5768HAS_HG=$ac_cv_prog_HAS_HG
5769if test -n "$HAS_HG"; then
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5771$as_echo "$HAS_HG" >&6; }
5772else
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5774$as_echo "no" >&6; }
5775fi
5776
5777
5778if test $HAS_HG = found
5779then
5780 HGVERSION="hg id -i \$(srcdir)"
5781 HGTAG="hg id -t \$(srcdir)"
5782 HGBRANCH="hg id -b \$(srcdir)"
5783else
5784 HGVERSION=""
5785 HGTAG=""
5786 HGBRANCH=""
5787fi
5788
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005789case $MACHDEP in
5790bsdos*|hp*|HP*)
5791 # install -d does not work on BSDI or HP-UX
5792 if test -z "$INSTALL"
5793 then
5794 INSTALL="${srcdir}/install-sh -c"
5795 fi
5796esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005797# Find a good install program. We prefer a C program (faster),
5798# so one script is as good as another. But avoid the broken or
5799# incompatible versions:
5800# SysV /etc/install, /usr/sbin/install
5801# SunOS /usr/etc/install
5802# IRIX /sbin/install
5803# AIX /bin/install
5804# AmigaOS /C/install, which installs bootblocks on floppy discs
5805# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5806# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5807# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5808# OS/2's system install, which has a completely different semantic
5809# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005810# Reject install programs that cannot install multiple files.
5811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5812$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005814if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005815 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005816else
5817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5818for as_dir in $PATH
5819do
5820 IFS=$as_save_IFS
5821 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822 # Account for people who put trailing slashes in PATH elements.
5823case $as_dir/ in #((
5824 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005827 /usr/ucb/* ) ;;
5828 *)
5829 # OSF1 and SCO ODT 3.0 have their own names for install.
5830 # Don't use installbsd from OSF since it installs stuff as root
5831 # by default.
5832 for ac_prog in ginstall scoinst install; do
5833 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005834 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005835 if test $ac_prog = install &&
5836 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5837 # AIX install. It has an incompatible calling convention.
5838 :
5839 elif test $ac_prog = install &&
5840 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5841 # program-specific install script used by HP pwplus--don't use.
5842 :
5843 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005844 rm -rf conftest.one conftest.two conftest.dir
5845 echo one > conftest.one
5846 echo two > conftest.two
5847 mkdir conftest.dir
5848 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5849 test -s conftest.one && test -s conftest.two &&
5850 test -s conftest.dir/conftest.one &&
5851 test -s conftest.dir/conftest.two
5852 then
5853 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5854 break 3
5855 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856 fi
5857 fi
5858 done
5859 done
5860 ;;
5861esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862
5863 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005864IFS=$as_save_IFS
5865
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005866rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005867
5868fi
5869 if test "${ac_cv_path_install+set}" = set; then
5870 INSTALL=$ac_cv_path_install
5871 else
5872 # As a last resort, use the slow shell script. Don't cache a
5873 # value for INSTALL within a source directory, because that will
5874 # break other packages using the cache if that directory is
5875 # removed, or if the value is a relative name.
5876 INSTALL=$ac_install_sh
5877 fi
5878fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5880$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881
5882# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5883# It thinks the first close brace ends the variable substitution.
5884test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5885
5886test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5887
5888test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5889
Trent Nelsonf6407a12012-08-30 14:56:13 +00005890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5891$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5892if test -z "$MKDIR_P"; then
5893 if ${ac_cv_path_mkdir+:} false; then :
5894 $as_echo_n "(cached) " >&6
5895else
5896 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5898do
5899 IFS=$as_save_IFS
5900 test -z "$as_dir" && as_dir=.
5901 for ac_prog in mkdir gmkdir; do
5902 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005903 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005904 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5905 'mkdir (GNU coreutils) '* | \
5906 'mkdir (coreutils) '* | \
5907 'mkdir (fileutils) '4.1*)
5908 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5909 break 3;;
5910 esac
5911 done
5912 done
5913 done
5914IFS=$as_save_IFS
5915
5916fi
5917
5918 test -d ./--version && rmdir ./--version
5919 if test "${ac_cv_path_mkdir+set}" = set; then
5920 MKDIR_P="$ac_cv_path_mkdir -p"
5921 else
5922 # As a last resort, use the slow shell script. Don't cache a
5923 # value for MKDIR_P within a source directory, because that will
5924 # break other packages using the cache if that directory is
5925 # removed, or if the value is a relative name.
5926 MKDIR_P="$ac_install_sh -d"
5927 fi
5928fi
5929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5930$as_echo "$MKDIR_P" >&6; }
5931
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005932
5933# Not every filesystem supports hard links
5934
5935if test -z "$LN" ; then
5936 case $ac_sys_system in
5937 BeOS*) LN="ln -s";;
5938 CYGWIN*) LN="ln -s";;
5939 atheos*) LN="ln -s";;
5940 *) LN=ln;;
5941 esac
5942fi
5943
5944# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5946$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005947
5948# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005949if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005950 withval=$with_pydebug;
5951if test "$withval" != no
5952then
5953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005954$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005955
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5957$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005958 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961fi
5962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005965fi
5966
5967
5968# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5969# merged with this chunk of code?
5970
5971# Optimizer/debugger flags
5972# ------------------------
5973# (The following bit of code is complicated enough - please keep things
5974# indented properly. Just pretend you're editing Python code. ;-)
5975
5976# There are two parallel sets of case statements below, one that checks to
5977# see if OPT was set and one that does BASECFLAGS setting based upon
5978# compiler and platform. BASECFLAGS tweaks need to be made even if the
5979# user set OPT.
5980
5981# tweak OPT based on compiler and platform, only if the user didn't set
5982# it on the command line
5983
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005984if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005985then
5986 case $GCC in
5987 yes)
5988 if test "$CC" != 'g++' ; then
5989 STRICT_PROTO="-Wstrict-prototypes"
5990 fi
5991 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5992 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5993 WRAP="-fwrapv"
5994 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005995
5996 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005997 case $CC in
5998 *clang*) WRAP="-fwrapv"
5999 ;;
6000 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006001
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002 case $ac_cv_prog_cc_g in
6003 yes)
6004 if test "$Py_DEBUG" = 'true' ; then
6005 # Optimization messes up debuggers, so turn it off for
6006 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006007 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006008 else
6009 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6010 fi
6011 ;;
6012 *)
6013 OPT="-O3 -Wall $STRICT_PROTO"
6014 ;;
6015 esac
6016 case $ac_sys_system in
6017 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6018 ;;
6019 esac
6020 ;;
6021
6022 *)
6023 OPT="-O"
6024 ;;
6025 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006026fi
6027
6028
6029
6030# The -arch flags for universal builds on OSX
6031UNIVERSAL_ARCH_FLAGS=
6032
6033
6034# tweak BASECFLAGS based on compiler and platform
6035case $GCC in
6036yes)
6037 # Python violates C99 rules, by casting between incompatible
6038 # pointer types. GCC may generate bad code as a result of that,
6039 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6041$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006042 ac_save_cc="$CC"
6043 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006044 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006045 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006048/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006049
6050int
6051main ()
6052{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006053
Gregory P. Smith373469a2009-11-01 21:03:38 +00006054 ;
6055 return 0;
6056}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006058if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006059 ac_cv_no_strict_aliasing_ok=yes
6060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006064fi
6065
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006066 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6068$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069 if test $ac_cv_no_strict_aliasing_ok = yes
6070 then
6071 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6072 fi
6073
6074 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6075 # support. Without this, treatment of subnormals doesn't follow
6076 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006077 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078 alpha*)
6079 BASECFLAGS="$BASECFLAGS -mieee"
6080 ;;
6081 esac
6082
6083 case $ac_sys_system in
6084 SCO_SV*)
6085 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6086 ;;
6087 # is there any other compiler on Darwin besides gcc?
6088 Darwin*)
6089 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6090 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006091 if test "${CC}" = gcc
6092 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6094$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006095 case "${UNIVERSALSDK}" in
6096 */MacOSX10.4u.sdk)
6097 # Build using 10.4 SDK, force usage of gcc when the
6098 # compiler is gcc, otherwise the user will get very
6099 # confusing error messages when building on OSX 10.6
6100 CC=gcc-4.0
6101 CPP=cpp-4.0
6102 ;;
6103 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6105$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006106 fi
6107
6108 # Calculate the right deployment target for this build.
6109 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006110 cur_target_major=`sw_vers -productVersion | \
6111 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6112 cur_target_minor=`sw_vers -productVersion | \
6113 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6114 cur_target="${cur_target_major}.${cur_target_minor}"
6115 if test ${cur_target_major} -eq 10 && \
6116 test ${cur_target_minor} -ge 3
6117 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006118 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006119 if test ${enable_universalsdk}; then
6120 if test "${UNIVERSAL_ARCHS}" = "all"; then
6121 # Ensure that the default platform for a
6122 # 4-way universal build is OSX 10.5,
6123 # that's the first OS release where
6124 # 4-way builds make sense.
6125 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006126
6127 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6128 cur_target='10.5'
6129
6130 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6131 cur_target='10.5'
6132
6133 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6134 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006135 fi
6136 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006137 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006138 # On Intel macs default to a deployment
6139 # target of 10.4, that's the first OSX
6140 # release with Intel support.
6141 cur_target="10.4"
6142 fi
6143 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006144 fi
6145 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6146
6147 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6148 # environment with a value that is the same as what we'll use
6149 # in the Makefile to ensure that we'll get the same compiler
6150 # environment during configure and build time.
6151 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6152 export MACOSX_DEPLOYMENT_TARGET
6153 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6154
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006155 if test "${enable_universalsdk}"; then
6156 UNIVERSAL_ARCH_FLAGS=""
6157 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6158 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6159 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006160 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006161
6162 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6163 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6164 LIPO_32BIT_FLAGS=""
6165 ARCH_RUN_32BIT="true"
6166
6167 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6168 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6169 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006170 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006171
6172 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6173 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6174 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006175 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006176
6177 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6178 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6179 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006180 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006181
6182 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006183 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 +00006184
6185 fi
6186
6187
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006188 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6189 if test "${UNIVERSALSDK}" != "/"
6190 then
6191 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6192 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6193 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006194 fi
6195
6196 fi
6197
6198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006199 ;;
6200 OSF*)
6201 BASECFLAGS="$BASECFLAGS -mieee"
6202 ;;
6203 esac
6204 ;;
6205
6206*)
6207 case $ac_sys_system in
6208 OpenUNIX*|UnixWare*)
6209 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6210 ;;
6211 OSF*)
6212 BASECFLAGS="$BASECFLAGS -ieee -std"
6213 ;;
6214 SCO_SV*)
6215 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6216 ;;
6217 esac
6218 ;;
6219esac
6220
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006221# ICC needs -fp-model strict or floats behave badly
6222case "$CC" in
6223*icc*)
6224 BASECFLAGS="$BASECFLAGS -fp-model strict"
6225 ;;
6226esac
6227
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006228if test "$Py_DEBUG" = 'true'; then
6229 :
6230else
6231 OPT="-DNDEBUG $OPT"
6232fi
6233
6234if test "$ac_arch_flags"
6235then
6236 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6237fi
6238
6239# disable check for icc since it seems to pass, but generates a warning
6240if test "$CC" = icc
6241then
6242 ac_cv_opt_olimit_ok=no
6243fi
6244
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6246$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006247if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249else
6250 ac_save_cc="$CC"
6251CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006253/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006254
6255int
6256main ()
6257{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006258
Gregory P. Smith373469a2009-11-01 21:03:38 +00006259 ;
6260 return 0;
6261}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006262_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006263if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264 ac_cv_opt_olimit_ok=yes
6265else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006267
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006268fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270CC="$ac_save_cc"
6271fi
6272
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6274$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006275if test $ac_cv_opt_olimit_ok = yes; then
6276 case $ac_sys_system in
6277 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6278 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6279 # environment?
6280 Darwin*)
6281 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006282 # XXX thankfully this useless troublemaker of a flag has been
6283 # eradicated in the 3.x line. For now, make sure it isn't picked
6284 # up by any of our other platforms that use CC.
6285 AIX*|SunOS*|HP-UX*|IRIX*)
6286 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287 *)
6288 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6289 ;;
6290 esac
6291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6293$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006294 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006295 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296else
6297 ac_save_cc="$CC"
6298 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006300/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006301
6302int
6303main ()
6304{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006305
Gregory P. Smith373469a2009-11-01 21:03:38 +00006306 ;
6307 return 0;
6308}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006310if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311 ac_cv_olimit_ok=yes
6312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006314
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006315fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317 CC="$ac_save_cc"
6318fi
6319
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6321$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006322 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006323 case $ac_sys_system in
6324 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6325 HP-UX*)
6326 ;;
6327 *)
6328 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6329 ;;
6330 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006331 fi
6332fi
6333
6334# Check whether GCC supports PyArg_ParseTuple format
6335if test "$GCC" = "yes"
6336then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6338$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006339 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006340 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006342/* end confdefs.h. */
6343
6344 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006345int
6346main ()
6347{
6348
6349 ;
6350 return 0;
6351}
Matthias Klosec511b472010-05-08 11:01:39 +00006352
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006353_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355
Matthias Klosec511b472010-05-08 11:01:39 +00006356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358
Matthias Klosec511b472010-05-08 11:01:39 +00006359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006360$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006361
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362else
Matthias Klosec511b472010-05-08 11:01:39 +00006363
6364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006365$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366
6367fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6369 CFLAGS=$save_CFLAGS
6370fi
6371
Brett Cannon4ff151a2015-09-18 15:09:42 -07006372
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006373# Enable optimization flags
6374
6375
6376Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6378$as_echo_n "checking for --enable-optimizations... " >&6; }
6379# Check whether --enable-optimizations was given.
6380if test "${enable_optimizations+set}" = set; then :
6381 enableval=$enable_optimizations;
INADA Naoki6a04ef72017-03-29 01:50:48 +09006382if test "$enableval" != no
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006383then
6384 Py_OPT='true'
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6386$as_echo "yes" >&6; };
6387else
6388 Py_OPT='false'
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6390$as_echo "no" >&6; };
6391fi
6392else
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6394$as_echo "no" >&6; }
6395fi
6396
6397if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006398 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6399 # compile working code using it and both test_distutils and test_gdb are
6400 # broken when you do managed to get a toolchain that works with it. People
6401 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006402 Py_LTO='true'
6403 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006404 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006405 DEF_MAKE_RULE="build_all"
6406else
6407 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006408 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006409 DEF_MAKE_RULE="all"
6410fi
6411
6412
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006413# Enable LTO flags
6414
6415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6416$as_echo_n "checking for --with-lto... " >&6; }
6417
6418# Check whether --with-lto was given.
6419if test "${with_lto+set}" = set; then :
6420 withval=$with_lto;
6421if test "$withval" != no
6422then
6423 Py_LTO='true'
6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6425$as_echo "yes" >&6; };
6426else
6427 Py_LTO='false'
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; };
6430fi
6431else
6432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6433$as_echo "no" >&6; }
6434fi
6435
6436if test "$Py_LTO" = 'true' ; then
6437 case $CC in
6438 *clang*)
6439 # Any changes made here should be reflected in the GCC+Darwin case below
6440 LTOFLAGS="-flto"
6441 ;;
6442 *gcc*)
6443 case $ac_sys_system in
6444 Darwin*)
6445 LTOFLAGS="-flto"
6446 ;;
6447 *)
6448 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6449 ;;
6450 esac
6451 ;;
6452 esac
6453fi
6454
6455
Brett Cannon4ff151a2015-09-18 15:09:42 -07006456# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006457
6458
6459
6460
6461
Gregory P. Smith794b2912016-09-08 00:07:40 -07006462# Make this work on systems where llvm tools are not installed with their
6463# normal names in the default $PATH (ie: Ubuntu). They exist under the
6464# non-suffixed name in their versioned llvm directory.
6465llvm_bin_dir=''
6466llvm_path="${PATH}"
6467if test "${CC}" = "clang"
6468then
6469 clang_bin=`which clang`
6470 # Some systems install clang elsewhere as a symlink to the real path
6471 # which is where the related llvm tools are located.
6472 if test -L "${clang_bin}"
6473 then
6474 clang_dir=`dirname "${clang_bin}"`
6475 clang_bin=`readlink "${clang_bin}"`
6476 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6477 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6478 fi
6479fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006480
Gregory P. Smith794b2912016-09-08 00:07:40 -07006481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6482$as_echo_n "checking target system type... " >&6; }
6483if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006484 $as_echo_n "(cached) " >&6
6485else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006486 if test "x$target_alias" = x; then
6487 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006488else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006489 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6490 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6491fi
6492
6493fi
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6495$as_echo "$ac_cv_target" >&6; }
6496case $ac_cv_target in
6497*-*-*) ;;
6498*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6499esac
6500target=$ac_cv_target
6501ac_save_IFS=$IFS; IFS='-'
6502set x $ac_cv_target
6503shift
6504target_cpu=$1
6505target_vendor=$2
6506shift; shift
6507# Remember, the first character of IFS is used to create $*,
6508# except with old shells:
6509target_os=$*
6510IFS=$ac_save_IFS
6511case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6512
6513
6514# The aliases save the names the user supplied, while $host etc.
6515# will get canonicalized.
6516test -n "$target_alias" &&
6517 test "$program_prefix$program_suffix$program_transform_name" = \
6518 NONENONEs,x,x, &&
6519 program_prefix=${target_alias}-
6520# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6521set dummy $target_alias-llvm-profdata; ac_word=$2
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6523$as_echo_n "checking for $ac_word... " >&6; }
6524if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6525 $as_echo_n "(cached) " >&6
6526else
6527 case $LLVM_PROFDATA in
6528 [\\/]* | ?:[\\/]*)
6529 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6530 ;;
6531 *)
6532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006534do
6535 IFS=$as_save_IFS
6536 test -z "$as_dir" && as_dir=.
6537 for ac_exec_ext in '' $ac_executable_extensions; do
6538 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006539 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006540 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6541 break 2
6542 fi
6543done
6544 done
6545IFS=$as_save_IFS
6546
Gregory P. Smith794b2912016-09-08 00:07:40 -07006547 ;;
6548esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006549fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006550LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6551if test -n "$LLVM_PROFDATA"; then
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6553$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006554else
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556$as_echo "no" >&6; }
6557fi
6558
6559
Gregory P. Smith794b2912016-09-08 00:07:40 -07006560if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6561 if test "$build" = "$target"; then
6562 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6563 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6564set dummy llvm-profdata; ac_word=$2
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6566$as_echo_n "checking for $ac_word... " >&6; }
6567if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6568 $as_echo_n "(cached) " >&6
6569else
6570 case $ac_pt_LLVM_PROFDATA in
6571 [\\/]* | ?:[\\/]*)
6572 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6573 ;;
6574 *)
6575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6576for as_dir in ${llvm_path}
6577do
6578 IFS=$as_save_IFS
6579 test -z "$as_dir" && as_dir=.
6580 for ac_exec_ext in '' $ac_executable_extensions; do
6581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6582 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6584 break 2
6585 fi
6586done
6587 done
6588IFS=$as_save_IFS
6589
6590 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6591 ;;
6592esac
6593fi
6594ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6595if test -n "$ac_pt_LLVM_PROFDATA"; then
6596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6597$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6598else
6599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6600$as_echo "no" >&6; }
6601fi
6602
6603 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6604 else
6605 LLVM_PROFDATA="''"
6606 fi
6607else
6608 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6609fi
6610
6611
6612if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6613then
6614 LLVM_PROF_FOUND="found"
6615else
6616 LLVM_PROF_FOUND="not-found"
6617fi
6618if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6619then
6620 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6621 if test -n "${found_llvm_profdata}"
6622 then
6623 # llvm-profdata isn't directly in $PATH in some cases.
6624 # https://apple.stackexchange.com/questions/197053/
6625 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6626 LLVM_PROF_FOUND=found
6627 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6628$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6629 fi
6630fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006631LLVM_PROF_ERR=no
6632case $CC in
6633 *clang*)
6634 # Any changes made here should be reflected in the GCC+Darwin case below
6635 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6636 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006637 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006638 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6639 if test $LLVM_PROF_FOUND = not-found
6640 then
6641 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006642 if test "${REQUIRE_PGO}" = "yes"
6643 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006644 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith794b2912016-09-08 00:07:40 -07006645 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006646 fi
6647 ;;
6648 *gcc*)
6649 case $ac_sys_system in
6650 Darwin*)
6651 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6652 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006653 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006654 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006655 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006656 then
6657 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006658 if test "${REQUIRE_PGO}" = "yes"
6659 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006660 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith794b2912016-09-08 00:07:40 -07006661 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006662 fi
6663 ;;
6664 *)
6665 PGO_PROF_GEN_FLAG="-fprofile-generate"
6666 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6667 LLVM_PROF_MERGER="true"
6668 LLVM_PROF_FILE=""
6669 ;;
6670 esac
6671 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006672 *icc*)
6673 PGO_PROF_GEN_FLAG="-prof-gen"
6674 PGO_PROF_USE_FLAG="-prof-use"
6675 LLVM_PROF_MERGER="true"
6676 LLVM_PROF_FILE=""
6677 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006678esac
6679
6680
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006681# On some compilers, pthreads are available without further options
6682# (e.g. MacOS X). On some of these systems, the compiler will not
6683# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6684# So we have to see first whether pthreads are available without
6685# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6687$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006688if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006691 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006692 ac_cv_pthread_is_default=no
6693else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006695/* end confdefs.h. */
6696
Stefan Krahae66ca62012-11-22 22:36:57 +01006697#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006698#include <pthread.h>
6699
6700void* routine(void* p){return NULL;}
6701
6702int main(){
6703 pthread_t p;
6704 if(pthread_create(&p,NULL,routine,NULL)!=0)
6705 return 1;
6706 (void)pthread_detach(p);
6707 return 0;
6708}
6709
6710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006711if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006712
6713 ac_cv_pthread_is_default=yes
6714 ac_cv_kthread=no
6715 ac_cv_pthread=no
6716
6717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006719fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6721 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006722fi
6723
6724
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725fi
6726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6728$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006729
6730
6731if test $ac_cv_pthread_is_default = yes
6732then
6733 ac_cv_kpthread=no
6734else
6735# -Kpthread, if available, provides the right #defines
6736# and linker options to make pthread_create available
6737# Some compilers won't report that they do not support -Kpthread,
6738# so we need to run a program to see whether it really made the
6739# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6741$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006742if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006743 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006744else
6745 ac_save_cc="$CC"
6746CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006748 ac_cv_kpthread=no
6749else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006751/* end confdefs.h. */
6752
Stefan Krahae66ca62012-11-22 22:36:57 +01006753#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006754#include <pthread.h>
6755
6756void* routine(void* p){return NULL;}
6757
6758int main(){
6759 pthread_t p;
6760 if(pthread_create(&p,NULL,routine,NULL)!=0)
6761 return 1;
6762 (void)pthread_detach(p);
6763 return 0;
6764}
6765
6766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006767if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768 ac_cv_kpthread=yes
6769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6773 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006774fi
6775
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006776CC="$ac_save_cc"
6777fi
6778
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6780$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006781fi
6782
6783if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6784then
6785# -Kthread, if available, provides the right #defines
6786# and linker options to make pthread_create available
6787# Some compilers won't report that they do not support -Kthread,
6788# so we need to run a program to see whether it really made the
6789# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6791$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006792if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006794else
6795 ac_save_cc="$CC"
6796CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798 ac_cv_kthread=no
6799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801/* end confdefs.h. */
6802
Stefan Krahae66ca62012-11-22 22:36:57 +01006803#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006804#include <pthread.h>
6805
6806void* routine(void* p){return NULL;}
6807
6808int main(){
6809 pthread_t p;
6810 if(pthread_create(&p,NULL,routine,NULL)!=0)
6811 return 1;
6812 (void)pthread_detach(p);
6813 return 0;
6814}
6815
6816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006818 ac_cv_kthread=yes
6819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006820 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006824fi
6825
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006826CC="$ac_save_cc"
6827fi
6828
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6830$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831fi
6832
6833if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6834then
6835# -pthread, if available, provides the right #defines
6836# and linker options to make pthread_create available
6837# Some compilers won't report that they do not support -pthread,
6838# so we need to run a program to see whether it really made the
6839# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6841$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006842if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006844else
6845 ac_save_cc="$CC"
6846CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006847if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006848 ac_cv_pthread=no
6849else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006851/* end confdefs.h. */
6852
Stefan Krahae66ca62012-11-22 22:36:57 +01006853#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006854#include <pthread.h>
6855
6856void* routine(void* p){return NULL;}
6857
6858int main(){
6859 pthread_t p;
6860 if(pthread_create(&p,NULL,routine,NULL)!=0)
6861 return 1;
6862 (void)pthread_detach(p);
6863 return 0;
6864}
6865
6866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006867if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868 ac_cv_pthread=yes
6869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006870 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6873 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874fi
6875
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006876CC="$ac_save_cc"
6877fi
6878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6880$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881fi
6882
6883# If we have set a CC compiler flag for thread support then
6884# check if it works for CXX, too.
6885ac_cv_cxx_thread=no
6886if test ! -z "$CXX"
6887then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6889$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006890ac_save_cxx="$CXX"
6891
6892if test "$ac_cv_kpthread" = "yes"
6893then
6894 CXX="$CXX -Kpthread"
6895 ac_cv_cxx_thread=yes
6896elif test "$ac_cv_kthread" = "yes"
6897then
6898 CXX="$CXX -Kthread"
6899 ac_cv_cxx_thread=yes
6900elif test "$ac_cv_pthread" = "yes"
6901then
6902 CXX="$CXX -pthread"
6903 ac_cv_cxx_thread=yes
6904fi
6905
6906if test $ac_cv_cxx_thread = yes
6907then
6908 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6909 $CXX -c conftest.$ac_ext 2>&5
6910 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6911 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6912 then
6913 ac_cv_cxx_thread=yes
6914 else
6915 ac_cv_cxx_thread=no
6916 fi
6917 rm -fr conftest*
6918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6920$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006921fi
6922CXX="$ac_save_cxx"
6923
6924
6925# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6927$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006928if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006930else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006932/* end confdefs.h. */
6933#include <stdlib.h>
6934#include <stdarg.h>
6935#include <string.h>
6936#include <float.h>
6937
6938int
6939main ()
6940{
6941
6942 ;
6943 return 0;
6944}
6945_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006946if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006947 ac_cv_header_stdc=yes
6948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006950fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6952
6953if test $ac_cv_header_stdc = yes; then
6954 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006956/* end confdefs.h. */
6957#include <string.h>
6958
6959_ACEOF
6960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006961 $EGREP "memchr" >/dev/null 2>&1; then :
6962
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006963else
6964 ac_cv_header_stdc=no
6965fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006966rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006967
6968fi
6969
6970if test $ac_cv_header_stdc = yes; then
6971 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006973/* end confdefs.h. */
6974#include <stdlib.h>
6975
6976_ACEOF
6977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978 $EGREP "free" >/dev/null 2>&1; then :
6979
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980else
6981 ac_cv_header_stdc=no
6982fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006983rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006984
6985fi
6986
6987if test $ac_cv_header_stdc = yes; then
6988 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006990 :
6991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006993/* end confdefs.h. */
6994#include <ctype.h>
6995#include <stdlib.h>
6996#if ((' ' & 0x0FF) == 0x020)
6997# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6998# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6999#else
7000# define ISLOWER(c) \
7001 (('a' <= (c) && (c) <= 'i') \
7002 || ('j' <= (c) && (c) <= 'r') \
7003 || ('s' <= (c) && (c) <= 'z'))
7004# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7005#endif
7006
7007#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7008int
7009main ()
7010{
7011 int i;
7012 for (i = 0; i < 256; i++)
7013 if (XOR (islower (i), ISLOWER (i))
7014 || toupper (i) != TOUPPER (i))
7015 return 2;
7016 return 0;
7017}
7018_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007019if ac_fn_c_try_run "$LINENO"; then :
7020
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007022 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007023fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7025 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007026fi
7027
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007028fi
7029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7031$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007032if test $ac_cv_header_stdc = yes; then
7033
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007035
7036fi
7037
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007038for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007039fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007040ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007041shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007042unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007043sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7044sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007045sys/param.h sys/poll.h sys/random.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007046sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007047sys/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 +00007048sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007049bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007050do :
7051 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7052ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007053if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007055#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007056_ACEOF
7057
7058fi
7059
Guido van Rossum627b2d71993-12-24 10:39:16 +00007060done
7061
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007062ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007063for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007064 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7066$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007067if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007071/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007072#include <sys/types.h>
7073#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007074
Martin v. Löwis11437992002-04-12 09:54:03 +00007075int
7076main ()
7077{
7078if ((DIR *) 0)
7079return 0;
7080 ;
7081 return 0;
7082}
7083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007085 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091eval ac_res=\$$as_ac_Header
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7093$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007094if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007096#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007097_ACEOF
7098
7099ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007100fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007101
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007102done
7103# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7104if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7106$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007107if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007108 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007109else
Martin v. Löwis11437992002-04-12 09:54:03 +00007110 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007113
Martin v. Löwiseba40652007-08-30 20:10:57 +00007114/* Override any GCC internal prototype to avoid an error.
7115 Use char because int might match the return type of a GCC
7116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007117#ifdef __cplusplus
7118extern "C"
7119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007120char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007121int
7122main ()
7123{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007124return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007125 ;
7126 return 0;
7127}
7128_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129for ac_lib in '' dir; do
7130 if test -z "$ac_lib"; then
7131 ac_res="none required"
7132 else
7133 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007134 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007135 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007137 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139rm -f core conftest.err conftest.$ac_objext \
7140 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007141 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007144done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007145if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146
Martin v. Löwiseba40652007-08-30 20:10:57 +00007147else
7148 ac_cv_search_opendir=no
7149fi
7150rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007151LIBS=$ac_func_search_save_LIBS
7152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7154$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007156if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007158
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007159fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007160
Michael W. Hudson54241132001-12-07 15:38:26 +00007161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7163$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007164if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007166else
7167 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007168cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007169/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007170
Martin v. Löwiseba40652007-08-30 20:10:57 +00007171/* Override any GCC internal prototype to avoid an error.
7172 Use char because int might match the return type of a GCC
7173 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007174#ifdef __cplusplus
7175extern "C"
7176#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007177char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007178int
7179main ()
7180{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007181return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007182 ;
7183 return 0;
7184}
7185_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186for ac_lib in '' x; do
7187 if test -z "$ac_lib"; then
7188 ac_res="none required"
7189 else
7190 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007191 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007192 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007193 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007196rm -f core conftest.err conftest.$ac_objext \
7197 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007198 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007201done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007202if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203
Martin v. Löwiseba40652007-08-30 20:10:57 +00007204else
7205 ac_cv_search_opendir=no
7206fi
7207rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007208LIBS=$ac_func_search_save_LIBS
7209fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7211$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007215
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007216fi
7217
7218fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007219
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7221$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007222if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007226/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007227#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007228int
7229main ()
7230{
7231return makedev(0, 0);
7232 ;
7233 return 0;
7234}
7235_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007236if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007237 ac_cv_header_sys_types_h_makedev=yes
7238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007239 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007241rm -f core conftest.err conftest.$ac_objext \
7242 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007243
7244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7246$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007247
7248if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249ac_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 +01007250if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007253
7254fi
7255
7256
7257
7258 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007259 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 +01007260if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007263
7264fi
7265
7266
7267 fi
7268fi
7269
Michael W. Hudson54241132001-12-07 15:38:26 +00007270
Martin v. Löwis11017b12006-01-14 18:12:57 +00007271# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007272for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007273do :
7274 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 +00007275#ifdef HAVE_ASM_TYPES_H
7276#include <asm/types.h>
7277#endif
7278#ifdef HAVE_SYS_SOCKET_H
7279#include <sys/socket.h>
7280#endif
7281
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007282"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007283if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007284 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007285#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007286_ACEOF
7287
7288fi
7289
7290done
7291
7292
Guido van Rossum627b2d71993-12-24 10:39:16 +00007293# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007294was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7296$as_echo_n "checking for clock_t in time.h... " >&6; }
7297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007300
7301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007303 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007305else
Martin v. Löwis11437992002-04-12 09:54:03 +00007306
7307
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007308$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007309
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007310
Guido van Rossum627b2d71993-12-24 10:39:16 +00007311fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007312rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7315$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007316
Neal Norwitz11690112002-07-30 01:08:28 +00007317# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7319$as_echo_n "checking for makedev... " >&6; }
7320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007321/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007322
7323#if defined(MAJOR_IN_MKDEV)
7324#include <sys/mkdev.h>
7325#elif defined(MAJOR_IN_SYSMACROS)
7326#include <sys/sysmacros.h>
7327#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007328#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007329#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007330int
7331main ()
7332{
7333 makedev(0, 0)
7334 ;
7335 return 0;
7336}
7337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007339 ac_cv_has_makedev=yes
7340else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343rm -f core conftest.err conftest.$ac_objext \
7344 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007345if test "$ac_cv_has_makedev" = "no"; then
7346 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007348/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007349
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007350#define _OSF_SOURCE 1
7351#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007352
Neal Norwitz11690112002-07-30 01:08:28 +00007353int
7354main ()
7355{
7356 makedev(0, 0)
7357 ;
7358 return 0;
7359}
7360_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007361if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007362 ac_cv_has_makedev=yes
7363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007364 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007365fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007366rm -f core conftest.err conftest.$ac_objext \
7367 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007368 if test "$ac_cv_has_makedev" = "yes"; then
7369
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007370$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007371
7372 fi
7373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7375$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007376if test "$ac_cv_has_makedev" = "yes"; then
7377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007379
7380fi
7381
Martin v. Löwis399a6892002-10-04 10:22:02 +00007382# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7383# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7384# defined, but the compiler does not support pragma redefine_extname,
7385# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7386# structures (such as rlimit64) without declaring them. As a
7387# work-around, disable LFS on such configurations
7388
7389use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7391$as_echo_n "checking Solaris LFS bug... " >&6; }
7392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007393/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007394
7395#define _LARGEFILE_SOURCE 1
7396#define _FILE_OFFSET_BITS 64
7397#include <sys/resource.h>
7398
Martin v. Löwis399a6892002-10-04 10:22:02 +00007399int
7400main ()
7401{
7402struct rlimit foo;
7403 ;
7404 return 0;
7405}
7406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007408 sol_lfs_bug=no
7409else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007410 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7414$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007415if test "$sol_lfs_bug" = "yes"; then
7416 use_lfs=no
7417fi
7418
7419if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007420# Two defines needed to enable largefile support on various platforms
7421# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007422case $ac_sys_system/$ac_sys_release in
7423AIX*)
7424
7425$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7426
7427 ;;
7428esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007430$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007431
7432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007433$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007434
Martin v. Löwis399a6892002-10-04 10:22:02 +00007435fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007436
Guido van Rossum84e7b241996-08-19 21:59:00 +00007437# Add some code to confdefs.h so that the test for off_t works on SCO
7438cat >> confdefs.h <<\EOF
7439#if defined(SCO_DS)
7440#undef _OFF_T
7441#endif
7442EOF
7443
Guido van Rossumef2255b2000-03-10 22:30:29 +00007444# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007446if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007448else
Martin v. Löwis11437992002-04-12 09:54:03 +00007449
7450cat >>confdefs.h <<_ACEOF
7451#define mode_t int
7452_ACEOF
7453
7454fi
7455
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007457if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007458
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007459else
Martin v. Löwis11437992002-04-12 09:54:03 +00007460
7461cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007463_ACEOF
7464
7465fi
7466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007468if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007470else
Martin v. Löwis11437992002-04-12 09:54:03 +00007471
7472cat >>confdefs.h <<_ACEOF
7473#define pid_t int
7474_ACEOF
7475
7476fi
7477
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007478
Martin v. Löwis11437992002-04-12 09:54:03 +00007479cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007480#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007481_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007484if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007485
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007486else
Martin v. Löwis11437992002-04-12 09:54:03 +00007487
7488cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007489#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007490_ACEOF
7491
7492fi
7493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7495$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007496if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007497 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007500/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007501#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007502
7503_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007506 ac_cv_type_uid_t=yes
7507else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007508 ac_cv_type_uid_t=no
7509fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007510rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007512fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7514$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007515if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007518
7519
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007521
7522fi
7523
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007524
7525# There are two separate checks for each of the exact-width integer types we
7526# need. First we check whether the type is available using the usual
7527# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7528# and <stdint.h> where available). We then also use the special type checks of
7529# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7530# directly, #define's uint32_t to be a suitable type.
7531
7532ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7533if test "x$ac_cv_type_uint32_t" = xyes; then :
7534
7535$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7536
7537fi
7538
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007539ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7540case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007541 no|yes) ;; #(
7542 *)
7543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007544$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007545
7546
7547cat >>confdefs.h <<_ACEOF
7548#define uint32_t $ac_cv_c_uint32_t
7549_ACEOF
7550;;
7551 esac
7552
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007553
7554ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7555if test "x$ac_cv_type_uint64_t" = xyes; then :
7556
7557$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7558
7559fi
7560
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007561ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7562case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007563 no|yes) ;; #(
7564 *)
7565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007567
7568
7569cat >>confdefs.h <<_ACEOF
7570#define uint64_t $ac_cv_c_uint64_t
7571_ACEOF
7572;;
7573 esac
7574
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007575
7576ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7577if test "x$ac_cv_type_int32_t" = xyes; then :
7578
7579$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7580
7581fi
7582
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007583ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7584case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007585 no|yes) ;; #(
7586 *)
7587
7588cat >>confdefs.h <<_ACEOF
7589#define int32_t $ac_cv_c_int32_t
7590_ACEOF
7591;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007592esac
7593
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007594
7595ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7596if test "x$ac_cv_type_int64_t" = xyes; then :
7597
7598$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7599
7600fi
7601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007602ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7603case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007604 no|yes) ;; #(
7605 *)
7606
7607cat >>confdefs.h <<_ACEOF
7608#define int64_t $ac_cv_c_int64_t
7609_ACEOF
7610;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007611esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007612
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007613
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007615if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007617$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007618
7619fi
7620
Jack Jansendd19cf82001-12-06 22:36:17 +00007621
Michael W. Hudson54241132001-12-07 15:38:26 +00007622# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007623# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624# The cast to long int works around a bug in the HP C Compiler
7625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7627# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7629$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007630if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007632else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007633 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 +00007634
Martin v. Löwis11437992002-04-12 09:54:03 +00007635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636 if test "$ac_cv_type_int" = yes; then
7637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007639as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007640See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007641 else
7642 ac_cv_sizeof_int=0
7643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007645
Martin v. Löwis11437992002-04-12 09:54:03 +00007646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7648$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007649
7650
7651
Martin v. Löwis11437992002-04-12 09:54:03 +00007652cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007653#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007654_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007655
7656
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657# The cast to long int works around a bug in the HP C Compiler
7658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7660# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7662$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007663if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007665else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007666 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 +00007667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 if test "$ac_cv_type_long" = yes; then
7670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007672as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007673See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 else
7675 ac_cv_sizeof_long=0
7676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007678
Martin v. Löwis11437992002-04-12 09:54:03 +00007679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7681$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682
7683
7684
Martin v. Löwis11437992002-04-12 09:54:03 +00007685cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007686#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007687_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007688
7689
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690# The cast to long int works around a bug in the HP C Compiler
7691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7693# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7695$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007696if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007699 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 +00007700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702 if test "$ac_cv_type_void_p" = yes; then
7703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007705as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007706See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 else
7708 ac_cv_sizeof_void_p=0
7709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711
Martin v. Löwis11437992002-04-12 09:54:03 +00007712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7714$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715
7716
7717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007719#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007720_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007721
7722
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723# The cast to long int works around a bug in the HP C Compiler
7724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7726# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7728$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007729if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732 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 +00007733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735 if test "$ac_cv_type_short" = yes; then
7736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007738as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007739See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740 else
7741 ac_cv_sizeof_short=0
7742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744
Martin v. Löwis11437992002-04-12 09:54:03 +00007745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7747$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748
7749
7750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007752#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007753_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007754
7755
Martin v. Löwiseba40652007-08-30 20:10:57 +00007756# The cast to long int works around a bug in the HP C Compiler
7757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7759# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7761$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007762if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007765 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 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007768 if test "$ac_cv_type_float" = yes; then
7769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007771as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007772See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 else
7774 ac_cv_sizeof_float=0
7775 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777
Martin v. Löwis11437992002-04-12 09:54:03 +00007778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7780$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007781
7782
7783
Martin v. Löwis11437992002-04-12 09:54:03 +00007784cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007785#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007786_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007787
7788
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789# The cast to long int works around a bug in the HP C Compiler
7790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7792# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7794$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007795if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 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 +00007799
Martin v. Löwis11437992002-04-12 09:54:03 +00007800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007801 if test "$ac_cv_type_double" = yes; then
7802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007804as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007805See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007806 else
7807 ac_cv_sizeof_double=0
7808 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810
Martin v. Löwis11437992002-04-12 09:54:03 +00007811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7813$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007814
7815
7816
Martin v. Löwis11437992002-04-12 09:54:03 +00007817cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007818#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007819_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007820
7821
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822# The cast to long int works around a bug in the HP C Compiler
7823# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7824# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7825# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7827$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007828if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007831 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 +00007832
Martin v. Löwis11437992002-04-12 09:54:03 +00007833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007834 if test "$ac_cv_type_fpos_t" = yes; then
7835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007837as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007838See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007839 else
7840 ac_cv_sizeof_fpos_t=0
7841 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007843
Martin v. Löwis11437992002-04-12 09:54:03 +00007844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7846$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007847
7848
7849
Martin v. Löwis11437992002-04-12 09:54:03 +00007850cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007851#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007852_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007853
Michael W. Hudson54241132001-12-07 15:38:26 +00007854
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855# The cast to long int works around a bug in the HP C Compiler
7856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7858# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7860$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007861if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007862 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007864 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 +00007865
Martin v. Löwis18e16552006-02-15 17:27:45 +00007866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867 if test "$ac_cv_type_size_t" = yes; then
7868 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007870as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 else
7873 ac_cv_sizeof_size_t=0
7874 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007876
Martin v. Löwis18e16552006-02-15 17:27:45 +00007877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7879$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007880
7881
7882
Martin v. Löwis18e16552006-02-15 17:27:45 +00007883cat >>confdefs.h <<_ACEOF
7884#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7885_ACEOF
7886
7887
Christian Heimes951cc0f2008-01-31 23:08:23 +00007888# The cast to long int works around a bug in the HP C Compiler
7889# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7890# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7891# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7893$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007894if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007895 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897 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 +00007898
Christian Heimes951cc0f2008-01-31 23:08:23 +00007899else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900 if test "$ac_cv_type_pid_t" = yes; then
7901 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007903as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007904See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007905 else
7906 ac_cv_sizeof_pid_t=0
7907 fi
7908fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007909
Christian Heimes951cc0f2008-01-31 23:08:23 +00007910fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7912$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007913
7914
7915
7916cat >>confdefs.h <<_ACEOF
7917#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7918_ACEOF
7919
7920
Michael W. Hudson54241132001-12-07 15:38:26 +00007921
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7923$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007924have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007926/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928int
7929main ()
7930{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007931long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007932 ;
7933 return 0;
7934}
7935_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
7938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007939$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007940
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007941 have_long_long=yes
7942
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7946$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007947if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948# The cast to long int works around a bug in the HP C Compiler
7949# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7950# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7951# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7953$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007954if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007956else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957 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 +00007958
Martin v. Löwis11437992002-04-12 09:54:03 +00007959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960 if test "$ac_cv_type_long_long" = yes; then
7961 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7962$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007963as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007964See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007965 else
7966 ac_cv_sizeof_long_long=0
7967 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7972$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973
7974
7975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007977#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007978_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007979
Michael W. Hudson54241132001-12-07 15:38:26 +00007980
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007981fi
7982
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7984$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007985have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007987/* end confdefs.h. */
7988
7989int
7990main ()
7991{
Matthias Klosec511b472010-05-08 11:01:39 +00007992long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007998
7999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008000$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008001
8002 have_long_double=yes
8003
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008004fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8007$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008008if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8014$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008015if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008016 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018 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 +00008019
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021 if test "$ac_cv_type_long_double" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008024as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008025See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008026 else
8027 ac_cv_sizeof_long_double=0
8028 fi
8029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008030
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008031fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8033$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008034
8035
8036
8037cat >>confdefs.h <<_ACEOF
8038#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8039_ACEOF
8040
8041
8042fi
8043
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8045$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008046have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008048/* end confdefs.h. */
8049
8050int
8051main ()
8052{
8053_Bool x; x = (_Bool)0;
8054 ;
8055 return 0;
8056}
8057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008059
8060
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008062
8063 have_c99_bool=yes
8064
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8068$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008069if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008070# The cast to long int works around a bug in the HP C Compiler
8071# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8072# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8073# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8075$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008076if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079 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 +00008080
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082 if test "$ac_cv_type__Bool" = yes; then
8083 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8084$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008085as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008086See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 else
8088 ac_cv_sizeof__Bool=0
8089 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008091
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8094$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008095
8096
8097
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008098cat >>confdefs.h <<_ACEOF
8099#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8100_ACEOF
8101
8102
8103fi
8104
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105ac_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 +00008106 #include <stdint.h>
8107 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008108 #ifdef HAVE_INTTYPES_H
8109 #include <inttypes.h>
8110 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008111"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008112if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008113
8114cat >>confdefs.h <<_ACEOF
8115#define HAVE_UINTPTR_T 1
8116_ACEOF
8117
Martin v. Löwiseba40652007-08-30 20:10:57 +00008118# The cast to long int works around a bug in the HP C Compiler
8119# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8120# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8121# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8123$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008124if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008127 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 +00008128
Martin v. Löwis11437992002-04-12 09:54:03 +00008129else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008130 if test "$ac_cv_type_uintptr_t" = yes; then
8131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008133as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008134See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008135 else
8136 ac_cv_sizeof_uintptr_t=0
8137 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008138fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139
Martin v. Löwis11437992002-04-12 09:54:03 +00008140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8142$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143
8144
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008147#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008149
Michael W. Hudson54241132001-12-07 15:38:26 +00008150
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008151fi
8152
Martin v. Löwisebe26702006-10-02 14:55:51 +00008153
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008154# The cast to long int works around a bug in the HP C Compiler
8155# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8156# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8157# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8159$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008160if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008161 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008163 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008164#ifdef HAVE_SYS_TYPES_H
8165#include <sys/types.h>
8166#endif
8167
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008169
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008170else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171 if test "$ac_cv_type_off_t" = yes; then
8172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008174as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008175See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008176 else
8177 ac_cv_sizeof_off_t=0
8178 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008179fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8183$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008184
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008188#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008190
Michael W. Hudson54241132001-12-07 15:38:26 +00008191
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008192
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8194$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008195if test "$have_long_long" = yes
8196then
8197if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008198 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008199
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008200$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008201
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8203$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8206$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008207fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008211fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008213# The cast to long int works around a bug in the HP C Compiler
8214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8216# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8218$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008219if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008220 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008223#ifdef HAVE_SYS_TYPES_H
8224#include <sys/types.h>
8225#endif
8226#ifdef HAVE_TIME_H
8227#include <time.h>
8228#endif
8229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008231
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008233 if test "$ac_cv_type_time_t" = yes; then
8234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008236as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008237See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008238 else
8239 ac_cv_sizeof_time_t=0
8240 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8245$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008247
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008250#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008251_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008252
Michael W. Hudson54241132001-12-07 15:38:26 +00008253
8254
Trent Mick635f6fb2000-08-23 21:33:05 +00008255# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008256ac_save_cc="$CC"
8257if test "$ac_cv_kpthread" = "yes"
8258then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008259elif test "$ac_cv_kthread" = "yes"
8260then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008261elif test "$ac_cv_pthread" = "yes"
8262then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008263fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8265$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008266have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008268/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008269
8270 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008271int
8272main ()
8273{
Guido van Rossum12580492000-09-24 16:47:19 +00008274pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008275 ;
8276 return 0;
8277}
Matthias Klosec511b472010-05-08 11:01:39 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008281 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8285$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008286if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008287 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008288# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8289# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8290# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8292$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008293if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008294 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008297#ifdef HAVE_PTHREAD_H
8298#include <pthread.h>
8299#endif
8300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008301"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008302
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304 if test "$ac_cv_type_pthread_t" = yes; then
8305 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008307as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008308See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008309 else
8310 ac_cv_sizeof_pthread_t=0
8311 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008313
Trent Mick635f6fb2000-08-23 21:33:05 +00008314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8316$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008318
8319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008321#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008322_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008323
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008324
Trent Mick635f6fb2000-08-23 21:33:05 +00008325fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008326CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008327
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8329$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008331if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008332 enableval=$enable_toolbox_glue;
8333fi
Jack Jansene578a632001-08-15 01:27:14 +00008334
8335
8336if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008337then
Jack Jansene578a632001-08-15 01:27:14 +00008338 case $ac_sys_system/$ac_sys_release in
8339 Darwin/*)
8340 enable_toolbox_glue="yes";;
8341 *)
8342 enable_toolbox_glue="no";;
8343 esac
8344fi
8345case "$enable_toolbox_glue" in
8346yes)
Jack Jansene578a632001-08-15 01:27:14 +00008347 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008348 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008350$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008351
8352 ;;
8353*)
Jack Jansene578a632001-08-15 01:27:14 +00008354 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008355 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008356 ;;
8357esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8359$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008360
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008361
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008362
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008363case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008364 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008365 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8366 ;;
8367 Darwin/*)
8368 OTHER_LIBTOOL_OPT=""
8369 ;;
8370esac
8371
8372
Ronald Oussoren25967582009-09-06 10:00:26 +00008373
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008374case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008375 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008376 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8377 if test "${enable_universalsdk}"; then
8378 :
8379 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008380 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008381 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008383 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008384 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008385 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008386 if test ${gcc_version} '<' 4.0
8387 then
8388 LIBTOOL_CRUFT="-lcc_dynamic"
8389 else
8390 LIBTOOL_CRUFT=""
8391 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008392 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008393 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008396/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008397
Ronald Oussoren25967582009-09-06 10:00:26 +00008398 #include <unistd.h>
8399 int main(int argc, char*argv[])
8400 {
8401 if (sizeof(long) == 4) {
8402 return 0;
8403 } else {
8404 return 1;
8405 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008406 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008407
Ronald Oussoren25967582009-09-06 10:00:26 +00008408_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008409if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008410 ac_osx_32bit=yes
8411else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008412 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008414rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8415 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008416fi
8417
8418
Ronald Oussoren25967582009-09-06 10:00:26 +00008419 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008420 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008421 i386)
8422 MACOSX_DEFAULT_ARCH="i386"
8423 ;;
8424 ppc)
8425 MACOSX_DEFAULT_ARCH="ppc"
8426 ;;
8427 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008428 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008429 ;;
8430 esac
8431 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008432 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008433 i386)
8434 MACOSX_DEFAULT_ARCH="x86_64"
8435 ;;
8436 ppc)
8437 MACOSX_DEFAULT_ARCH="ppc64"
8438 ;;
8439 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008440 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008441 ;;
8442 esac
8443
8444 #ARCH_RUN_32BIT="true"
8445 fi
8446
8447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008449 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008450esac
8451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8453$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008454if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008455then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008456 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008458 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008460$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8463$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008464 if test $enable_shared = "yes"
8465 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008466 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 +00008467 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8470$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008471fi
8472
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8474$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008475case $ac_sys_system/$ac_sys_release in
8476 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008477
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008478$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8481$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008482 ;;
8483 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8485$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008486 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008487esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008488
Guido van Rossum0a516c91994-09-12 10:58:40 +00008489# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008490
Michael W. Hudson54241132001-12-07 15:38:26 +00008491
8492
8493
8494
Ronald Oussoren75912852010-04-08 08:13:31 +00008495
Guido van Rossum0a516c91994-09-12 10:58:40 +00008496# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008497# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8499$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008500if test -z "$SO"
8501then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008502 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008503 hp*|HP*)
8504 case `uname -m` in
8505 ia64) SO=.so;;
8506 *) SO=.sl;;
8507 esac
8508 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008509 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008510 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008511 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008512else
8513 # this might also be a termcap variable, see #610332
8514 echo
8515 echo '====================================================================='
8516 echo '+ +'
8517 echo '+ WARNING: You have set SO in your environment. +'
8518 echo '+ Do you really mean to change the extension for shared libraries? +'
8519 echo '+ Continuing in 10 seconds to let you to ponder. +'
8520 echo '+ +'
8521 echo '====================================================================='
8522 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8525$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008526
Ronald Oussoren79f90492009-01-02 10:44:46 +00008527
Neal Norwitz58e28882006-05-19 07:00:58 +00008528cat >>confdefs.h <<_ACEOF
8529#define SHLIB_EXT "$SO"
8530_ACEOF
8531
Guido van Rossum0a516c91994-09-12 10:58:40 +00008532# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008533# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008534# (Shared libraries in this instance are shared modules to be loaded into
8535# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8537$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008538if test -z "$LDSHARED"
8539then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008540 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008541 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008542 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008543 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008544 ;;
8545 BeOS*)
8546 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008547 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008548 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008549 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008550 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008552 if test "$GCC" = "yes" ; then
8553 LDSHARED='$(CC) -shared'
8554 LDCXXSHARED='$(CXX) -shared'
8555 else
8556 LDSHARED='$(CC) -G'
8557 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008558 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008559 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008560 if test "$GCC" = "yes" ; then
8561 LDSHARED='$(CC) -shared'
8562 LDCXXSHARED='$(CXX) -shared'
8563 else
8564 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008565 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008566 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008567 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008568 LDSHARED='$(CC) -bundle'
8569 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008570 if test "$enable_framework" ; then
8571 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008572 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8573 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008574 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008575 else
8576 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008577 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008578 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008579 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008580 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008581 LDSHARED='$(CC) -bundle'
8582 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008583 if test "$enable_framework" ; then
8584 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008585 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8586 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008587 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008588 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008589 # No framework, use the Python app as bundle-loader
8590 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008591 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008592 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008593 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008594 Darwin/*)
8595 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8596 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008597
Ned Deilyc40b9032014-06-25 13:48:46 -07008598 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8599 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8600 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8601 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8602 if test ${dep_target_major} -eq 10 && \
8603 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008604 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008605 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008606 LDSHARED='$(CC) -bundle'
8607 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008608 if test "$enable_framework" ; then
8609 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008610 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8611 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008612 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008613 else
8614 # No framework, use the Python app as bundle-loader
8615 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8616 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008617 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008618 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008619 else
8620 # building for OS X 10.3 and later
8621 if test "${enable_universalsdk}"; then
8622 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8623 fi
8624 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8625 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8626 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008627 fi
8628 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008629 Linux*|GNU*|QNX*)
8630 LDSHARED='$(CC) -shared'
8631 LDCXXSHARED='$(CXX) -shared';;
8632 BSD/OS*/4*)
8633 LDSHARED="gcc -shared"
8634 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008635 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008636 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008637 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008638 LDSHARED='$(CC) -shared'
8639 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008640 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008641 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008642 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008643 OpenBSD*)
8644 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8645 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008646 LDSHARED='$(CC) -shared $(CCSHARED)'
8647 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008648 else
8649 case `uname -r` in
8650 [01].* | 2.[0-7] | 2.[0-7].*)
8651 LDSHARED="ld -Bshareable ${LDFLAGS}"
8652 ;;
8653 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008654 LDSHARED='$(CC) -shared $(CCSHARED)'
8655 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008656 ;;
8657 esac
8658 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008659 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008660 LDSHARED='$(CC) -shared'
8661 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008662 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008663 if test "$GCC" = "yes" ; then
8664 LDSHARED='$(CC) -shared'
8665 LDCXXSHARED='$(CXX) -shared'
8666 else
8667 LDSHARED='$(CC) -G'
8668 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008669 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008670 SCO_SV*)
8671 LDSHARED='$(CC) -Wl,-G,-Bexport'
8672 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8673 CYGWIN*)
8674 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8675 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8676 atheos*)
8677 LDSHARED="gcc -shared"
8678 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008679 *) LDSHARED="ld";;
8680 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8683$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008684LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008685BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008686# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008687# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8689$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008690if test -z "$CCSHARED"
8691then
Guido van Rossum07397971997-04-29 21:49:50 +00008692 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008693 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008694 then CCSHARED="-fPIC";
8695 elif test `uname -p` = sparc;
8696 then CCSHARED="-xcode=pic32";
8697 else CCSHARED="-Kpic";
8698 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008699 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008700 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008701 else CCSHARED="+z";
8702 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008703 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008704 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008705 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008706 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008707 if test "$GCC" = "yes"
8708 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008709 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008710 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008711 SCO_SV*)
8712 if test "$GCC" = "yes"
8713 then CCSHARED="-fPIC"
8714 else CCSHARED="-Kpic -belf"
8715 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008716 IRIX*/6*) case $CC in
8717 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008718 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008719 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008720 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008722fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8724$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008725# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008726# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8728$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008729if test -z "$LINKFORSHARED"
8730then
Guido van Rossum07397971997-04-29 21:49:50 +00008731 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008732 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008733 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008734 LINKFORSHARED="-Wl,-E -Wl,+s";;
8735# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008736 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008737 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008738 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008739 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008740 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8741 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008742 # not used by the core itself but which needs to be in the core so
8743 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008744 # -prebind is no longer used, because it actually seems to give a
8745 # slowdown in stead of a speedup, maybe due to the large number of
8746 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008747
8748 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008749 if test "$enable_framework"
8750 then
Jack Jansenda49e192005-01-07 13:08:22 +00008751 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008752 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008753 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008754 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008755 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008756 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008757 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008758 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8759 then
8760 LINKFORSHARED="-Wl,--export-dynamic"
8761 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008762 SunOS/5*) case $CC in
8763 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008764 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008765 then
8766 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008767 fi;;
8768 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008769 CYGWIN*)
8770 if test $enable_shared = "no"
8771 then
8772 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8773 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008774 QNX*)
8775 # -Wl,-E causes the symbols to be added to the dynamic
8776 # symbol table so that they can be found when a module
8777 # is loaded. -N 2048K causes the stack size to be set
8778 # to 2048 kilobytes so that the stack doesn't overflow
8779 # when running test_compile.py.
8780 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8784$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008785
Michael W. Hudson54241132001-12-07 15:38:26 +00008786
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008787
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8789$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008790if test ! "$LIBRARY" = "$LDLIBRARY"
8791then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008792 case $ac_sys_system in
8793 CYGWIN*)
8794 # Cygwin needs CCSHARED when building extension DLLs
8795 # but not when building the interpreter DLL.
8796 CFLAGSFORSHARED='';;
8797 *)
8798 CFLAGSFORSHARED='$(CCSHARED)'
8799 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8802$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008803
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008804# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8805# library (with --enable-shared).
8806# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008807# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8808# if it is not required, since it creates a dependency of the shared library
8809# to LIBS. This, in turn, means that applications linking the shared libpython
8810# don't need to link LIBS explicitly. The default should be only changed
8811# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008812
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8814$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008815case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008816 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008817 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008818esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8820$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008821
8822
Guido van Rossum627b2d71993-12-24 10:39:16 +00008823# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8825$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008826if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008827 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008828else
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008830LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834/* Override any GCC internal prototype to avoid an error.
8835 Use char because int might match the return type of a GCC
8836 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837#ifdef __cplusplus
8838extern "C"
8839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008840char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008841int
8842main ()
8843{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008844return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845 ;
8846 return 0;
8847}
8848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008853fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854rm -f core conftest.err conftest.$ac_objext \
8855 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008856LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8859$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008860if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 cat >>confdefs.h <<_ACEOF
8862#define HAVE_LIBDL 1
8863_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008864
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008865 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008866
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008867fi
8868 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8870$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008871if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008873else
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008875LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879/* Override any GCC internal prototype to avoid an error.
8880 Use char because int might match the return type of a GCC
8881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882#ifdef __cplusplus
8883extern "C"
8884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008885char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008886int
8887main ()
8888{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 ;
8891 return 0;
8892}
8893_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008899rm -f core conftest.err conftest.$ac_objext \
8900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008901LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8904$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008905if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 cat >>confdefs.h <<_ACEOF
8907#define HAVE_LIBDLD 1
8908_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008909
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008910 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008911
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008912fi
8913 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008914
Ronald Oussoren79f90492009-01-02 10:44:46 +00008915# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008916if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8918$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008919if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008920 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008921else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008922 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008925
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926/* Override any GCC internal prototype to avoid an error.
8927 Use char because int might match the return type of a GCC
8928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929#ifdef __cplusplus
8930extern "C"
8931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008932char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ;
8938 return 0;
8939}
8940_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941for ac_lib in '' pthread rt posix4; do
8942 if test -z "$ac_lib"; then
8943 ac_res="none required"
8944 else
8945 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008946 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008948 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008950fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008951rm -f core conftest.err conftest.$ac_objext \
8952 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008953 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008956done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008957if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008958
Martin v. Löwiseba40652007-08-30 20:10:57 +00008959else
8960 ac_cv_search_sem_init=no
8961fi
8962rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008963LIBS=$ac_func_search_save_LIBS
8964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8966$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008970
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008971fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008972 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008973 # posix4 on Solaris 2.6
8974 # pthread (first!) on Linux
8975fi
8976
Martin v. Löwis19d17342003-06-14 21:03:05 +00008977# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8979$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008980if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008982else
8983 ac_check_lib_save_LIBS=$LIBS
8984LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008987
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988/* Override any GCC internal prototype to avoid an error.
8989 Use char because int might match the return type of a GCC
8990 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008991#ifdef __cplusplus
8992extern "C"
8993#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008994char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008995int
8996main ()
8997{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008999 ;
9000 return 0;
9001}
9002_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009003if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009004 ac_cv_lib_intl_textdomain=yes
9005else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008rm -f core conftest.err conftest.$ac_objext \
9009 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009010LIBS=$ac_check_lib_save_LIBS
9011fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9013$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009014if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009015
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009017
9018fi
9019
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009020
9021# checks for system dependent C++ extensions support
9022case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009023 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9024$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009027
Georg Brandl94800df2011-02-25 11:09:02 +00009028 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009029int
9030main ()
9031{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009032loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ;
9034 return 0;
9035}
Matthias Klosec511b472010-05-08 11:01:39 +00009036
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009038if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009039
Matthias Klosec511b472010-05-08 11:01:39 +00009040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009041$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009042
Matthias Klosec511b472010-05-08 11:01:39 +00009043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009045
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009046else
Matthias Klosec511b472010-05-08 11:01:39 +00009047
9048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009049$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009050
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009051fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009052rm -f core conftest.err conftest.$ac_objext \
9053 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009054 *) ;;
9055esac
9056
Guido van Rossum70c7f481998-03-26 18:44:10 +00009057# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009058# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9060$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009061if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009063else
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009065LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009068
Martin v. Löwiseba40652007-08-30 20:10:57 +00009069/* Override any GCC internal prototype to avoid an error.
9070 Use char because int might match the return type of a GCC
9071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009072#ifdef __cplusplus
9073extern "C"
9074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009075char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009076int
9077main ()
9078{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009079return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 ;
9081 return 0;
9082}
9083_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009088fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009089rm -f core conftest.err conftest.$ac_objext \
9090 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009091LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009092fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9094$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009095if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009096 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009097fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009098 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9100$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009101if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009103else
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009105LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009108
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109/* Override any GCC internal prototype to avoid an error.
9110 Use char because int might match the return type of a GCC
9111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009112#ifdef __cplusplus
9113extern "C"
9114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009115char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009116int
9117main ()
9118{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009120 ;
9121 return 0;
9122}
9123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009125 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129rm -f core conftest.err conftest.$ac_objext \
9130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009131LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009132fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9134$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009135if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009136 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009137fi
9138 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009139
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009140case "$ac_sys_system" in
9141BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9143$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009144if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009145 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009148LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009151
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152/* Override any GCC internal prototype to avoid an error.
9153 Use char because int might match the return type of a GCC
9154 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009155#ifdef __cplusplus
9156extern "C"
9157#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009158char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009159int
9160main ()
9161{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009162return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 ;
9164 return 0;
9165}
9166_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009167if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009170 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009171fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009174LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009175fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9177$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009178if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009179 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009180fi
9181 # BeOS
9182;;
9183esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9186$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009187
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009189if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9192$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009193LIBS="$withval $LIBS"
9194
9195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9197$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198fi
9199
Guido van Rossum7f43da71994-08-01 12:15:30 +00009200
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009201
9202
9203
9204
9205
9206
9207
9208if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9209 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009210 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9211set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9213$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009214if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009215 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009216else
9217 case $PKG_CONFIG in
9218 [\\/]* | ?:[\\/]*)
9219 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9220 ;;
9221 *)
9222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9223for as_dir in $PATH
9224do
9225 IFS=$as_save_IFS
9226 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009227 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009229 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009231 break 2
9232 fi
9233done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009234 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009235IFS=$as_save_IFS
9236
9237 ;;
9238esac
9239fi
9240PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9241if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9243$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9246$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009247fi
9248
9249
9250fi
9251if test -z "$ac_cv_path_PKG_CONFIG"; then
9252 ac_pt_PKG_CONFIG=$PKG_CONFIG
9253 # Extract the first word of "pkg-config", so it can be a program name with args.
9254set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9256$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009257if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009259else
9260 case $ac_pt_PKG_CONFIG in
9261 [\\/]* | ?:[\\/]*)
9262 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9263 ;;
9264 *)
9265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9266for as_dir in $PATH
9267do
9268 IFS=$as_save_IFS
9269 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009270 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009271 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009272 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009273 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009274 break 2
9275 fi
9276done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009277 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009278IFS=$as_save_IFS
9279
9280 ;;
9281esac
9282fi
9283ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9284if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9286$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9289$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009290fi
9291
9292 if test "x$ac_pt_PKG_CONFIG" = x; then
9293 PKG_CONFIG=""
9294 else
9295 case $cross_compiling:$ac_tool_warned in
9296yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9298$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009299ac_tool_warned=yes ;;
9300esac
9301 PKG_CONFIG=$ac_pt_PKG_CONFIG
9302 fi
9303else
9304 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9305fi
9306
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009307fi
9308if test -n "$PKG_CONFIG"; then
9309 _pkg_min_version=0.9.0
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9311$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9312 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9314$as_echo "yes" >&6; }
9315 else
9316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9317$as_echo "no" >&6; }
9318 PKG_CONFIG=""
9319 fi
9320fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009321
9322# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9324$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009325
9326# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009327if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009328 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009329else
9330 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009331fi
9332
9333
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9335$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009336
9337# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9339$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009340
9341# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009342if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009343 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009344else
9345 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009346fi
9347
9348
9349if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009350 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9351else
9352 LIBFFI_INCLUDEDIR=""
9353fi
9354
9355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9357$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009358
Ned Deilya2a9f572013-10-25 00:30:10 -07009359# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9360
9361
9362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9363$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9364
9365# Check whether --with-tcltk-includes was given.
9366if test "${with_tcltk_includes+set}" = set; then :
9367 withval=$with_tcltk_includes;
9368else
9369 with_tcltk_includes="default"
9370fi
9371
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9373$as_echo "$with_tcltk_includes" >&6; }
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9375$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9376
9377# Check whether --with-tcltk-libs was given.
9378if test "${with_tcltk_libs+set}" = set; then :
9379 withval=$with_tcltk_libs;
9380else
9381 with_tcltk_libs="default"
9382fi
9383
9384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9385$as_echo "$with_tcltk_libs" >&6; }
9386if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9387then
9388 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9389 then
9390 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9391 fi
9392 TCLTK_INCLUDES=""
9393 TCLTK_LIBS=""
9394else
9395 TCLTK_INCLUDES="$with_tcltk_includes"
9396 TCLTK_LIBS="$with_tcltk_libs"
9397fi
9398
Benjamin Peterson867475c2009-04-29 20:36:25 +00009399# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9401$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009402
9403# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009405 withval=$with_dbmliborder;
9406if test x$with_dbmliborder = xyes
9407then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009408as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009409else
9410 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9411 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9412 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009413 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009414 fi
9415 done
9416fi
9417fi
9418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9420$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009421
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009422# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009423
9424
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9426$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009427
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 withval=$with_signal_module;
9431fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009432
9433
9434if test -z "$with_signal_module"
9435then with_signal_module="yes"
9436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9438$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009439
9440if test "${with_signal_module}" = "yes"; then
9441 USE_SIGNAL_MODULE=""
9442 SIGNAL_OBJS=""
9443else
9444 USE_SIGNAL_MODULE="#"
9445 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9446fi
9447
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009448# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009449
Barry Warsawc0d24d82000-06-29 16:12:00 +00009450USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9453$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009454
Guido van Rossumec2f0731997-01-22 20:54:01 +00009455
Martin v. Löwiseba40652007-08-30 20:10:57 +00009456# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9460$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009461LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009462if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009463 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009464fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9467$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468fi
9469
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
9471# Templates for things AC_DEFINEd more than once.
9472# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009473
9474
Martin v. Löwis11437992002-04-12 09:54:03 +00009475
9476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9478$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009479
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009481if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 withval=$with_threads;
9483fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009484
9485
Barry Warsawc0d24d82000-06-29 16:12:00 +00009486# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009487
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009489if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490 withval=$with_thread; with_threads=$with_thread
9491fi
9492
Barry Warsawc0d24d82000-06-29 16:12:00 +00009493
9494if test -z "$with_threads"
9495then with_threads="yes"
9496fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9498$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009499
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009500
Barry Warsawc0d24d82000-06-29 16:12:00 +00009501if test "$with_threads" = "no"
9502then
9503 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009504elif test "$ac_cv_pthread_is_default" = yes
9505then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009507
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009508 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009509 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009510
9511 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009513elif test "$ac_cv_kpthread" = "yes"
9514then
9515 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009516 if test "$ac_cv_cxx_thread" = "yes"; then
9517 CXX="$CXX -Kpthread"
9518 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009521 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009522 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009523elif test "$ac_cv_kthread" = "yes"
9524then
9525 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009526 if test "$ac_cv_cxx_thread" = "yes"; then
9527 CXX="$CXX -Kthread"
9528 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009530
9531 posix_threads=yes
9532 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009533elif test "$ac_cv_pthread" = "yes"
9534then
9535 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009536 if test "$ac_cv_cxx_thread" = "yes"; then
9537 CXX="$CXX -pthread"
9538 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009540
9541 posix_threads=yes
9542 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009543else
9544 if test ! -z "$with_threads" -a -d "$with_threads"
9545 then LDFLAGS="$LDFLAGS -L$with_threads"
9546 fi
9547 if test ! -z "$withval" -a -d "$withval"
9548 then LDFLAGS="$LDFLAGS -L$withval"
9549 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009550
9551 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009552 # define _POSIX_THREADS in unistd.h. Some apparently don't
9553 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9555$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009557/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009559#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009560#ifdef _POSIX_THREADS
9561yes
9562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009563
9564_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009567 unistd_defines_pthreads=yes
9568else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009569 unistd_defines_pthreads=no
9570fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009571rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009572
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9574$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009575
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009576 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009577
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009579if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009580 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009582 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009583
Martin v. Löwis11437992002-04-12 09:54:03 +00009584
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009585$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009586
9587 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009588 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009589else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591 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 +01009592if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009596
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009599
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009600 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009601else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009602
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9604$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009605
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009607if test "${with_pth+set}" = set; then :
9608 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9609$as_echo "$withval" >&6; }
9610 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009611
9612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009614
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009615 LIBS="-lpth $LIBS"
9616 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009617else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009620
9621 # Just looking for pthread_create in libpthread is not enough:
9622 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9623 # So we really have to include pthread.h, and then link.
9624 _libs=$LIBS
9625 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9627$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009630
9631#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009632#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009633
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009634void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009635int
9636main ()
9637{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009638
9639pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ;
9641 return 0;
9642}
9643_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009645
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9647$as_echo "yes" >&6; }
9648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009649
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009650 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009651 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009652else
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009654 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009656if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009658
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009659 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009660 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009661else
Guido van Rossumad678af1998-10-02 14:42:15 +00009662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009663 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 +01009664if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009666
9667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009669
9670 THREADOBJ="Python/thread.o"
9671else
9672
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009673 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 +01009674if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009675 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009676
9677
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009679
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009680 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009681else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009682
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9684$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009685if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009710else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009711 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009712fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9718$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009719if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009720 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009721
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009722 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009723 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009724 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009725else
Greg Steinadf63d62000-07-05 10:38:09 +00009726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9728$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009729if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009733LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737/* Override any GCC internal prototype to avoid an error.
9738 Use char because int might match the return type of a GCC
9739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740#ifdef __cplusplus
9741extern "C"
9742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009743char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ;
9749 return 0;
9750}
9751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009755 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757rm -f core conftest.err conftest.$ac_objext \
9758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9762$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009763if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009765
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009766 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009767 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009768 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009769else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009770
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9772$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009773if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009775else
Martin v. Löwis11437992002-04-12 09:54:03 +00009776 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009777LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009780
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781/* Override any GCC internal prototype to avoid an error.
9782 Use char because int might match the return type of a GCC
9783 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009784#ifdef __cplusplus
9785extern "C"
9786#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009787char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009792 ;
9793 return 0;
9794}
9795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009796if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009797 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801rm -f core conftest.err conftest.$ac_objext \
9802 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009803LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9806$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009807if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009809
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009810 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009811 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009812 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009813else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009814
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9816$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009817if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009819else
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009821LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824
Martin v. Löwiseba40652007-08-30 20:10:57 +00009825/* Override any GCC internal prototype to avoid an error.
9826 Use char because int might match the return type of a GCC
9827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828#ifdef __cplusplus
9829extern "C"
9830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009831char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009832int
9833main ()
9834{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ;
9837 return 0;
9838}
9839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009842else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009844fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009845rm -f core conftest.err conftest.$ac_objext \
9846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009847LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9850$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009851if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009853
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009854 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009855 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009856 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009857else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009858
Martin v. Löwis130fb172001-07-19 11:00:41 +00009859 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009860fi
9861
Guido van Rossum627b2d71993-12-24 10:39:16 +00009862
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009863fi
9864
Guido van Rossum0be3e491997-05-22 20:33:33 +00009865fi
9866
Guido van Rossum49545951997-12-02 19:28:29 +00009867fi
9868
Guido van Rossumb93a8621998-05-07 13:27:32 +00009869fi
9870
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009871
Michael W. Hudson54241132001-12-07 15:38:26 +00009872fi
9873
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009874
9875fi
9876
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009877fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009878rm -f core conftest.err conftest.$ac_objext \
9879 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880fi
9881
Martin v. Löwis11437992002-04-12 09:54:03 +00009882fi
9883
9884
9885fi
9886
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009887
Michael W. Hudson54241132001-12-07 15:38:26 +00009888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9890$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009891if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009892 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009893else
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009895LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009898
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899/* Override any GCC internal prototype to avoid an error.
9900 Use char because int might match the return type of a GCC
9901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009902#ifdef __cplusplus
9903extern "C"
9904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009905char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009906int
9907main ()
9908{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009910 ;
9911 return 0;
9912}
9913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009917 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009919rm -f core conftest.err conftest.$ac_objext \
9920 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009921LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009922fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9924$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009925if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009927
Martin v. Löwis130fb172001-07-19 11:00:41 +00009928 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009929 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009930 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009931fi
9932
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009933
Neal Norwitza978ab02002-11-02 16:58:05 +00009934 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9936$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009937if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009938 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009939else
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009941LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009944
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945/* Override any GCC internal prototype to avoid an error.
9946 Use char because int might match the return type of a GCC
9947 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009948#ifdef __cplusplus
9949extern "C"
9950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009951char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009952int
9953main ()
9954{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009955return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009956 ;
9957 return 0;
9958}
9959_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009960if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009961 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009965rm -f core conftest.err conftest.$ac_objext \
9966 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009967LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009968fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9970$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009971if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009972 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009973
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009974 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009975 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009976 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009977fi
9978
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009979 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009980
Martin v. Löwis130fb172001-07-19 11:00:41 +00009981 if test "$USE_THREAD_MODULE" != "#"
9982 then
9983 # If the above checks didn't disable threads, (at least) OSF1
9984 # needs this '-threads' argument during linking.
9985 case $ac_sys_system in
9986 OSF1) LDLAST=-threads;;
9987 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009988 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009989fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009990
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009991if test "$posix_threads" = "yes"; then
9992 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009995
9996 fi
9997
9998 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9999 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010000 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010001$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010002
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010003 ;;
10004 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010005$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010006
10007 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010008 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010010
10011 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010012 esac
10013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10015$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010016 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010019 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010020 ac_cv_pthread_system_supported=no
10021else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010023/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010024
10025 #include <stdio.h>
10026 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010027 void *foo(void *parm) {
10028 return NULL;
10029 }
10030 main() {
10031 pthread_attr_t attr;
10032 pthread_t id;
10033 if (pthread_attr_init(&attr)) exit(-1);
10034 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10035 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10036 exit(0);
10037 }
10038_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040 ac_cv_pthread_system_supported=yes
10041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010042 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010043fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10045 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010046fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010047
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048
Guido van Rossum627b2d71993-12-24 10:39:16 +000010049fi
10050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10052$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010053 if test "$ac_cv_pthread_system_supported" = "yes"; then
10054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010056
10057 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010058 for ac_func in pthread_sigmask
10059do :
10060 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010061if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010062 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010063#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010064_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010065 case $ac_sys_system in
10066 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010069
10070 ;;
10071 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010072fi
10073done
10074
Christian Heimes0d604cf2013-08-21 13:26:05 +020010075 for ac_func in pthread_atfork
10076do :
10077 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10078if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10079 cat >>confdefs.h <<_ACEOF
10080#define HAVE_PTHREAD_ATFORK 1
10081_ACEOF
10082
10083fi
10084done
10085
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010086fi
10087
10088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10092$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010093# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010095 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010099 ipv6=no
10100 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010101 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10102$as_echo "yes" >&6; }
10103 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104
10105 ipv6=yes
10106 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010107 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112 /* AF_INET6 available check */
10113#include <sys/types.h>
10114#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010115int
10116main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010118int domain = AF_INET6;
10119 ;
10120 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010121}
Martin v. Löwis11437992002-04-12 09:54:03 +000010122_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010123if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10126$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010127 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010128
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010129else
Matthias Klosec511b472010-05-08 11:01:39 +000010130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10132$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010133 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010134
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010135fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010138if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10140$as_echo_n "checking if RFC2553 API is available... " >&6; }
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010143
10144 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010145#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010146int
10147main ()
10148{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010149struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010150 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 ;
10152 return 0;
10153}
Matthias Klosec511b472010-05-08 11:01:39 +000010154
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010157
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010159$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010160 ipv6=yes
10161
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010162else
Matthias Klosec511b472010-05-08 11:01:39 +000010163
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010165$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010166 ipv6=no
10167
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010170fi
10171
10172if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010174
10175fi
10176
Martin v. Löwiseba40652007-08-30 20:10:57 +000010177fi
10178
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010179
10180ipv6type=unknown
10181ipv6lib=none
10182ipv6trylibc=no
10183
10184if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10186$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010187 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10188 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010189 case $i in
10190 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010193
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010194#include <netinet/in.h>
10195#ifdef IPV6_INRIA_VERSION
10196yes
10197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010198_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010199if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010200 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010201 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010202fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010203rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010204
10205 ;;
10206 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010208/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010210#include <netinet/in.h>
10211#ifdef __KAME__
10212yes
10213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010214_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010216 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217 ipv6type=$i;
10218 ipv6lib=inet6
10219 ipv6libdir=/usr/local/v6/lib
10220 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010221fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010222rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010223
10224 ;;
10225 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010229#include <features.h>
10230#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10231yes
10232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010236 ipv6type=$i;
10237 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010238fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010239rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010240
10241 ;;
10242 linux-inet6)
10243 if test -d /usr/inet6; then
10244 ipv6type=$i
10245 ipv6lib=inet6
10246 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010247 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010248 fi
10249 ;;
10250 solaris)
10251 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010252 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010253 ipv6type=$i
10254 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010255 fi
10256 fi
10257 ;;
10258 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010260/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010261
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010262#include <sys/param.h>
10263#ifdef _TOSHIBA_INET6
10264yes
10265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010266_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010269 ipv6type=$i;
10270 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010271 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010272fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010273rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010274
10275 ;;
10276 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010279
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010280#include </usr/local/v6/include/sys/v6config.h>
10281#ifdef __V6D__
10282yes
10283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010284_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287 ipv6type=$i;
10288 ipv6lib=v6;
10289 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010290 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010291fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010292rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293
10294 ;;
10295 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010297/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010298
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010299#include <sys/param.h>
10300#ifdef _ZETA_MINAMI_INET6
10301yes
10302#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010303_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010305 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306 ipv6type=$i;
10307 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010308 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010309fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010310rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010311
10312 ;;
10313 esac
10314 if test "$ipv6type" != "unknown"; then
10315 break
10316 fi
10317 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10319$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010320fi
10321
10322if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10323 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10324 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10325 echo "using lib$ipv6lib"
10326 else
10327 if test $ipv6trylibc = "yes"; then
10328 echo "using libc"
10329 else
10330 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10331 echo "You need to fetch lib$ipv6lib.a from appropriate"
10332 echo 'ipv6 kit and compile beforehand.'
10333 exit 1
10334 fi
10335 fi
10336fi
10337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10339$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010341/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010342
10343 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010344int
10345main ()
10346{
10347FSIORefNum fRef = 0
10348 ;
10349 return 0;
10350}
Mark Dickinson0712b562010-05-08 19:13:21 +000010351
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010352_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010353if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010354
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010356$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10359$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010360
Mark Dickinson0712b562010-05-08 19:13:21 +000010361else
10362
10363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10364$as_echo "no" >&6; }
10365
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010366fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10368
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010369# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10371$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010372
Martin v. Löwiseba40652007-08-30 20:10:57 +000010373# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010374if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010375 withval=$with_doc_strings;
10376fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010377
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010378
10379if test -z "$with_doc_strings"
10380then with_doc_strings="yes"
10381fi
10382if test "$with_doc_strings" != "no"
10383then
10384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010385$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010386
10387fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10389$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010390
Neil Schemenauera35c6882001-02-27 04:45:05 +000010391# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10393$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010394
Martin v. Löwiseba40652007-08-30 20:10:57 +000010395# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010396if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010397 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010398if test "$withval" != no
10399then
10400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10404$as_echo "yes" >&6; }
10405else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10406$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010407fi
10408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10410$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411fi
10412
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010413
10414# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10416$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010417
Martin v. Löwiseba40652007-08-30 20:10:57 +000010418# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010420 withval=$with_pymalloc;
10421fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010422
Neil Schemenauera35c6882001-02-27 04:45:05 +000010423
Neil Schemenauer16c22972002-03-22 15:34:49 +000010424if test -z "$with_pymalloc"
10425then with_pymalloc="yes"
10426fi
10427if test "$with_pymalloc" != "no"
10428then
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010430$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010431
10432fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10434$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010435
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010436# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10438$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010439
10440# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010442 withval=$with_valgrind;
10443else
10444 with_valgrind=no
10445fi
10446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10448$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010449if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450 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 +010010451if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010453$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010454
10455else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010456 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010457
10458fi
10459
10460
10461fi
10462
Barry Warsawef82cd72000-06-30 16:21:01 +000010463# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10465$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010466
Martin v. Löwiseba40652007-08-30 20:10:57 +000010467# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010470if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010471then
10472
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010473$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10476$as_echo "yes" >&6; }
10477else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10478$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010479fi
10480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10482$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010483fi
10484
Barry Warsawef82cd72000-06-30 16:21:01 +000010485
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010486# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010487
Guido van Rossum98935bf2001-09-05 19:13:16 +000010488DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010489
Guido van Rossume97ee181999-12-20 21:27:22 +000010490# the dlopen() function means we might want to use dynload_shlib.o. some
10491# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010492for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493do :
10494 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010495if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010496 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010498_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010499
Guido van Rossume97ee181999-12-20 21:27:22 +000010500fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010501done
Guido van Rossume97ee181999-12-20 21:27:22 +000010502
Michael W. Hudson54241132001-12-07 15:38:26 +000010503
Guido van Rossume97ee181999-12-20 21:27:22 +000010504# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10505# loading of modules.
10506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10508$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010509if test -z "$DYNLOADFILE"
10510then
10511 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010512 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10513 if test "$ac_cv_func_dlopen" = yes
10514 then DYNLOADFILE="dynload_shlib.o"
10515 else DYNLOADFILE="dynload_aix.o"
10516 fi
10517 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010518 BeOS*) DYNLOADFILE="dynload_beos.o";;
10519 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010520 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10521 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010522 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010523 *)
10524 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10525 # out any dynamic loading
10526 if test "$ac_cv_func_dlopen" = yes
10527 then DYNLOADFILE="dynload_shlib.o"
10528 else DYNLOADFILE="dynload_stub.o"
10529 fi
10530 ;;
10531 esac
10532fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10534$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010535if test "$DYNLOADFILE" != "dynload_stub.o"
10536then
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010539
10540fi
10541
Neil Schemenauer4e425612001-06-19 15:44:15 +000010542# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10543
Michael W. Hudson54241132001-12-07 15:38:26 +000010544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10546$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010547if test -z "$MACHDEP_OBJS"
10548then
Jack Jansene578a632001-08-15 01:27:14 +000010549 MACHDEP_OBJS=$extra_machdep_objs
10550else
10551 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10554$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010555
Guido van Rossum627b2d71993-12-24 10:39:16 +000010556# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010557for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10558 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010559 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10560 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010561 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010562 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010563 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010564 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010565 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10566 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010567 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010568 setlocale setregid setreuid setresuid setresgid \
10569 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010570 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010571 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010572 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010573do :
10574 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10575ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010576if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010577 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010578#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010579_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010580
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010581fi
10582done
10583
Michael W. Hudson54241132001-12-07 15:38:26 +000010584
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010585# For some functions, having a definition is not sufficient, since
10586# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10588$as_echo_n "checking for chroot... " >&6; }
10589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010590/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010591#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010592int
10593main ()
10594{
10595void *x=chroot
10596 ;
10597 return 0;
10598}
10599_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010603
Matthias Klosec511b472010-05-08 11:01:39 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010605$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10608$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010609
10610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10613$as_echo_n "checking for link... " >&6; }
10614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010616#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010617int
10618main ()
10619{
10620void *x=link
10621 ;
10622 return 0;
10623}
10624_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010627$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010628
Matthias Klosec511b472010-05-08 11:01:39 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010634
10635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10638$as_echo_n "checking for symlink... " >&6; }
10639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010641#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010642int
10643main ()
10644{
10645void *x=symlink
10646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010653
Matthias Klosec511b472010-05-08 11:01:39 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010659
10660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10663$as_echo_n "checking for fchdir... " >&6; }
10664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010666#include <unistd.h>
10667int
10668main ()
10669{
10670void *x=fchdir
10671 ;
10672 return 0;
10673}
10674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010677$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010678
Matthias Klosec511b472010-05-08 11:01:39 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10683$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010684
10685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10688$as_echo_n "checking for fsync... " >&6; }
10689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010691#include <unistd.h>
10692int
10693main ()
10694{
10695void *x=fsync
10696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010701
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010703
Matthias Klosec511b472010-05-08 11:01:39 +000010704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010705$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010709
10710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10713$as_echo_n "checking for fdatasync... " >&6; }
10714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010716#include <unistd.h>
10717int
10718main ()
10719{
10720void *x=fdatasync
10721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010726
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010727$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010728
Matthias Klosec511b472010-05-08 11:01:39 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10733$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010734
10735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10738$as_echo_n "checking for epoll... " >&6; }
10739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010740/* end confdefs.h. */
10741#include <sys/epoll.h>
10742int
10743main ()
10744{
10745void *x=epoll_create
10746 ;
10747 return 0;
10748}
10749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010753
Matthias Klosec511b472010-05-08 11:01:39 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010755$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010759
10760fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10763$as_echo_n "checking for kqueue... " >&6; }
10764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010765/* end confdefs.h. */
10766
10767#include <sys/types.h>
10768#include <sys/event.h>
10769
10770int
10771main ()
10772{
10773int x=kqueue()
10774 ;
10775 return 0;
10776}
10777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010778if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010780$as_echo "#define HAVE_KQUEUE 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
Martin v. Löwisd5843682002-11-21 20:41:28 +000010790# On some systems (eg. FreeBSD 5), we would find a definition of the
10791# functions ctermid_r, setgroups in the library, but no prototype
10792# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10793# address to avoid compiler warnings and potential miscompilations
10794# because of the missing prototypes.
10795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10797$as_echo_n "checking for ctermid_r... " >&6; }
10798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010799/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010800
Martin v. Löwisd5843682002-11-21 20:41:28 +000010801#include <stdio.h>
10802
Martin v. Löwisd5843682002-11-21 20:41:28 +000010803int
10804main ()
10805{
10806void* p = ctermid_r
10807 ;
10808 return 0;
10809}
10810_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010813$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010814
Matthias Klosec511b472010-05-08 11:01:39 +000010815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010816$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010817else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10819$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010820
10821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10823
Antoine Pitroub170f172010-09-10 18:47:36 +000010824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10825$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010826if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010827 $as_echo_n "(cached) " >&6
10828else
10829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010831#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010832int
10833main ()
10834{
10835void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010836
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010837 ;
10838 return 0;
10839}
10840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010842 ac_cv_flock_decl=yes
10843else
10844 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010845
10846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010848
Antoine Pitroub170f172010-09-10 18:47:36 +000010849fi
10850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10851$as_echo "$ac_cv_flock_decl" >&6; }
10852if test "x${ac_cv_flock_decl}" = xyes; then
10853 for ac_func in flock
10854do :
10855 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010856if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010857 cat >>confdefs.h <<_ACEOF
10858#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010859_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010860
Antoine Pitrou85729812010-09-07 14:55:24 +000010861else
Antoine Pitroub170f172010-09-10 18:47:36 +000010862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010863$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010864if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010865 $as_echo_n "(cached) " >&6
10866else
10867 ac_check_lib_save_LIBS=$LIBS
10868LIBS="-lbsd $LIBS"
10869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870/* end confdefs.h. */
10871
10872/* Override any GCC internal prototype to avoid an error.
10873 Use char because int might match the return type of a GCC
10874 builtin and then its argument prototype would still apply. */
10875#ifdef __cplusplus
10876extern "C"
10877#endif
10878char flock ();
10879int
10880main ()
10881{
10882return flock ();
10883 ;
10884 return 0;
10885}
10886_ACEOF
10887if ac_fn_c_try_link "$LINENO"; then :
10888 ac_cv_lib_bsd_flock=yes
10889else
10890 ac_cv_lib_bsd_flock=no
10891fi
10892rm -f core conftest.err conftest.$ac_objext \
10893 conftest$ac_exeext conftest.$ac_ext
10894LIBS=$ac_check_lib_save_LIBS
10895fi
10896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10897$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010898if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010899 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010900
10901
10902$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10903
10904
10905fi
10906
10907
10908fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010909done
10910
Antoine Pitrou85729812010-09-07 14:55:24 +000010911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10914$as_echo_n "checking for getpagesize... " >&6; }
10915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010916/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010917
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010918#include <unistd.h>
10919
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010920int
10921main ()
10922{
10923void* p = getpagesize
10924 ;
10925 return 0;
10926}
10927_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010930$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010931
Matthias Klosec511b472010-05-08 11:01:39 +000010932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010933$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10936$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010937
10938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010940
Charles-François Natali93a11752011-11-27 13:01:35 +010010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10942$as_echo_n "checking for broken unsetenv... " >&6; }
10943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10944/* end confdefs.h. */
10945
10946#include <stdlib.h>
10947
10948int
10949main ()
10950{
10951int res = unsetenv("DUMMY")
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956if ac_fn_c_try_compile "$LINENO"; then :
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
10959else
10960
10961$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10962
10963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10964$as_echo "yes" >&6; }
10965
10966fi
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010969for ac_prog in true
10970do
10971 # Extract the first word of "$ac_prog", so it can be a program name with args.
10972set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10974$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010975if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010977else
10978 if test -n "$TRUE"; then
10979 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10980else
10981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982for as_dir in $PATH
10983do
10984 IFS=$as_save_IFS
10985 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010988 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989 $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 +000010990 break 2
10991 fi
10992done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010994IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010995
10996fi
10997fi
10998TRUE=$ac_cv_prog_TRUE
10999if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11001$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011002else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11004$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011005fi
11006
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011008 test -n "$TRUE" && break
11009done
11010test -n "$TRUE" || TRUE="/bin/true"
11011
11012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11014$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011015if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011017else
11018 ac_check_lib_save_LIBS=$LIBS
11019LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011022
Martin v. Löwiseba40652007-08-30 20:10:57 +000011023/* Override any GCC internal prototype to avoid an error.
11024 Use char because int might match the return type of a GCC
11025 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011026#ifdef __cplusplus
11027extern "C"
11028#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011029char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011030int
11031main ()
11032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011034 ;
11035 return 0;
11036}
11037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011038if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011039 ac_cv_lib_c_inet_aton=yes
11040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011043rm -f core conftest.err conftest.$ac_objext \
11044 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011045LIBS=$ac_check_lib_save_LIBS
11046fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11048$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011049if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011050 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11053$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011054if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011056else
11057 ac_check_lib_save_LIBS=$LIBS
11058LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011060/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011061
Martin v. Löwiseba40652007-08-30 20:10:57 +000011062/* Override any GCC internal prototype to avoid an error.
11063 Use char because int might match the return type of a GCC
11064 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011065#ifdef __cplusplus
11066extern "C"
11067#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011068char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069int
11070main ()
11071{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011072return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011073 ;
11074 return 0;
11075}
11076_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011078 ac_cv_lib_resolv_inet_aton=yes
11079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011080 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082rm -f core conftest.err conftest.$ac_objext \
11083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084LIBS=$ac_check_lib_save_LIBS
11085fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11087$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011088if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011089 cat >>confdefs.h <<_ACEOF
11090#define HAVE_LIBRESOLV 1
11091_ACEOF
11092
11093 LIBS="-lresolv $LIBS"
11094
11095fi
11096
11097
11098fi
11099
11100
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011101# On Tru64, chflags seems to be present, but calling it will
11102# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11104$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011105if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011108 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011109 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011112/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011113
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011114#include <sys/stat.h>
11115#include <unistd.h>
11116int main(int argc, char*argv[])
11117{
11118 if(chflags(argv[0], 0) != 0)
11119 return 1;
11120 return 0;
11121}
Ned Deily43e10542011-06-27 23:41:53 -070011122
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011125 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11130 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011131fi
11132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011133
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11136$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011137if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011139if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011140 ac_cv_have_chflags="yes"
11141else
11142 ac_cv_have_chflags="no"
11143fi
11144
11145fi
11146if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011149
11150fi
11151
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11153$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011154if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011155 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011156else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011158 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011161/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011162
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011163#include <sys/stat.h>
11164#include <unistd.h>
11165int main(int argc, char*argv[])
11166{
11167 if(lchflags(argv[0], 0) != 0)
11168 return 1;
11169 return 0;
11170}
Ned Deily43e10542011-06-27 23:41:53 -070011171
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011172_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011174 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011176 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11179 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011180fi
11181
11182
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11185$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011186if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011187 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011188if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011189 ac_cv_have_lchflags="yes"
11190else
11191 ac_cv_have_lchflags="no"
11192fi
11193
11194fi
11195if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011198
11199fi
11200
Ronald Oussorenf8752642006-07-06 10:13:35 +000011201case $ac_sys_system/$ac_sys_release in
11202Darwin/*)
11203 _CUR_CFLAGS="${CFLAGS}"
11204 _CUR_LDFLAGS="${LDFLAGS}"
11205 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11206 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11207 ;;
11208esac
11209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11211$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011212if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011213 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011214else
11215 ac_check_lib_save_LIBS=$LIBS
11216LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011218/* end confdefs.h. */
11219
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220/* Override any GCC internal prototype to avoid an error.
11221 Use char because int might match the return type of a GCC
11222 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011223#ifdef __cplusplus
11224extern "C"
11225#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011226char inflateCopy ();
11227int
11228main ()
11229{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011230return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011231 ;
11232 return 0;
11233}
11234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011235if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011236 ac_cv_lib_z_inflateCopy=yes
11237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011238 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240rm -f core conftest.err conftest.$ac_objext \
11241 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011242LIBS=$ac_check_lib_save_LIBS
11243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11245$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011246if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011247
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011249
11250fi
11251
11252
Ronald Oussorenf8752642006-07-06 10:13:35 +000011253case $ac_sys_system/$ac_sys_release in
11254Darwin/*)
11255 CFLAGS="${_CUR_CFLAGS}"
11256 LDFLAGS="${_CUR_LDFLAGS}"
11257 ;;
11258esac
11259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11261$as_echo_n "checking for hstrerror... " >&6; }
11262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011263/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011264
Martin v. Löwise9416172003-05-03 10:12:45 +000011265#include <netdb.h>
11266
Martin v. Löwise9416172003-05-03 10:12:45 +000011267int
11268main ()
11269{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011270void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011271 ;
11272 return 0;
11273}
11274_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011276
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011278
Matthias Klosec511b472010-05-08 11:01:39 +000011279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011284
11285fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286rm -f core conftest.err conftest.$ac_objext \
11287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11290$as_echo_n "checking for inet_aton... " >&6; }
11291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011292/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011293
Martin v. Löwis86d66262006-02-17 08:40:11 +000011294#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011295#include <sys/socket.h>
11296#include <netinet/in.h>
11297#include <arpa/inet.h>
11298
Martin v. Löwise9416172003-05-03 10:12:45 +000011299int
11300main ()
11301{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011302void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011303 ;
11304 return 0;
11305}
11306_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011310
Matthias Klosec511b472010-05-08 11:01:39 +000011311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11315$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011316
11317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011318rm -f core conftest.err conftest.$ac_objext \
11319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11322$as_echo_n "checking for inet_pton... " >&6; }
11323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011324/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011325
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011326#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011327#include <sys/socket.h>
11328#include <netinet/in.h>
11329#include <arpa/inet.h>
11330
Martin v. Löwise9416172003-05-03 10:12:45 +000011331int
11332main ()
11333{
11334void* p = inet_pton
11335 ;
11336 return 0;
11337}
11338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011341$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011342
Matthias Klosec511b472010-05-08 11:01:39 +000011343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11347$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011348
11349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011351
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011352# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11354$as_echo_n "checking for setgroups... " >&6; }
11355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011356/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011357
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011358#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011359#ifdef HAVE_GRP_H
11360#include <grp.h>
11361#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011362
Martin v. Löwisd5843682002-11-21 20:41:28 +000011363int
11364main ()
11365{
11366void* p = setgroups
11367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011374
Matthias Klosec511b472010-05-08 11:01:39 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011377else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011380
11381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011383
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011384# check for openpty and forkpty
11385
11386for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011387do :
11388 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011389if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011390 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011392_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011394else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11396$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011397if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011399else
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011401LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011404
Martin v. Löwiseba40652007-08-30 20:10:57 +000011405/* Override any GCC internal prototype to avoid an error.
11406 Use char because int might match the return type of a GCC
11407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011408#ifdef __cplusplus
11409extern "C"
11410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011411char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011412int
11413main ()
11414{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011416 ;
11417 return 0;
11418}
11419_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011420if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011424fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425rm -f core conftest.err conftest.$ac_objext \
11426 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011427LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011428fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11430$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011431if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011432 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011433 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11436$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011437if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011438 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011439else
11440 ac_check_lib_save_LIBS=$LIBS
11441LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011443/* end confdefs.h. */
11444
Martin v. Löwiseba40652007-08-30 20:10:57 +000011445/* Override any GCC internal prototype to avoid an error.
11446 Use char because int might match the return type of a GCC
11447 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011448#ifdef __cplusplus
11449extern "C"
11450#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011451char openpty ();
11452int
11453main ()
11454{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011460if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011461 ac_cv_lib_bsd_openpty=yes
11462else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011463 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011464fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011465rm -f core conftest.err conftest.$ac_objext \
11466 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011467LIBS=$ac_check_lib_save_LIBS
11468fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11470$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011471if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011473 LIBS="$LIBS -lbsd"
11474fi
11475
11476
11477fi
11478
Fred Drake8cef4cf2000-06-28 16:40:38 +000011479
11480fi
11481done
11482
11483for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011484do :
11485 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011486if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011487 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011489_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490
Fred Drake8cef4cf2000-06-28 16:40:38 +000011491else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11493$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011494if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011495 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011496else
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011498LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011501
Martin v. Löwiseba40652007-08-30 20:10:57 +000011502/* Override any GCC internal prototype to avoid an error.
11503 Use char because int might match the return type of a GCC
11504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011505#ifdef __cplusplus
11506extern "C"
11507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011508char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011509int
11510main ()
11511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ;
11514 return 0;
11515}
11516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011518 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011520 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011521fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522rm -f core conftest.err conftest.$ac_objext \
11523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011524LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11527$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011528if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011529 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011530 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11533$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011534if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011535 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011536else
11537 ac_check_lib_save_LIBS=$LIBS
11538LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011540/* end confdefs.h. */
11541
Martin v. Löwiseba40652007-08-30 20:10:57 +000011542/* Override any GCC internal prototype to avoid an error.
11543 Use char because int might match the return type of a GCC
11544 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011545#ifdef __cplusplus
11546extern "C"
11547#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011548char forkpty ();
11549int
11550main ()
11551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011552return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011553 ;
11554 return 0;
11555}
11556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011557if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011558 ac_cv_lib_bsd_forkpty=yes
11559else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011561fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011562rm -f core conftest.err conftest.$ac_objext \
11563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011564LIBS=$ac_check_lib_save_LIBS
11565fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11567$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011568if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011569 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011570 LIBS="$LIBS -lbsd"
11571fi
11572
11573
11574fi
11575
Fred Drake8cef4cf2000-06-28 16:40:38 +000011576
11577fi
11578done
11579
Jack Jansendd19cf82001-12-06 22:36:17 +000011580
Brett Cannonaa5778d2008-03-18 04:09:00 +000011581# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011582for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011583do :
11584 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011585if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011586 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011587#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011588_ACEOF
11589
11590fi
11591done
11592
11593
Michael W. Hudson54241132001-12-07 15:38:26 +000011594# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011595for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596do :
11597 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11598ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011599if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011600 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011602_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011604fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011605done
11606
Michael W. Hudson54241132001-12-07 15:38:26 +000011607
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011608ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011609if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011610 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011611
Martin v. Löwis1142de32002-03-29 16:28:31 +000011612else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011614 *" dup2.$ac_objext "* ) ;;
11615 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011616 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011617esac
11618
Martin v. Löwis1142de32002-03-29 16:28:31 +000011619fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011620
11621ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011622if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011623 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11624
11625else
11626 case " $LIBOBJS " in
11627 *" getcwd.$ac_objext "* ) ;;
11628 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11629 ;;
11630esac
11631
11632fi
11633
11634ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011635if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011636 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11637
11638else
11639 case " $LIBOBJS " in
11640 *" strdup.$ac_objext "* ) ;;
11641 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11642 ;;
11643esac
11644
11645fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011646
11647
11648for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649do :
11650 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011651if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011652 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011657#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011658int
11659main ()
11660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011661getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011662 ;
11663 return 0;
11664}
11665_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011669
Guido van Rossum627b2d71993-12-24 10:39:16 +000011670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011672
Guido van Rossum627b2d71993-12-24 10:39:16 +000011673fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011674done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011675
Jack Jansen150753c2003-03-29 22:07:47 +000011676for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011677do :
11678 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011679if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011680 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +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. */
Jack Jansen150753c2003-03-29 22:07:47 +000011685#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011686int
11687main ()
11688{
11689setpgrp(0,0);
11690 ;
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 SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011697
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011700
11701fi
11702done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011703
Thomas Wouters3a584202000-08-05 23:28:51 +000011704for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011705do :
11706 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011707if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011708 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011709#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011713#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011714int
11715main ()
11716{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011717gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011718 ;
11719 return 0;
11720}
11721_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722if ac_fn_c_try_compile "$LINENO"; then :
11723
Guido van Rossum627b2d71993-12-24 10:39:16 +000011724else
Skip Montanaro6dead952003-09-25 14:50:04 +000011725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011726$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011727
Martin v. Löwis11437992002-04-12 09:54:03 +000011728
Guido van Rossum627b2d71993-12-24 10:39:16 +000011729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011731
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011732fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011733done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011734
Michael W. Hudson54241132001-12-07 15:38:26 +000011735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11737$as_echo_n "checking for major... " >&6; }
11738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011739/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011740
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011741#if defined(MAJOR_IN_MKDEV)
11742#include <sys/mkdev.h>
11743#elif defined(MAJOR_IN_SYSMACROS)
11744#include <sys/sysmacros.h>
11745#else
11746#include <sys/types.h>
11747#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011748
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011749int
11750main ()
11751{
11752
11753 makedev(major(0),minor(0));
11754
11755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011760
11761
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011762$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011763
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11765$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011766
11767else
Skip Montanaro6dead952003-09-25 14:50:04 +000011768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011771
11772fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011773rm -f core conftest.err conftest.$ac_objext \
11774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011775
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011776# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011777# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11779$as_echo_n "checking for getaddrinfo... " >&6; }
11780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011781/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011782
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011783#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011784#include <sys/socket.h>
11785#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011786#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011787
Martin v. Löwis11437992002-04-12 09:54:03 +000011788int
11789main ()
11790{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011791getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011792 ;
11793 return 0;
11794}
11795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011797 have_getaddrinfo=yes
11798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011801rm -f core conftest.err conftest.$ac_objext \
11802 conftest$ac_exeext conftest.$ac_ext
11803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11804$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011805if test $have_getaddrinfo = yes
11806then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11808$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011809 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011810 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011813
11814if test "${enable_ipv6+set}" = set; then
11815 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11816else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011817 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011818fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011822
Stefan Krah0afe4e42012-11-22 23:56:51 +010011823#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011824#include <sys/types.h>
11825#include <netdb.h>
11826#include <string.h>
11827#include <sys/socket.h>
11828#include <netinet/in.h>
11829
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011830int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011831{
11832 int passive, gaierr, inet4 = 0, inet6 = 0;
11833 struct addrinfo hints, *ai, *aitop;
11834 char straddr[INET6_ADDRSTRLEN], strport[16];
11835
11836 for (passive = 0; passive <= 1; passive++) {
11837 memset(&hints, 0, sizeof(hints));
11838 hints.ai_family = AF_UNSPEC;
11839 hints.ai_flags = passive ? AI_PASSIVE : 0;
11840 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011841 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011842 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11843 (void)gai_strerror(gaierr);
11844 goto bad;
11845 }
11846 for (ai = aitop; ai; ai = ai->ai_next) {
11847 if (ai->ai_addr == NULL ||
11848 ai->ai_addrlen == 0 ||
11849 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11850 straddr, sizeof(straddr), strport, sizeof(strport),
11851 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11852 goto bad;
11853 }
11854 switch (ai->ai_family) {
11855 case AF_INET:
11856 if (strcmp(strport, "54321") != 0) {
11857 goto bad;
11858 }
11859 if (passive) {
11860 if (strcmp(straddr, "0.0.0.0") != 0) {
11861 goto bad;
11862 }
11863 } else {
11864 if (strcmp(straddr, "127.0.0.1") != 0) {
11865 goto bad;
11866 }
11867 }
11868 inet4++;
11869 break;
11870 case AF_INET6:
11871 if (strcmp(strport, "54321") != 0) {
11872 goto bad;
11873 }
11874 if (passive) {
11875 if (strcmp(straddr, "::") != 0) {
11876 goto bad;
11877 }
11878 } else {
11879 if (strcmp(straddr, "::1") != 0) {
11880 goto bad;
11881 }
11882 }
11883 inet6++;
11884 break;
11885 case AF_UNSPEC:
11886 goto bad;
11887 break;
11888 default:
11889 /* another family support? */
11890 break;
11891 }
11892 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011893 freeaddrinfo(aitop);
11894 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011895 }
11896
11897 if (!(inet4 == 0 || inet4 == 2))
11898 goto bad;
11899 if (!(inet6 == 0 || inet6 == 2))
11900 goto bad;
11901
11902 if (aitop)
11903 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011904 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011905
11906 bad:
11907 if (aitop)
11908 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011909 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011910}
11911
Martin v. Löwis11437992002-04-12 09:54:03 +000011912_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011914 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011922fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011925
Benjamin Peterson75fed812010-11-01 01:47:19 +000011926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11927$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11928
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011929if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011930then
11931 if test $ipv6 = yes
11932 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011933 echo 'Fatal: You must get working getaddrinfo() function.'
11934 echo ' or you can specify "--disable-ipv6"'.
11935 exit 1
11936 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011937else
Martin v. Löwis11437992002-04-12 09:54:03 +000011938
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011939$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011940
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011941fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011942
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011943for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011944do :
11945 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011946if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011947 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011949_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011950
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011951fi
11952done
11953
Michael W. Hudson54241132001-12-07 15:38:26 +000011954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11957$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011958if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011959 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011962/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011963#include <sys/types.h>
11964#include <sys/time.h>
11965#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011966
Martin v. Löwis11437992002-04-12 09:54:03 +000011967int
11968main ()
11969{
11970if ((struct tm *) 0)
11971return 0;
11972 ;
11973 return 0;
11974}
11975_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011976if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011977 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011979 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11984$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011985if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011988
11989fi
11990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11992$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011993if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011994 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011997/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011998#include <sys/types.h>
11999#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001int
12002main ()
12003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012004struct tm tm;
12005 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012006 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ;
12008 return 0;
12009}
12010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012 ac_cv_struct_tm=time.h
12013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012014 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12019$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012020if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023
12024fi
12025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026ac_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 +000012027#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012029"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012030if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012031
12032cat >>confdefs.h <<_ACEOF
12033#define HAVE_STRUCT_TM_TM_ZONE 1
12034_ACEOF
12035
12036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012037fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012038
Martin v. Löwis11437992002-04-12 09:54:03 +000012039if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12040
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042
12043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12045"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012046if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012048else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012050fi
12051
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054_ACEOF
12055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12057$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012058if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012063#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012064#if !HAVE_DECL_TZNAME
12065extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012066#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012067
Martin v. Löwis11437992002-04-12 09:54:03 +000012068int
12069main ()
12070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012071return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012072 ;
12073 return 0;
12074}
12075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012076if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012077 ac_cv_var_tzname=yes
12078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012081rm -f core conftest.err conftest.$ac_objext \
12082 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12085$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012086 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012089
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012090 fi
12091fi
12092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093ac_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 +010012094if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012095
12096cat >>confdefs.h <<_ACEOF
12097#define HAVE_STRUCT_STAT_ST_RDEV 1
12098_ACEOF
12099
12100
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012101fi
12102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012103ac_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 +010012104if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012105
Martin v. Löwis11437992002-04-12 09:54:03 +000012106cat >>confdefs.h <<_ACEOF
12107#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12108_ACEOF
12109
12110
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012111fi
12112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113ac_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 +010012114if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012115
12116cat >>confdefs.h <<_ACEOF
12117#define HAVE_STRUCT_STAT_ST_FLAGS 1
12118_ACEOF
12119
12120
12121fi
12122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123ac_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 +010012124if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012125
12126cat >>confdefs.h <<_ACEOF
12127#define HAVE_STRUCT_STAT_ST_GEN 1
12128_ACEOF
12129
12130
12131fi
12132
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012133ac_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 +010012134if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012135
12136cat >>confdefs.h <<_ACEOF
12137#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12138_ACEOF
12139
12140
12141fi
12142
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143ac_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 +010012144if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012145
Martin v. Löwis11437992002-04-12 09:54:03 +000012146cat >>confdefs.h <<_ACEOF
12147#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12148_ACEOF
12149
12150
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012151fi
12152
Michael W. Hudson54241132001-12-07 15:38:26 +000012153
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12155$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012156if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012158else
Matthias Klosec511b472010-05-08 11:01:39 +000012159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012161/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012162#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012171if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012172 ac_cv_header_time_altzone=yes
12173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012174 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012177
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178fi
12179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12181$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012182if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012183
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185
12186fi
12187
Guido van Rossumda88dad1995-01-26 00:46:29 +000012188was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12190$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012192/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012193
12194#include <sys/types.h>
12195#include <sys/select.h>
12196#include <sys/time.h>
12197
Martin v. Löwis11437992002-04-12 09:54:03 +000012198int
12199main ()
12200{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201;
Martin v. Löwis11437992002-04-12 09:54:03 +000012202 ;
12203 return 0;
12204}
12205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
12208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012209$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012211 was_it_defined=yes
12212
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12216$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12219$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012220if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012221 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012224/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012225#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012226int
12227main ()
12228{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012229struct addrinfo a
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öwis01dfdb32001-06-23 16:30:13 +000012235 ac_cv_struct_addrinfo=yes
12236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012237 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12240fi
12241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12243$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012244if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012246$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012247
12248fi
12249
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12251$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012252if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012256/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012257
12258# include <sys/types.h>
12259# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012260int
12261main ()
12262{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012263struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 ;
12265 return 0;
12266}
12267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012269 ac_cv_struct_sockaddr_storage=yes
12270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012271 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12274fi
12275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12277$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012278if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012281
12282fi
12283
Guido van Rossum627b2d71993-12-24 10:39:16 +000012284# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12287$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012288if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012293$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012294int
12295main ()
12296{
12297static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012298test_array [0] = 0;
12299return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012300
12301 ;
12302 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012303}
Martin v. Löwis11437992002-04-12 09:54:03 +000012304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012306 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12313$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012315 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316
12317fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12320$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012321if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012322 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012323else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012325/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327int
12328main ()
12329{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012332 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012334 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336 char const *const *pcpcc;
12337 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 /* NEC SVR4.0.2 mips cc rejects this. */
12339 struct point {int x, y;};
12340 static struct point const zero = {0,0};
12341 /* AIX XL C 1.02.0.0 rejects this.
12342 It does not let you subtract one const X* pointer from another in
12343 an arm of an if-expression whose if-part is not a constant
12344 expression */
12345 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348 ++pcpcc;
12349 ppc = (char**) pcpcc;
12350 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012351 { /* SCO 3.2v4 cc rejects this sort of thing. */
12352 char tx;
12353 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012354 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 }
12359 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12360 int x[] = {25, 17};
12361 const int *foo = &x[0];
12362 ++foo;
12363 }
12364 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12365 typedef const int *iptr;
12366 iptr p = 0;
12367 ++p;
12368 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012369 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012371 struct s { int j; const int *ap[3]; } bx;
12372 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 }
12374 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12375 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012377 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012379#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ;
12382 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012383}
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012386 ac_cv_c_const=yes
12387else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12393$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397
12398fi
12399
Michael W. Hudson54241132001-12-07 15:38:26 +000012400
Guido van Rossumda88dad1995-01-26 00:46:29 +000012401works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12403$as_echo_n "checking for working volatile... " >&6; }
12404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012405/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012406
Martin v. Löwis11437992002-04-12 09:54:03 +000012407int
12408main ()
12409{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012410volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 ;
12412 return 0;
12413}
12414_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012416 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012417else
Skip Montanaro6dead952003-09-25 14:50:04 +000012418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012420
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012421
Guido van Rossum627b2d71993-12-24 10:39:16 +000012422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12425$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012426
Guido van Rossumda88dad1995-01-26 00:46:29 +000012427works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12429$as_echo_n "checking for working signed char... " >&6; }
12430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012432
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012436signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 ;
12438 return 0;
12439}
12440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012442 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012443else
Skip Montanaro6dead952003-09-25 14:50:04 +000012444
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012445$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012446
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012447
Guido van Rossum7f43da71994-08-01 12:15:30 +000012448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12451$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012452
Guido van Rossumda88dad1995-01-26 00:46:29 +000012453have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12455$as_echo_n "checking for prototypes... " >&6; }
12456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012458int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012459int
12460main ()
12461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012462return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 ;
12464 return 0;
12465}
12466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012469$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012470
Matthias Klosec511b472010-05-08 11:01:39 +000012471 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12475$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012476
Guido van Rossumda88dad1995-01-26 00:46:29 +000012477works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12479$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012482
12483#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012484int foo(int x, ...) {
12485 va_list va;
12486 va_start(va, x);
12487 va_arg(va, int);
12488 va_arg(va, char *);
12489 va_arg(va, double);
12490 return 0;
12491}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012492
Martin v. Löwis11437992002-04-12 09:54:03 +000012493int
12494main ()
12495{
Guido van Rossum90eea071996-08-30 20:58:57 +000012496return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 ;
12498 return 0;
12499}
12500_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
12503
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012504$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012506 works=yes
12507
Guido van Rossum627b2d71993-12-24 10:39:16 +000012508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12511$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512
Martin v. Löwisd6320502004-08-12 13:45:08 +000012513# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12515$as_echo_n "checking for socketpair... " >&6; }
12516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012517/* end confdefs.h. */
12518
12519#include <sys/types.h>
12520#include <sys/socket.h>
12521
12522int
12523main ()
12524{
12525void *x=socketpair
12526 ;
12527 return 0;
12528}
12529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012532$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012533
Matthias Klosec511b472010-05-08 11:01:39 +000012534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12538$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012539
12540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012542
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12545$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012548#include <sys/types.h>
12549#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012550int
12551main ()
12552{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012553struct sockaddr x;
12554x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 ;
12556 return 0;
12557}
12558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012559if ac_fn_c_try_compile "$LINENO"; then :
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12561$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012563$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012564
12565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012568
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012571
Guido van Rossumda88dad1995-01-26 00:46:29 +000012572va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12574$as_echo_n "checking whether va_list is an array... " >&6; }
12575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012576/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012577
12578#ifdef HAVE_STDARG_PROTOTYPES
12579#include <stdarg.h>
12580#else
12581#include <varargs.h>
12582#endif
12583
Martin v. Löwis11437992002-04-12 09:54:03 +000012584int
12585main ()
12586{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012587va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012588 ;
12589 return 0;
12590}
12591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012592if ac_fn_c_try_compile "$LINENO"; then :
12593
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012594else
Skip Montanaro6dead952003-09-25 14:50:04 +000012595
Martin v. Löwis11437992002-04-12 09:54:03 +000012596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012597$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Guido van Rossumda88dad1995-01-26 00:46:29 +000012599 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12604$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012606# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012607
12608
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012610if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012612 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012613
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12615$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012616 OLD_CFLAGS=$CFLAGS
12617 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012619/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012620
12621# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012622
Martin v. Löwis11437992002-04-12 09:54:03 +000012623int
12624main ()
12625{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012626
12627 char *name;
12628 struct hostent *he, *res;
12629 char buffer[2048];
12630 int buflen = 2048;
12631 int h_errnop;
12632
12633 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012634
12635 ;
12636 return 0;
12637}
12638_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012642
Martin v. Löwis11437992002-04-12 09:54:03 +000012643
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012644$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12647$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012649else
Skip Montanaro6dead952003-09-25 14:50:04 +000012650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
12653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12654$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012658# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Martin v. Löwis11437992002-04-12 09:54:03 +000012660int
12661main ()
12662{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012663
12664 char *name;
12665 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012666 char buffer[2048];
12667 int buflen = 2048;
12668 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012669
Matthias Klosec511b472010-05-08 11:01:39 +000012670 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012671
12672 ;
12673 return 0;
12674}
12675_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012676if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012679
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Matthias Klosec511b472010-05-08 11:01:39 +000012681$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012682
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12684$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012686else
Skip Montanaro6dead952003-09-25 14:50:04 +000012687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12689$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12691$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12693/* end confdefs.h. */
12694
12695# include <netdb.h>
12696
12697int
12698main ()
12699{
12700
12701 char *name;
12702 struct hostent *he;
12703 struct hostent_data data;
12704
12705 (void) gethostbyname_r(name, he, &data);
12706
12707 ;
12708 return 0;
12709}
12710_ACEOF
12711if ac_fn_c_try_compile "$LINENO"; then :
12712
12713 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12714
12715
12716$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12717
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12719$as_echo "yes" >&6; }
12720
12721else
12722
12723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012725
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012734 CFLAGS=$OLD_CFLAGS
12735
12736else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738 for ac_func in gethostbyname
12739do :
12740 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012741if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012744_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012745
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012746fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012747done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012748
Michael W. Hudson54241132001-12-07 15:38:26 +000012749
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012750fi
12751
Michael W. Hudson54241132001-12-07 15:38:26 +000012752
12753
12754
12755
12756
12757
Guido van Rossum627b2d71993-12-24 10:39:16 +000012758# checks for system services
12759# (none yet)
12760
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012761# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012762ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012763if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012764
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012765else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12767$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012768if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012769 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770else
Martin v. Löwis11437992002-04-12 09:54:03 +000012771 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012772LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012775
Martin v. Löwiseba40652007-08-30 20:10:57 +000012776/* Override any GCC internal prototype to avoid an error.
12777 Use char because int might match the return type of a GCC
12778 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012779#ifdef __cplusplus
12780extern "C"
12781#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012782char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012786return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012787 ;
12788 return 0;
12789}
12790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012791if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012794 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796rm -f core conftest.err conftest.$ac_objext \
12797 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012798LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12801$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012802if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012803 cat >>confdefs.h <<_ACEOF
12804#define HAVE_LIBIEEE 1
12805_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012807 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012808
Guido van Rossum627b2d71993-12-24 10:39:16 +000012809fi
12810
Michael W. Hudson54241132001-12-07 15:38:26 +000012811
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012812fi
12813
Michael W. Hudson54241132001-12-07 15:38:26 +000012814
Guido van Rossum7f253911997-05-09 02:42:48 +000012815# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12817$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012818
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012821 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012822if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012823then
12824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12828$as_echo "yes" >&6; }
12829else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12830$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012831fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12834$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012835fi
12836
Guido van Rossum7f253911997-05-09 02:42:48 +000012837
Guido van Rossum7f43da71994-08-01 12:15:30 +000012838# check for --with-libm=...
12839
Guido van Rossum563e7081996-09-10 18:20:48 +000012840case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012841Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012842BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012843*) LIBM=-lm
12844esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12846$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012847
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012849if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012851if test "$withval" = no
12852then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12854$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012855elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012856then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12858$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012859else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012860fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12863$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864fi
12865
Guido van Rossum7f43da71994-08-01 12:15:30 +000012866
12867# check for --with-libc=...
12868
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12870$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012871
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012874 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012875if test "$withval" = no
12876then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12878$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012879elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012880then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12882$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012883else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012884fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12887$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012888fi
12889
Guido van Rossum7f43da71994-08-01 12:15:30 +000012890
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012891# **************************************************
12892# * Check for various properties of floating point *
12893# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12896$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012897if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012898 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012899else
12900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012902 ac_cv_little_endian_double=no
12903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012905/* end confdefs.h. */
12906
12907#include <string.h>
12908int main() {
12909 double x = 9006104071832581.0;
12910 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12911 return 0;
12912 else
12913 return 1;
12914}
12915
12916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012918 ac_cv_little_endian_double=yes
12919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012920 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12923 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012924fi
12925
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012926fi
12927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12929$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012930if test "$ac_cv_little_endian_double" = yes
12931then
12932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012933$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012934
12935fi
12936
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12938$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012939if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012940 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012941else
12942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012944 ac_cv_big_endian_double=no
12945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012947/* end confdefs.h. */
12948
12949#include <string.h>
12950int main() {
12951 double x = 9006104071832581.0;
12952 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12953 return 0;
12954 else
12955 return 1;
12956}
12957
12958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012960 ac_cv_big_endian_double=yes
12961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012966fi
12967
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012968fi
12969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12971$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012972if test "$ac_cv_big_endian_double" = yes
12973then
12974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012976
12977fi
12978
12979# Some ARM platforms use a mixed-endian representation for doubles.
12980# While Python doesn't currently have full support for these platforms
12981# (see e.g., issue 1762561), we can at least make sure that float <-> string
12982# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12984$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012985if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012986 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012987else
12988
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012989if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012990 ac_cv_mixed_endian_double=no
12991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012993/* end confdefs.h. */
12994
12995#include <string.h>
12996int main() {
12997 double x = 9006104071832581.0;
12998 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12999 return 0;
13000 else
13001 return 1;
13002}
13003
13004_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013006 ac_cv_mixed_endian_double=yes
13007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013008 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013012fi
13013
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013014fi
13015
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13017$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013018if test "$ac_cv_mixed_endian_double" = yes
13019then
13020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013022
13023fi
13024
13025# The short float repr introduced in Python 3.1 requires the
13026# correctly-rounded string <-> double conversion functions from
13027# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13028# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013029# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013030# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013031
13032# This inline assembler syntax may also work for suncc and icc,
13033# so we try it on all platforms.
13034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13036$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013038/* end confdefs.h. */
13039
13040int
13041main ()
13042{
13043
Mark Dickinsona548dee2009-11-15 13:12:43 +000013044 unsigned short cw;
13045 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13046 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013047
13048 ;
13049 return 0;
13050}
13051_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013052if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013053 have_gcc_asm_for_x87=yes
13054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013055 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013056fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13060$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013061if test "$have_gcc_asm_for_x87" = yes
13062then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013065
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013066fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013067
Mark Dickinson04b27232009-01-04 12:29:36 +000013068# Detect whether system arithmetic is subject to x87-style double
13069# rounding issues. The result of this test has little meaning on non
13070# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13071# mode is round-to-nearest and double rounding issues are present, and
13072# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13074$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013075# $BASECFLAGS may affect the result
13076ac_save_cc="$CC"
13077CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013079 ac_cv_x87_double_rounding=no
13080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013082/* end confdefs.h. */
13083
13084#include <stdlib.h>
13085#include <math.h>
13086int main() {
13087 volatile double x, y, z;
13088 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13089 x = 0.99999999999999989; /* 1-2**-53 */
13090 y = 1./x;
13091 if (y != 1.)
13092 exit(0);
13093 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13094 x = 1e16;
13095 y = 2.99999;
13096 z = x + y;
13097 if (z != 1e16+4.)
13098 exit(0);
13099 /* both tests show evidence of double rounding */
13100 exit(1);
13101}
13102
13103_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013105 ac_cv_x87_double_rounding=no
13106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013107 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013108fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013111fi
13112
Mark Dickinson99abd142009-10-24 13:44:16 +000013113CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13115$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013116if test "$ac_cv_x87_double_rounding" = yes
13117then
13118
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013119$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013120
13121fi
13122
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013123# ************************************
13124# * Check for mathematical functions *
13125# ************************************
13126
13127LIBS_SAVE=$LIBS
13128LIBS="$LIBS $LIBM"
13129
Mark Dickinson265d7382008-04-21 22:32:24 +000013130# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13131# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13133$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013134if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013136else
13137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013139 ac_cv_tanh_preserves_zero_sign=no
13140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013142/* end confdefs.h. */
13143
13144#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013145#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013146int main() {
13147 /* return 0 if either negative zeros don't exist
13148 on this platform or if negative zeros exist
13149 and tanh(-0.) == -0. */
13150 if (atan2(0., -1.) == atan2(-0., -1.) ||
13151 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13152 else exit(1);
13153}
13154
13155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013156if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013157 ac_cv_tanh_preserves_zero_sign=yes
13158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013159 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013160fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13162 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013163fi
13164
Mark Dickinson265d7382008-04-21 22:32:24 +000013165fi
13166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13168$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013169if test "$ac_cv_tanh_preserves_zero_sign" = yes
13170then
13171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013173
13174fi
13175
Mark Dickinson65898e02009-09-05 10:27:00 +000013176for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177do :
13178 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13179ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013180if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013181 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013183_ACEOF
13184
13185fi
13186done
13187
Mark Dickinson65898e02009-09-05 10:27:00 +000013188for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189do :
13190 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13191ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013192if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013193 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013194#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013195_ACEOF
13196
13197fi
13198done
13199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13201"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013202if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013203 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013204else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013205 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013206fi
13207
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013208cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013211ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13212"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013213if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013217fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013218
13219cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013220#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13223"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013224if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013225 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013226else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013228fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013229
13230cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013231#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013232_ACEOF
13233
13234
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013235LIBS=$LIBS_SAVE
13236
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013237# For multiprocessing module, check that sem_open
13238# actually works. For FreeBSD versions <= 7.2,
13239# the kernel module that provides POSIX semaphores
13240# isn't loaded by default, so an attempt to call
13241# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13243$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013244if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013247 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013248 ac_cv_posix_semaphores_enabled=yes
13249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013251/* end confdefs.h. */
13252
13253#include <unistd.h>
13254#include <fcntl.h>
13255#include <stdio.h>
13256#include <semaphore.h>
13257#include <sys/stat.h>
13258
13259int main(void) {
13260 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13261 if (a == SEM_FAILED) {
13262 perror("sem_open");
13263 return 1;
13264 }
13265 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013266 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013267 return 0;
13268}
13269
13270_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013272 ac_cv_posix_semaphores_enabled=yes
13273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013274 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013278fi
13279
13280
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013281fi
13282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13284$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013285if test $ac_cv_posix_semaphores_enabled = no
13286then
13287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013289
13290fi
13291
13292# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13294$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013295if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013298 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013299 ac_cv_broken_sem_getvalue=yes
13300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013302/* end confdefs.h. */
13303
13304#include <unistd.h>
13305#include <fcntl.h>
13306#include <stdio.h>
13307#include <semaphore.h>
13308#include <sys/stat.h>
13309
13310int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013311 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013312 int count;
13313 int res;
13314 if(a==SEM_FAILED){
13315 perror("sem_open");
13316 return 1;
13317
13318 }
13319 res = sem_getvalue(a, &count);
13320 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013321 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013322 return res==-1 ? 1 : 0;
13323}
13324
13325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013327 ac_cv_broken_sem_getvalue=no
13328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013329 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013331rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13332 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013333fi
13334
13335
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013336fi
13337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13339$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013340if test $ac_cv_broken_sem_getvalue = yes
13341then
13342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013344
13345fi
13346
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013347# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13349$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013350# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013351if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013352 enableval=$enable_big_digits; case $enable_big_digits in
13353yes)
13354 enable_big_digits=30 ;;
13355no)
13356 enable_big_digits=15 ;;
1335715|30)
13358 ;;
13359*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013360 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 +000013361esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13363$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013364
13365cat >>confdefs.h <<_ACEOF
13366#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13367_ACEOF
13368
13369
13370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13372$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013373fi
13374
13375
Guido van Rossumef2255b2000-03-10 22:30:29 +000013376# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013378if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
13380
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013381$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013383 wchar_h="yes"
13384
Guido van Rossumef2255b2000-03-10 22:30:29 +000013385else
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013387
13388fi
13389
Michael W. Hudson54241132001-12-07 15:38:26 +000013390
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013392# determine wchar_t size
13393if test "$wchar_h" = yes
13394then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013396# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13397# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13398# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13400$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013401if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013402 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13405"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013406
Martin v. Löwis11437992002-04-12 09:54:03 +000013407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408 if test "$ac_cv_type_wchar_t" = yes; then
13409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013411as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013412See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013413 else
13414 ac_cv_sizeof_wchar_t=0
13415 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13420$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013421
13422
13423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013425#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013426_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013427
Michael W. Hudson54241132001-12-07 15:38:26 +000013428
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013429fi
13430
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13432$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013433have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013436
13437#include <tcl.h>
13438#if TCL_UTF_MAX != 6
13439# error "NOT UCS4_TCL"
13440#endif
13441int
13442main ()
13443{
13444
13445 ;
13446 return 0;
13447}
13448_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013450
13451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013453
13454 have_ucs4_tcl=yes
13455
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13459$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013460
Skip Montanaro6dead952003-09-25 14:50:04 +000013461# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013462if test "$wchar_h" = yes
13463then
13464 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13466$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013467 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013468 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013469else
13470
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013472 ac_cv_wchar_t_signed=yes
13473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013475/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013476
13477 #include <wchar.h>
13478 int main()
13479 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013480 /* Success: exit code 0 */
13481 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013482 }
13483
13484_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013486 ac_cv_wchar_t_signed=yes
13487else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013489fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013492fi
13493
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013494fi
13495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13497$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498fi
13499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13501$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013502# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013504 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013505else
13506 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013507fi
13508
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013509
13510if test $enable_unicode = yes
13511then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013512 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013513 case "$have_ucs4_tcl" in
13514 yes) enable_unicode="ucs4"
13515 ;;
13516 *) enable_unicode="ucs2"
13517 ;;
13518 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013519fi
13520
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013521
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013522case "$enable_unicode" in
13523ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013524 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013525
13526 ;;
13527ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013528 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013529
13530 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013531no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013532*) 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 +000013533esac
13534
Michael W. Hudson54241132001-12-07 15:38:26 +000013535
Martin v. Löwis11437992002-04-12 09:54:03 +000013536
13537
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013538if test "$enable_unicode" = "no"
13539then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013540 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13542$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013543else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013544 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013546$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013547
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013548
13549 # wchar_t is only usable if it maps to an unsigned type
13550 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013551 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013552 then
13553 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013554
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013555$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013558
13559 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13560 then
13561 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013562 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013563
13564 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13565 then
13566 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013568
13569 else
13570 PY_UNICODE_TYPE="no type found"
13571 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13573$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013574fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013575
13576# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13578$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013579if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013581else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013582 ac_cv_c_bigendian=unknown
13583 # See if we're dealing with a universal compiler.
13584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13585/* end confdefs.h. */
13586#ifndef __APPLE_CC__
13587 not a universal capable compiler
13588 #endif
13589 typedef int dummy;
13590
Skip Montanaro6dead952003-09-25 14:50:04 +000013591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592if ac_fn_c_try_compile "$LINENO"; then :
13593
13594 # Check for potential -arch flags. It is not universal unless
13595 # there are at least two -arch flags with different values.
13596 ac_arch=
13597 ac_prev=
13598 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13599 if test -n "$ac_prev"; then
13600 case $ac_word in
13601 i?86 | x86_64 | ppc | ppc64)
13602 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13603 ac_arch=$ac_word
13604 else
13605 ac_cv_c_bigendian=universal
13606 break
13607 fi
13608 ;;
13609 esac
13610 ac_prev=
13611 elif test "x$ac_word" = "x-arch"; then
13612 ac_prev=arch
13613 fi
13614 done
13615fi
13616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13617 if test $ac_cv_c_bigendian = unknown; then
13618 # See if sys/param.h defines the BYTE_ORDER macro.
13619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013620/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013621#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013623
Martin v. Löwis11437992002-04-12 09:54:03 +000013624int
13625main ()
13626{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013627#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13628 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13629 && LITTLE_ENDIAN)
13630 bogus endian macros
13631 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013632
13633 ;
13634 return 0;
13635}
13636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013640/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013641#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013643
Martin v. Löwis11437992002-04-12 09:54:03 +000013644int
13645main ()
13646{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013647#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648 not big endian
13649 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013650
13651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013656 ac_cv_c_bigendian=yes
13657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661fi
13662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13663 fi
13664 if test $ac_cv_c_bigendian = unknown; then
13665 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013667/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668#include <limits.h>
13669
Martin v. Löwis11437992002-04-12 09:54:03 +000013670int
13671main ()
13672{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013673#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13674 bogus endian macros
13675 #endif
13676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677 ;
13678 return 0;
13679}
13680_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681if ac_fn_c_try_compile "$LINENO"; then :
13682 # It does; now see whether it defined to _BIG_ENDIAN or not.
13683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13684/* end confdefs.h. */
13685#include <limits.h>
13686
13687int
13688main ()
13689{
13690#ifndef _BIG_ENDIAN
13691 not big endian
13692 #endif
13693
13694 ;
13695 return 0;
13696}
13697_ACEOF
13698if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013701 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13704fi
13705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13706 fi
13707 if test $ac_cv_c_bigendian = unknown; then
13708 # Compile a test program.
13709 if test "$cross_compiling" = yes; then :
13710 # Try to guess by grepping values from an object file.
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712/* end confdefs.h. */
13713short int ascii_mm[] =
13714 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13715 short int ascii_ii[] =
13716 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13717 int use_ascii (int i) {
13718 return ascii_mm[i] + ascii_ii[i];
13719 }
13720 short int ebcdic_ii[] =
13721 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13722 short int ebcdic_mm[] =
13723 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13724 int use_ebcdic (int i) {
13725 return ebcdic_mm[i] + ebcdic_ii[i];
13726 }
13727 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729int
13730main ()
13731{
13732return use_ascii (foo) == use_ebcdic (foo);
13733 ;
13734 return 0;
13735}
13736_ACEOF
13737if ac_fn_c_try_compile "$LINENO"; then :
13738 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13739 ac_cv_c_bigendian=yes
13740 fi
13741 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13742 if test "$ac_cv_c_bigendian" = unknown; then
13743 ac_cv_c_bigendian=no
13744 else
13745 # finding both strings is unlikely to happen, but who knows?
13746 ac_cv_c_bigendian=unknown
13747 fi
13748 fi
13749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013753/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013755int
13756main ()
13757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759 /* Are we little or big endian? From Harbison&Steele. */
13760 union
13761 {
13762 long int l;
13763 char c[sizeof (long int)];
13764 } u;
13765 u.l = 1;
13766 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767
13768 ;
13769 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013770}
Martin v. Löwis11437992002-04-12 09:54:03 +000013771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013773 ac_cv_c_bigendian=no
13774else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013775 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013776fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13778 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13784$as_echo "$ac_cv_c_bigendian" >&6; }
13785 case $ac_cv_c_bigendian in #(
13786 yes)
13787 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13788;; #(
13789 no)
13790 ;; #(
13791 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013793$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013795 ;; #(
13796 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013797 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013798 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013799 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013800
Michael W. Hudson54241132001-12-07 15:38:26 +000013801
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013802# Check whether right shifting a negative integer extends the sign bit
13803# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13805$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013806if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013808else
Martin v. Löwis11437992002-04-12 09:54:03 +000013809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013810if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013811 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013815
13816int main()
13817{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013818 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013819}
13820
Martin v. Löwis11437992002-04-12 09:54:03 +000013821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013823 ac_cv_rshift_extends_sign=yes
13824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13828 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013829fi
13830
Martin v. Löwiseba40652007-08-30 20:10:57 +000013831fi
13832
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13834$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013835if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013836then
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013839
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013840fi
13841
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013842# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13844$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013845if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013847else
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013851#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013852int
13853main ()
13854{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013855
13856 FILE *f = fopen("/dev/null", "r");
13857 flockfile(f);
13858 getc_unlocked(f);
13859 funlockfile(f);
13860
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 ;
13862 return 0;
13863}
13864_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013866 ac_cv_have_getc_unlocked=yes
13867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868 ac_cv_have_getc_unlocked=no
13869fi
13870rm -f core conftest.err conftest.$ac_objext \
13871 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013872fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13875$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013876if test "$ac_cv_have_getc_unlocked" = yes
13877then
Martin v. Löwis11437992002-04-12 09:54:03 +000013878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013879$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013880
13881fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013882
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013883# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013884# save the value of LIBS so we don't actually link Python with readline
13885LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013886
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013887# On some systems we need to link readline to a termcap compatible
13888# library. NOTE: Keep the precedence of listed libraries synchronised
13889# with setup.py.
13890py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13892$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013893for py_libtermcap in "" ncursesw ncurses curses termcap; do
13894 if test -z "$py_libtermcap"; then
13895 READLINE_LIBS="-lreadline"
13896 else
13897 READLINE_LIBS="-lreadline -l$py_libtermcap"
13898 fi
13899 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013901/* end confdefs.h. */
13902
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903/* Override any GCC internal prototype to avoid an error.
13904 Use char because int might match the return type of a GCC
13905 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013906#ifdef __cplusplus
13907extern "C"
13908#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013909char readline ();
13910int
13911main ()
13912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013919 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013921rm -f core conftest.err conftest.$ac_objext \
13922 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013923 if test $py_cv_lib_readline = yes; then
13924 break
13925 fi
13926done
13927# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13928#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013929if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13931$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13934$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013937
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013938fi
13939
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013940# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13942$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013943if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013944 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013945else
13946 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013947LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013949/* end confdefs.h. */
13950
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951/* Override any GCC internal prototype to avoid an error.
13952 Use char because int might match the return type of a GCC
13953 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013954#ifdef __cplusplus
13955extern "C"
13956#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013957char rl_callback_handler_install ();
13958int
13959main ()
13960{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013961return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013962 ;
13963 return 0;
13964}
13965_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013966if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013967 ac_cv_lib_readline_rl_callback_handler_install=yes
13968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013969 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013971rm -f core conftest.err conftest.$ac_objext \
13972 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013973LIBS=$ac_check_lib_save_LIBS
13974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13976$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013977if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013978
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013979$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013980
13981fi
13982
13983
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013984# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013986/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013987#include <readline/readline.h>
13988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013989if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013990 have_readline=yes
13991else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013992 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013993
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013994fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013995rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013996if test $have_readline = yes
13997then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014000#include <readline/readline.h>
14001
14002_ACEOF
14003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014006$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014007
14008fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014009rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014010
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014012/* end confdefs.h. */
14013#include <readline/readline.h>
14014
14015_ACEOF
14016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014020
14021fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014022rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014023
14024fi
14025
Martin v. Löwis0daad592001-09-30 21:09:59 +000014026# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14028$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014029if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014031else
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014033LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014036
Martin v. Löwiseba40652007-08-30 20:10:57 +000014037/* Override any GCC internal prototype to avoid an error.
14038 Use char because int might match the return type of a GCC
14039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014040#ifdef __cplusplus
14041extern "C"
14042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014043char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014044int
14045main ()
14046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 ;
14049 return 0;
14050}
14051_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014057rm -f core conftest.err conftest.$ac_objext \
14058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014059LIBS=$ac_check_lib_save_LIBS
14060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14062$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014063if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014066
Martin v. Löwis0daad592001-09-30 21:09:59 +000014067fi
14068
Michael W. Hudson54241132001-12-07 15:38:26 +000014069
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014070# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14072$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014073if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014074 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014075else
14076 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014077LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014079/* end confdefs.h. */
14080
14081/* Override any GCC internal prototype to avoid an error.
14082 Use char because int might match the return type of a GCC
14083 builtin and then its argument prototype would still apply. */
14084#ifdef __cplusplus
14085extern "C"
14086#endif
14087char rl_completion_display_matches_hook ();
14088int
14089main ()
14090{
14091return rl_completion_display_matches_hook ();
14092 ;
14093 return 0;
14094}
14095_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014097 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014099 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014100fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014101rm -f core conftest.err conftest.$ac_objext \
14102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014103LIBS=$ac_check_lib_save_LIBS
14104fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14106$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014107if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014110
14111fi
14112
14113
Martin Pantera70c3232016-04-03 02:54:58 +000014114# also in 4.0, but not in editline
14115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14116$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14117if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14118 $as_echo_n "(cached) " >&6
14119else
14120 ac_check_lib_save_LIBS=$LIBS
14121LIBS="-lreadline $READLINE_LIBS $LIBS"
14122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14123/* end confdefs.h. */
14124
14125/* Override any GCC internal prototype to avoid an error.
14126 Use char because int might match the return type of a GCC
14127 builtin and then its argument prototype would still apply. */
14128#ifdef __cplusplus
14129extern "C"
14130#endif
14131char rl_resize_terminal ();
14132int
14133main ()
14134{
14135return rl_resize_terminal ();
14136 ;
14137 return 0;
14138}
14139_ACEOF
14140if ac_fn_c_try_link "$LINENO"; then :
14141 ac_cv_lib_readline_rl_resize_terminal=yes
14142else
14143 ac_cv_lib_readline_rl_resize_terminal=no
14144fi
14145rm -f core conftest.err conftest.$ac_objext \
14146 conftest$ac_exeext conftest.$ac_ext
14147LIBS=$ac_check_lib_save_LIBS
14148fi
14149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14150$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14151if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14152
14153$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14154
14155fi
14156
14157
Martin v. Löwis0daad592001-09-30 21:09:59 +000014158# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14160$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014161if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014162 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014163else
Martin v. Löwis11437992002-04-12 09:54:03 +000014164 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014165LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014168
Martin v. Löwiseba40652007-08-30 20:10:57 +000014169/* Override any GCC internal prototype to avoid an error.
14170 Use char because int might match the return type of a GCC
14171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014172#ifdef __cplusplus
14173extern "C"
14174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014175char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014176int
14177main ()
14178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014179return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014180 ;
14181 return 0;
14182}
14183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014185 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189rm -f core conftest.err conftest.$ac_objext \
14190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014191LIBS=$ac_check_lib_save_LIBS
14192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14194$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014195if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014197$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014198
Guido van Rossum353ae582001-07-10 16:45:32 +000014199fi
14200
Jack Jansendd19cf82001-12-06 22:36:17 +000014201
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014202# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014204/* end confdefs.h. */
14205#include <readline/readline.h>
14206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014207if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014208 have_readline=yes
14209else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014210 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014211
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014212fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014213rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014214if test $have_readline = yes
14215then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014217/* end confdefs.h. */
14218#include <readline/readline.h>
14219
14220_ACEOF
14221if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014222 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014224$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014225
14226fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014227rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014228
14229fi
14230
Martin v. Löwis82bca632006-02-10 20:49:30 +000014231# End of readline checks: restore LIBS
14232LIBS=$LIBS_no_readline
14233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14235$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014236if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014238else
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014241 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014245
14246int main()
14247{
14248 int val1 = nice(1);
14249 if (val1 != -1 && val1 == nice(2))
14250 exit(0);
14251 exit(1);
14252}
14253
Martin v. Löwis11437992002-04-12 09:54:03 +000014254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014255if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014256 ac_cv_broken_nice=yes
14257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014258 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014259fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014260rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14261 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014262fi
14263
Martin v. Löwiseba40652007-08-30 20:10:57 +000014264fi
14265
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14267$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014268if test "$ac_cv_broken_nice" = yes
14269then
Martin v. Löwis11437992002-04-12 09:54:03 +000014270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014272
14273fi
14274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14276$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014277if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014278 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014280 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014281 ac_cv_broken_poll=no
14282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014284/* end confdefs.h. */
14285
14286#include <poll.h>
14287
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014288int main()
14289{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014290 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014291 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014292
14293 close (42);
14294
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014295 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014296 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014297 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014298 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014299 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014300 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014301 return 1;
14302}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014303
14304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014305if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014306 ac_cv_broken_poll=yes
14307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014308 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014309fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014314fi
14315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14317$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014318if test "$ac_cv_broken_poll" = yes
14319then
14320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014322
14323fi
14324
Brett Cannon43802422005-02-10 20:48:03 +000014325# 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 +000014326# (which is not required by ISO C or UNIX spec) and/or if we support
14327# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328ac_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 +000014329#include <$ac_cv_struct_tm>
14330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014331"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014332if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014333
14334cat >>confdefs.h <<_ACEOF
14335#define HAVE_STRUCT_TM_TM_ZONE 1
14336_ACEOF
14337
14338
14339fi
14340
14341if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14342
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014343$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014344
14345else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14347"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014348if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352fi
14353
Martin v. Löwiseba40652007-08-30 20:10:57 +000014354cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014355#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014356_ACEOF
14357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14359$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014360if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014361 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014364/* end confdefs.h. */
14365#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366#if !HAVE_DECL_TZNAME
14367extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014368#endif
14369
14370int
14371main ()
14372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014373return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014374 ;
14375 return 0;
14376}
14377_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014379 ac_cv_var_tzname=yes
14380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014381 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383rm -f core conftest.err conftest.$ac_objext \
14384 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014385fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14387$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014388 if test $ac_cv_var_tzname = yes; then
14389
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014391
14392 fi
14393fi
14394
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014395
Martin v. Löwis1d459062005-03-14 21:23:33 +000014396# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14398$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014399if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014401else
14402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014404 ac_cv_working_tzset=no
14405else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014407/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014408
14409#include <stdlib.h>
14410#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014411#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014412
14413#if HAVE_TZNAME
14414extern char *tzname[];
14415#endif
14416
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014417int main()
14418{
Brett Cannon18367812003-09-19 00:59:16 +000014419 /* Note that we need to ensure that not only does tzset(3)
14420 do 'something' with localtime, but it works as documented
14421 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014422 This includes making sure that tzname is set properly if
14423 tm->tm_zone does not exist since it is the alternative way
14424 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014425
14426 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014427 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014428 */
14429
Martin v. Löwis1d459062005-03-14 21:23:33 +000014430 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014431 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14432
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014433 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014434 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014435 if (localtime(&groundhogday)->tm_hour != 0)
14436 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014437#if HAVE_TZNAME
14438 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14439 if (strcmp(tzname[0], "UTC") ||
14440 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14441 exit(1);
14442#endif
Brett Cannon18367812003-09-19 00:59:16 +000014443
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014444 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014445 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014446 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014447 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014448#if HAVE_TZNAME
14449 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14450 exit(1);
14451#endif
Brett Cannon18367812003-09-19 00:59:16 +000014452
14453 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14454 tzset();
14455 if (localtime(&groundhogday)->tm_hour != 11)
14456 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014457#if HAVE_TZNAME
14458 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14459 exit(1);
14460#endif
14461
14462#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014463 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14464 exit(1);
14465 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14466 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014467#endif
Brett Cannon18367812003-09-19 00:59:16 +000014468
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014469 exit(0);
14470}
14471
14472_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014473if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014474 ac_cv_working_tzset=yes
14475else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014480fi
14481
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482fi
14483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14485$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014486if test "$ac_cv_working_tzset" = yes
14487then
14488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014490
14491fi
14492
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014493# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14495$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014496if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014500/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014501#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014502int
14503main ()
14504{
14505
14506struct stat st;
14507st.st_mtim.tv_nsec = 1;
14508
14509 ;
14510 return 0;
14511}
14512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014514 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14519fi
14520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14522$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014523if test "$ac_cv_stat_tv_nsec" = yes
14524then
14525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014527
14528fi
14529
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014530# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14532$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014533if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014537/* end confdefs.h. */
14538#include <sys/stat.h>
14539int
14540main ()
14541{
14542
14543struct stat st;
14544st.st_mtimespec.tv_nsec = 1;
14545
14546 ;
14547 return 0;
14548}
14549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014551 ac_cv_stat_tv_nsec2=yes
14552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014553 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14556fi
14557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14559$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014560if test "$ac_cv_stat_tv_nsec2" = yes
14561then
14562
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014564
14565fi
14566
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014567# first curses configure check
14568ac_save_cppflags="$CPPFLAGS"
14569CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14570
14571for ac_header in curses.h ncurses.h
14572do :
14573 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14574ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14576 cat >>confdefs.h <<_ACEOF
14577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14578_ACEOF
14579
14580fi
14581
14582done
14583
14584
14585# On Solaris, term.h requires curses.h
14586for ac_header in term.h
14587do :
14588 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14589#ifdef HAVE_CURSES_H
14590#include <curses.h>
14591#endif
14592
14593"
14594if test "x$ac_cv_header_term_h" = xyes; then :
14595 cat >>confdefs.h <<_ACEOF
14596#define HAVE_TERM_H 1
14597_ACEOF
14598
14599fi
14600
14601done
14602
14603
Jack Jansen666b1e72001-10-31 12:11:48 +000014604# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14606$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014607if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014611/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014612#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014613int
14614main ()
14615{
Jack Jansen666b1e72001-10-31 12:11:48 +000014616
14617 int rtn;
14618 rtn = mvwdelch(0,0,0);
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 ;
14621 return 0;
14622}
14623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014624if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014625 ac_cv_mvwdelch_is_expression=yes
14626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014627 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14630fi
14631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14633$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014634
14635if test "$ac_cv_mvwdelch_is_expression" = yes
14636then
Martin v. Löwis11437992002-04-12 09:54:03 +000014637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014639
14640fi
14641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14643$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014644if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014645 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014646else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014648/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014649#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014650int
14651main ()
14652{
Jack Jansen666b1e72001-10-31 12:11:48 +000014653
14654 WINDOW *w;
14655 w->_flags = 0;
14656
Martin v. Löwis11437992002-04-12 09:54:03 +000014657 ;
14658 return 0;
14659}
14660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014661if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014662 ac_cv_window_has_flags=yes
14663else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014664 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14667fi
14668
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14670$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014671
Jack Jansen666b1e72001-10-31 12:11:48 +000014672
14673if test "$ac_cv_window_has_flags" = yes
14674then
Martin v. Löwis11437992002-04-12 09:54:03 +000014675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014676$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014677
14678fi
14679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14681$as_echo_n "checking for is_term_resized... " >&6; }
14682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014683/* end confdefs.h. */
14684#include <curses.h>
14685int
14686main ()
14687{
14688void *x=is_term_resized
14689 ;
14690 return 0;
14691}
14692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014695$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014696
Matthias Klosec511b472010-05-08 11:01:39 +000014697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014698$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14701$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014702
14703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14707$as_echo_n "checking for resize_term... " >&6; }
14708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014709/* end confdefs.h. */
14710#include <curses.h>
14711int
14712main ()
14713{
14714void *x=resize_term
14715 ;
14716 return 0;
14717}
14718_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014721$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014722
Matthias Klosec511b472010-05-08 11:01:39 +000014723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014724$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14727$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014728
14729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14733$as_echo_n "checking for resizeterm... " >&6; }
14734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014735/* end confdefs.h. */
14736#include <curses.h>
14737int
14738main ()
14739{
14740void *x=resizeterm
14741 ;
14742 return 0;
14743}
14744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014747$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014748
Matthias Klosec511b472010-05-08 11:01:39 +000014749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014750$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14753$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014754
14755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014757# last curses configure check
14758CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014759
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14761$as_echo "$as_me: checking for device files" >&6;}
14762
14763if test "x$cross_compiling" = xyes; then
14764 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14766$as_echo_n "checking for /dev/ptmx... " >&6; }
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14768$as_echo "not set" >&6; }
14769 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14770 fi
14771 if test "${ac_cv_file__dev_ptc+set}" != set; then
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14773$as_echo_n "checking for /dev/ptc... " >&6; }
14774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14775$as_echo "not set" >&6; }
14776 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14777 fi
14778fi
14779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14781$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014782if ${ac_cv_file__dev_ptmx+:} false; then :
14783 $as_echo_n "(cached) " >&6
14784else
14785 test "$cross_compiling" = yes &&
14786 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14787if test -r "/dev/ptmx"; then
14788 ac_cv_file__dev_ptmx=yes
14789else
14790 ac_cv_file__dev_ptmx=no
14791fi
14792fi
14793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14794$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14795if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014796
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014797fi
14798
14799if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014800
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014801$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014802
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14805$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014806if ${ac_cv_file__dev_ptc+:} false; then :
14807 $as_echo_n "(cached) " >&6
14808else
14809 test "$cross_compiling" = yes &&
14810 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14811if test -r "/dev/ptc"; then
14812 ac_cv_file__dev_ptc=yes
14813else
14814 ac_cv_file__dev_ptc=no
14815fi
14816fi
14817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14818$as_echo "$ac_cv_file__dev_ptc" >&6; }
14819if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014820
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014821fi
14822
14823if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014825$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014826
Neal Norwitz865400f2003-03-21 01:42:58 +000014827fi
14828
Mark Dickinson82864d12009-11-15 16:18:58 +000014829if test "$have_long_long" = yes
14830then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14832$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014833 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014834 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014836 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014837 ac_cv_have_long_long_format="cross -- assuming no"
14838 if test x$GCC = xyes; then
14839 save_CFLAGS=$CFLAGS
14840 CFLAGS="$CFLAGS -Werror -Wformat"
14841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14842/* end confdefs.h. */
14843
14844 #include <stdio.h>
14845 #include <stddef.h>
14846
14847int
14848main ()
14849{
14850
14851 char *buffer;
14852 sprintf(buffer, "%lld", (long long)123);
14853 sprintf(buffer, "%lld", (long long)-123);
14854 sprintf(buffer, "%llu", (unsigned long long)123);
14855
14856 ;
14857 return 0;
14858}
14859_ACEOF
14860if ac_fn_c_try_compile "$LINENO"; then :
14861 ac_cv_have_long_long_format=yes
14862
14863fi
14864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14865 CFLAGS=$save_CFLAGS
14866 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014867else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014869/* end confdefs.h. */
14870
14871 #include <stdio.h>
14872 #include <stddef.h>
14873 #include <string.h>
14874
14875 #ifdef HAVE_SYS_TYPES_H
14876 #include <sys/types.h>
14877 #endif
14878
14879 int main()
14880 {
14881 char buffer[256];
14882
14883 if (sprintf(buffer, "%lld", (long long)123) < 0)
14884 return 1;
14885 if (strcmp(buffer, "123"))
14886 return 1;
14887
14888 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14889 return 1;
14890 if (strcmp(buffer, "-123"))
14891 return 1;
14892
14893 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14894 return 1;
14895 if (strcmp(buffer, "123"))
14896 return 1;
14897
14898 return 0;
14899 }
14900
14901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014902if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014903 ac_cv_have_long_long_format=yes
14904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014905 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014906fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014909fi
14910
14911
Mark Dickinson82864d12009-11-15 16:18:58 +000014912fi
14913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14915$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014916fi
14917
Mark Dickinson5ce84742009-12-31 20:48:04 +000014918if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014919then
14920
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014921$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014922
14923fi
14924
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014925if test $ac_sys_system = Darwin
14926then
14927 LIBS="$LIBS -framework CoreFoundation"
14928fi
14929
Mark Dickinson82864d12009-11-15 16:18:58 +000014930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14932$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014933if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014936 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014937 ac_cv_have_size_t_format="cross -- assuming yes"
14938
Brett Cannon09d12362006-05-11 05:11:33 +000014939else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014941/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014942
Brett Cannon09d12362006-05-11 05:11:33 +000014943#include <stdio.h>
14944#include <stddef.h>
14945#include <string.h>
14946
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014947#ifdef HAVE_SYS_TYPES_H
14948#include <sys/types.h>
14949#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014950
14951#ifdef HAVE_SSIZE_T
14952typedef ssize_t Py_ssize_t;
14953#elif SIZEOF_VOID_P == SIZEOF_LONG
14954typedef long Py_ssize_t;
14955#else
14956typedef int Py_ssize_t;
14957#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014958
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014959int main()
14960{
14961 char buffer[256];
14962
Brett Cannon09d12362006-05-11 05:11:33 +000014963 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14964 return 1;
14965
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014966 if (strcmp(buffer, "123"))
14967 return 1;
14968
14969 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14970 return 1;
14971
14972 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014973 return 1;
14974
14975 return 0;
14976}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014977
Brett Cannon09d12362006-05-11 05:11:33 +000014978_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014979if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014980 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014982 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014986fi
14987
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14990$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014991if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014993$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014994
14995fi
14996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014998#ifdef HAVE_SYS_TYPES_H
14999#include <sys/types.h>
15000#endif
15001#ifdef HAVE_SYS_SOCKET_H
15002#include <sys/socket.h>
15003#endif
15004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015005"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015006if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015007
Martin v. Löwis11437992002-04-12 09:54:03 +000015008else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015010$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015011
15012fi
15013
Michael W. Hudson54241132001-12-07 15:38:26 +000015014
Benjamin Peterson7497e912010-10-16 00:53:39 +000015015case $ac_sys_system in
15016AIX*)
15017
15018$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15019 ;;
15020esac
15021
15022
Michael W. Hudson54241132001-12-07 15:38:26 +000015023
15024
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015025for h in `(cd $srcdir;echo Python/thread_*.h)`
15026do
15027 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15028done
15029
Michael W. Hudson54241132001-12-07 15:38:26 +000015030
Neal Norwitzd24499d2005-12-18 21:36:39 +000015031SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15033$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015034for dir in $SRCDIRS; do
15035 if test ! -d $dir; then
15036 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015037 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015038done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015039
15040# BEGIN_COMPUTED_GOTO
15041# Check for --with-computed-gotos
15042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15043$as_echo_n "checking for --with-computed-gotos... " >&6; }
15044
15045# Check whether --with-computed-gotos was given.
15046if test "${with_computed_gotos+set}" = set; then :
15047 withval=$with_computed_gotos;
15048if test "$withval" = yes
15049then
15050
15051$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15052
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15054$as_echo "yes" >&6; }
15055fi
15056if test "$withval" = no
15057then
15058
15059$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15060
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15062$as_echo "no" >&6; }
15063fi
15064
15065else
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15067$as_echo "no value specified" >&6; }
15068fi
15069
15070
15071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15072$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15073if ${ac_cv_computed_gotos+:} false; then :
15074 $as_echo_n "(cached) " >&6
15075else
15076 if test "$cross_compiling" = yes; then :
15077 if test "${with_computed_gotos+set}" = set; then
15078 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15079 else
15080 ac_cv_computed_gotos=no
15081 fi
15082else
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084/* end confdefs.h. */
15085
15086int main(int argc, char **argv)
15087{
15088 static void *targets[1] = { &&LABEL1 };
15089 goto LABEL2;
15090LABEL1:
15091 return 0;
15092LABEL2:
15093 goto *targets[0];
15094 return 1;
15095}
15096
15097_ACEOF
15098if ac_fn_c_try_run "$LINENO"; then :
15099 ac_cv_computed_gotos=yes
15100else
15101 ac_cv_computed_gotos=no
15102fi
15103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15104 conftest.$ac_objext conftest.beam conftest.$ac_ext
15105fi
15106
15107fi
15108
15109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15110$as_echo "$ac_cv_computed_gotos" >&6; }
15111case "$ac_cv_computed_gotos" in yes*)
15112
15113$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15114
15115esac
15116# END_COMPUTED_GOTO
15117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15119$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015120
Ned Deily3f1d0b32014-11-20 02:11:03 -080015121# ensurepip option
15122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15123$as_echo_n "checking for ensurepip... " >&6; }
15124
15125# Check whether --with-ensurepip was given.
15126if test "${with_ensurepip+set}" = set; then :
15127 withval=$with_ensurepip;
15128else
15129 with_ensurepip=no
15130fi
15131
15132case $with_ensurepip in #(
15133 yes|upgrade) :
15134 ENSUREPIP=upgrade ;; #(
15135 install) :
15136 ENSUREPIP=install ;; #(
15137 no) :
15138 ENSUREPIP=no ;; #(
15139 *) :
15140 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15141esac
15142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15143$as_echo "$ENSUREPIP" >&6; }
15144
15145
Guido van Rossum627b2d71993-12-24 10:39:16 +000015146# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015147ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015148
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015149ac_config_files="$ac_config_files Modules/ld_so_aix"
15150
Martin v. Löwis11437992002-04-12 09:54:03 +000015151cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152# This file is a shell script that caches the results of configure
15153# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015154# scripts and configure runs, see configure's option --config-cache.
15155# It is not useful on other systems. If it contains results you don't
15156# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015157#
Martin v. Löwis11437992002-04-12 09:54:03 +000015158# config.status only pays attention to the cache file if you give it
15159# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015160#
Skip Montanaro6dead952003-09-25 14:50:04 +000015161# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015162# loading this file, other *unset* `ac_cv_foo' will be assigned the
15163# following values.
15164
15165_ACEOF
15166
Guido van Rossumf78abae1997-01-21 22:02:36 +000015167# The following way of writing the cache mishandles newlines in values,
15168# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015170# Ultrix sh set writes to stderr and can't be redirected directly,
15171# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172(
15173 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15174 eval ac_val=\$$ac_var
15175 case $ac_val in #(
15176 *${as_nl}*)
15177 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015178 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15179$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180 esac
15181 case $ac_var in #(
15182 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015183 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15184 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185 esac ;;
15186 esac
15187 done
15188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15191 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015192 # `set' does not quote correctly, so add quotes: double-quote
15193 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015194 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195 "s/'/'\\\\''/g;
15196 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 *)
15199 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202 esac |
15203 sort
15204) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015205 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015208 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015209 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15210 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15212 :end' >>confcache
15213if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15214 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015215 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015216 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15217$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015218 if test ! -f "$cache_file" || test -h "$cache_file"; then
15219 cat confcache >"$cache_file"
15220 else
15221 case $cache_file in #(
15222 */* | ?:*)
15223 mv -f confcache "$cache_file"$$ &&
15224 mv -f "$cache_file"$$ "$cache_file" ;; #(
15225 *)
15226 mv -f confcache "$cache_file" ;;
15227 esac
15228 fi
15229 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015230 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15232$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015233 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015234fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015235rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015237test "x$prefix" = xNONE && prefix=$ac_default_prefix
15238# Let make expand exec_prefix.
15239test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015240
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015241DEFS=-DHAVE_CONFIG_H
15242
Skip Montanaro6dead952003-09-25 14:50:04 +000015243ac_libobjs=
15244ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015245U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015246for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15247 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015249 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15251 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015252 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15253 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015254done
15255LIBOBJS=$ac_libobjs
15256
15257LTLIBOBJS=$ac_ltlibobjs
15258
15259
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015261
Matthias Klose3cef2a92012-03-14 23:39:33 +010015262: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015263ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015264ac_clean_files_save=$ac_clean_files
15265ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015266{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15267$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15268as_write_fail=0
15269cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015270#! $SHELL
15271# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015272# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015273# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015274# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015275
Martin v. Löwis11437992002-04-12 09:54:03 +000015276debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015277ac_cs_recheck=false
15278ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015280SHELL=\${CONFIG_SHELL-$SHELL}
15281export SHELL
15282_ASEOF
15283cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15284## -------------------- ##
15285## M4sh Initialization. ##
15286## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015287
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288# Be more Bourne compatible
15289DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015290if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 emulate sh
15292 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015294 # is contrary to our usage. Disable this feature.
15295 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015298 case `(set -o) 2>/dev/null` in #(
15299 *posix*) :
15300 set -o posix ;; #(
15301 *) :
15302 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015304fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015305
Skip Montanaro6dead952003-09-25 14:50:04 +000015306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015307as_nl='
15308'
15309export as_nl
15310# Printing a long string crashes Solaris 7 /usr/bin/printf.
15311as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15312as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15313as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15314# Prefer a ksh shell builtin over an external printf program on Solaris,
15315# but without wasting forks for bash or zsh.
15316if test -z "$BASH_VERSION$ZSH_VERSION" \
15317 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15318 as_echo='print -r --'
15319 as_echo_n='print -rn --'
15320elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15321 as_echo='printf %s\n'
15322 as_echo_n='printf %s'
15323else
15324 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15325 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15326 as_echo_n='/usr/ucb/echo -n'
15327 else
15328 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15329 as_echo_n_body='eval
15330 arg=$1;
15331 case $arg in #(
15332 *"$as_nl"*)
15333 expr "X$arg" : "X\\(.*\\)$as_nl";
15334 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15335 esac;
15336 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15337 '
15338 export as_echo_n_body
15339 as_echo_n='sh -c $as_echo_n_body as_echo'
15340 fi
15341 export as_echo_body
15342 as_echo='sh -c $as_echo_body as_echo'
15343fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015344
15345# The user is always right.
15346if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015347 PATH_SEPARATOR=:
15348 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15349 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15350 PATH_SEPARATOR=';'
15351 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015352fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015353
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354
15355# IFS
15356# We need space, tab and new line, in precisely that order. Quoting is
15357# there to prevent editors from complaining about space-tab.
15358# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15359# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360IFS=" "" $as_nl"
15361
15362# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015363as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015364case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365 *[\\/]* ) as_myself=$0 ;;
15366 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015367for as_dir in $PATH
15368do
15369 IFS=$as_save_IFS
15370 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015371 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15372 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015374
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375 ;;
15376esac
15377# We did not find ourselves, most probably we were run as `sh COMMAND'
15378# in which case we are not to be found in the path.
15379if test "x$as_myself" = x; then
15380 as_myself=$0
15381fi
15382if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015383 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15384 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385fi
15386
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015387# Unset variables that we do not need and which cause bugs (e.g. in
15388# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15389# suppresses any "Segmentation fault" message there. '((' could
15390# trigger a bug in pdksh 5.2.14.
15391for as_var in BASH_ENV ENV MAIL MAILPATH
15392do eval test x\${$as_var+set} = xset \
15393 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015394done
15395PS1='$ '
15396PS2='> '
15397PS4='+ '
15398
15399# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400LC_ALL=C
15401export LC_ALL
15402LANGUAGE=C
15403export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015405# CDPATH.
15406(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15407
15408
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015409# as_fn_error STATUS ERROR [LINENO LOG_FD]
15410# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015411# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15412# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015413# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015414as_fn_error ()
15415{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015416 as_status=$1; test $as_status -eq 0 && as_status=1
15417 if test "$4"; then
15418 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15419 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015420 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015421 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015422 as_fn_exit $as_status
15423} # as_fn_error
15424
15425
15426# as_fn_set_status STATUS
15427# -----------------------
15428# Set $? to STATUS, without forking.
15429as_fn_set_status ()
15430{
15431 return $1
15432} # as_fn_set_status
15433
15434# as_fn_exit STATUS
15435# -----------------
15436# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15437as_fn_exit ()
15438{
15439 set +e
15440 as_fn_set_status $1
15441 exit $1
15442} # as_fn_exit
15443
15444# as_fn_unset VAR
15445# ---------------
15446# Portably unset VAR.
15447as_fn_unset ()
15448{
15449 { eval $1=; unset $1;}
15450}
15451as_unset=as_fn_unset
15452# as_fn_append VAR VALUE
15453# ----------------------
15454# Append the text in VALUE to the end of the definition contained in VAR. Take
15455# advantage of any shell optimizations that allow amortized linear growth over
15456# repeated appends, instead of the typical quadratic growth present in naive
15457# implementations.
15458if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15459 eval 'as_fn_append ()
15460 {
15461 eval $1+=\$2
15462 }'
15463else
15464 as_fn_append ()
15465 {
15466 eval $1=\$$1\$2
15467 }
15468fi # as_fn_append
15469
15470# as_fn_arith ARG...
15471# ------------------
15472# Perform arithmetic evaluation on the ARGs, and store the result in the
15473# global $as_val. Take advantage of shells that can avoid forks. The arguments
15474# must be portable across $(()) and expr.
15475if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15476 eval 'as_fn_arith ()
15477 {
15478 as_val=$(( $* ))
15479 }'
15480else
15481 as_fn_arith ()
15482 {
15483 as_val=`expr "$@" || test $? -eq 1`
15484 }
15485fi # as_fn_arith
15486
15487
Martin v. Löwiseba40652007-08-30 20:10:57 +000015488if expr a : '\(a\)' >/dev/null 2>&1 &&
15489 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15490 as_expr=expr
15491else
15492 as_expr=false
15493fi
15494
15495if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15496 as_basename=basename
15497else
15498 as_basename=false
15499fi
15500
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015501if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15502 as_dirname=dirname
15503else
15504 as_dirname=false
15505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507as_me=`$as_basename -- "$0" ||
15508$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15509 X"$0" : 'X\(//\)$' \| \
15510 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015511$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512 sed '/^.*\/\([^/][^/]*\)\/*$/{
15513 s//\1/
15514 q
15515 }
15516 /^X\/\(\/\/\)$/{
15517 s//\1/
15518 q
15519 }
15520 /^X\/\(\/\).*/{
15521 s//\1/
15522 q
15523 }
15524 s/.*/./; q'`
15525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015526# Avoid depending upon Character Ranges.
15527as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15528as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15529as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15530as_cr_digits='0123456789'
15531as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532
15533ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015534case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015536 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015538 xy) ECHO_C='\c';;
15539 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15540 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541 esac;;
15542*)
15543 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015544esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015545
Martin v. Löwis11437992002-04-12 09:54:03 +000015546rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547if test -d conf$$.dir; then
15548 rm -f conf$$.dir/conf$$.file
15549else
15550 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015551 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015552fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015553if (echo >conf$$.file) 2>/dev/null; then
15554 if ln -s conf$$.file conf$$ 2>/dev/null; then
15555 as_ln_s='ln -s'
15556 # ... but there are two gotchas:
15557 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15558 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015559 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015560 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015561 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015562 elif ln conf$$.file conf$$ 2>/dev/null; then
15563 as_ln_s=ln
15564 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015565 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015567else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015568 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15571rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573
15574# as_fn_mkdir_p
15575# -------------
15576# Create "$as_dir" as a directory, including parents if necessary.
15577as_fn_mkdir_p ()
15578{
15579
15580 case $as_dir in #(
15581 -*) as_dir=./$as_dir;;
15582 esac
15583 test -d "$as_dir" || eval $as_mkdir_p || {
15584 as_dirs=
15585 while :; do
15586 case $as_dir in #(
15587 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15588 *) as_qdir=$as_dir;;
15589 esac
15590 as_dirs="'$as_qdir' $as_dirs"
15591 as_dir=`$as_dirname -- "$as_dir" ||
15592$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15593 X"$as_dir" : 'X\(//\)[^/]' \| \
15594 X"$as_dir" : 'X\(//\)$' \| \
15595 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15596$as_echo X"$as_dir" |
15597 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15598 s//\1/
15599 q
15600 }
15601 /^X\(\/\/\)[^/].*/{
15602 s//\1/
15603 q
15604 }
15605 /^X\(\/\/\)$/{
15606 s//\1/
15607 q
15608 }
15609 /^X\(\/\).*/{
15610 s//\1/
15611 q
15612 }
15613 s/.*/./; q'`
15614 test -d "$as_dir" && break
15615 done
15616 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015617 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015618
15619
15620} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015621if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015622 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015623else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015624 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015625 as_mkdir_p=false
15626fi
15627
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015628
15629# as_fn_executable_p FILE
15630# -----------------------
15631# Test if FILE is an executable regular file.
15632as_fn_executable_p ()
15633{
15634 test -f "$1" && test -x "$1"
15635} # as_fn_executable_p
15636as_test_x='test -x'
15637as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015638
15639# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015640as_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 +000015641
15642# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015643as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
15645
Martin v. Löwis11437992002-04-12 09:54:03 +000015646exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015647## ----------------------------------- ##
15648## Main body of $CONFIG_STATUS script. ##
15649## ----------------------------------- ##
15650_ASEOF
15651test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015653cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15654# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015655# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656# values after options handling.
15657ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015658This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015659generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661 CONFIG_FILES = $CONFIG_FILES
15662 CONFIG_HEADERS = $CONFIG_HEADERS
15663 CONFIG_LINKS = $CONFIG_LINKS
15664 CONFIG_COMMANDS = $CONFIG_COMMANDS
15665 $ $0 $@
15666
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667on `(hostname || uname -n) 2>/dev/null | sed 1q`
15668"
15669
Martin v. Löwis11437992002-04-12 09:54:03 +000015670_ACEOF
15671
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015672case $ac_config_files in *"
15673"*) set x $ac_config_files; shift; ac_config_files=$*;;
15674esac
15675
15676case $ac_config_headers in *"
15677"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15678esac
15679
15680
15681cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015682# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015683config_files="$ac_config_files"
15684config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015688cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015689ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015690\`$as_me' instantiates files and other configuration actions
15691from templates according to the current configuration. Unless the files
15692and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015694Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015695
15696 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015697 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015698 --config print configuration, then exit
15699 -q, --quiet, --silent
15700 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 -d, --debug don't remove temporary files
15702 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015703 --file=FILE[:TEMPLATE]
15704 instantiate the configuration file FILE
15705 --header=FILE[:TEMPLATE]
15706 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015707
15708Configuration files:
15709$config_files
15710
15711Configuration headers:
15712$config_headers
15713
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015714Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015715
Martin v. Löwiseba40652007-08-30 20:10:57 +000015716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015717cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15718ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015719ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015720python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015721configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015722 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015723
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015724Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015725This config.status script is free software; the Free Software Foundation
15726gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015727
15728ac_pwd='$ac_pwd'
15729srcdir='$srcdir'
15730INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015731MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015732test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015733_ACEOF
15734
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15736# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015737ac_need_defaults=:
15738while test $# != 0
15739do
15740 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015741 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15743 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015744 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015746 --*=)
15747 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15748 ac_optarg=
15749 ac_shift=:
15750 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 ac_option=$1
15753 ac_optarg=$2
15754 ac_shift=shift
15755 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015756 esac
15757
Skip Montanaro6dead952003-09-25 14:50:04 +000015758 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015760 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15761 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015763 $as_echo "$ac_cs_version"; exit ;;
15764 --config | --confi | --conf | --con | --co | --c )
15765 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 debug=: ;;
15768 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015769 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015770 case $ac_optarg in
15771 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015772 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015773 esac
15774 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 ac_need_defaults=false;;
15776 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015777 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778 case $ac_optarg in
15779 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15780 esac
15781 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015783 --he | --h)
15784 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015785 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015788 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015789 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15790 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15791 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015792
15793 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015794 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015795Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015797 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015798 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015799
15800 esac
15801 shift
15802done
15803
Skip Montanaro6dead952003-09-25 14:50:04 +000015804ac_configure_extra_args=
15805
15806if $ac_cs_silent; then
15807 exec 6>/dev/null
15808 ac_configure_extra_args="$ac_configure_extra_args --silent"
15809fi
15810
15811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015813if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015814 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015815 shift
15816 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15817 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015819 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015820fi
15821
Martin v. Löwis11437992002-04-12 09:54:03 +000015822_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015823cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824exec 5>>config.log
15825{
15826 echo
15827 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15828## Running $as_me. ##
15829_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015832
Martin v. Löwiseba40652007-08-30 20:10:57 +000015833_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015835_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015838
15839# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015840for ac_config_target in $ac_config_targets
15841do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842 case $ac_config_target in
15843 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15844 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15845 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15846 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015847 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15848 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015849 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15850 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015851 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015852 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853
Matthias Klose3cef2a92012-03-14 23:39:33 +010015854 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015855 esac
15856done
15857
Martin v. Löwiseba40652007-08-30 20:10:57 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859# If the user did not use the arguments to specify the items to instantiate,
15860# then the envvar interface is used. Set only those that are not.
15861# We use the long form for the default assignment because of an extremely
15862# bizarre bug on SunOS 4.1.3.
15863if $ac_need_defaults; then
15864 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15865 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15866fi
15867
Skip Montanaro6dead952003-09-25 14:50:04 +000015868# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015870# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871# Hook for its removal unless debugging.
15872# Note that there is a small window in which the directory will not be cleaned:
15873# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015874$debug ||
15875{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015876 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015877 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015878 : "${ac_tmp:=$tmp}"
15879 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015880' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015881 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015882}
Martin v. Löwis11437992002-04-12 09:54:03 +000015883# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015884
Martin v. Löwis11437992002-04-12 09:54:03 +000015885{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015886 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015887 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015888} ||
15889{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015890 tmp=./conf$$-$RANDOM
15891 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015892} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015893ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015895# Set up the scripts for CONFIG_FILES section.
15896# No need to generate them if there are no CONFIG_FILES.
15897# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015900
15901ac_cr=`echo X | tr X '\015'`
15902# On cygwin, bash can eat \r inside `` if the user requested igncr.
15903# But we know of no other shell where ac_cr would be empty at this
15904# point, so we can use a bashism as a fallback.
15905if test "x$ac_cr" = x; then
15906 eval ac_cr=\$\'\\r\'
15907fi
15908ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15909if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015910 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015911else
15912 ac_cs_awk_cr=$ac_cr
15913fi
15914
Matthias Klose3cef2a92012-03-14 23:39:33 +010015915echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015916_ACEOF
15917
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015919{
15920 echo "cat >conf$$subs.awk <<_ACEOF" &&
15921 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15922 echo "_ACEOF"
15923} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015924 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15925ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015926ac_delim='%!_!# '
15927for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015928 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015929 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015931 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15932 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015933 break
15934 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015935 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015936 else
15937 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015940rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015943cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015945sed -n '
15946h
15947s/^/S["/; s/!.*/"]=/
15948p
15949g
15950s/^[^!]*!//
15951:repl
15952t repl
15953s/'"$ac_delim"'$//
15954t delim
15955:nl
15956h
15957s/\(.\{148\}\)..*/\1/
15958t more1
15959s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15960p
15961n
15962b repl
15963:more1
15964s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15965p
15966g
15967s/.\{148\}//
15968t nl
15969:delim
15970h
15971s/\(.\{148\}\)..*/\1/
15972t more2
15973s/["\\]/\\&/g; s/^/"/; s/$/"/
15974p
15975b
15976:more2
15977s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15978p
15979g
15980s/.\{148\}//
15981t delim
15982' <conf$$subs.awk | sed '
15983/^[^""]/{
15984 N
15985 s/\n//
15986}
15987' >>$CONFIG_STATUS || ac_write_fail=1
15988rm -f conf$$subs.awk
15989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15990_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015991cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015992 for (key in S) S_is_set[key] = 1
15993 FS = ""
15994
15995}
15996{
15997 line = $ 0
15998 nfields = split(line, field, "@")
15999 substed = 0
16000 len = length(field[1])
16001 for (i = 2; i < nfields; i++) {
16002 key = field[i]
16003 keylen = length(key)
16004 if (S_is_set[key]) {
16005 value = S[key]
16006 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16007 len += length(value) + length(field[++i])
16008 substed = 1
16009 } else
16010 len += 1 + keylen
16011 }
16012
16013 print line
16014}
16015
16016_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16019if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16020 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16021else
16022 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016023fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016024 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016025_ACEOF
16026
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016027# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16028# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029# trailing colons and then remove the whole line if VPATH becomes empty
16030# (actually we leave an empty line to preserve line numbers).
16031if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016032 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16033h
16034s///
16035s/^/:/
16036s/[ ]*$/:/
16037s/:\$(srcdir):/:/g
16038s/:\${srcdir}:/:/g
16039s/:@srcdir@:/:/g
16040s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016042x
16043s/\(=[ ]*\).*/\1/
16044G
16045s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046s/^[^=]*=[ ]*$//
16047}'
16048fi
16049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016050cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016051fi # test -n "$CONFIG_FILES"
16052
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016053# Set up the scripts for CONFIG_HEADERS section.
16054# No need to generate them if there are no CONFIG_HEADERS.
16055# This happens for instance with `./config.status Makefile'.
16056if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016057cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016058BEGIN {
16059_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016061# Transform confdefs.h into an awk script `defines.awk', embedded as
16062# here-document in config.status, that substitutes the proper values into
16063# config.h.in to produce config.h.
16064
16065# Create a delimiter string that does not exist in confdefs.h, to ease
16066# handling of long lines.
16067ac_delim='%!_!# '
16068for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016069 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16070 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016071 break
16072 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016073 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016074 else
16075 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16076 fi
16077done
16078
16079# For the awk script, D is an array of macro values keyed by name,
16080# likewise P contains macro parameters if any. Preserve backslash
16081# newline sequences.
16082
16083ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16084sed -n '
16085s/.\{148\}/&'"$ac_delim"'/g
16086t rset
16087:rset
16088s/^[ ]*#[ ]*define[ ][ ]*/ /
16089t def
16090d
16091:def
16092s/\\$//
16093t bsnl
16094s/["\\]/\\&/g
16095s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16096D["\1"]=" \3"/p
16097s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16098d
16099:bsnl
16100s/["\\]/\\&/g
16101s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16102D["\1"]=" \3\\\\\\n"\\/p
16103t cont
16104s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16105t cont
16106d
16107:cont
16108n
16109s/.\{148\}/&'"$ac_delim"'/g
16110t clear
16111:clear
16112s/\\$//
16113t bsnlc
16114s/["\\]/\\&/g; s/^/"/; s/$/"/p
16115d
16116:bsnlc
16117s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16118b cont
16119' <confdefs.h | sed '
16120s/'"$ac_delim"'/"\\\
16121"/g' >>$CONFIG_STATUS || ac_write_fail=1
16122
16123cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16124 for (key in D) D_is_set[key] = 1
16125 FS = ""
16126}
16127/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16128 line = \$ 0
16129 split(line, arg, " ")
16130 if (arg[1] == "#") {
16131 defundef = arg[2]
16132 mac1 = arg[3]
16133 } else {
16134 defundef = substr(arg[1], 2)
16135 mac1 = arg[2]
16136 }
16137 split(mac1, mac2, "(") #)
16138 macro = mac2[1]
16139 prefix = substr(line, 1, index(line, defundef) - 1)
16140 if (D_is_set[macro]) {
16141 # Preserve the white space surrounding the "#".
16142 print prefix "define", macro P[macro] D[macro]
16143 next
16144 } else {
16145 # Replace #undef with comments. This is necessary, for example,
16146 # in the case of _POSIX_SOURCE, which is predefined and required
16147 # on some systems where configure will not decide to define it.
16148 if (defundef == "undef") {
16149 print "/*", prefix defundef, macro, "*/"
16150 next
16151 }
16152 }
16153}
16154{ print }
16155_ACAWK
16156_ACEOF
16157cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016158 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016159fi # test -n "$CONFIG_HEADERS"
16160
16161
16162eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16163shift
16164for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165do
16166 case $ac_tag in
16167 :[FHLC]) ac_mode=$ac_tag; continue;;
16168 esac
16169 case $ac_mode$ac_tag in
16170 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016171 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172 :[FH]-) ac_tag=-:-;;
16173 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16174 esac
16175 ac_save_IFS=$IFS
16176 IFS=:
16177 set x $ac_tag
16178 IFS=$ac_save_IFS
16179 shift
16180 ac_file=$1
16181 shift
16182
16183 case $ac_mode in
16184 :L) ac_source=$1;;
16185 :[FH])
16186 ac_file_inputs=
16187 for ac_f
16188 do
16189 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016190 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016191 *) # Look for the file first in the build tree, then in the source tree
16192 # (if the path is not absolute). The absolute path cannot be DOS-style,
16193 # because $ac_f cannot contain `:'.
16194 test -f "$ac_f" ||
16195 case $ac_f in
16196 [\\/$]*) false;;
16197 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16198 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016199 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016200 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016201 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16202 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016203 done
16204
16205 # Let's still pretend it is `configure' which instantiates (i.e., don't
16206 # use $as_me), people would be surprised to read:
16207 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016208 configure_input='Generated from '`
16209 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16210 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016211 if test x"$ac_file" != x-; then
16212 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016213 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16214$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016216 # Neutralize special characters interpreted by sed in replacement strings.
16217 case $configure_input in #(
16218 *\&* | *\|* | *\\* )
16219 ac_sed_conf_input=`$as_echo "$configure_input" |
16220 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16221 *) ac_sed_conf_input=$configure_input;;
16222 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223
16224 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016225 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16226 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016227 esac
16228 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016229 esac
16230
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016232$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016233 X"$ac_file" : 'X\(//\)[^/]' \| \
16234 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016236$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16238 s//\1/
16239 q
16240 }
16241 /^X\(\/\/\)[^/].*/{
16242 s//\1/
16243 q
16244 }
16245 /^X\(\/\/\)$/{
16246 s//\1/
16247 q
16248 }
16249 /^X\(\/\).*/{
16250 s//\1/
16251 q
16252 }
16253 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016254 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 ac_builddir=.
16256
Martin v. Löwiseba40652007-08-30 20:10:57 +000016257case "$ac_dir" in
16258.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16259*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016260 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016262 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263 case $ac_top_builddir_sub in
16264 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16265 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16266 esac ;;
16267esac
16268ac_abs_top_builddir=$ac_pwd
16269ac_abs_builddir=$ac_pwd$ac_dir_suffix
16270# for backward compatibility:
16271ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016272
16273case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016274 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276 ac_top_srcdir=$ac_top_builddir_sub
16277 ac_abs_top_srcdir=$ac_pwd ;;
16278 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016280 ac_top_srcdir=$srcdir
16281 ac_abs_top_srcdir=$srcdir ;;
16282 *) # Relative name.
16283 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16284 ac_top_srcdir=$ac_top_build_prefix$srcdir
16285 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016286esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016288
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
Martin v. Löwiseba40652007-08-30 20:10:57 +000016290 case $ac_mode in
16291 :F)
16292 #
16293 # CONFIG_FILE
16294 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016295
16296 case $INSTALL in
16297 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016298 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016299 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016300 ac_MKDIR_P=$MKDIR_P
16301 case $MKDIR_P in
16302 [\\/$]* | ?:[\\/]* ) ;;
16303 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16304 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016305_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016307cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308# If the template does not know about datarootdir, expand it.
16309# FIXME: This hack should be removed a few years after 2.60.
16310ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016311ac_sed_dataroot='
16312/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016313 p
16314 q
16315}
16316/@datadir@/p
16317/@docdir@/p
16318/@infodir@/p
16319/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016320/@mandir@/p'
16321case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016322*datarootdir*) ac_datarootdir_seen=yes;;
16323*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016324 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16325$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016327cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016328 ac_datarootdir_hack='
16329 s&@datadir@&$datadir&g
16330 s&@docdir@&$docdir&g
16331 s&@infodir@&$infodir&g
16332 s&@localedir@&$localedir&g
16333 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016334 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016335esac
16336_ACEOF
16337
16338# Neutralize VPATH when `$srcdir' = `.'.
16339# Shell code in configure.ac might set extrasub.
16340# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16342ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016343$extrasub
16344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016345cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016346:t
16347/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016348s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016349s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016350s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351s&@srcdir@&$ac_srcdir&;t t
16352s&@abs_srcdir@&$ac_abs_srcdir&;t t
16353s&@top_srcdir@&$ac_top_srcdir&;t t
16354s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16355s&@builddir@&$ac_builddir&;t t
16356s&@abs_builddir@&$ac_abs_builddir&;t t
16357s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16358s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016359s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016360$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016361"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016362eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16363 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016364
Martin v. Löwiseba40652007-08-30 20:10:57 +000016365test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016366 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16367 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16368 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016369 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016370which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016371$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016372which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016373
Matthias Klose3cef2a92012-03-14 23:39:33 +010016374 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016375 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016376 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16377 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016378 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016379 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016380 ;;
16381 :H)
16382 #
16383 # CONFIG_HEADER
16384 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016386 {
16387 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016388 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16389 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016390 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016391 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016392 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16393$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016395 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016396 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016397 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 fi
16399 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016400 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016401 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016402 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016403 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016405
Martin v. Löwiseba40652007-08-30 20:10:57 +000016406
16407 esac
16408
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016409
16410 case $ac_file$ac_mode in
16411 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16412
16413 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414done # for ac_tag
16415
Guido van Rossum627b2d71993-12-24 10:39:16 +000016416
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016417as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016418_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016419ac_clean_files=$ac_clean_files_save
16420
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016421test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016422 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016423
Martin v. Löwis11437992002-04-12 09:54:03 +000016424
16425# configure is writing to config.log, and then calls config.status.
16426# config.status does its own redirection, appending to config.log.
16427# Unfortunately, on DOS this fails, as config.log is still kept open
16428# by configure, so config.status won't be able to write to it; its
16429# output is simply discarded. So we exec the FD to /dev/null,
16430# effectively closing config.log, so it can be properly (re)opened and
16431# appended to by config.status. When coming back to configure, we
16432# need to make the FD available again.
16433if test "$no_create" != yes; then
16434 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016435 ac_config_status_args=
16436 test "$silent" = yes &&
16437 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016439 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 exec 5>>config.log
16441 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16442 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016443 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016444fi
16445if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16446 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16447$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016448fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016449
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016450
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016451echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016452if test ! -f Modules/Setup
16453then
16454 cp $srcdir/Modules/Setup.dist Modules/Setup
16455fi
16456
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016457echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016458if test ! -f Modules/Setup.local
16459then
16460 echo "# Edit this file for local setup changes" >Modules/Setup.local
16461fi
16462
16463echo "creating Makefile"
16464$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16465 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016466 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016467
16468case $ac_sys_system in
16469BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016470 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016471
16472 Support for BeOS is deprecated as of Python 2.6.
16473 See PEP 11 for the gory details.
16474 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016475$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016476
16477 Support for BeOS is deprecated as of Python 2.6.
16478 See PEP 11 for the gory details.
16479 " >&2;}
16480 ;;
16481*) ;;
16482esac
16483
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016484mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016485
16486if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16487 echo "" >&6
16488 echo "" >&6
16489 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +000016490 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016491 echo "" >&6
16492 echo "" >&6
16493fi