blob: 4c0435e98d249f81d083c814d71c0baabec44010 [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
Victor Stinner2c7085f2017-05-02 16:55:50 +0200686HAS_GIT
687GITBRANCH
688GITTAG
689GITVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100691ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000692AR
693RANLIB
694GNULD
695LINKCC
696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
699BLDLIBRARY
700DLLLIBRARY
701LDLIBRARY
702LIBRARY
703BUILDEXEEXT
704EGREP
705GREP
706CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100707MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100708ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000709MAINCC
710CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718EXPORT_MACOSX_DEPLOYMENT_TARGET
719CONFIGURE_MACOSX_DEPLOYMENT_TARGET
720EXTRAMACHDEPPATH
721EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200722PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000723SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100724_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000725MACHDEP
726FRAMEWORKINSTALLAPPSPREFIX
727FRAMEWORKUNIXTOOLSPREFIX
728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100743PYTHON_FOR_BUILD
Victor Stinner8a19eb22017-05-05 03:14:23 +0200744PYTHON_FOR_REGEN
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100745host_os
746host_vendor
747host_cpu
748host
749build_os
750build_vendor
751build_cpu
752build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000753target_alias
754host_alias
755build_alias
756LIBS
757ECHO_T
758ECHO_N
759ECHO_C
760DEFS
761mandir
762localedir
763libdir
764psdir
765pdfdir
766dvidir
767htmldir
768infodir
769docdir
770oldincludedir
771includedir
772localstatedir
773sharedstatedir
774sysconfdir
775datadir
776datarootdir
777libexecdir
778sbindir
779bindir
780program_transform_name
781prefix
782exec_prefix
783PACKAGE_URL
784PACKAGE_BUGREPORT
785PACKAGE_STRING
786PACKAGE_VERSION
787PACKAGE_TARNAME
788PACKAGE_NAME
789PATH_SEPARATOR
790SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000791ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000792ac_user_opts='
793enable_option_checking
794enable_universalsdk
795with_universal_archs
796with_framework_name
797enable_framework
798with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600799with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000800with_cxx_main
801with_suffix
802enable_shared
803enable_profiling
804with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +0000805enable_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000806with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000807enable_toolbox_glue
808with_libs
809with_system_expat
810with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700811with_tcltk_includes
812with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000813with_dbmliborder
814with_signal_module
815with_dec_threads
816with_threads
817with_thread
818with_pth
819enable_ipv6
820with_doc_strings
821with_tsc
822with_pymalloc
823with_valgrind
824with_wctype_functions
825with_fpectl
826with_libm
827with_libc
828enable_big_digits
829enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500830with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800831with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000832'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000833 ac_precious_vars='build_alias
834host_alias
835target_alias
836CC
837CFLAGS
838LDFLAGS
839LIBS
840CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500841CPP
842PKG_CONFIG
843PKG_CONFIG_PATH
844PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000848ac_init_help=
849ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000850ac_unrecognized_opts=
851ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# The variables have the same names as the options, with
853# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857no_recursion=
858prefix=NONE
859program_prefix=NONE
860program_suffix=NONE
861program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866x_includes=NONE
867x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000868
869# Installation directory options.
870# These are left unexpanded so users can "make install exec_prefix=/foo"
871# and all the variables that are supposed to be based on exec_prefix
872# by default will actually change.
873# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875bindir='${exec_prefix}/bin'
876sbindir='${exec_prefix}/sbin'
877libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000878datarootdir='${prefix}/share'
879datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880sysconfdir='${prefix}/etc'
881sharedstatedir='${prefix}/com'
882localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883includedir='${prefix}/include'
884oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000885docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
886infodir='${datarootdir}/info'
887htmldir='${docdir}'
888dvidir='${docdir}'
889pdfdir='${docdir}'
890psdir='${docdir}'
891libdir='${exec_prefix}/lib'
892localedir='${datarootdir}/locale'
893mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000898do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 # If the previous option needs an argument, assign it.
900 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 ac_prev=
903 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000907 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
908 *=) ac_optarg= ;;
909 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000910 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000912 # Accept the important Cygnus configure options, so we can diagnose typos.
913
Martin v. Löwiseba40652007-08-30 20:10:57 +0000914 case $ac_dashdash$ac_option in
915 --)
916 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918 -bindir | --bindir | --bindi | --bind | --bin | --bi)
919 ac_prev=bindir ;;
920 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 -cache-file | --cache-file | --cache-fil | --cache-fi \
929 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
930 ac_prev=cache_file ;;
931 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
932 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 cache_file=$ac_optarg ;;
934
935 --config-cache | -C)
936 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000937
Martin v. Löwiseba40652007-08-30 20:10:57 +0000938 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
Martin v. Löwiseba40652007-08-30 20:10:57 +0000943 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
944 | --dataroo | --dataro | --datar)
945 ac_prev=datarootdir ;;
946 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
947 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
948 datarootdir=$ac_optarg ;;
949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000951 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000953 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000954 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000955 ac_useropt_orig=$ac_useropt
956 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
957 case $ac_user_opts in
958 *"
959"enable_$ac_useropt"
960"*) ;;
961 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
962 ac_unrecognized_sep=', ';;
963 esac
964 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000965
966 -docdir | --docdir | --docdi | --doc | --do)
967 ac_prev=docdir ;;
968 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
969 docdir=$ac_optarg ;;
970
971 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
972 ac_prev=dvidir ;;
973 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
974 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000977 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000979 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000980 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000981 ac_useropt_orig=$ac_useropt
982 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
983 case $ac_user_opts in
984 *"
985"enable_$ac_useropt"
986"*) ;;
987 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
988 ac_unrecognized_sep=', ';;
989 esac
990 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
993 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
994 | --exec | --exe | --ex)
995 ac_prev=exec_prefix ;;
996 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
997 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
998 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000999 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000
1001 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001002 # Obsolete; use --with-gas.
1003 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 -help | --help | --hel | --he | -h)
1006 ac_init_help=long ;;
1007 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1008 ac_init_help=recursive ;;
1009 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1010 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwiseba40652007-08-30 20:10:57 +00001017 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1018 ac_prev=htmldir ;;
1019 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1020 | --ht=*)
1021 htmldir=$ac_optarg ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -includedir | --includedir | --includedi | --included | --include \
1024 | --includ | --inclu | --incl | --inc)
1025 ac_prev=includedir ;;
1026 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1027 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029
1030 -infodir | --infodir | --infodi | --infod | --info | --inf)
1031 ac_prev=infodir ;;
1032 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -libdir | --libdir | --libdi | --libd)
1036 ac_prev=libdir ;;
1037 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1041 | --libexe | --libex | --libe)
1042 ac_prev=libexecdir ;;
1043 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1044 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
Martin v. Löwiseba40652007-08-30 20:10:57 +00001047 -localedir | --localedir | --localedi | --localed | --locale)
1048 ac_prev=localedir ;;
1049 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1050 localedir=$ac_optarg ;;
1051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001053 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054 ac_prev=localstatedir ;;
1055 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001056 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
1059 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1060 ac_prev=mandir ;;
1061 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Obsolete; use --without-fp.
1066 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 no_create=yes ;;
1071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1073 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1074 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1077 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1078 | --oldin | --oldi | --old | --ol | --o)
1079 ac_prev=oldincludedir ;;
1080 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1081 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1082 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1086 ac_prev=prefix ;;
1087 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1091 | --program-pre | --program-pr | --program-p)
1092 ac_prev=program_prefix ;;
1093 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1094 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1098 | --program-suf | --program-su | --program-s)
1099 ac_prev=program_suffix ;;
1100 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1101 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-transform-name | --program-transform-name \
1105 | --program-transform-nam | --program-transform-na \
1106 | --program-transform-n | --program-transform- \
1107 | --program-transform | --program-transfor \
1108 | --program-transfo | --program-transf \
1109 | --program-trans | --program-tran \
1110 | --progr-tra | --program-tr | --program-t)
1111 ac_prev=program_transform_name ;;
1112 -program-transform-name=* | --program-transform-name=* \
1113 | --program-transform-nam=* | --program-transform-na=* \
1114 | --program-transform-n=* | --program-transform-=* \
1115 | --program-transform=* | --program-transfor=* \
1116 | --program-transfo=* | --program-transf=* \
1117 | --program-trans=* | --program-tran=* \
1118 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
Martin v. Löwiseba40652007-08-30 20:10:57 +00001121 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1122 ac_prev=pdfdir ;;
1123 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1124 pdfdir=$ac_optarg ;;
1125
1126 -psdir | --psdir | --psdi | --psd | --ps)
1127 ac_prev=psdir ;;
1128 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1129 psdir=$ac_optarg ;;
1130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1132 | -silent | --silent | --silen | --sile | --sil)
1133 silent=yes ;;
1134
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001135 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1136 ac_prev=sbindir ;;
1137 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1138 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001139 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140
1141 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1142 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1143 | --sharedst | --shareds | --shared | --share | --shar \
1144 | --sha | --sh)
1145 ac_prev=sharedstatedir ;;
1146 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1147 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1148 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1149 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 -site | --site | --sit)
1153 ac_prev=site ;;
1154 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156
Guido van Rossum7f43da71994-08-01 12:15:30 +00001157 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1158 ac_prev=srcdir ;;
1159 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1163 | --syscon | --sysco | --sysc | --sys | --sy)
1164 ac_prev=sysconfdir ;;
1165 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1166 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
1174 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1175 verbose=yes ;;
1176
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 -version | --version | --versio | --versi | --vers | -V)
1178 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001181 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001182 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001183 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001184 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001185 ac_useropt_orig=$ac_useropt
1186 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1187 case $ac_user_opts in
1188 *"
1189"with_$ac_useropt"
1190"*) ;;
1191 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1192 ac_unrecognized_sep=', ';;
1193 esac
1194 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 --x)
1213 # Obsolete; use --with-x.
1214 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1217 | --x-incl | --x-inc | --x-in | --x-i)
1218 ac_prev=x_includes ;;
1219 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1220 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222
1223 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1224 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1225 ac_prev=x_libraries ;;
1226 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1227 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001228 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001230 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1231Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 *=*)
1235 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1236 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001237 case $ac_envvar in #(
1238 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001239 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001240 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001241 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 export $ac_envvar ;;
1243
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001244 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001249 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250 ;;
1251
1252 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253done
1254
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001257 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258fi
1259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001260if test -n "$ac_unrecognized_opts"; then
1261 case $enable_option_checking in
1262 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001263 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001264 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1265 esac
1266fi
1267
1268# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001269for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1270 datadir sysconfdir sharedstatedir localstatedir includedir \
1271 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
INADA Naoki6a04ef72017-03-29 01:50:48 +09001272 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001273do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001274 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001275 # Remove trailing slashes.
1276 case $ac_val in
1277 */ )
1278 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1279 eval $ac_var=\$ac_val;;
1280 esac
1281 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001283 [\\/$]* | ?:[\\/]* ) continue;;
1284 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001286 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001287done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
Martin v. Löwis11437992002-04-12 09:54:03 +00001289# There might be people who depend on the old broken behavior: `$host'
1290# used to hold the argument of --host etc.
1291# FIXME: To remove some day.
1292build=$build_alias
1293host=$host_alias
1294target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295
Martin v. Löwis11437992002-04-12 09:54:03 +00001296# FIXME: To remove some day.
1297if test "x$host_alias" != x; then
1298 if test "x$build_alias" = x; then
1299 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001300 elif test "x$build_alias" != "x$host_alias"; then
1301 cross_compiling=yes
1302 fi
1303fi
1304
1305ac_tool_prefix=
1306test -n "$host_alias" && ac_tool_prefix=$host_alias-
1307
1308test "$silent" = yes && exec 6>/dev/null
1309
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwiseba40652007-08-30 20:10:57 +00001311ac_pwd=`pwd` && test -n "$ac_pwd" &&
1312ac_ls_di=`ls -di .` &&
1313ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001314 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001315test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001316 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001317
1318
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319# Find the source files, if location was not specified.
1320if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001322 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001323 ac_confdir=`$as_dirname -- "$as_myself" ||
1324$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1325 X"$as_myself" : 'X\(//\)[^/]' \| \
1326 X"$as_myself" : 'X\(//\)$' \| \
1327 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1328$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\/\)[^/].*/{
1334 s//\1/
1335 q
1336 }
1337 /^X\(\/\/\)$/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\).*/{
1342 s//\1/
1343 q
1344 }
1345 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001347 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001348 srcdir=..
1349 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001350else
1351 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001353if test ! -r "$srcdir/$ac_unique_file"; then
1354 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001355 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001357ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1358ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001359 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001360 pwd)`
1361# When building in place, set srcdir=.
1362if test "$ac_abs_confdir" = "$ac_pwd"; then
1363 srcdir=.
1364fi
1365# Remove unnecessary trailing slashes from srcdir.
1366# Double slashes in file names in object file debugging info
1367# mess up M-x gdb in Emacs.
1368case $srcdir in
1369*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1370esac
1371for ac_var in $ac_precious_vars; do
1372 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1373 eval ac_env_${ac_var}_value=\$${ac_var}
1374 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1375 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1376done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001377
Martin v. Löwis11437992002-04-12 09:54:03 +00001378#
1379# Report the --help message.
1380#
1381if test "$ac_init_help" = "long"; then
1382 # Omit some internal or obsolete options to make the list less imposing.
1383 # This message is too long to be a string in the A/UX 3.1 sh.
1384 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001385\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387Usage: $0 [OPTION]... [VAR=VALUE]...
1388
1389To assign environment variables (e.g., CC, CFLAGS...), specify them as
1390VAR=VALUE. See below for descriptions of some of the useful variables.
1391
1392Defaults for the options are specified in brackets.
1393
1394Configuration:
1395 -h, --help display this help and exit
1396 --help=short display options specific to this package
1397 --help=recursive display the short help of all the included packages
1398 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001399 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 --cache-file=FILE cache test results in FILE [disabled]
1401 -C, --config-cache alias for \`--cache-file=config.cache'
1402 -n, --no-create do not create output files
1403 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1404
Martin v. Löwis11437992002-04-12 09:54:03 +00001405Installation directories:
1406 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001407 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001409 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001410
1411By default, \`make install' will install all the files in
1412\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1413an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1414for instance \`--prefix=\$HOME'.
1415
1416For better control, use the options below.
1417
1418Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001419 --bindir=DIR user executables [EPREFIX/bin]
1420 --sbindir=DIR system admin executables [EPREFIX/sbin]
1421 --libexecdir=DIR program executables [EPREFIX/libexec]
1422 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1423 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1424 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1425 --libdir=DIR object code libraries [EPREFIX/lib]
1426 --includedir=DIR C header files [PREFIX/include]
1427 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1428 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1429 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1430 --infodir=DIR info documentation [DATAROOTDIR/info]
1431 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1432 --mandir=DIR man documentation [DATAROOTDIR/man]
1433 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1434 --htmldir=DIR html documentation [DOCDIR]
1435 --dvidir=DIR dvi documentation [DOCDIR]
1436 --pdfdir=DIR pdf documentation [DOCDIR]
1437 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001438_ACEOF
1439
1440 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001441
1442System types:
1443 --build=BUILD configure for building on BUILD [guessed]
1444 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001445 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446_ACEOF
1447fi
1448
1449if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001450 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001451 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001452 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001453 cat <<\_ACEOF
1454
1455Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001456 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1458 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001459 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001460 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --enable-framework[=INSTALLDIR]
1462 Build (MacOSX|Darwin) framework
1463 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001464 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00001465 --enable-optimizations Enable expensive optimizations (PGO, maybe LTO,
1466 etc). Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1468 --enable-ipv6 Enable ipv6 (with ipv4) support
1469 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001470 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001471 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001473 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001474
1475Optional Packages:
1476 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1477 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001478 --with-universal-archs=ARCH
1479 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001480 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001481 --with-framework-name=FRAMEWORK
1482 specify an alternate name of the framework built
1483 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001485 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001486 --with-cxx-main=<compiler>
1487 compile main() and link python executable with C++
1488 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-suffix=.exe set executable suffix
1490 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001491 --with-lto Enable Link Time Optimization in PGO builds.
1492 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001494 --with-system-expat build pyexpat module using an installed expat
1495 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001496 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001497 --with-tcltk-includes='-I...'
1498 override search for Tcl and Tk include files
1499 --with-tcltk-libs='-L...'
1500 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001501 --with-dbmliborder=db1:db2:...
1502 order to check db backends for dbm. Valid value is a
1503 colon separated string with the backend names
1504 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with-signal-module disable/enable signal module
1506 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1507 --with(out)-threads[=DIRECTORY]
1508 disable/enable thread support
1509 --with(out)-thread[=DIRECTORY]
1510 deprecated; use --with(out)-threads
1511 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001513 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001515 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-fpectl enable SIGFPE catching
1518 --with-libm=STRING math library
1519 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001520 --with(out)-computed-gotos
1521 Use computed gotos in evaluation loop (enabled by
1522 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001523 --with(out)-ensurepip=[=OPTION]
1524 "install" or "upgrade" using bundled pip, default is
1525 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001526
1527Some influential environment variables:
1528 CC C compiler command
1529 CFLAGS C compiler flags
1530 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1531 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001532 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001533 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001535 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001536 PKG_CONFIG path to pkg-config utility
1537 PKG_CONFIG_PATH
1538 directories to add to pkg-config's search path
1539 PKG_CONFIG_LIBDIR
1540 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Use these variables to override the choices made by `configure' or to help
1543it to find libraries and programs with nonstandard names/locations.
1544
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001545Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001546_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001547ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001548fi
1549
1550if test "$ac_init_help" = "recursive"; then
1551 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001553 test -d "$ac_dir" ||
1554 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1555 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 ac_builddir=.
1557
Martin v. Löwiseba40652007-08-30 20:10:57 +00001558case "$ac_dir" in
1559.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1560*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001561 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001563 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001564 case $ac_top_builddir_sub in
1565 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1566 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1567 esac ;;
1568esac
1569ac_abs_top_builddir=$ac_pwd
1570ac_abs_builddir=$ac_pwd$ac_dir_suffix
1571# for backward compatibility:
1572ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001573
1574case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 ac_top_srcdir=$ac_top_builddir_sub
1578 ac_abs_top_srcdir=$ac_pwd ;;
1579 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001581 ac_top_srcdir=$srcdir
1582 ac_abs_top_srcdir=$srcdir ;;
1583 *) # Relative name.
1584 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1585 ac_top_srcdir=$ac_top_build_prefix$srcdir
1586 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001587esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001589
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 cd "$ac_dir" || { ac_status=$?; continue; }
1591 # Check for guested configure.
1592 if test -f "$ac_srcdir/configure.gnu"; then
1593 echo &&
1594 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1595 elif test -f "$ac_srcdir/configure"; then
1596 echo &&
1597 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001599 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001600 fi || ac_status=$?
1601 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 done
1603fi
1604
Martin v. Löwiseba40652007-08-30 20:10:57 +00001605test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001606if $ac_init_version; then
1607 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001608python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001609generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001611Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001612This configure script is free software; the Free Software Foundation
1613gives unlimited permission to copy, distribute and modify it.
1614_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001615 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001617
1618## ------------------------ ##
1619## Autoconf initialization. ##
1620## ------------------------ ##
1621
1622# ac_fn_c_try_compile LINENO
1623# --------------------------
1624# Try to compile conftest.$ac_ext, and return whether this succeeded.
1625ac_fn_c_try_compile ()
1626{
1627 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1628 rm -f conftest.$ac_objext
1629 if { { ac_try="$ac_compile"
1630case "(($ac_try" in
1631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1632 *) ac_try_echo=$ac_try;;
1633esac
1634eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1635$as_echo "$ac_try_echo"; } >&5
1636 (eval "$ac_compile") 2>conftest.err
1637 ac_status=$?
1638 if test -s conftest.err; then
1639 grep -v '^ *+' conftest.err >conftest.er1
1640 cat conftest.er1 >&5
1641 mv -f conftest.er1 conftest.err
1642 fi
1643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1644 test $ac_status = 0; } && {
1645 test -z "$ac_c_werror_flag" ||
1646 test ! -s conftest.err
1647 } && test -s conftest.$ac_objext; then :
1648 ac_retval=0
1649else
1650 $as_echo "$as_me: failed program was:" >&5
1651sed 's/^/| /' conftest.$ac_ext >&5
1652
1653 ac_retval=1
1654fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_compile
1659
1660# ac_fn_c_try_cpp LINENO
1661# ----------------------
1662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_cpp ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if { { ac_try="$ac_cpp conftest.$ac_ext"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001681 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 }; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_cpp
1696
1697# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1698# -------------------------------------------------------
1699# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1700# the include files in INCLUDES and setting the cache variable VAR
1701# accordingly.
1702ac_fn_c_check_header_mongrel ()
1703{
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001705 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1707$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001708if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001709 $as_echo_n "(cached) " >&6
1710fi
1711eval ac_res=\$$3
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713$as_echo "$ac_res" >&6; }
1714else
1715 # Is the header compilable?
1716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1717$as_echo_n "checking $2 usability... " >&6; }
1718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1719/* end confdefs.h. */
1720$4
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_compile "$LINENO"; then :
1724 ac_header_compiler=yes
1725else
1726 ac_header_compiler=no
1727fi
1728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1730$as_echo "$ac_header_compiler" >&6; }
1731
1732# Is the header present?
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1734$as_echo_n "checking $2 presence... " >&6; }
1735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h. */
1737#include <$2>
1738_ACEOF
1739if ac_fn_c_try_cpp "$LINENO"; then :
1740 ac_header_preproc=yes
1741else
1742 ac_header_preproc=no
1743fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001744rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1746$as_echo "$ac_header_preproc" >&6; }
1747
1748# So? What about this header?
1749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1750 yes:no: )
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1752$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1754$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1755 ;;
1756 no:yes:* )
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1758$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1760$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1762$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1764$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1766$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001767( $as_echo "## --------------------------------------- ##
1768## Report this to https://bugs.python.org/ ##
1769## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001770 ) | sed "s/^/$as_me: WARNING: /" >&2
1771 ;;
1772esac
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001775if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001776 $as_echo_n "(cached) " >&6
1777else
1778 eval "$3=\$ac_header_compiler"
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001785
1786} # ac_fn_c_check_header_mongrel
1787
1788# ac_fn_c_try_run LINENO
1789# ----------------------
1790# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1791# that executables *can* be run.
1792ac_fn_c_try_run ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { { ac_try="$ac_link"
1796case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799esac
1800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801$as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>&5
1803 ac_status=$?
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1806 { { case "(($ac_try" in
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1809esac
1810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811$as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_try") 2>&5
1813 ac_status=$?
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; }; }; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: program exited with status $ac_status" >&5
1819 $as_echo "$as_me: failed program was:" >&5
1820sed 's/^/| /' conftest.$ac_ext >&5
1821
1822 ac_retval=$ac_status
1823fi
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001826 as_fn_set_status $ac_retval
1827
1828} # ac_fn_c_try_run
1829
1830# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1831# -------------------------------------------------------
1832# Tests whether HEADER exists and can be compiled using the include files in
1833# INCLUDES, setting the cache variable VAR accordingly.
1834ac_fn_c_check_header_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001839if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845#include <$2>
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 eval "$3=yes"
1849else
1850 eval "$3=no"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001858
1859} # ac_fn_c_check_header_compile
1860
1861# ac_fn_c_try_link LINENO
1862# -----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded.
1864ac_fn_c_try_link ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 rm -f conftest.$ac_objext conftest$ac_exeext
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>conftest.err
1876 ac_status=$?
1877 if test -s conftest.err; then
1878 grep -v '^ *+' conftest.err >conftest.er1
1879 cat conftest.er1 >&5
1880 mv -f conftest.er1 conftest.err
1881 fi
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; } && {
1884 test -z "$ac_c_werror_flag" ||
1885 test ! -s conftest.err
1886 } && test -s conftest$ac_exeext && {
1887 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001888 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001889 }; then :
1890 ac_retval=0
1891else
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=1
1896fi
1897 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1898 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1899 # interfere with the next link command; also delete a directory that is
1900 # left behind by Apple's compiler. We do this before executing the actions.
1901 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001902 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001903 as_fn_set_status $ac_retval
1904
1905} # ac_fn_c_try_link
1906
1907# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1908# -------------------------------------------
1909# Tests whether TYPE exists after having included INCLUDES, setting cache
1910# variable VAR accordingly.
1911ac_fn_c_check_type ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001916if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001917 $as_echo_n "(cached) " >&6
1918else
1919 eval "$3=no"
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921/* end confdefs.h. */
1922$4
1923int
1924main ()
1925{
1926if (sizeof ($2))
1927 return 0;
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939if (sizeof (($2)))
1940 return 0;
1941 ;
1942 return 0;
1943}
1944_ACEOF
1945if ac_fn_c_try_compile "$LINENO"; then :
1946
1947else
1948 eval "$3=yes"
1949fi
1950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951fi
1952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1953fi
1954eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001957 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001958
1959} # ac_fn_c_check_type
1960
1961# ac_fn_c_find_uintX_t LINENO BITS VAR
1962# ------------------------------------
1963# Finds an unsigned integer type with width BITS, setting cache variable VAR
1964# accordingly.
1965ac_fn_c_find_uintX_t ()
1966{
1967 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1969$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001970if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971 $as_echo_n "(cached) " >&6
1972else
1973 eval "$3=no"
1974 # Order is important - never check a type that is potentially smaller
1975 # than half of the expected target width.
1976 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1977 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1979/* end confdefs.h. */
1980$ac_includes_default
1981int
1982main ()
1983{
1984static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001985test_array [0] = 0;
1986return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001987
1988 ;
1989 return 0;
1990}
1991_ACEOF
1992if ac_fn_c_try_compile "$LINENO"; then :
1993 case $ac_type in #(
1994 uint$2_t) :
1995 eval "$3=yes" ;; #(
1996 *) :
1997 eval "$3=\$ac_type" ;;
1998esac
1999fi
2000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002001 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002002
2003else
2004 break
2005fi
2006 done
2007fi
2008eval ac_res=\$$3
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2010$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002012
2013} # ac_fn_c_find_uintX_t
2014
2015# ac_fn_c_find_intX_t LINENO BITS VAR
2016# -----------------------------------
2017# Finds a signed integer type with width BITS, setting cache variable VAR
2018# accordingly.
2019ac_fn_c_find_intX_t ()
2020{
2021 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2023$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002024if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025 $as_echo_n "(cached) " >&6
2026else
2027 eval "$3=no"
2028 # Order is important - never check a type that is potentially smaller
2029 # than half of the expected target width.
2030 for ac_type in int$2_t 'int' 'long int' \
2031 'long long int' 'short int' 'signed char'; do
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033/* end confdefs.h. */
2034$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002035 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002036int
2037main ()
2038{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002039static 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 +01002040test_array [0] = 0;
2041return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002051 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002052int
2053main ()
2054{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002055static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002057test_array [0] = 0;
2058return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002059
2060 ;
2061 return 0;
2062}
2063_ACEOF
2064if ac_fn_c_try_compile "$LINENO"; then :
2065
2066else
2067 case $ac_type in #(
2068 int$2_t) :
2069 eval "$3=yes" ;; #(
2070 *) :
2071 eval "$3=\$ac_type" ;;
2072esac
2073fi
2074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2075fi
2076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002077 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002078
2079else
2080 break
2081fi
2082 done
2083fi
2084eval ac_res=\$$3
2085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2086$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002087 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002088
2089} # ac_fn_c_find_intX_t
2090
2091# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2092# --------------------------------------------
2093# Tries to find the compile-time value of EXPR in a program that includes
2094# INCLUDES, setting VAR accordingly. Returns whether the value could be
2095# computed
2096ac_fn_c_compute_int ()
2097{
2098 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2099 if test "$cross_compiling" = yes; then
2100 # Depending upon the size, compute the lo and hi bounds.
2101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002108test_array [0] = 0;
2109return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_lo=0 ac_mid=0
2117 while :; do
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121int
2122main ()
2123{
2124static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002125test_array [0] = 0;
2126return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002127
2128 ;
2129 return 0;
2130}
2131_ACEOF
2132if ac_fn_c_try_compile "$LINENO"; then :
2133 ac_hi=$ac_mid; break
2134else
2135 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2136 if test $ac_lo -le $ac_mid; then
2137 ac_lo= ac_hi=
2138 break
2139 fi
2140 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2141fi
2142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2143 done
2144else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146/* end confdefs.h. */
2147$4
2148int
2149main ()
2150{
2151static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002152test_array [0] = 0;
2153return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002154
2155 ;
2156 return 0;
2157}
2158_ACEOF
2159if ac_fn_c_try_compile "$LINENO"; then :
2160 ac_hi=-1 ac_mid=-1
2161 while :; do
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
2166main ()
2167{
2168static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002169test_array [0] = 0;
2170return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_lo=$ac_mid; break
2178else
2179 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2180 if test $ac_mid -le $ac_hi; then
2181 ac_lo= ac_hi=
2182 break
2183 fi
2184 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2185fi
2186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2187 done
2188else
2189 ac_lo= ac_hi=
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192fi
2193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194# Binary search between lo and hi bounds.
2195while test "x$ac_lo" != "x$ac_hi"; do
2196 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h. */
2199$4
2200int
2201main ()
2202{
2203static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002204test_array [0] = 0;
2205return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002206
2207 ;
2208 return 0;
2209}
2210_ACEOF
2211if ac_fn_c_try_compile "$LINENO"; then :
2212 ac_hi=$ac_mid
2213else
2214 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2215fi
2216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2217done
2218case $ac_lo in #((
2219?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2220'') ac_retval=1 ;;
2221esac
2222 else
2223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2224/* end confdefs.h. */
2225$4
2226static long int longval () { return $2; }
2227static unsigned long int ulongval () { return $2; }
2228#include <stdio.h>
2229#include <stdlib.h>
2230int
2231main ()
2232{
2233
2234 FILE *f = fopen ("conftest.val", "w");
2235 if (! f)
2236 return 1;
2237 if (($2) < 0)
2238 {
2239 long int i = longval ();
2240 if (i != ($2))
2241 return 1;
2242 fprintf (f, "%ld", i);
2243 }
2244 else
2245 {
2246 unsigned long int i = ulongval ();
2247 if (i != ($2))
2248 return 1;
2249 fprintf (f, "%lu", i);
2250 }
2251 /* Do not output a trailing newline, as this causes \r\n confusion
2252 on some platforms. */
2253 return ferror (f) || fclose (f) != 0;
2254
2255 ;
2256 return 0;
2257}
2258_ACEOF
2259if ac_fn_c_try_run "$LINENO"; then :
2260 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2261else
2262 ac_retval=1
2263fi
2264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2265 conftest.$ac_objext conftest.beam conftest.$ac_ext
2266rm -f conftest.val
2267
2268 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002269 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002270 as_fn_set_status $ac_retval
2271
2272} # ac_fn_c_compute_int
2273
2274# ac_fn_c_check_func LINENO FUNC VAR
2275# ----------------------------------
2276# Tests whether FUNC exists, setting the cache variable VAR accordingly
2277ac_fn_c_check_func ()
2278{
2279 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2281$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002282if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002283 $as_echo_n "(cached) " >&6
2284else
2285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2286/* end confdefs.h. */
2287/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2288 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2289#define $2 innocuous_$2
2290
2291/* System header to define __stub macros and hopefully few prototypes,
2292 which can conflict with char $2 (); below.
2293 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2294 <limits.h> exists even on freestanding compilers. */
2295
2296#ifdef __STDC__
2297# include <limits.h>
2298#else
2299# include <assert.h>
2300#endif
2301
2302#undef $2
2303
2304/* Override any GCC internal prototype to avoid an error.
2305 Use char because int might match the return type of a GCC
2306 builtin and then its argument prototype would still apply. */
2307#ifdef __cplusplus
2308extern "C"
2309#endif
2310char $2 ();
2311/* The GNU C library defines this for functions which it implements
2312 to always fail with ENOSYS. Some functions are actually named
2313 something starting with __ and the normal name is an alias. */
2314#if defined __stub_$2 || defined __stub___$2
2315choke me
2316#endif
2317
2318int
2319main ()
2320{
2321return $2 ();
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_link "$LINENO"; then :
2327 eval "$3=yes"
2328else
2329 eval "$3=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext \
2332 conftest$ac_exeext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002338
2339} # ac_fn_c_check_func
2340
2341# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2342# ----------------------------------------------------
2343# Tries to find if the field MEMBER exists in type AGGR, after including
2344# INCLUDES, setting cache variable VAR accordingly.
2345ac_fn_c_check_member ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2349$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002350if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002351 $as_echo_n "(cached) " >&6
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (sizeof ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 eval "$4=no"
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391eval ac_res=\$$4
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002395
2396} # ac_fn_c_check_member
2397
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002398# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2399# ---------------------------------------------
2400# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2401# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002402ac_fn_c_check_decl ()
2403{
2404 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002405 as_decl_name=`echo $2|sed 's/ *(.*//'`
2406 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2408$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002409if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002410 $as_echo_n "(cached) " >&6
2411else
2412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2413/* end confdefs.h. */
2414$4
2415int
2416main ()
2417{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002418#ifndef $as_decl_name
2419#ifdef __cplusplus
2420 (void) $as_decl_use;
2421#else
2422 (void) $as_decl_name;
2423#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002424#endif
2425
2426 ;
2427 return 0;
2428}
2429_ACEOF
2430if ac_fn_c_try_compile "$LINENO"; then :
2431 eval "$3=yes"
2432else
2433 eval "$3=no"
2434fi
2435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2436fi
2437eval ac_res=\$$3
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002441
2442} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002443cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002444This file contains any messages produced by compilers while
2445running configure, to aid debugging if configure makes a mistake.
2446
Martin v. Löwis174440b2008-10-03 08:59:41 +00002447It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002448generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002449
2450 $ $0 $@
2451
2452_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002453exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002454{
2455cat <<_ASUNAME
2456## --------- ##
2457## Platform. ##
2458## --------- ##
2459
2460hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2461uname -m = `(uname -m) 2>/dev/null || echo unknown`
2462uname -r = `(uname -r) 2>/dev/null || echo unknown`
2463uname -s = `(uname -s) 2>/dev/null || echo unknown`
2464uname -v = `(uname -v) 2>/dev/null || echo unknown`
2465
2466/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2467/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2468
2469/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2470/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2471/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002472/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002473/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2474/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2475/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2476
2477_ASUNAME
2478
2479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480for as_dir in $PATH
2481do
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002484 $as_echo "PATH: $as_dir"
2485 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002487
2488} >&5
2489
2490cat >&5 <<_ACEOF
2491
2492
2493## ----------- ##
2494## Core tests. ##
2495## ----------- ##
2496
2497_ACEOF
2498
2499
2500# Keep a trace of the command line.
2501# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002502# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002503# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002504# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002505ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002506ac_configure_args0=
2507ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002508ac_must_keep_next=false
2509for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002510do
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 for ac_arg
2512 do
2513 case $ac_arg in
2514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2516 | -silent | --silent | --silen | --sile | --sil)
2517 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002518 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002519 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002520 esac
2521 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002522 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002523 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002524 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002526 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002528 case $ac_arg in
2529 *=* | --config-cache | -C | -disable-* | --disable-* \
2530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2532 | -with-* | --with-* | -without-* | --without-* | --x)
2533 case "$ac_configure_args0 " in
2534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2535 esac
2536 ;;
2537 -* ) ac_must_keep_next=true ;;
2538 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002540 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002545{ ac_configure_args0=; unset ac_configure_args0;}
2546{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002547
2548# When interrupted or exit'd, cleanup temporary files, and complete
2549# config.log. We remove comments because anyway the quotes in there
2550# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002551# WARNING: Use '\'' to represent an apostrophe within the trap.
2552# 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 +00002553trap 'exit_status=$?
2554 # Save into config.log some information that might help in debugging.
2555 {
2556 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002557
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002558 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002559## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002560## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 echo
2562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563(
2564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in #(
2567 *${as_nl}*)
2568 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2570$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571 esac
2572 case $ac_var in #(
2573 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2575 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac ;;
2577 esac
2578 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2581 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002583 "s/'\''/'\''\\\\'\'''\''/g;
2584 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2585 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002586 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002588 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac |
2590 sort
2591)
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002593
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002594 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002595## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002596## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002597 echo
2598 for ac_var in $ac_subst_vars
2599 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 eval ac_val=\$$ac_var
2601 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002602 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002603 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002604 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002605 done | sort
2606 echo
2607
2608 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002610## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002611## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002612 echo
2613 for ac_var in $ac_subst_files
2614 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 eval ac_val=\$$ac_var
2616 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002619 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 done | sort
2621 echo
2622 fi
2623
Martin v. Löwis11437992002-04-12 09:54:03 +00002624 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002625 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002626## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002627## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002629 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 echo
2631 fi
2632 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002633 $as_echo "$as_me: caught signal $ac_signal"
2634 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002636 rm -f core *.core core.conftest.* &&
2637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002639' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002640for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002641 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002642done
2643ac_signal=0
2644
2645# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002647
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002648$as_echo "/* confdefs.h */" > confdefs.h
2649
Martin v. Löwis11437992002-04-12 09:54:03 +00002650# Predefined preprocessor variables.
2651
2652cat >>confdefs.h <<_ACEOF
2653#define PACKAGE_NAME "$PACKAGE_NAME"
2654_ACEOF
2655
Martin v. Löwis11437992002-04-12 09:54:03 +00002656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_VERSION "$PACKAGE_VERSION"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_STRING "$PACKAGE_STRING"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2670_ACEOF
2671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_URL "$PACKAGE_URL"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676
2677# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002678# Prefer an explicitly selected file to automatically selected ones.
2679ac_site_file1=NONE
2680ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002682 # We do not want a PATH search for config.site.
2683 case $CONFIG_SITE in #((
2684 -*) ac_site_file1=./$CONFIG_SITE;;
2685 */*) ac_site_file1=$CONFIG_SITE;;
2686 *) ac_site_file1=./$CONFIG_SITE;;
2687 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002688elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002689 ac_site_file1=$prefix/share/config.site
2690 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002691else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002692 ac_site_file1=$ac_default_prefix/share/config.site
2693 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002695for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 test "x$ac_site_file" = xNONE && continue
2698 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2700$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002701 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002702 . "$ac_site_file" \
2703 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002706See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707 fi
2708done
2709
2710if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002711 # Some versions of bash will fail to source /dev/null (special files
2712 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2713 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2715$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2718 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 esac
2720 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002721else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002722 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2723$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 >$cache_file
2725fi
2726
2727# Check that the precious variables saved in the cache have kept the same
2728# value.
2729ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2732 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2734 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 case $ac_old_set,$ac_new_set in
2736 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2738$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 +00002739 ac_cache_corrupted=: ;;
2740 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2742$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 ac_cache_corrupted=: ;;
2744 ,);;
2745 *)
2746 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002747 # differences in whitespace do not lead to failure.
2748 ac_old_val_w=`echo x $ac_old_val`
2749 ac_new_val_w=`echo x $ac_new_val`
2750 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2752$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2753 ac_cache_corrupted=:
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2756$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2757 eval $ac_var=\$ac_old_val
2758 fi
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2760$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2762$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002763 fi;;
2764 esac
2765 # Pass precious variables to config.status.
2766 if test "$ac_new_set" = set; then
2767 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002768 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 *) ac_arg=$ac_var=$ac_new_val ;;
2770 esac
2771 case " $ac_configure_args " in
2772 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002773 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 esac
2775 fi
2776done
2777if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2781$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002782 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002783fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002784## -------------------- ##
2785## Main body of script. ##
2786## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002787
Guido van Rossum7f43da71994-08-01 12:15:30 +00002788ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002789ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793
Guido van Rossum627b2d71993-12-24 10:39:16 +00002794
Michael W. Hudson54241132001-12-07 15:38:26 +00002795
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002797
2798
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002799ac_aux_dir=
2800for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2801 if test -f "$ac_dir/install-sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install-sh -c"
2804 break
2805 elif test -f "$ac_dir/install.sh"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/install.sh -c"
2808 break
2809 elif test -f "$ac_dir/shtool"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/shtool install -c"
2812 break
2813 fi
2814done
2815if test -z "$ac_aux_dir"; then
2816 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2817fi
2818
2819# These three variables are undocumented and unsupported,
2820# and are intended to be withdrawn in a future Autoconf release.
2821# They can cause serious problems if a builder's source tree is in a directory
2822# whose full name contains unusual characters.
2823ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2824ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2825ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2826
2827
2828# Make sure we can run config.sub.
2829$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2830 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2833$as_echo_n "checking build system type... " >&6; }
2834if ${ac_cv_build+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 ac_build_alias=$build_alias
2838test "x$ac_build_alias" = x &&
2839 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2840test "x$ac_build_alias" = x &&
2841 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2842ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2843 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2844
2845fi
2846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2847$as_echo "$ac_cv_build" >&6; }
2848case $ac_cv_build in
2849*-*-*) ;;
2850*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2851esac
2852build=$ac_cv_build
2853ac_save_IFS=$IFS; IFS='-'
2854set x $ac_cv_build
2855shift
2856build_cpu=$1
2857build_vendor=$2
2858shift; shift
2859# Remember, the first character of IFS is used to create $*,
2860# except with old shells:
2861build_os=$*
2862IFS=$ac_save_IFS
2863case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2864
2865
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2867$as_echo_n "checking host system type... " >&6; }
2868if ${ac_cv_host+:} false; then :
2869 $as_echo_n "(cached) " >&6
2870else
2871 if test "x$host_alias" = x; then
2872 ac_cv_host=$ac_cv_build
2873else
2874 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2875 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2876fi
2877
2878fi
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2880$as_echo "$ac_cv_host" >&6; }
2881case $ac_cv_host in
2882*-*-*) ;;
2883*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2884esac
2885host=$ac_cv_host
2886ac_save_IFS=$IFS; IFS='-'
2887set x $ac_cv_host
2888shift
2889host_cpu=$1
2890host_vendor=$2
2891shift; shift
2892# Remember, the first character of IFS is used to create $*,
2893# except with old shells:
2894host_os=$*
2895IFS=$ac_save_IFS
2896case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2897
2898
2899
2900
2901
Ned Deily983df862014-08-22 13:30:59 -07002902# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2903rm -f pybuilddir.txt
2904
Victor Stinner8a19eb22017-05-05 03:14:23 +02002905for ac_prog in python$PACKAGE_VERSION python3 python
2906do
2907 # Extract the first word of "$ac_prog", so it can be a program name with args.
2908set dummy $ac_prog; ac_word=$2
2909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2910$as_echo_n "checking for $ac_word... " >&6; }
2911if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
2912 $as_echo_n "(cached) " >&6
2913else
2914 if test -n "$PYTHON_FOR_REGEN"; then
2915 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
2916else
2917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2918for as_dir in $PATH
2919do
2920 IFS=$as_save_IFS
2921 test -z "$as_dir" && as_dir=.
2922 for ac_exec_ext in '' $ac_executable_extensions; do
2923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2924 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
2925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2926 break 2
2927 fi
2928done
2929 done
2930IFS=$as_save_IFS
2931
2932fi
2933fi
2934PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2935if test -n "$PYTHON_FOR_REGEN"; then
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2937$as_echo "$PYTHON_FOR_REGEN" >&6; }
2938else
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2940$as_echo "no" >&6; }
2941fi
2942
2943
2944 test -n "$PYTHON_FOR_REGEN" && break
2945done
2946test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
2947
2948
2949
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002950if test "$cross_compiling" = yes; then
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2952$as_echo_n "checking for python interpreter for cross build... " >&6; }
2953 if test -z "$PYTHON_FOR_BUILD"; then
2954 for interp in python$PACKAGE_VERSION python2 python; do
2955 which $interp >/dev/null 2>&1 || continue
2956 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2957 break
2958 fi
2959 interp=
2960 done
2961 if test x$interp = x; then
2962 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2963 fi
2964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2965$as_echo "$interp" >&6; }
Victor Stinner8a19eb22017-05-05 03:14:23 +02002966 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002967 fi
2968elif test "$cross_compiling" = maybe; then
2969 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2970else
2971 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2972fi
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
Georg Brandlbcd64a32009-03-31 21:45:18 +00002976if test "$prefix" != "/"; then
2977 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2978fi
2979
2980
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
2982
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002983# We don't use PACKAGE_ variables, and they cause conflicts
2984# with other autoconf-based packages that include Python.h
2985grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2986rm confdefs.h
2987mv confdefs.h.new confdefs.h
2988
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002989
Martin v. Löwis174440b2008-10-03 08:59:41 +00002990VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002991
Martin v. Löwis1142de32002-03-29 16:28:31 +00002992
2993SOVERSION=1.0
2994
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002995# The later defininition of _XOPEN_SOURCE disables certain features
2996# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002998$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999
3000
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3002# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3003# them.
3004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003006
3007
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3010# them.
3011
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003012$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003013
3014
Martin v. Löwisd6320502004-08-12 13:45:08 +00003015# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3016# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3017
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003019
3020
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003021# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3022# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3023# them.
3024
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003025$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003026
3027
3028
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003029define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003030
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003031# Arguments passed to configure.
3032
3033CONFIG_ARGS="$ac_configure_args"
3034
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3036$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003037# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003038if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003039 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003040 case $enableval in
3041 yes)
3042 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003043 if test ! -d "${enableval}"
3044 then
3045 enableval=/
3046 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003047 ;;
3048 esac
3049 case $enableval in
3050 no)
3051 UNIVERSALSDK=
3052 enable_universalsdk=
3053 ;;
3054 *)
3055 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003056 if test ! -d "${UNIVERSALSDK}"
3057 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003058 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003059 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003060 ;;
3061 esac
3062
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003063
Ronald Oussoren988117f2006-04-29 11:31:35 +00003064else
3065
3066 UNIVERSALSDK=
3067 enable_universalsdk=
3068
Martin v. Löwiseba40652007-08-30 20:10:57 +00003069fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003070
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003071if test -n "${UNIVERSALSDK}"
3072then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3074$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3077$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003078fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003079
Martin v. Löwiseba40652007-08-30 20:10:57 +00003080
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003081
Ned Deily8e60f6e2013-05-30 00:14:29 -07003082ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003083
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003084UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003090if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003091 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3093$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003094 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003095 if test "${enable_universalsdk}" ; then
3096 :
3097 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003098 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003099 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003100
3101else
3102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3104$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003105
3106fi
3107
3108
3109
3110
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003111
3112# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003113if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003114 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003115 if test "${enable_framework}"; then
3116 :
3117 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003118 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003119 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003120 PYTHONFRAMEWORK=${withval}
3121 PYTHONFRAMEWORKDIR=${withval}.framework
3122 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3123
3124else
3125
3126 PYTHONFRAMEWORK=Python
3127 PYTHONFRAMEWORKDIR=Python.framework
3128 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3129
3130fi
3131
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003133if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003134 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003135 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003136 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003137 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003138 esac
3139 case $enableval in
3140 no)
3141 PYTHONFRAMEWORK=
3142 PYTHONFRAMEWORKDIR=no-framework
3143 PYTHONFRAMEWORKPREFIX=
3144 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003145 FRAMEWORKINSTALLFIRST=
3146 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003147 FRAMEWORKALTINSTALLFIRST=
3148 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003149 if test "x${prefix}" = "xNONE"; then
3150 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3151 else
3152 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3153 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003154 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003155 ;;
3156 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003157 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003158 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003159 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003160 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003161 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3162 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003163 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003164
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003165 if test "x${prefix}" = "xNONE" ; then
3166 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003167
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003168 else
3169 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3170 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003171
3172 case "${enableval}" in
3173 /System*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 if test "${prefix}" = "NONE" ; then
3176 # See below
3177 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3178 fi
3179 ;;
3180
3181 /Library*)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184
3185 */Library/Frameworks)
3186 MDIR="`dirname "${enableval}"`"
3187 MDIR="`dirname "${MDIR}"`"
3188 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3189
3190 if test "${prefix}" = "NONE"; then
3191 # User hasn't specified the
3192 # --prefix option, but wants to install
3193 # the framework in a non-default location,
3194 # ensure that the compatibility links get
3195 # installed relative to that prefix as well
3196 # instead of in /usr/local.
3197 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3198 fi
3199 ;;
3200
3201 *)
3202 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3203 ;;
3204 esac
3205
Jack Jansen127e56e2001-09-11 14:41:54 +00003206 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003207
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003208 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003209 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003211
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003213
Martin v. Löwiseba40652007-08-30 20:10:57 +00003214 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003215
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003216 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3217
3218 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3219
Jack Jansene578a632001-08-15 01:27:14 +00003220 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003221
Guido van Rossum563e7081996-09-10 18:20:48 +00003222else
Martin v. Löwis11437992002-04-12 09:54:03 +00003223
Jack Jansene578a632001-08-15 01:27:14 +00003224 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003225 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003226 PYTHONFRAMEWORKPREFIX=
3227 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003228 FRAMEWORKINSTALLFIRST=
3229 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003230 FRAMEWORKALTINSTALLFIRST=
3231 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003232 if test "x${prefix}" = "xNONE" ; then
3233 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3234 else
3235 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3236 fi
Jack Jansene578a632001-08-15 01:27:14 +00003237 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003239
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240fi
3241
Michael W. Hudson54241132001-12-07 15:38:26 +00003242
3243
3244
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003247
3248
Ronald Oussoren5b787322006-06-06 19:50:24 +00003249
3250
3251
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003252
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003253
Jack Jansene578a632001-08-15 01:27:14 +00003254##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003255## AS_HELP_STRING([--with-dyld],
3256## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003257##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003258# Set name for machine-dependent library files
3259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3261$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003262if test -z "$MACHDEP"
3263then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003264 # avoid using uname for cross builds
3265 if test "$cross_compiling" = yes; then
3266 # ac_sys_system and ac_sys_release are only used for setting
3267 # `define_xopen_source' in the case statement below. For the
3268 # current supported cross builds, this macro is not adjusted.
3269 case "$host" in
3270 *-*-linux*)
3271 ac_sys_system=Linux
3272 ;;
3273 *-*-cygwin*)
3274 ac_sys_system=Cygwin
3275 ;;
3276 *)
3277 # for now, limit cross builds to known configurations
3278 MACHDEP="unknown"
3279 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3280 esac
3281 ac_sys_release=
3282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003284 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003285 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003286 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003288 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003290 fi
3291 ac_md_system=`echo $ac_sys_system |
3292 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3293 ac_md_release=`echo $ac_sys_release |
3294 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3295 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003296
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003297 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003298 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003299 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003300 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003301 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003304 esac
3305fi
3306
3307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003326 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003328fi
Guido van Rossum91922671997-10-09 20:24:13 +00003329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003352
3353 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003354 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003360
3361 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003365 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 +00003366 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003396 Darwin/1[0-9].*)
3397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003419$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003420
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3423 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3424 # several APIs are not declared. Since this is also needed in some
3425 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003427$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003428
3429
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003430
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003431$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003432
3433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003439# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003455
3456PLATDIR=plat-$MACHDEP
3457
Jack Jansen83f898c2002-12-30 22:23:40 +00003458# And add extra plat-mac for darwin
3459
Jack Jansen7b59b422003-03-17 15:44:10 +00003460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3462$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003463if test -z "$EXTRAPLATDIR"
3464then
3465 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003466 darwin)
3467 EXTRAPLATDIR="\$(PLATMACDIRS)"
3468 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3469 ;;
3470 *)
3471 EXTRAPLATDIR=""
3472 EXTRAMACHDEPPATH=""
3473 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003474 esac
3475fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3477$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003478
Jack Jansen6b08a402004-06-03 12:41:45 +00003479# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3480# it may influence the way we can build extensions, so distutils
3481# needs to check it
3482
Ronald Oussoren988117f2006-04-29 11:31:35 +00003483
Jack Jansen6b08a402004-06-03 12:41:45 +00003484CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003485EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003486
Guido van Rossum627b2d71993-12-24 10:39:16 +00003487# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003488
3489# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3490# for debug/optimization stuff. BASECFLAGS is for flags that are required
3491# just to get things to compile and link. Users are free to override OPT
3492# when running configure or make. The build should not break if they do.
3493# BASECFLAGS should generally not be messed with, however.
3494
3495# XXX shouldn't some/most/all of this code be merged with the stuff later
3496# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3498$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003499
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003501if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003503 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003504 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003505 without_gcc=yes;;
3506 yes) CC=gcc
3507 without_gcc=no;;
3508 *) CC=$withval
3509 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003511else
Martin v. Löwis11437992002-04-12 09:54:03 +00003512
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003513 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003514 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003515 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003516 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003517 case $BE_HOST_CPU in
3518 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003519 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003520 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003521 BASECFLAGS="$BASECFLAGS -export pragma"
3522 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003523 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003524 ;;
3525 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003526 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003527 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003528 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003529 ;;
3530 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003531 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003532 ;;
3533 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003534 AR="\$(srcdir)/Modules/ar_beos"
3535 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003536 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003537 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003538 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003539fi
3540
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3542$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003543
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3545$as_echo_n "checking for --with-icc... " >&6; }
3546
3547# Check whether --with-icc was given.
3548if test "${with_icc+set}" = set; then :
3549 withval=$with_icc;
3550 case $withval in
3551 no) CC=${CC:-cc}
3552 with_icc=no;;
3553 yes) CC=icc
3554 CXX=icpc
3555 with_icc=yes;;
3556 *) CC=$withval
3557 with_icc=$withval;;
3558 esac
3559else
3560
3561 with_icc=no
3562fi
3563
3564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3565$as_echo "$with_icc" >&6; }
3566
Guido van Rossum8b131c51995-03-09 14:10:13 +00003567# If the user switches compilers, we can't believe the cache
3568if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3569then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003570 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003571(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003572fi
3573
Trent Nelson15daa352012-12-13 06:46:39 +00003574if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3575 # Normally, MIPSpro CC treats #error directives as warnings, which means
3576 # a successful exit code is returned (0). This is a problem because IRIX
3577 # has a bunch of system headers with this guard at the top:
3578 #
3579 # #ifndef __c99
3580 # #error This header file is to be used only for c99 mode compilations
3581 # #else
3582 #
3583 # When autoconf tests for such a header, like stdint.h, this happens:
3584 #
3585 # configure:4619: cc -c conftest.c >&5
3586 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3587 # #error directive: This header file is to be used only for c99 mode
3588 # compilations
3589 #
3590 # #error This header file is to be used only for c99 mode compilations
3591 # ^
3592 #
3593 # configure:4619: $? = 0
3594 # configure:4619: result: yes
3595 #
3596 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3597 # warning as an error, which causes cc to return a non-zero result,
3598 # which autoconf can interpret correctly.
3599 CFLAGS="$CFLAGS -diag_error 1035"
3600 # Whilst we're here, we might as well make sure CXX defaults to something
3601 # sensible if we're not using gcc.
3602 if test -z "$CXX"; then
3603 CXX="CC"
3604 fi
3605fi
3606
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003607# If the user set CFLAGS, use this instead of the automatically
3608# determined setting
3609preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003610ac_ext=c
3611ac_cpp='$CPP $CPPFLAGS'
3612ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3613ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3614ac_compiler_gnu=$ac_cv_c_compiler_gnu
3615if test -n "$ac_tool_prefix"; then
3616 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3617set dummy ${ac_tool_prefix}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_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622else
3623 if test -n "$CC"; then
3624 ac_cv_prog_CC="$CC" # Let the user override the test.
3625else
Martin v. Löwis11437992002-04-12 09:54:03 +00003626as_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_CC="${ac_tool_prefix}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
Jack Jansendd19cf82001-12-06 22:36:17 +00003641fi
3642fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003643CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003644if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3646$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +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
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654if test -z "$ac_cv_prog_CC"; then
3655 ac_ct_CC=$CC
3656 # Extract the first word of "gcc", so it can be a program name with args.
3657set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3659$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003660if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
3663 if test -n "$ac_ct_CC"; then
3664 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3665else
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003671 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674 $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 +00003675 break 2
3676 fi
3677done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003680
3681fi
3682fi
3683ac_ct_CC=$ac_cv_prog_ac_ct_CC
3684if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3686$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3689$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003690fi
3691
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692 if test "x$ac_ct_CC" = x; then
3693 CC=""
3694 else
3695 case $cross_compiling:$ac_tool_warned in
3696yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699ac_tool_warned=yes ;;
3700esac
3701 CC=$ac_ct_CC
3702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
3704 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003705fi
3706
Jack Jansendd19cf82001-12-06 22:36:17 +00003707if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708 if test -n "$ac_tool_prefix"; then
3709 # 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 +00003710set dummy ${ac_tool_prefix}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
Jack Jansendd19cf82001-12-06 22:36:17 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Martin v. Löwis11437992002-04-12 09:54:03 +00003719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3720for as_dir in $PATH
3721do
3722 IFS=$as_save_IFS
3723 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003724 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003727 $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 +00003728 break 2
3729 fi
3730done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003731 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003732IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
3734fi
3735fi
3736CC=$ac_cv_prog_CC
3737if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3739$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3742$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003743fi
3744
Martin v. Löwiseba40652007-08-30 20:10:57 +00003745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747fi
3748if test -z "$CC"; then
3749 # Extract the first word of "cc", so it can be a program name with args.
3750set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3752$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003753if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003755else
3756 if test -n "$CC"; then
3757 ac_cv_prog_CC="$CC" # Let the user override the test.
3758else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3768 ac_prog_rejected=yes
3769 continue
3770 fi
3771 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003773 break 2
3774 fi
3775done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003778
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test $ac_prog_rejected = yes; then
3780 # We found a bogon in the path, so make sure we never use it.
3781 set dummy $ac_cv_prog_CC
3782 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003784 # We chose a different compiler from the bogus one.
3785 # However, it has the same basename, so the bogon will be chosen
3786 # first if we set CC to just the basename; use the full file name.
3787 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003788 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003789 fi
3790fi
3791fi
3792fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003793CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3796$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003800fi
3801
Martin v. Löwiseba40652007-08-30 20:10:57 +00003802
Martin v. Löwis11437992002-04-12 09:54:03 +00003803fi
3804if test -z "$CC"; then
3805 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 do
3808 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3809set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003812if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003813 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 $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 +00003827 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003828 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003829done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
3833fi
3834fi
3835CC=$ac_cv_prog_CC
3836if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3838$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3841$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003842fi
3843
Martin v. Löwiseba40652007-08-30 20:10:57 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 test -n "$CC" && break
3846 done
3847fi
3848if test -z "$CC"; then
3849 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003850 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003851do
3852 # Extract the first word of "$ac_prog", so it can be a program name with args.
3853set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003856if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003858else
3859 if test -n "$ac_ct_CC"; then
3860 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3861else
3862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863for as_dir in $PATH
3864do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003867 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003871 break 2
3872 fi
3873done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003874 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003875IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003876
Martin v. Löwis11437992002-04-12 09:54:03 +00003877fi
3878fi
3879ac_ct_CC=$ac_cv_prog_ac_ct_CC
3880if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3882$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003886fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003887
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 test -n "$ac_ct_CC" && break
3890done
Michael W. Hudson54241132001-12-07 15:38:26 +00003891
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 if test "x$ac_ct_CC" = x; then
3893 CC=""
3894 else
3895 case $cross_compiling:$ac_tool_warned in
3896yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003897{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3898$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899ac_tool_warned=yes ;;
3900esac
3901 CC=$ac_ct_CC
3902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903fi
3904
3905fi
3906
3907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003908test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003910as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003911See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
3913# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003914$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3915set X $ac_compile
3916ac_compiler=$2
3917for ac_option in --version -v -V -qversion; do
3918 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003923eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3924$as_echo "$ac_try_echo"; } >&5
3925 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003926 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927 if test -s conftest.err; then
3928 sed '10a\
3929... rest of stderr output deleted ...
3930 10q' conftest.err >conftest.er1
3931 cat conftest.er1 >&5
3932 fi
3933 rm -f conftest.er1 conftest.err
3934 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3935 test $ac_status = 0; }
3936done
Martin v. Löwis11437992002-04-12 09:54:03 +00003937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003939/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003940
Martin v. Löwis11437992002-04-12 09:54:03 +00003941int
3942main ()
3943{
3944
3945 ;
3946 return 0;
3947}
3948_ACEOF
3949ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003950ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003951# Try to create an executable without -o first, disregard a.out.
3952# It will help us diagnose broken compilers, and finding out an intuition
3953# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3955$as_echo_n "checking whether the C compiler works... " >&6; }
3956ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3957
3958# The possible output files:
3959ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3960
Martin v. Löwiseba40652007-08-30 20:10:57 +00003961ac_rmfiles=
3962for ac_file in $ac_files
3963do
3964 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003965 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003966 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3967 esac
3968done
3969rm -f $ac_rmfiles
3970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003971if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972case "(($ac_try" in
3973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974 *) ac_try_echo=$ac_try;;
3975esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3983# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3984# in a Makefile. We should not override ac_cv_exeext if it was cached,
3985# so that the user can short-circuit this test for compilers unknown to
3986# Autoconf.
3987for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003988do
3989 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003990 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003991 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003992 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003993 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003994 # We found the default executable, but exeext='' is most
3995 # certainly right.
3996 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003997 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003999 then :; else
4000 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4001 fi
4002 # We set ac_cv_exeext here because the later test for it is not
4003 # safe: cross compilers may not add the suffix if given an `-o'
4004 # argument, so we may need to know it at that point already.
4005 # Even if this section looks crufty: it has the advantage of
4006 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00004007 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004008 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00004009 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004010 esac
4011done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004012test "$ac_cv_exeext" = no && ac_cv_exeext=
4013
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004014else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015 ac_file=''
4016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017if test -z "$ac_file"; then :
4018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4019$as_echo "no" >&6; }
4020$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004021sed 's/^/| /' conftest.$ac_ext >&5
4022
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004023{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004025as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01004026See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004027else
4028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4029$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4032$as_echo_n "checking for C compiler default output file name... " >&6; }
4033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4034$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004035ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004037rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004038ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4040$as_echo_n "checking for suffix of executables... " >&6; }
4041if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004042case "(($ac_try" in
4043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4044 *) ac_try_echo=$ac_try;;
4045esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004046eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4047$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004049 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4051 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004052 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4053# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4054# work properly (i.e., refer to `conftest.exe'), while it won't with
4055# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004056for ac_file in conftest.exe conftest conftest.*; do
4057 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004058 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004059 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004060 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004061 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004062 * ) break;;
4063 esac
4064done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004065else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004068as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004069See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004070fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004071rm -f conftest conftest$ac_cv_exeext
4072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4073$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004074
4075rm -f conftest.$ac_ext
4076EXEEXT=$ac_cv_exeext
4077ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4079/* end confdefs.h. */
4080#include <stdio.h>
4081int
4082main ()
4083{
4084FILE *f = fopen ("conftest.out", "w");
4085 return ferror (f) || fclose (f) != 0;
4086
4087 ;
4088 return 0;
4089}
Skip Montanaro6dead952003-09-25 14:50:04 +00004090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091ac_clean_files="$ac_clean_files conftest.out"
4092# Check that the compiler produces executables we can run. If not, either
4093# the compiler is broken, or we cross compile.
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4095$as_echo_n "checking whether we are cross compiling... " >&6; }
4096if test "$cross_compiling" != yes; then
4097 { { ac_try="$ac_link"
4098case "(($ac_try" in
4099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4100 *) ac_try_echo=$ac_try;;
4101esac
4102eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4103$as_echo "$ac_try_echo"; } >&5
4104 (eval "$ac_link") 2>&5
4105 ac_status=$?
4106 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4107 test $ac_status = 0; }
4108 if { ac_try='./conftest$ac_cv_exeext'
4109 { { case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112esac
4113eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4114$as_echo "$ac_try_echo"; } >&5
4115 (eval "$ac_try") 2>&5
4116 ac_status=$?
4117 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4118 test $ac_status = 0; }; }; then
4119 cross_compiling=no
4120 else
4121 if test "$cross_compiling" = maybe; then
4122 cross_compiling=yes
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004126as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004127If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004128See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004129 fi
4130 fi
4131fi
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4133$as_echo "$cross_compiling" >&6; }
4134
4135rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4136ac_clean_files=$ac_clean_files_save
4137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4138$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004139if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 $as_echo_n "(cached) " >&6
4141else
4142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004144
Martin v. Löwis11437992002-04-12 09:54:03 +00004145int
4146main ()
4147{
4148
4149 ;
4150 return 0;
4151}
4152_ACEOF
4153rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004154if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004155case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004159eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4160$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004161 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004162 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004163 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4164 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004165 for ac_file in conftest.o conftest.obj conftest.*; do
4166 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004168 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004169 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4170 break;;
4171 esac
4172done
4173else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004175sed 's/^/| /' conftest.$ac_ext >&5
4176
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004179as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004180See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004182rm -f conftest.$ac_cv_objext conftest.$ac_ext
4183fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4185$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004186OBJEXT=$ac_cv_objext
4187ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4189$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004190if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004195
Martin v. Löwis11437992002-04-12 09:54:03 +00004196int
4197main ()
4198{
4199#ifndef __GNUC__
4200 choke me
4201#endif
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 ac_compiler_gnu=yes
4209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004210 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004213ac_cv_c_compiler_gnu=$ac_compiler_gnu
4214
4215fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4217$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4218if test $ac_compiler_gnu = yes; then
4219 GCC=yes
4220else
4221 GCC=
4222fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004223ac_test_CFLAGS=${CFLAGS+set}
4224ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4226$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004227if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004228 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004229else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004230 ac_save_c_werror_flag=$ac_c_werror_flag
4231 ac_c_werror_flag=yes
4232 ac_cv_prog_cc_g=no
4233 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004236
Martin v. Löwis11437992002-04-12 09:54:03 +00004237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004246 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248 CFLAGS=""
4249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250/* end confdefs.h. */
4251
4252int
4253main ()
4254{
4255
4256 ;
4257 return 0;
4258}
4259_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004260if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004262else
4263 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004264 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004266/* end confdefs.h. */
4267
4268int
4269main ()
4270{
4271
4272 ;
4273 return 0;
4274}
4275_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4284 ac_c_werror_flag=$ac_save_c_werror_flag
4285fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4287$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004289 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004290elif test $ac_cv_prog_cc_g = yes; then
4291 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004292 CFLAGS="-g -O2"
4293 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004294 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295 fi
4296else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004297 if test "$GCC" = yes; then
4298 CFLAGS="-O2"
4299 else
4300 CFLAGS=
4301 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4304$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004305if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004306 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004308 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004309ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004311/* end confdefs.h. */
4312#include <stdarg.h>
4313#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004314struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004315/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4316struct buf { int x; };
4317FILE * (*rcsopen) (struct buf *, struct stat *, int);
4318static char *e (p, i)
4319 char **p;
4320 int i;
4321{
4322 return p[i];
4323}
4324static char *f (char * (*g) (char **, int), char **p, ...)
4325{
4326 char *s;
4327 va_list v;
4328 va_start (v,p);
4329 s = g (p, va_arg (v,int));
4330 va_end (v);
4331 return s;
4332}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004333
4334/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4335 function prototypes and stuff, but not '\xHH' hex character constants.
4336 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004337 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004338 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4339 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004340 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004341int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4342
Martin v. Löwiseba40652007-08-30 20:10:57 +00004343/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4344 inside strings and character constants. */
4345#define FOO(x) 'x'
4346int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4347
Skip Montanaro6dead952003-09-25 14:50:04 +00004348int test (int i, double x);
4349struct s1 {int (*f) (int a);};
4350struct s2 {int (*f) (double a);};
4351int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4352int argc;
4353char **argv;
4354int
4355main ()
4356{
4357return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4358 ;
4359 return 0;
4360}
4361_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4363 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004364do
4365 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004366 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004369rm -f core conftest.err conftest.$ac_objext
4370 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004371done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004373CC=$ac_save_CC
4374
4375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004376# AC_CACHE_VAL
4377case "x$ac_cv_prog_cc_c89" in
4378 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4380$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4383$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004384 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004385 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4387$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004388esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004389if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004391fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004392
Martin v. Löwis11437992002-04-12 09:54:03 +00004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004398
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004399if test ! -z "$preset_cflags"
4400then
4401 CFLAGS=$preset_cflags
4402fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004403
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004404
4405
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4407$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004408
Martin v. Löwiseba40652007-08-30 20:10:57 +00004409# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004410if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004411 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004412
4413 case $withval in
4414 no) with_cxx_main=no
4415 MAINCC='$(CC)';;
4416 yes) with_cxx_main=yes
4417 MAINCC='$(CXX)';;
4418 *) with_cxx_main=yes
4419 MAINCC=$withval
4420 if test -z "$CXX"
4421 then
4422 CXX=$withval
4423 fi;;
4424 esac
4425else
4426
4427 with_cxx_main=no
4428 MAINCC='$(CC)'
4429
Martin v. Löwiseba40652007-08-30 20:10:57 +00004430fi
4431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4433$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004434
4435preset_cxx="$CXX"
4436if test -z "$CXX"
4437then
4438 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004439 gcc) if test -n "$ac_tool_prefix"; then
4440 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4441set dummy ${ac_tool_prefix}g++; ac_word=$2
4442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4443$as_echo_n "checking for $ac_word... " >&6; }
4444if ${ac_cv_path_CXX+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446else
4447 case $CXX in
4448 [\\/]* | ?:[\\/]*)
4449 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4450 ;;
4451 *)
4452 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4453for as_dir in notfound
4454do
4455 IFS=$as_save_IFS
4456 test -z "$as_dir" && as_dir=.
4457 for ac_exec_ext in '' $ac_executable_extensions; do
4458 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4459 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4460 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4461 break 2
4462 fi
4463done
4464 done
4465IFS=$as_save_IFS
4466
4467 ;;
4468esac
4469fi
4470CXX=$ac_cv_path_CXX
4471if test -n "$CXX"; then
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4473$as_echo "$CXX" >&6; }
4474else
4475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4476$as_echo "no" >&6; }
4477fi
4478
4479
4480fi
4481if test -z "$ac_cv_path_CXX"; then
4482 ac_pt_CXX=$CXX
4483 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004484set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004487if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004488 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004489else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004490 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004491 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004492 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 +00004493 ;;
4494 *)
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in notfound
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004500 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004502 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503 $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 +00004504 break 2
4505 fi
4506done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004507 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004508IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004509
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004510 ;;
4511esac
4512fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004513ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4514if test -n "$ac_pt_CXX"; then
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4516$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004517else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004521
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004522 if test "x$ac_pt_CXX" = x; then
4523 CXX="g++"
4524 else
4525 case $cross_compiling:$ac_tool_warned in
4526yes:)
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4529ac_tool_warned=yes ;;
4530esac
4531 CXX=$ac_pt_CXX
4532 fi
4533else
4534 CXX="$ac_cv_path_CXX"
4535fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004537 cc) if test -n "$ac_tool_prefix"; then
4538 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4539set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4541$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004542if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004543 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004544else
4545 case $CXX in
4546 [\\/]* | ?:[\\/]*)
4547 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4548 ;;
4549 *)
4550 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4551for as_dir in notfound
4552do
4553 IFS=$as_save_IFS
4554 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004555 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004556 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004557 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004558 $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 +00004559 break 2
4560 fi
4561done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004562 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004563IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004564
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004565 ;;
4566esac
4567fi
4568CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004569if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4571$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4574$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004576
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004577
4578fi
4579if test -z "$ac_cv_path_CXX"; then
4580 ac_pt_CXX=$CXX
4581 # Extract the first word of "c++", so it can be a program name with args.
4582set dummy c++; ac_word=$2
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4584$as_echo_n "checking for $ac_word... " >&6; }
4585if ${ac_cv_path_ac_pt_CXX+:} false; then :
4586 $as_echo_n "(cached) " >&6
4587else
4588 case $ac_pt_CXX in
4589 [\\/]* | ?:[\\/]*)
4590 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4591 ;;
4592 *)
4593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in notfound
4595do
4596 IFS=$as_save_IFS
4597 test -z "$as_dir" && as_dir=.
4598 for ac_exec_ext in '' $ac_executable_extensions; do
4599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4600 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602 break 2
4603 fi
4604done
4605 done
4606IFS=$as_save_IFS
4607
4608 ;;
4609esac
4610fi
4611ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4612if test -n "$ac_pt_CXX"; then
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4614$as_echo "$ac_pt_CXX" >&6; }
4615else
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4617$as_echo "no" >&6; }
4618fi
4619
4620 if test "x$ac_pt_CXX" = x; then
4621 CXX="c++"
4622 else
4623 case $cross_compiling:$ac_tool_warned in
4624yes:)
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4626$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4627ac_tool_warned=yes ;;
4628esac
4629 CXX=$ac_pt_CXX
4630 fi
4631else
4632 CXX="$ac_cv_path_CXX"
4633fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004634 ;;
4635 esac
4636 if test "$CXX" = "notfound"
4637 then
4638 CXX=""
4639 fi
4640fi
4641if test -z "$CXX"
4642then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004643 if test -n "$ac_tool_prefix"; then
4644 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4645 do
4646 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4649$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004650if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004651 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652else
4653 if test -n "$CXX"; then
4654 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4655else
4656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4657for as_dir in $PATH
4658do
4659 IFS=$as_save_IFS
4660 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004661 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004662 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004663 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004664 $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 +00004665 break 2
4666 fi
4667done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004668 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004669IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004670
4671fi
4672fi
4673CXX=$ac_cv_prog_CXX
4674if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4676$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004680fi
4681
Martin v. Löwiseba40652007-08-30 20:10:57 +00004682
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004683 test -n "$CXX" && break
4684 done
4685fi
4686if test -z "$CXX"; then
4687 ac_ct_CXX=$CXX
4688 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4689do
4690 # Extract the first word of "$ac_prog", so it can be a program name with args.
4691set dummy $ac_prog; ac_word=$2
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4693$as_echo_n "checking for $ac_word... " >&6; }
4694if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4695 $as_echo_n "(cached) " >&6
4696else
4697 if test -n "$ac_ct_CXX"; then
4698 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4699else
4700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4701for as_dir in $PATH
4702do
4703 IFS=$as_save_IFS
4704 test -z "$as_dir" && as_dir=.
4705 for ac_exec_ext in '' $ac_executable_extensions; do
4706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4707 ac_cv_prog_ac_ct_CXX="$ac_prog"
4708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4709 break 2
4710 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004711done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004712 done
4713IFS=$as_save_IFS
4714
4715fi
4716fi
4717ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4718if test -n "$ac_ct_CXX"; then
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4720$as_echo "$ac_ct_CXX" >&6; }
4721else
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4723$as_echo "no" >&6; }
4724fi
4725
4726
4727 test -n "$ac_ct_CXX" && break
4728done
4729
4730 if test "x$ac_ct_CXX" = x; then
4731 CXX="notfound"
4732 else
4733 case $cross_compiling:$ac_tool_warned in
4734yes:)
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4737ac_tool_warned=yes ;;
4738esac
4739 CXX=$ac_ct_CXX
4740 fi
4741fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004742
4743 if test "$CXX" = "notfound"
4744 then
4745 CXX=""
4746 fi
4747fi
4748if test "$preset_cxx" != "$CXX"
4749then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004751
4752 By default, distutils will build C++ extension modules with \"$CXX\".
4753 If this is not intended, then set CXX on the configure command line.
4754 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004755$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004756
4757 By default, distutils will build C++ extension modules with \"$CXX\".
4758 If this is not intended, then set CXX on the configure command line.
4759 " >&2;}
4760fi
4761
doko@python.org4e63fbe2013-01-25 13:08:27 +01004762MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4763
4764
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004765
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004766# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004767
4768ac_ext=c
4769ac_cpp='$CPP $CPPFLAGS'
4770ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4771ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4772ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4774$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004775# On Suns, sometimes $CPP names a directory.
4776if test -n "$CPP" && test -d "$CPP"; then
4777 CPP=
4778fi
4779if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004780 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004782else
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 # Double quotes because CPP needs to be expanded
4784 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4785 do
4786 ac_preproc_ok=false
4787for ac_c_preproc_warn_flag in '' yes
4788do
4789 # Use a header file that comes with gcc, so configuring glibc
4790 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004791 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4792 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004793 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004796/* end confdefs.h. */
4797#ifdef __STDC__
4798# include <limits.h>
4799#else
4800# include <assert.h>
4801#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004802 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004804if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806else
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 # Broken: fails on valid input.
4808continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004809fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004810rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004811
Martin v. Löwiseba40652007-08-30 20:10:57 +00004812 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004813 # can be detected and how.
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. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004816#include <ac_nonexistent.h>
4817_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004818if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 # Broken: success on invalid input.
4820continue
4821else
Martin v. Löwis11437992002-04-12 09:54:03 +00004822 # Passes both tests.
4823ac_preproc_ok=:
4824break
4825fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004826rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004827
4828done
4829# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004830rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004831if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004832 break
4833fi
4834
4835 done
4836 ac_cv_prog_CPP=$CPP
4837
4838fi
4839 CPP=$ac_cv_prog_CPP
4840else
4841 ac_cv_prog_CPP=$CPP
4842fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4844$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004845ac_preproc_ok=false
4846for ac_c_preproc_warn_flag in '' yes
4847do
4848 # Use a header file that comes with gcc, so configuring glibc
4849 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004850 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4851 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004852 # On the NeXT, cc -E runs the code through the compiler's parser,
4853 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004855/* end confdefs.h. */
4856#ifdef __STDC__
4857# include <limits.h>
4858#else
4859# include <assert.h>
4860#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004861 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004863if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004864
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865else
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # Broken: fails on valid input.
4867continue
4868fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004869rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004870
Martin v. Löwiseba40652007-08-30 20:10:57 +00004871 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004874/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004875#include <ac_nonexistent.h>
4876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004877if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004878 # Broken: success on invalid input.
4879continue
4880else
Martin v. Löwis11437992002-04-12 09:54:03 +00004881 # Passes both tests.
4882ac_preproc_ok=:
4883break
4884fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004885rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004886
4887done
4888# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004889rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004890if $ac_preproc_ok; then :
4891
Martin v. Löwis11437992002-04-12 09:54:03 +00004892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004895as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004896See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004897fi
4898
4899ac_ext=c
4900ac_cpp='$CPP $CPPFLAGS'
4901ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4903ac_compiler_gnu=$ac_cv_c_compiler_gnu
4904
4905
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4907$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004908if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004909 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004910else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004913 # Loop through the user's path and test for each of PROGNAME-LIST
4914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004915for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4916do
4917 IFS=$as_save_IFS
4918 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 for ac_prog in grep ggrep; do
4920 for ac_exec_ext in '' $ac_executable_extensions; do
4921 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004922 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004924 # Check for GNU $ac_path_GREP
4925case `"$ac_path_GREP" --version 2>&1` in
4926*GNU*)
4927 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4928*)
4929 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004930 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931 while :
4932 do
4933 cat "conftest.in" "conftest.in" >"conftest.tmp"
4934 mv "conftest.tmp" "conftest.in"
4935 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004937 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4938 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4941 # Best one so far, save it but keep looking for a better one
4942 ac_cv_path_GREP="$ac_path_GREP"
4943 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004944 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 # 10*(2^10) chars as input seems more than enough
4946 test $ac_count -gt 10 && break
4947 done
4948 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4949esac
4950
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004951 $ac_path_GREP_found && break 3
4952 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004954 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004955IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004956 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004957 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 +00004958 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004959else
4960 ac_cv_path_GREP=$GREP
4961fi
4962
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4965$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966 GREP="$ac_cv_path_GREP"
4967
4968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4970$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004971if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004972 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973else
4974 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4975 then ac_cv_path_EGREP="$GREP -E"
4976 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979 # Loop through the user's path and test for each of PROGNAME-LIST
4980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4982do
4983 IFS=$as_save_IFS
4984 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985 for ac_prog in egrep; do
4986 for ac_exec_ext in '' $ac_executable_extensions; do
4987 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004988 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004990 # Check for GNU $ac_path_EGREP
4991case `"$ac_path_EGREP" --version 2>&1` in
4992*GNU*)
4993 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4994*)
4995 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004996 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997 while :
4998 do
4999 cat "conftest.in" "conftest.in" >"conftest.tmp"
5000 mv "conftest.tmp" "conftest.in"
5001 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005003 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5004 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00005006 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5007 # Best one so far, save it but keep looking for a better one
5008 ac_cv_path_EGREP="$ac_path_EGREP"
5009 ac_path_EGREP_max=$ac_count
5010 fi
5011 # 10*(2^10) chars as input seems more than enough
5012 test $ac_count -gt 10 && break
5013 done
5014 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5015esac
5016
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005017 $ac_path_EGREP_found && break 3
5018 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005019 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005020 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005021IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005022 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005023 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 +00005024 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005025else
5026 ac_cv_path_EGREP=$EGREP
5027fi
5028
Martin v. Löwiseba40652007-08-30 20:10:57 +00005029 fi
5030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5032$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005033 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005034
5035
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5037$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005038if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005039 $as_echo_n "(cached) " >&6
5040else
5041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005042/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043#include <stdlib.h>
5044#include <stdarg.h>
5045#include <string.h>
5046#include <float.h>
5047
5048int
5049main ()
5050{
5051
5052 ;
5053 return 0;
5054}
5055_ACEOF
5056if ac_fn_c_try_compile "$LINENO"; then :
5057 ac_cv_header_stdc=yes
5058else
5059 ac_cv_header_stdc=no
5060fi
5061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5062
5063if test $ac_cv_header_stdc = yes; then
5064 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5066/* end confdefs.h. */
5067#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005068
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005069_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005071 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005072
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005074 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005075fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005076rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005077
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005078fi
5079
5080if test $ac_cv_header_stdc = yes; then
5081 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5083/* end confdefs.h. */
5084#include <stdlib.h>
5085
5086_ACEOF
5087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5088 $EGREP "free" >/dev/null 2>&1; then :
5089
5090else
5091 ac_cv_header_stdc=no
5092fi
5093rm -f conftest*
5094
5095fi
5096
5097if test $ac_cv_header_stdc = yes; then
5098 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5099 if test "$cross_compiling" = yes; then :
5100 :
5101else
5102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5103/* end confdefs.h. */
5104#include <ctype.h>
5105#include <stdlib.h>
5106#if ((' ' & 0x0FF) == 0x020)
5107# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5108# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5109#else
5110# define ISLOWER(c) \
5111 (('a' <= (c) && (c) <= 'i') \
5112 || ('j' <= (c) && (c) <= 'r') \
5113 || ('s' <= (c) && (c) <= 'z'))
5114# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5115#endif
5116
5117#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5118int
5119main ()
5120{
5121 int i;
5122 for (i = 0; i < 256; i++)
5123 if (XOR (islower (i), ISLOWER (i))
5124 || toupper (i) != TOUPPER (i))
5125 return 2;
5126 return 0;
5127}
5128_ACEOF
5129if ac_fn_c_try_run "$LINENO"; then :
5130
5131else
5132 ac_cv_header_stdc=no
5133fi
5134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5135 conftest.$ac_objext conftest.beam conftest.$ac_ext
5136fi
5137
5138fi
5139fi
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5141$as_echo "$ac_cv_header_stdc" >&6; }
5142if test $ac_cv_header_stdc = yes; then
5143
5144$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5145
5146fi
5147
5148# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5149for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5150 inttypes.h stdint.h unistd.h
5151do :
5152 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5153ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5154"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005155if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005156 cat >>confdefs.h <<_ACEOF
5157#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5158_ACEOF
5159
5160fi
5161
5162done
5163
5164
5165
5166 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 +01005167if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005168 MINIX=yes
5169else
5170 MINIX=
5171fi
5172
5173
5174 if test "$MINIX" = yes; then
5175
5176$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5177
5178
5179$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5180
5181
5182$as_echo "#define _MINIX 1" >>confdefs.h
5183
5184 fi
5185
5186
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5188$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005189if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005190 $as_echo_n "(cached) " >&6
5191else
5192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5193/* end confdefs.h. */
5194
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005195# define __EXTENSIONS__ 1
5196 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005197int
5198main ()
5199{
5200
5201 ;
5202 return 0;
5203}
5204_ACEOF
5205if ac_fn_c_try_compile "$LINENO"; then :
5206 ac_cv_safe_to_define___extensions__=yes
5207else
5208 ac_cv_safe_to_define___extensions__=no
5209fi
5210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5211fi
5212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5213$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5214 test $ac_cv_safe_to_define___extensions__ = yes &&
5215 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5216
5217 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5218
5219 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5220
5221 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5222
5223 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5224
5225
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005226
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227# Check for unsupported systems
5228case $ac_sys_system/$ac_sys_release in
5229atheos*|Linux*/1*)
5230 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5231 echo See README for details.
5232 exit 1;;
5233esac
5234
5235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5237$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005238
5239# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005240if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241 withval=$with_suffix;
5242 case $withval in
5243 no) EXEEXT=;;
5244 yes) EXEEXT=.exe;;
5245 *) EXEEXT=$withval;;
5246 esac
5247fi
5248
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5250$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251
5252# Test whether we're running on a non-case-sensitive system, in which
5253# case we give a warning if no ext is given
5254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5256$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257if test ! -d CaseSensitiveTestDir; then
5258mkdir CaseSensitiveTestDir
5259fi
5260
5261if test -d casesensitivetestdir
5262then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5264$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265 BUILDEXEEXT=.exe
5266else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5268$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269 BUILDEXEEXT=$EXEEXT
5270fi
5271rmdir CaseSensitiveTestDir
5272
5273case $MACHDEP in
5274bsdos*)
5275 case $CC in
5276 gcc) CC="$CC -D_HAVE_BSDI";;
5277 esac;;
5278esac
5279
5280case $ac_sys_system in
5281hp*|HP*)
5282 case $CC in
5283 cc|*/cc) CC="$CC -Ae";;
5284 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005285SunOS*)
5286 # Some functions have a prototype only with that define, e.g. confstr
5287
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005288$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289
5290 ;;
5291esac
5292
5293
5294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5296$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297if test -z "$LIBRARY"
5298then
5299 LIBRARY='libpython$(VERSION).a'
5300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5302$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005303
5304# LDLIBRARY is the name of the library to link against (as opposed to the
5305# name of the library into which to insert object files). BLDLIBRARY is also
5306# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5307# is blank as the main program is not linked directly against LDLIBRARY.
5308# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5309# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5310# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5311# DLLLIBRARY is the shared (i.e., DLL) library.
5312#
5313# RUNSHARED is used to run shared python without installed libraries
5314#
5315# INSTSONAME is the name of the shared library that will be use to install
5316# on the system - some systems like version suffix, others don't
5317
5318
5319
5320
5321
5322
5323LDLIBRARY="$LIBRARY"
5324BLDLIBRARY='$(LDLIBRARY)'
5325INSTSONAME='$(LDLIBRARY)'
5326DLLLIBRARY=''
5327LDLIBRARYDIR=''
5328RUNSHARED=''
5329
5330# LINKCC is the command that links the python executable -- default is $(CC).
5331# If CXX is set, and if it is needed to link a main function that was
5332# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5333# python might then depend on the C++ runtime
5334# This is altered for AIX in order to build the export list before
5335# linking.
5336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5338$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339if test -z "$LINKCC"
5340then
5341 LINKCC='$(PURIFY) $(MAINCC)'
5342 case $ac_sys_system in
5343 AIX*)
5344 exp_extra="\"\""
5345 if test $ac_sys_release -ge 5 -o \
5346 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5347 exp_extra="."
5348 fi
5349 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005350 QNX*)
5351 # qcc must be used because the other compilers do not
5352 # support -N.
5353 LINKCC=qcc;;
5354 esac
5355fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5357$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358
5359# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5360# make sure we default having it set to "no": this is used by
5361# distutils.unixccompiler to know if it should add --enable-new-dtags
5362# to linker command lines, and failing to detect GNU ld simply results
5363# in the same bahaviour as before.
5364
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5366$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005367ac_prog=ld
5368if test "$GCC" = yes; then
5369 ac_prog=`$CC -print-prog-name=ld`
5370fi
5371case `"$ac_prog" -V 2>&1 < /dev/null` in
5372 *GNU*)
5373 GNULD=yes;;
5374 *)
5375 GNULD=no;;
5376esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5378$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5381$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005382# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005383if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005384 enableval=$enable_shared;
5385fi
5386
5387
5388if test -z "$enable_shared"
5389then
5390 case $ac_sys_system in
5391 CYGWIN* | atheos*)
5392 enable_shared="yes";;
5393 *)
5394 enable_shared="no";;
5395 esac
5396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5398$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5401$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005402# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005403if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005404 enableval=$enable_profiling;
5405fi
5406
5407if test "x$enable_profiling" = xyes; then
5408 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005409 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005411/* end confdefs.h. */
5412int main() { return 0; }
5413_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005414if ac_fn_c_try_link "$LINENO"; then :
5415
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005417 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005419rm -f core conftest.err conftest.$ac_objext \
5420 conftest$ac_exeext conftest.$ac_ext
5421 CC="$ac_save_cc"
5422else
5423 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005424fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5426$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005428if test "x$enable_profiling" = xyes; then
5429 BASECFLAGS="-pg $BASECFLAGS"
5430 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431fi
5432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5434$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435
5436# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5437# library that we build, but we do not want to link against it (we
5438# will find it with a -framework option). For this reason there is an
5439# extra variable BLDLIBRARY against which Python and the extension
5440# modules are linked, BLDLIBRARY. This is normally the same as
5441# LDLIBRARY, but empty for MacOSX framework builds.
5442if test "$enable_framework"
5443then
5444 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005445 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446 BLDLIBRARY=''
5447else
5448 BLDLIBRARY='$(LDLIBRARY)'
5449fi
5450
5451# Other platforms follow
5452if test $enable_shared = "yes"; then
5453
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005454$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005455
5456 case $ac_sys_system in
5457 BeOS*)
5458 LDLIBRARY='libpython$(VERSION).so'
5459 ;;
5460 CYGWIN*)
5461 LDLIBRARY='libpython$(VERSION).dll.a'
5462 DLLLIBRARY='libpython$(VERSION).dll'
5463 ;;
5464 SunOS*)
5465 LDLIBRARY='libpython$(VERSION).so'
5466 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005467 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005468 INSTSONAME="$LDLIBRARY".$SOVERSION
5469 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005470 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471 LDLIBRARY='libpython$(VERSION).so'
5472 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005473 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 case $ac_sys_system in
5475 FreeBSD*)
5476 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5477 ;;
5478 esac
5479 INSTSONAME="$LDLIBRARY".$SOVERSION
5480 ;;
5481 hp*|HP*)
5482 case `uname -m` in
5483 ia64)
5484 LDLIBRARY='libpython$(VERSION).so'
5485 ;;
5486 *)
5487 LDLIBRARY='libpython$(VERSION).sl'
5488 ;;
5489 esac
5490 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005491 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 ;;
5493 OSF*)
5494 LDLIBRARY='libpython$(VERSION).so'
5495 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005496 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005497 ;;
5498 atheos*)
5499 LDLIBRARY='libpython$(VERSION).so'
5500 BLDLIBRARY='-L. -lpython$(VERSION)'
5501 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5502 ;;
5503 Darwin*)
5504 LDLIBRARY='libpython$(VERSION).dylib'
5505 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005506 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005508 AIX*)
5509 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005510 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005511 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005512
5513 esac
5514else # shared is disabled
5515 case $ac_sys_system in
5516 CYGWIN*)
5517 BLDLIBRARY='$(LIBRARY)'
5518 LDLIBRARY='libpython$(VERSION).dll.a'
5519 ;;
5520 esac
5521fi
5522
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005523if test "$cross_compiling" = yes; then
5524 RUNSHARED=
5525fi
5526
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5528$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529
5530if test -n "$ac_tool_prefix"; then
5531 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5532set dummy ${ac_tool_prefix}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_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 "$RANLIB"; then
5539 ac_cv_prog_RANLIB="$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_RANLIB="${ac_tool_prefix}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
5558RANLIB=$ac_cv_prog_RANLIB
5559if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5561$as_echo "$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
5568fi
5569if test -z "$ac_cv_prog_RANLIB"; then
5570 ac_ct_RANLIB=$RANLIB
5571 # Extract the first word of "ranlib", so it can be a program name with args.
5572set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5574$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005575if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005576 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005577else
5578 if test -n "$ac_ct_RANLIB"; then
5579 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5580else
5581as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5582for as_dir in $PATH
5583do
5584 IFS=$as_save_IFS
5585 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005586 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005588 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005590 break 2
5591 fi
5592done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005593 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005594IFS=$as_save_IFS
5595
5596fi
5597fi
5598ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5599if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5601$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005605fi
5606
5607 if test "x$ac_ct_RANLIB" = x; then
5608 RANLIB=":"
5609 else
5610 case $cross_compiling:$ac_tool_warned in
5611yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005612{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5613$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005614ac_tool_warned=yes ;;
5615esac
5616 RANLIB=$ac_ct_RANLIB
5617 fi
5618else
5619 RANLIB="$ac_cv_prog_RANLIB"
5620fi
5621
5622
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005623if test -n "$ac_tool_prefix"; then
5624 for ac_prog in ar aal
5625 do
5626 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5627set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5629$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005630if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005631 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005632else
5633 if test -n "$AR"; then
5634 ac_cv_prog_AR="$AR" # Let the user override the test.
5635else
5636as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5637for as_dir in $PATH
5638do
5639 IFS=$as_save_IFS
5640 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005641 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005643 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005645 break 2
5646 fi
5647done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005648 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005649IFS=$as_save_IFS
5650
5651fi
5652fi
5653AR=$ac_cv_prog_AR
5654if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5656$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005660fi
5661
5662
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005663 test -n "$AR" && break
5664 done
5665fi
5666if test -z "$AR"; then
5667 ac_ct_AR=$AR
5668 for ac_prog in ar aal
5669do
5670 # Extract the first word of "$ac_prog", so it can be a program name with args.
5671set dummy $ac_prog; ac_word=$2
5672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5673$as_echo_n "checking for $ac_word... " >&6; }
5674if ${ac_cv_prog_ac_ct_AR+:} false; then :
5675 $as_echo_n "(cached) " >&6
5676else
5677 if test -n "$ac_ct_AR"; then
5678 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5679else
5680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681for as_dir in $PATH
5682do
5683 IFS=$as_save_IFS
5684 test -z "$as_dir" && as_dir=.
5685 for ac_exec_ext in '' $ac_executable_extensions; do
5686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5687 ac_cv_prog_ac_ct_AR="$ac_prog"
5688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689 break 2
5690 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005691done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005692 done
5693IFS=$as_save_IFS
5694
5695fi
5696fi
5697ac_ct_AR=$ac_cv_prog_ac_ct_AR
5698if test -n "$ac_ct_AR"; then
5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5700$as_echo "$ac_ct_AR" >&6; }
5701else
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5703$as_echo "no" >&6; }
5704fi
5705
5706
5707 test -n "$ac_ct_AR" && break
5708done
5709
5710 if test "x$ac_ct_AR" = x; then
5711 AR="ar"
5712 else
5713 case $cross_compiling:$ac_tool_warned in
5714yes:)
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5717ac_tool_warned=yes ;;
5718esac
5719 AR=$ac_ct_AR
5720 fi
5721fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722
5723
5724# tweak ARFLAGS only if the user didn't set it on the command line
5725
5726if test -z "$ARFLAGS"
5727then
5728 ARFLAGS="rc"
5729fi
5730
5731
Victor Stinner2c7085f2017-05-02 16:55:50 +02005732
5733
5734
Victor Stinnerdf569252017-05-03 00:05:45 +02005735if test -e $srcdir/.git
Victor Stinner2c7085f2017-05-02 16:55:50 +02005736then
5737# Extract the first word of "git", so it can be a program name with args.
5738set dummy git; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5740$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinner2c7085f2017-05-02 16:55:50 +02005741if ${ac_cv_prog_HAS_GIT+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005742 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005743else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005744 if test -n "$HAS_GIT"; then
5745 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005746else
5747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5748for as_dir in $PATH
5749do
5750 IFS=$as_save_IFS
5751 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005752 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005754 ac_cv_prog_HAS_GIT="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005756 break 2
5757 fi
5758done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005759 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005760IFS=$as_save_IFS
5761
Victor Stinner2c7085f2017-05-02 16:55:50 +02005762 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005763fi
5764fi
Victor Stinner2c7085f2017-05-02 16:55:50 +02005765HAS_GIT=$ac_cv_prog_HAS_GIT
5766if test -n "$HAS_GIT"; then
5767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
5768$as_echo "$HAS_GIT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5771$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005772fi
5773
5774
Victor Stinner2c7085f2017-05-02 16:55:50 +02005775else
5776HAS_GIT=no-repository
5777fi
5778if test $HAS_GIT = found
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005779then
Victor Stinner2c7085f2017-05-02 16:55:50 +02005780 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
5781 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
5782 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005783else
Victor Stinner2c7085f2017-05-02 16:55:50 +02005784 GITVERSION=""
5785 GITTAG=""
5786 GITBRANCH=""
Georg Brandl3a5508e2011-03-06 10:42:21 +01005787fi
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 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006403 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006404 DEF_MAKE_RULE="build_all"
6405else
6406 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006407 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006408 DEF_MAKE_RULE="all"
6409fi
6410
6411
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006412# Enable LTO flags
6413
6414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6415$as_echo_n "checking for --with-lto... " >&6; }
6416
6417# Check whether --with-lto was given.
6418if test "${with_lto+set}" = set; then :
6419 withval=$with_lto;
6420if test "$withval" != no
6421then
6422 Py_LTO='true'
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; };
6425else
6426 Py_LTO='false'
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428$as_echo "no" >&6; };
6429fi
6430else
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435if test "$Py_LTO" = 'true' ; then
6436 case $CC in
6437 *clang*)
6438 # Any changes made here should be reflected in the GCC+Darwin case below
6439 LTOFLAGS="-flto"
6440 ;;
6441 *gcc*)
6442 case $ac_sys_system in
6443 Darwin*)
6444 LTOFLAGS="-flto"
6445 ;;
6446 *)
6447 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6448 ;;
6449 esac
6450 ;;
6451 esac
6452fi
6453
6454
Brett Cannon4ff151a2015-09-18 15:09:42 -07006455# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006456
6457
6458
6459
6460
Gregory P. Smith794b2912016-09-08 00:07:40 -07006461# Make this work on systems where llvm tools are not installed with their
6462# normal names in the default $PATH (ie: Ubuntu). They exist under the
6463# non-suffixed name in their versioned llvm directory.
6464llvm_bin_dir=''
6465llvm_path="${PATH}"
6466if test "${CC}" = "clang"
6467then
6468 clang_bin=`which clang`
6469 # Some systems install clang elsewhere as a symlink to the real path
6470 # which is where the related llvm tools are located.
6471 if test -L "${clang_bin}"
6472 then
6473 clang_dir=`dirname "${clang_bin}"`
6474 clang_bin=`readlink "${clang_bin}"`
6475 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6476 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6477 fi
6478fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006479
Gregory P. Smith794b2912016-09-08 00:07:40 -07006480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6481$as_echo_n "checking target system type... " >&6; }
6482if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006483 $as_echo_n "(cached) " >&6
6484else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006485 if test "x$target_alias" = x; then
6486 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006487else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006488 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6489 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6490fi
6491
6492fi
6493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6494$as_echo "$ac_cv_target" >&6; }
6495case $ac_cv_target in
6496*-*-*) ;;
6497*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6498esac
6499target=$ac_cv_target
6500ac_save_IFS=$IFS; IFS='-'
6501set x $ac_cv_target
6502shift
6503target_cpu=$1
6504target_vendor=$2
6505shift; shift
6506# Remember, the first character of IFS is used to create $*,
6507# except with old shells:
6508target_os=$*
6509IFS=$ac_save_IFS
6510case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6511
6512
6513# The aliases save the names the user supplied, while $host etc.
6514# will get canonicalized.
6515test -n "$target_alias" &&
6516 test "$program_prefix$program_suffix$program_transform_name" = \
6517 NONENONEs,x,x, &&
6518 program_prefix=${target_alias}-
6519# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6520set dummy $target_alias-llvm-profdata; ac_word=$2
6521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6522$as_echo_n "checking for $ac_word... " >&6; }
6523if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6524 $as_echo_n "(cached) " >&6
6525else
6526 case $LLVM_PROFDATA in
6527 [\\/]* | ?:[\\/]*)
6528 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6529 ;;
6530 *)
6531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6532for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006533do
6534 IFS=$as_save_IFS
6535 test -z "$as_dir" && as_dir=.
6536 for ac_exec_ext in '' $ac_executable_extensions; do
6537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006538 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6540 break 2
6541 fi
6542done
6543 done
6544IFS=$as_save_IFS
6545
Gregory P. Smith794b2912016-09-08 00:07:40 -07006546 ;;
6547esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006548fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006549LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6550if test -n "$LLVM_PROFDATA"; then
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6552$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006553else
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6555$as_echo "no" >&6; }
6556fi
6557
6558
Gregory P. Smith794b2912016-09-08 00:07:40 -07006559if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6560 if test "$build" = "$target"; then
6561 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6562 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6563set dummy llvm-profdata; ac_word=$2
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565$as_echo_n "checking for $ac_word... " >&6; }
6566if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 case $ac_pt_LLVM_PROFDATA in
6570 [\\/]* | ?:[\\/]*)
6571 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6572 ;;
6573 *)
6574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6575for as_dir in ${llvm_path}
6576do
6577 IFS=$as_save_IFS
6578 test -z "$as_dir" && as_dir=.
6579 for ac_exec_ext in '' $ac_executable_extensions; do
6580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6581 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6583 break 2
6584 fi
6585done
6586 done
6587IFS=$as_save_IFS
6588
6589 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6590 ;;
6591esac
6592fi
6593ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6594if test -n "$ac_pt_LLVM_PROFDATA"; then
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6596$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6597else
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6603 else
6604 LLVM_PROFDATA="''"
6605 fi
6606else
6607 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6608fi
6609
6610
6611if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6612then
6613 LLVM_PROF_FOUND="found"
6614else
6615 LLVM_PROF_FOUND="not-found"
6616fi
6617if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6618then
6619 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6620 if test -n "${found_llvm_profdata}"
6621 then
6622 # llvm-profdata isn't directly in $PATH in some cases.
6623 # https://apple.stackexchange.com/questions/197053/
6624 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6625 LLVM_PROF_FOUND=found
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6627$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6628 fi
6629fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006630LLVM_PROF_ERR=no
6631case $CC in
6632 *clang*)
6633 # Any changes made here should be reflected in the GCC+Darwin case below
6634 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6635 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006636 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006637 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6638 if test $LLVM_PROF_FOUND = not-found
6639 then
6640 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006641 if test "${REQUIRE_PGO}" = "yes"
6642 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006643 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 -07006644 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006645 fi
6646 ;;
6647 *gcc*)
6648 case $ac_sys_system in
6649 Darwin*)
6650 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6651 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006652 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006653 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006654 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006655 then
6656 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006657 if test "${REQUIRE_PGO}" = "yes"
6658 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)b9999152016-11-20 21:19:36 +00006659 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 -07006660 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006661 fi
6662 ;;
6663 *)
6664 PGO_PROF_GEN_FLAG="-fprofile-generate"
6665 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6666 LLVM_PROF_MERGER="true"
6667 LLVM_PROF_FILE=""
6668 ;;
6669 esac
6670 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006671 *icc*)
6672 PGO_PROF_GEN_FLAG="-prof-gen"
6673 PGO_PROF_USE_FLAG="-prof-use"
6674 LLVM_PROF_MERGER="true"
6675 LLVM_PROF_FILE=""
6676 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006677esac
6678
6679
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006680# On some compilers, pthreads are available without further options
6681# (e.g. MacOS X). On some of these systems, the compiler will not
6682# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6683# So we have to see first whether pthreads are available without
6684# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6686$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006687if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006688 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006690 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006691 ac_cv_pthread_is_default=no
6692else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006694/* end confdefs.h. */
6695
Stefan Krahae66ca62012-11-22 22:36:57 +01006696#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006697#include <pthread.h>
6698
6699void* routine(void* p){return NULL;}
6700
6701int main(){
6702 pthread_t p;
6703 if(pthread_create(&p,NULL,routine,NULL)!=0)
6704 return 1;
6705 (void)pthread_detach(p);
6706 return 0;
6707}
6708
6709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006710if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006711
6712 ac_cv_pthread_is_default=yes
6713 ac_cv_kthread=no
6714 ac_cv_pthread=no
6715
6716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006718fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006721fi
6722
6723
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006724fi
6725
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6727$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006728
6729
6730if test $ac_cv_pthread_is_default = yes
6731then
6732 ac_cv_kpthread=no
6733else
6734# -Kpthread, if available, provides the right #defines
6735# and linker options to make pthread_create available
6736# Some compilers won't report that they do not support -Kpthread,
6737# so we need to run a program to see whether it really made the
6738# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6740$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006741if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006742 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006743else
6744 ac_save_cc="$CC"
6745CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006746if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006747 ac_cv_kpthread=no
6748else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006750/* end confdefs.h. */
6751
Stefan Krahae66ca62012-11-22 22:36:57 +01006752#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753#include <pthread.h>
6754
6755void* routine(void* p){return NULL;}
6756
6757int main(){
6758 pthread_t p;
6759 if(pthread_create(&p,NULL,routine,NULL)!=0)
6760 return 1;
6761 (void)pthread_detach(p);
6762 return 0;
6763}
6764
6765_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006766if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767 ac_cv_kpthread=yes
6768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006769 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006771rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6772 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006773fi
6774
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006775CC="$ac_save_cc"
6776fi
6777
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6779$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006780fi
6781
6782if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6783then
6784# -Kthread, if available, provides the right #defines
6785# and linker options to make pthread_create available
6786# Some compilers won't report that they do not support -Kthread,
6787# so we need to run a program to see whether it really made the
6788# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6790$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006791if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006792 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006793else
6794 ac_save_cc="$CC"
6795CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006796if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006797 ac_cv_kthread=no
6798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006800/* end confdefs.h. */
6801
Stefan Krahae66ca62012-11-22 22:36:57 +01006802#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006803#include <pthread.h>
6804
6805void* routine(void* p){return NULL;}
6806
6807int main(){
6808 pthread_t p;
6809 if(pthread_create(&p,NULL,routine,NULL)!=0)
6810 return 1;
6811 (void)pthread_detach(p);
6812 return 0;
6813}
6814
6815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006816if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006817 ac_cv_kthread=yes
6818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006819 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006823fi
6824
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006825CC="$ac_save_cc"
6826fi
6827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6829$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006830fi
6831
6832if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6833then
6834# -pthread, if available, provides the right #defines
6835# and linker options to make pthread_create available
6836# Some compilers won't report that they do not support -pthread,
6837# so we need to run a program to see whether it really made the
6838# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6840$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006841if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006843else
6844 ac_save_cc="$CC"
6845CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006846if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006847 ac_cv_pthread=no
6848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006850/* end confdefs.h. */
6851
Stefan Krahae66ca62012-11-22 22:36:57 +01006852#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006853#include <pthread.h>
6854
6855void* routine(void* p){return NULL;}
6856
6857int main(){
6858 pthread_t p;
6859 if(pthread_create(&p,NULL,routine,NULL)!=0)
6860 return 1;
6861 (void)pthread_detach(p);
6862 return 0;
6863}
6864
6865_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867 ac_cv_pthread=yes
6868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006873fi
6874
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006875CC="$ac_save_cc"
6876fi
6877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6879$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006880fi
6881
6882# If we have set a CC compiler flag for thread support then
6883# check if it works for CXX, too.
6884ac_cv_cxx_thread=no
6885if test ! -z "$CXX"
6886then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6888$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006889ac_save_cxx="$CXX"
6890
6891if test "$ac_cv_kpthread" = "yes"
6892then
6893 CXX="$CXX -Kpthread"
6894 ac_cv_cxx_thread=yes
6895elif test "$ac_cv_kthread" = "yes"
6896then
6897 CXX="$CXX -Kthread"
6898 ac_cv_cxx_thread=yes
6899elif test "$ac_cv_pthread" = "yes"
6900then
6901 CXX="$CXX -pthread"
6902 ac_cv_cxx_thread=yes
6903fi
6904
6905if test $ac_cv_cxx_thread = yes
6906then
6907 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6908 $CXX -c conftest.$ac_ext 2>&5
6909 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6910 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6911 then
6912 ac_cv_cxx_thread=yes
6913 else
6914 ac_cv_cxx_thread=no
6915 fi
6916 rm -fr conftest*
6917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6919$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006920fi
6921CXX="$ac_save_cxx"
6922
6923
6924# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6926$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006927if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006928 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006931/* end confdefs.h. */
6932#include <stdlib.h>
6933#include <stdarg.h>
6934#include <string.h>
6935#include <float.h>
6936
6937int
6938main ()
6939{
6940
6941 ;
6942 return 0;
6943}
6944_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006945if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006946 ac_cv_header_stdc=yes
6947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006949fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6951
6952if test $ac_cv_header_stdc = yes; then
6953 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006955/* end confdefs.h. */
6956#include <string.h>
6957
6958_ACEOF
6959if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006960 $EGREP "memchr" >/dev/null 2>&1; then :
6961
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006962else
6963 ac_cv_header_stdc=no
6964fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006965rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006966
6967fi
6968
6969if test $ac_cv_header_stdc = yes; then
6970 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006972/* end confdefs.h. */
6973#include <stdlib.h>
6974
6975_ACEOF
6976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977 $EGREP "free" >/dev/null 2>&1; then :
6978
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006979else
6980 ac_cv_header_stdc=no
6981fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006982rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006983
6984fi
6985
6986if test $ac_cv_header_stdc = yes; then
6987 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006989 :
6990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006992/* end confdefs.h. */
6993#include <ctype.h>
6994#include <stdlib.h>
6995#if ((' ' & 0x0FF) == 0x020)
6996# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6997# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6998#else
6999# define ISLOWER(c) \
7000 (('a' <= (c) && (c) <= 'i') \
7001 || ('j' <= (c) && (c) <= 'r') \
7002 || ('s' <= (c) && (c) <= 'z'))
7003# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7004#endif
7005
7006#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7007int
7008main ()
7009{
7010 int i;
7011 for (i = 0; i < 256; i++)
7012 if (XOR (islower (i), ISLOWER (i))
7013 || toupper (i) != TOUPPER (i))
7014 return 2;
7015 return 0;
7016}
7017_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007018if ac_fn_c_try_run "$LINENO"; then :
7019
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007021 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007025fi
7026
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007027fi
7028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7030$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007031if test $ac_cv_header_stdc = yes; then
7032
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007033$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007034
7035fi
7036
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007037for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007038fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007039ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007040shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007041unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007042sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7043sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Peterson6b1c9092016-12-19 23:54:25 -08007044sys/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 +00007045sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007046sys/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 +00007047sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007048bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049do :
7050 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7051ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007052if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007053 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007054#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007055_ACEOF
7056
7057fi
7058
Guido van Rossum627b2d71993-12-24 10:39:16 +00007059done
7060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007061ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007062for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007063 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7065$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007066if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007067 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007068else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007070/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007071#include <sys/types.h>
7072#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007073
Martin v. Löwis11437992002-04-12 09:54:03 +00007074int
7075main ()
7076{
7077if ((DIR *) 0)
7078return 0;
7079 ;
7080 return 0;
7081}
7082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007084 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007086 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007090eval ac_res=\$$as_ac_Header
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7092$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007093if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007095#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007096_ACEOF
7097
7098ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007099fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007100
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007101done
7102# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7103if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7105$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007106if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007108else
Martin v. Löwis11437992002-04-12 09:54:03 +00007109 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007112
Martin v. Löwiseba40652007-08-30 20:10:57 +00007113/* Override any GCC internal prototype to avoid an error.
7114 Use char because int might match the return type of a GCC
7115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007116#ifdef __cplusplus
7117extern "C"
7118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007119char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007120int
7121main ()
7122{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007123return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007124 ;
7125 return 0;
7126}
7127_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007128for ac_lib in '' dir; do
7129 if test -z "$ac_lib"; then
7130 ac_res="none required"
7131 else
7132 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007133 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007134 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007135 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007136 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007138rm -f core conftest.err conftest.$ac_objext \
7139 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007140 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007141 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007143done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007144if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145
Martin v. Löwiseba40652007-08-30 20:10:57 +00007146else
7147 ac_cv_search_opendir=no
7148fi
7149rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007150LIBS=$ac_func_search_save_LIBS
7151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7153$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007154ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007155if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007156 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007158fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007159
Michael W. Hudson54241132001-12-07 15:38:26 +00007160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7162$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007163if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007165else
7166 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007169
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170/* Override any GCC internal prototype to avoid an error.
7171 Use char because int might match the return type of a GCC
7172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007173#ifdef __cplusplus
7174extern "C"
7175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007176char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007177int
7178main ()
7179{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007180return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007181 ;
7182 return 0;
7183}
7184_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007185for ac_lib in '' x; do
7186 if test -z "$ac_lib"; then
7187 ac_res="none required"
7188 else
7189 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007190 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007191 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007193 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007195rm -f core conftest.err conftest.$ac_objext \
7196 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007197 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007198 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007200done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007201if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007202
Martin v. Löwiseba40652007-08-30 20:10:57 +00007203else
7204 ac_cv_search_opendir=no
7205fi
7206rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007207LIBS=$ac_func_search_save_LIBS
7208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7210$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007211ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007212if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007213 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007214
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007215fi
7216
7217fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007218
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7220$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007221if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007223else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007225/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007226#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007227int
7228main ()
7229{
7230return makedev(0, 0);
7231 ;
7232 return 0;
7233}
7234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007235if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007236 ac_cv_header_sys_types_h_makedev=yes
7237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007238 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007239fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007240rm -f core conftest.err conftest.$ac_objext \
7241 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007242
7243fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7245$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007246
7247if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248ac_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 +01007249if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007250
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007252
7253fi
7254
7255
7256
7257 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258 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 +01007259if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007261$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007262
7263fi
7264
7265
7266 fi
7267fi
7268
Michael W. Hudson54241132001-12-07 15:38:26 +00007269
Martin v. Löwis11017b12006-01-14 18:12:57 +00007270# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007271for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272do :
7273 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 +00007274#ifdef HAVE_ASM_TYPES_H
7275#include <asm/types.h>
7276#endif
7277#ifdef HAVE_SYS_SOCKET_H
7278#include <sys/socket.h>
7279#endif
7280
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007281"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007282if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007283 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007285_ACEOF
7286
7287fi
7288
7289done
7290
7291
Guido van Rossum627b2d71993-12-24 10:39:16 +00007292# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007293was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7295$as_echo_n "checking for clock_t in time.h... " >&6; }
7296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007297/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007298#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007299
7300_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007302 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007303 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007304else
Martin v. Löwis11437992002-04-12 09:54:03 +00007305
7306
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007307$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007308
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007309
Guido van Rossum627b2d71993-12-24 10:39:16 +00007310fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007311rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7314$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007315
Neal Norwitz11690112002-07-30 01:08:28 +00007316# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7318$as_echo_n "checking for makedev... " >&6; }
7319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007320/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007321
7322#if defined(MAJOR_IN_MKDEV)
7323#include <sys/mkdev.h>
7324#elif defined(MAJOR_IN_SYSMACROS)
7325#include <sys/sysmacros.h>
7326#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007327#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007328#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007329int
7330main ()
7331{
7332 makedev(0, 0)
7333 ;
7334 return 0;
7335}
7336_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007338 ac_cv_has_makedev=yes
7339else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007341fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007342rm -f core conftest.err conftest.$ac_objext \
7343 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007344if test "$ac_cv_has_makedev" = "no"; then
7345 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007347/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007348
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007349#define _OSF_SOURCE 1
7350#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007351
Neal Norwitz11690112002-07-30 01:08:28 +00007352int
7353main ()
7354{
7355 makedev(0, 0)
7356 ;
7357 return 0;
7358}
7359_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007361 ac_cv_has_makedev=yes
7362else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007363 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007365rm -f core conftest.err conftest.$ac_objext \
7366 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007367 if test "$ac_cv_has_makedev" = "yes"; then
7368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007369$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007370
7371 fi
7372fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7374$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007375if test "$ac_cv_has_makedev" = "yes"; then
7376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007377$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007378
7379fi
7380
Martin v. Löwis399a6892002-10-04 10:22:02 +00007381# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7382# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7383# defined, but the compiler does not support pragma redefine_extname,
7384# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7385# structures (such as rlimit64) without declaring them. As a
7386# work-around, disable LFS on such configurations
7387
7388use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7390$as_echo_n "checking Solaris LFS bug... " >&6; }
7391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007392/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007393
7394#define _LARGEFILE_SOURCE 1
7395#define _FILE_OFFSET_BITS 64
7396#include <sys/resource.h>
7397
Martin v. Löwis399a6892002-10-04 10:22:02 +00007398int
7399main ()
7400{
7401struct rlimit foo;
7402 ;
7403 return 0;
7404}
7405_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007407 sol_lfs_bug=no
7408else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007409 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7413$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007414if test "$sol_lfs_bug" = "yes"; then
7415 use_lfs=no
7416fi
7417
7418if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007419# Two defines needed to enable largefile support on various platforms
7420# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007421case $ac_sys_system/$ac_sys_release in
7422AIX*)
7423
7424$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7425
7426 ;;
7427esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007429$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007430
7431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007432$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007433
Martin v. Löwis399a6892002-10-04 10:22:02 +00007434fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007435
Guido van Rossum84e7b241996-08-19 21:59:00 +00007436# Add some code to confdefs.h so that the test for off_t works on SCO
7437cat >> confdefs.h <<\EOF
7438#if defined(SCO_DS)
7439#undef _OFF_T
7440#endif
7441EOF
7442
Guido van Rossumef2255b2000-03-10 22:30:29 +00007443# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007444ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007445if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007446
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007447else
Martin v. Löwis11437992002-04-12 09:54:03 +00007448
7449cat >>confdefs.h <<_ACEOF
7450#define mode_t int
7451_ACEOF
7452
7453fi
7454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007456if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007458else
Martin v. Löwis11437992002-04-12 09:54:03 +00007459
7460cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007461#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007462_ACEOF
7463
7464fi
7465
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007467if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007468
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007469else
Martin v. Löwis11437992002-04-12 09:54:03 +00007470
7471cat >>confdefs.h <<_ACEOF
7472#define pid_t int
7473_ACEOF
7474
7475fi
7476
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007477
Martin v. Löwis11437992002-04-12 09:54:03 +00007478cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007479#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007480_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007481
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007482ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007483if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007484
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007485else
Martin v. Löwis11437992002-04-12 09:54:03 +00007486
7487cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007488#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007489_ACEOF
7490
7491fi
7492
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7494$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007495if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007501
7502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007503if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505 ac_cv_type_uid_t=yes
7506else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007507 ac_cv_type_uid_t=no
7508fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007509rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007510
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007511fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7513$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007514if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007515
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007517
7518
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007520
7521fi
7522
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007523
7524# There are two separate checks for each of the exact-width integer types we
7525# need. First we check whether the type is available using the usual
7526# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7527# and <stdint.h> where available). We then also use the special type checks of
7528# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7529# directly, #define's uint32_t to be a suitable type.
7530
7531ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7532if test "x$ac_cv_type_uint32_t" = xyes; then :
7533
7534$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7535
7536fi
7537
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7539case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007540 no|yes) ;; #(
7541 *)
7542
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007543$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007544
7545
7546cat >>confdefs.h <<_ACEOF
7547#define uint32_t $ac_cv_c_uint32_t
7548_ACEOF
7549;;
7550 esac
7551
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007552
7553ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7554if test "x$ac_cv_type_uint64_t" = xyes; then :
7555
7556$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7557
7558fi
7559
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007560ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7561case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007562 no|yes) ;; #(
7563 *)
7564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007565$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007566
7567
7568cat >>confdefs.h <<_ACEOF
7569#define uint64_t $ac_cv_c_uint64_t
7570_ACEOF
7571;;
7572 esac
7573
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007574
7575ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7576if test "x$ac_cv_type_int32_t" = xyes; then :
7577
7578$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7579
7580fi
7581
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7583case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007584 no|yes) ;; #(
7585 *)
7586
7587cat >>confdefs.h <<_ACEOF
7588#define int32_t $ac_cv_c_int32_t
7589_ACEOF
7590;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007591esac
7592
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007593
7594ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7595if test "x$ac_cv_type_int64_t" = xyes; then :
7596
7597$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7598
7599fi
7600
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007601ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7602case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007603 no|yes) ;; #(
7604 *)
7605
7606cat >>confdefs.h <<_ACEOF
7607#define int64_t $ac_cv_c_int64_t
7608_ACEOF
7609;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007610esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007611
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007612
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007613ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007614if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007616$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007617
7618fi
7619
Jack Jansendd19cf82001-12-06 22:36:17 +00007620
Michael W. Hudson54241132001-12-07 15:38:26 +00007621# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007622# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623# The cast to long int works around a bug in the HP C Compiler
7624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7626# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7628$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007629if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632 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 +00007633
Martin v. Löwis11437992002-04-12 09:54:03 +00007634else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007635 if test "$ac_cv_type_int" = yes; then
7636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007638as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007639See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640 else
7641 ac_cv_sizeof_int=0
7642 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7647$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007648
7649
7650
Martin v. Löwis11437992002-04-12 09:54:03 +00007651cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007652#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007653_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007654
7655
Martin v. Löwiseba40652007-08-30 20:10:57 +00007656# The cast to long int works around a bug in the HP C Compiler
7657# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7658# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7659# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7661$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007662if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007663 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007664else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007665 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 +00007666
Martin v. Löwis11437992002-04-12 09:54:03 +00007667else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007668 if test "$ac_cv_type_long" = yes; then
7669 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007671as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007672See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673 else
7674 ac_cv_sizeof_long=0
7675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007676fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007677
Martin v. Löwis11437992002-04-12 09:54:03 +00007678fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7680$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007681
7682
7683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007685#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007686_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007687
7688
Martin v. Löwiseba40652007-08-30 20:10:57 +00007689# The cast to long int works around a bug in the HP C Compiler
7690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7692# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7694$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007695if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007697else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007698 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 +00007699
Martin v. Löwis11437992002-04-12 09:54:03 +00007700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701 if test "$ac_cv_type_void_p" = yes; then
7702 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007704as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007705See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706 else
7707 ac_cv_sizeof_void_p=0
7708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7713$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714
7715
7716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007718#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007719_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007720
7721
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722# The cast to long int works around a bug in the HP C Compiler
7723# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7724# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7725# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7727$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007728if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007729 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731 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 +00007732
Martin v. Löwis11437992002-04-12 09:54:03 +00007733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007734 if test "$ac_cv_type_short" = yes; then
7735 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007737as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007738See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739 else
7740 ac_cv_sizeof_short=0
7741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007742fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743
Martin v. Löwis11437992002-04-12 09:54:03 +00007744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7746$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007747
7748
7749
Martin v. Löwis11437992002-04-12 09:54:03 +00007750cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007751#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007752_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007753
7754
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755# The cast to long int works around a bug in the HP C Compiler
7756# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7757# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7758# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7760$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007761if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007763else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007764 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 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007767 if test "$ac_cv_type_float" = yes; then
7768 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007770as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007771See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007772 else
7773 ac_cv_sizeof_float=0
7774 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7779$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780
7781
7782
Martin v. Löwis11437992002-04-12 09:54:03 +00007783cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007786
7787
Martin v. Löwiseba40652007-08-30 20:10:57 +00007788# The cast to long int works around a bug in the HP C Compiler
7789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7791# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7793$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007794if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007797 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 +00007798
Martin v. Löwis11437992002-04-12 09:54:03 +00007799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007800 if test "$ac_cv_type_double" = yes; then
7801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007803as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007804See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007805 else
7806 ac_cv_sizeof_double=0
7807 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809
Martin v. Löwis11437992002-04-12 09:54:03 +00007810fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7812$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007813
7814
7815
Martin v. Löwis11437992002-04-12 09:54:03 +00007816cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007817#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007818_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007819
7820
Martin v. Löwiseba40652007-08-30 20:10:57 +00007821# The cast to long int works around a bug in the HP C Compiler
7822# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7823# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7824# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7826$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007827if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007828 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007830 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 +00007831
Martin v. Löwis11437992002-04-12 09:54:03 +00007832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007833 if test "$ac_cv_type_fpos_t" = yes; then
7834 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7835$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007836as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007837See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838 else
7839 ac_cv_sizeof_fpos_t=0
7840 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007841fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842
Martin v. Löwis11437992002-04-12 09:54:03 +00007843fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7845$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846
7847
7848
Martin v. Löwis11437992002-04-12 09:54:03 +00007849cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007850#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007851_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007852
Michael W. Hudson54241132001-12-07 15:38:26 +00007853
Martin v. Löwiseba40652007-08-30 20:10:57 +00007854# The cast to long int works around a bug in the HP C Compiler
7855# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7856# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7857# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7859$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007860if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007861 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007863 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 +00007864
Martin v. Löwis18e16552006-02-15 17:27:45 +00007865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866 if test "$ac_cv_type_size_t" = yes; then
7867 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7868$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007869as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007870See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 else
7872 ac_cv_sizeof_size_t=0
7873 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007875
Martin v. Löwis18e16552006-02-15 17:27:45 +00007876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7878$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007879
7880
7881
Martin v. Löwis18e16552006-02-15 17:27:45 +00007882cat >>confdefs.h <<_ACEOF
7883#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7884_ACEOF
7885
7886
Christian Heimes951cc0f2008-01-31 23:08:23 +00007887# The cast to long int works around a bug in the HP C Compiler
7888# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7889# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7890# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7892$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007893if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007894 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896 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 +00007897
Christian Heimes951cc0f2008-01-31 23:08:23 +00007898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899 if test "$ac_cv_type_pid_t" = yes; then
7900 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7901$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007902as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007903See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007904 else
7905 ac_cv_sizeof_pid_t=0
7906 fi
7907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908
Christian Heimes951cc0f2008-01-31 23:08:23 +00007909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7911$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007912
7913
7914
7915cat >>confdefs.h <<_ACEOF
7916#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7917_ACEOF
7918
7919
Michael W. Hudson54241132001-12-07 15:38:26 +00007920
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7922$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007923have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007926
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007930long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007931 ;
7932 return 0;
7933}
7934_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
7937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007939
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007940 have_long_long=yes
7941
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7945$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007946if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007947# The cast to long int works around a bug in the HP C Compiler
7948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7950# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7952$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007953if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007954 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007956 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 +00007957
Martin v. Löwis11437992002-04-12 09:54:03 +00007958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007959 if test "$ac_cv_type_long_long" = yes; then
7960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007962as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007963See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007964 else
7965 ac_cv_sizeof_long_long=0
7966 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007968
Martin v. Löwis11437992002-04-12 09:54:03 +00007969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7971$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972
7973
7974
Martin v. Löwis11437992002-04-12 09:54:03 +00007975cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007976#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007977_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007978
Michael W. Hudson54241132001-12-07 15:38:26 +00007979
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007980fi
7981
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7983$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007984have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007986/* end confdefs.h. */
7987
7988int
7989main ()
7990{
Matthias Klosec511b472010-05-08 11:01:39 +00007991long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007992 ;
7993 return 0;
7994}
7995_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007996if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007997
7998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008000
8001 have_long_double=yes
8002
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008003fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8006$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008007if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008008# The cast to long int works around a bug in the HP C Compiler
8009# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8010# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8011# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8013$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008014if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008015 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008016else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017 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 +00008018
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008020 if test "$ac_cv_type_long_double" = yes; then
8021 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8022$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008023as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008024See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008025 else
8026 ac_cv_sizeof_long_double=0
8027 fi
8028fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008029
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8032$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008033
8034
8035
8036cat >>confdefs.h <<_ACEOF
8037#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8038_ACEOF
8039
8040
8041fi
8042
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8044$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008045have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008047/* end confdefs.h. */
8048
8049int
8050main ()
8051{
8052_Bool x; x = (_Bool)0;
8053 ;
8054 return 0;
8055}
8056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008058
8059
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008061
8062 have_c99_bool=yes
8063
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8067$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008068if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069# The cast to long int works around a bug in the HP C Compiler
8070# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8071# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8072# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8074$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008075if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008076 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008078 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 +00008079
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008081 if test "$ac_cv_type__Bool" = yes; then
8082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008084as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008085See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008086 else
8087 ac_cv_sizeof__Bool=0
8088 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8093$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008094
8095
8096
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008097cat >>confdefs.h <<_ACEOF
8098#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8099_ACEOF
8100
8101
8102fi
8103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104ac_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 +00008105 #include <stdint.h>
8106 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008107 #ifdef HAVE_INTTYPES_H
8108 #include <inttypes.h>
8109 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008110"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008111if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008112
8113cat >>confdefs.h <<_ACEOF
8114#define HAVE_UINTPTR_T 1
8115_ACEOF
8116
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117# The cast to long int works around a bug in the HP C Compiler
8118# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8119# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8120# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8122$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008123if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126 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 +00008127
Martin v. Löwis11437992002-04-12 09:54:03 +00008128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008129 if test "$ac_cv_type_uintptr_t" = yes; then
8130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8131$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008132as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008133See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008134 else
8135 ac_cv_sizeof_uintptr_t=0
8136 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008137fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008138
Martin v. Löwis11437992002-04-12 09:54:03 +00008139fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8141$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142
8143
8144
Martin v. Löwis11437992002-04-12 09:54:03 +00008145cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008146#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008147_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008148
Michael W. Hudson54241132001-12-07 15:38:26 +00008149
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008150fi
8151
Martin v. Löwisebe26702006-10-02 14:55:51 +00008152
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008153# The cast to long int works around a bug in the HP C Compiler
8154# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8155# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8156# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8158$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008159if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008160 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008162 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008163#ifdef HAVE_SYS_TYPES_H
8164#include <sys/types.h>
8165#endif
8166
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008168
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170 if test "$ac_cv_type_off_t" = yes; then
8171 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008173as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008174See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008175 else
8176 ac_cv_sizeof_off_t=0
8177 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008179
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008180fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8182$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008183
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008184
8185
Martin v. Löwis11437992002-04-12 09:54:03 +00008186cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008187#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008188_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008189
Michael W. Hudson54241132001-12-07 15:38:26 +00008190
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8193$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008194if test "$have_long_long" = yes
8195then
8196if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008197 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008200
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8202$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8205$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008206fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008210fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008211
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008212# The cast to long int works around a bug in the HP C Compiler
8213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8215# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8217$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008218if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008219 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008221 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008222#ifdef HAVE_SYS_TYPES_H
8223#include <sys/types.h>
8224#endif
8225#ifdef HAVE_TIME_H
8226#include <time.h>
8227#endif
8228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008229"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008230
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008231else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008232 if test "$ac_cv_type_time_t" = yes; then
8233 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8234$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008235as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008236See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008237 else
8238 ac_cv_sizeof_time_t=0
8239 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008240fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008241
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8244$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008245
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008246
8247
Martin v. Löwis11437992002-04-12 09:54:03 +00008248cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008249#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008250_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008251
Michael W. Hudson54241132001-12-07 15:38:26 +00008252
8253
Trent Mick635f6fb2000-08-23 21:33:05 +00008254# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008255ac_save_cc="$CC"
8256if test "$ac_cv_kpthread" = "yes"
8257then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008258elif test "$ac_cv_kthread" = "yes"
8259then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008260elif test "$ac_cv_pthread" = "yes"
8261then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8264$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008265have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008267/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008268
8269 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008270int
8271main ()
8272{
Guido van Rossum12580492000-09-24 16:47:19 +00008273pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 ;
8275 return 0;
8276}
Matthias Klosec511b472010-05-08 11:01:39 +00008277
Martin v. Löwis11437992002-04-12 09:54:03 +00008278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008279if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008280 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8284$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008285if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008286 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008287# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8288# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8289# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8291$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008292if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008295 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008296#ifdef HAVE_PTHREAD_H
8297#include <pthread.h>
8298#endif
8299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008301
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008303 if test "$ac_cv_type_pthread_t" = yes; then
8304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008306as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008307See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008308 else
8309 ac_cv_sizeof_pthread_t=0
8310 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008311fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312
Trent Mick635f6fb2000-08-23 21:33:05 +00008313fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8315$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008316
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008317
8318
Martin v. Löwis11437992002-04-12 09:54:03 +00008319cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008320#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008321_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008322
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008323
Trent Mick635f6fb2000-08-23 21:33:05 +00008324fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008325CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8328$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008330if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008331 enableval=$enable_toolbox_glue;
8332fi
Jack Jansene578a632001-08-15 01:27:14 +00008333
8334
8335if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008336then
Jack Jansene578a632001-08-15 01:27:14 +00008337 case $ac_sys_system/$ac_sys_release in
8338 Darwin/*)
8339 enable_toolbox_glue="yes";;
8340 *)
8341 enable_toolbox_glue="no";;
8342 esac
8343fi
8344case "$enable_toolbox_glue" in
8345yes)
Jack Jansene578a632001-08-15 01:27:14 +00008346 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008347 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008349$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008350
8351 ;;
8352*)
Jack Jansene578a632001-08-15 01:27:14 +00008353 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008354 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008355 ;;
8356esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8358$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008359
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008360
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008361
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008362case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008363 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008364 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8365 ;;
8366 Darwin/*)
8367 OTHER_LIBTOOL_OPT=""
8368 ;;
8369esac
8370
8371
Ronald Oussoren25967582009-09-06 10:00:26 +00008372
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008373case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008374 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008375 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8376 if test "${enable_universalsdk}"; then
8377 :
8378 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008379 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008380 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008381 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008382 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008383 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008384 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008385 if test ${gcc_version} '<' 4.0
8386 then
8387 LIBTOOL_CRUFT="-lcc_dynamic"
8388 else
8389 LIBTOOL_CRUFT=""
8390 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008391 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008392 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008395/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008396
Ronald Oussoren25967582009-09-06 10:00:26 +00008397 #include <unistd.h>
8398 int main(int argc, char*argv[])
8399 {
8400 if (sizeof(long) == 4) {
8401 return 0;
8402 } else {
8403 return 1;
8404 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008405 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008406
Ronald Oussoren25967582009-09-06 10:00:26 +00008407_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008409 ac_osx_32bit=yes
8410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008411 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008412fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008415fi
8416
8417
Ronald Oussoren25967582009-09-06 10:00:26 +00008418 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008419 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008420 i386)
8421 MACOSX_DEFAULT_ARCH="i386"
8422 ;;
8423 ppc)
8424 MACOSX_DEFAULT_ARCH="ppc"
8425 ;;
8426 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008427 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008428 ;;
8429 esac
8430 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008431 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008432 i386)
8433 MACOSX_DEFAULT_ARCH="x86_64"
8434 ;;
8435 ppc)
8436 MACOSX_DEFAULT_ARCH="ppc64"
8437 ;;
8438 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008439 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008440 ;;
8441 esac
8442
8443 #ARCH_RUN_32BIT="true"
8444 fi
8445
8446 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008447 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008448 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008449esac
8450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8452$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008453if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008454then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008455 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008457 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008458
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008459$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008460
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8462$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008463 if test $enable_shared = "yes"
8464 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008465 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 +00008466 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008467else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8469$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008470fi
8471
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8473$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008474case $ac_sys_system/$ac_sys_release in
8475 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008476
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008477$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8480$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008481 ;;
8482 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8484$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008485 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008486esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008487
Guido van Rossum0a516c91994-09-12 10:58:40 +00008488# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008489
Michael W. Hudson54241132001-12-07 15:38:26 +00008490
8491
8492
8493
Ronald Oussoren75912852010-04-08 08:13:31 +00008494
Guido van Rossum0a516c91994-09-12 10:58:40 +00008495# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008496# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8498$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008499if test -z "$SO"
8500then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008501 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008502 hp*|HP*)
8503 case `uname -m` in
8504 ia64) SO=.so;;
8505 *) SO=.sl;;
8506 esac
8507 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008508 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008509 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008510 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008511else
8512 # this might also be a termcap variable, see #610332
8513 echo
8514 echo '====================================================================='
8515 echo '+ +'
8516 echo '+ WARNING: You have set SO in your environment. +'
8517 echo '+ Do you really mean to change the extension for shared libraries? +'
8518 echo '+ Continuing in 10 seconds to let you to ponder. +'
8519 echo '+ +'
8520 echo '====================================================================='
8521 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008522fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8524$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008525
Ronald Oussoren79f90492009-01-02 10:44:46 +00008526
Neal Norwitz58e28882006-05-19 07:00:58 +00008527cat >>confdefs.h <<_ACEOF
8528#define SHLIB_EXT "$SO"
8529_ACEOF
8530
Guido van Rossum0a516c91994-09-12 10:58:40 +00008531# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008532# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008533# (Shared libraries in this instance are shared modules to be loaded into
8534# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8536$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008537if test -z "$LDSHARED"
8538then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008539 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008540 AIX*)
Martin Panterf75a2eb2016-11-20 09:31:41 +00008541 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008542 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008543 ;;
8544 BeOS*)
8545 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008546 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008547 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008548 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008549 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008551 if test "$GCC" = "yes" ; then
8552 LDSHARED='$(CC) -shared'
8553 LDCXXSHARED='$(CXX) -shared'
8554 else
8555 LDSHARED='$(CC) -G'
8556 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008557 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008558 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008559 if test "$GCC" = "yes" ; then
8560 LDSHARED='$(CC) -shared'
8561 LDCXXSHARED='$(CXX) -shared'
8562 else
8563 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008564 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008565 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008566 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008567 LDSHARED='$(CC) -bundle'
8568 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008569 if test "$enable_framework" ; then
8570 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008571 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8572 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008573 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008574 else
8575 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008576 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008577 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008578 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008579 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008580 LDSHARED='$(CC) -bundle'
8581 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008582 if test "$enable_framework" ; then
8583 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008584 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8585 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008586 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008587 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008588 # No framework, use the Python app as bundle-loader
8589 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008590 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008591 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008592 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008593 Darwin/*)
8594 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8595 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008596
Ned Deilyc40b9032014-06-25 13:48:46 -07008597 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8598 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8599 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8600 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8601 if test ${dep_target_major} -eq 10 && \
8602 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008603 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008604 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008605 LDSHARED='$(CC) -bundle'
8606 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008607 if test "$enable_framework" ; then
8608 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008609 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8610 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008611 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008612 else
8613 # No framework, use the Python app as bundle-loader
8614 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8615 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008616 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008617 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008618 else
8619 # building for OS X 10.3 and later
8620 if test "${enable_universalsdk}"; then
8621 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8622 fi
8623 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8624 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8625 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008626 fi
8627 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008628 Linux*|GNU*|QNX*)
8629 LDSHARED='$(CC) -shared'
8630 LDCXXSHARED='$(CXX) -shared';;
8631 BSD/OS*/4*)
8632 LDSHARED="gcc -shared"
8633 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008634 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008635 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008636 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008637 LDSHARED='$(CC) -shared'
8638 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008639 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008640 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008641 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008642 OpenBSD*)
8643 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8644 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008645 LDSHARED='$(CC) -shared $(CCSHARED)'
8646 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008647 else
8648 case `uname -r` in
8649 [01].* | 2.[0-7] | 2.[0-7].*)
8650 LDSHARED="ld -Bshareable ${LDFLAGS}"
8651 ;;
8652 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008653 LDSHARED='$(CC) -shared $(CCSHARED)'
8654 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008655 ;;
8656 esac
8657 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008658 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008659 LDSHARED='$(CC) -shared'
8660 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008661 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008662 if test "$GCC" = "yes" ; then
8663 LDSHARED='$(CC) -shared'
8664 LDCXXSHARED='$(CXX) -shared'
8665 else
8666 LDSHARED='$(CC) -G'
8667 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008668 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008669 SCO_SV*)
8670 LDSHARED='$(CC) -Wl,-G,-Bexport'
8671 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8672 CYGWIN*)
8673 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8674 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8675 atheos*)
8676 LDSHARED="gcc -shared"
8677 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008678 *) LDSHARED="ld";;
8679 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8682$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008683LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008684BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008685# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008686# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8688$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008689if test -z "$CCSHARED"
8690then
Guido van Rossum07397971997-04-29 21:49:50 +00008691 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008692 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008693 then CCSHARED="-fPIC";
8694 elif test `uname -p` = sparc;
8695 then CCSHARED="-xcode=pic32";
8696 else CCSHARED="-Kpic";
8697 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008698 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008699 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008700 else CCSHARED="+z";
8701 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008702 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008703 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008704 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008705 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008706 if test "$GCC" = "yes"
8707 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008708 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008709 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008710 SCO_SV*)
8711 if test "$GCC" = "yes"
8712 then CCSHARED="-fPIC"
8713 else CCSHARED="-Kpic -belf"
8714 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008715 IRIX*/6*) case $CC in
8716 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008717 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008718 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008719 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008720 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008721fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8723$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008724# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008725# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8727$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008728if test -z "$LINKFORSHARED"
8729then
Guido van Rossum07397971997-04-29 21:49:50 +00008730 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008731 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008732 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008733 LINKFORSHARED="-Wl,-E -Wl,+s";;
8734# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008735 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008736 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008737 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008738 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008739 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8740 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008741 # not used by the core itself but which needs to be in the core so
8742 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008743 # -prebind is no longer used, because it actually seems to give a
8744 # slowdown in stead of a speedup, maybe due to the large number of
8745 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008746
8747 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008748 if test "$enable_framework"
8749 then
Jack Jansenda49e192005-01-07 13:08:22 +00008750 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008751 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008752 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008753 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008754 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008755 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008756 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008757 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8758 then
8759 LINKFORSHARED="-Wl,--export-dynamic"
8760 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008761 SunOS/5*) case $CC in
8762 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008763 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008764 then
8765 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008766 fi;;
8767 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008768 CYGWIN*)
8769 if test $enable_shared = "no"
8770 then
8771 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8772 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008773 QNX*)
8774 # -Wl,-E causes the symbols to be added to the dynamic
8775 # symbol table so that they can be found when a module
8776 # is loaded. -N 2048K causes the stack size to be set
8777 # to 2048 kilobytes so that the stack doesn't overflow
8778 # when running test_compile.py.
8779 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008780 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8783$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008784
Michael W. Hudson54241132001-12-07 15:38:26 +00008785
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008786
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8788$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008789if test ! "$LIBRARY" = "$LDLIBRARY"
8790then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008791 case $ac_sys_system in
8792 CYGWIN*)
8793 # Cygwin needs CCSHARED when building extension DLLs
8794 # but not when building the interpreter DLL.
8795 CFLAGSFORSHARED='';;
8796 *)
8797 CFLAGSFORSHARED='$(CCSHARED)'
8798 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8801$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008802
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008803# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8804# library (with --enable-shared).
8805# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008806# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8807# if it is not required, since it creates a dependency of the shared library
8808# to LIBS. This, in turn, means that applications linking the shared libpython
8809# don't need to link LIBS explicitly. The default should be only changed
8810# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008811
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8813$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008814case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008815 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008816 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008817esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8819$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008820
8821
Guido van Rossum627b2d71993-12-24 10:39:16 +00008822# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8824$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008825if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008826 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008827else
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008829LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008832
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833/* Override any GCC internal prototype to avoid an error.
8834 Use char because int might match the return type of a GCC
8835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008836#ifdef __cplusplus
8837extern "C"
8838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008839char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008840int
8841main ()
8842{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 ;
8845 return 0;
8846}
8847_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008848if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008853rm -f core conftest.err conftest.$ac_objext \
8854 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008855LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008856fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8858$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008859if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 cat >>confdefs.h <<_ACEOF
8861#define HAVE_LIBDL 1
8862_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008863
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008864 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008865
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008866fi
8867 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8869$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008870if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008872else
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008874LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008877
Martin v. Löwiseba40652007-08-30 20:10:57 +00008878/* Override any GCC internal prototype to avoid an error.
8879 Use char because int might match the return type of a GCC
8880 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008881#ifdef __cplusplus
8882extern "C"
8883#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008884char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008885int
8886main ()
8887{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008888return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008889 ;
8890 return 0;
8891}
8892_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008893if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008894 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008897fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898rm -f core conftest.err conftest.$ac_objext \
8899 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008900LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8903$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008904if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008905 cat >>confdefs.h <<_ACEOF
8906#define HAVE_LIBDLD 1
8907_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008908
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008909 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008910
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008911fi
8912 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008913
Ronald Oussoren79f90492009-01-02 10:44:46 +00008914# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008915if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8917$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008918if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008919 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008920else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008921 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008924
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925/* Override any GCC internal prototype to avoid an error.
8926 Use char because int might match the return type of a GCC
8927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928#ifdef __cplusplus
8929extern "C"
8930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008931char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008932int
8933main ()
8934{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008935return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 ;
8937 return 0;
8938}
8939_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940for ac_lib in '' pthread rt posix4; do
8941 if test -z "$ac_lib"; then
8942 ac_res="none required"
8943 else
8944 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008945 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008946 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008947 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950rm -f core conftest.err conftest.$ac_objext \
8951 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008952 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008955done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008956if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008957
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958else
8959 ac_cv_search_sem_init=no
8960fi
8961rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008962LIBS=$ac_func_search_save_LIBS
8963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8965$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008966ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008969
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008970fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008971 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008972 # posix4 on Solaris 2.6
8973 # pthread (first!) on Linux
8974fi
8975
Martin v. Löwis19d17342003-06-14 21:03:05 +00008976# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8978$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008979if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008981else
8982 ac_check_lib_save_LIBS=$LIBS
8983LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008985/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008986
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987/* Override any GCC internal prototype to avoid an error.
8988 Use char because int might match the return type of a GCC
8989 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008990#ifdef __cplusplus
8991extern "C"
8992#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008993char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008994int
8995main ()
8996{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008998 ;
8999 return 0;
9000}
9001_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009003 ac_cv_lib_intl_textdomain=yes
9004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009006fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009007rm -f core conftest.err conftest.$ac_objext \
9008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009009LIBS=$ac_check_lib_save_LIBS
9010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9012$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009013if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009014
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009016
9017fi
9018
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009019
9020# checks for system dependent C++ extensions support
9021case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009022 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9023$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009026
Georg Brandl94800df2011-02-25 11:09:02 +00009027 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009028int
9029main ()
9030{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009031loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ;
9033 return 0;
9034}
Matthias Klosec511b472010-05-08 11:01:39 +00009035
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009037if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009038
Matthias Klosec511b472010-05-08 11:01:39 +00009039
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009040$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009041
Matthias Klosec511b472010-05-08 11:01:39 +00009042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009043$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009044
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009045else
Matthias Klosec511b472010-05-08 11:01:39 +00009046
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009048$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009049
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009050fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051rm -f core conftest.err conftest.$ac_objext \
9052 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009053 *) ;;
9054esac
9055
Guido van Rossum70c7f481998-03-26 18:44:10 +00009056# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009057# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9059$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009060if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009061 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009064LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Martin v. Löwiseba40652007-08-30 20:10:57 +00009068/* Override any GCC internal prototype to avoid an error.
9069 Use char because int might match the return type of a GCC
9070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009071#ifdef __cplusplus
9072extern "C"
9073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009074char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
9077{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009078return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ;
9080 return 0;
9081}
9082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009084 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009086 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009088rm -f core conftest.err conftest.$ac_objext \
9089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009090LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009091fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9093$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009094if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009095 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009096fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009097 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9099$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009100if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009101 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009102else
Martin v. Löwis11437992002-04-12 09:54:03 +00009103 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009104LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009107
Martin v. Löwiseba40652007-08-30 20:10:57 +00009108/* Override any GCC internal prototype to avoid an error.
9109 Use char because int might match the return type of a GCC
9110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009111#ifdef __cplusplus
9112extern "C"
9113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009114char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009115int
9116main ()
9117{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ;
9120 return 0;
9121}
9122_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009128rm -f core conftest.err conftest.$ac_objext \
9129 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009130LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009131fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9133$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009134if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009135 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009136fi
9137 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009138
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009139case "$ac_sys_system" in
9140BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9142$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009143if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009144 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009145else
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009147LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150
Martin v. Löwiseba40652007-08-30 20:10:57 +00009151/* Override any GCC internal prototype to avoid an error.
9152 Use char because int might match the return type of a GCC
9153 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009154#ifdef __cplusplus
9155extern "C"
9156#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009157char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009158int
9159main ()
9160{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009161return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 ;
9163 return 0;
9164}
9165_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009166if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009167 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009168else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009170fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009171rm -f core conftest.err conftest.$ac_objext \
9172 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009173LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009174fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9176$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009177if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009178 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009179fi
9180 # BeOS
9181;;
9182esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009183
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9185$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009186
Martin v. Löwiseba40652007-08-30 20:10:57 +00009187# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009188if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9191$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009192LIBS="$withval $LIBS"
9193
9194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009197fi
9198
Guido van Rossum7f43da71994-08-01 12:15:30 +00009199
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009200
9201
9202
9203
9204
9205
9206
9207if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9208 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009209 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9210set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9212$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009213if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009214 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009215else
9216 case $PKG_CONFIG in
9217 [\\/]* | ?:[\\/]*)
9218 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9219 ;;
9220 *)
9221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9222for as_dir in $PATH
9223do
9224 IFS=$as_save_IFS
9225 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009227 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009228 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009229 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009230 break 2
9231 fi
9232done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009233 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009234IFS=$as_save_IFS
9235
9236 ;;
9237esac
9238fi
9239PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9240if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9242$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9245$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009246fi
9247
9248
9249fi
9250if test -z "$ac_cv_path_PKG_CONFIG"; then
9251 ac_pt_PKG_CONFIG=$PKG_CONFIG
9252 # Extract the first word of "pkg-config", so it can be a program name with args.
9253set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009256if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009258else
9259 case $ac_pt_PKG_CONFIG in
9260 [\\/]* | ?:[\\/]*)
9261 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9262 ;;
9263 *)
9264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267 IFS=$as_save_IFS
9268 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009270 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009271 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009272 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009273 break 2
9274 fi
9275done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009277IFS=$as_save_IFS
9278
9279 ;;
9280esac
9281fi
9282ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9283if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9285$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009289fi
9290
9291 if test "x$ac_pt_PKG_CONFIG" = x; then
9292 PKG_CONFIG=""
9293 else
9294 case $cross_compiling:$ac_tool_warned in
9295yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009296{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9297$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009298ac_tool_warned=yes ;;
9299esac
9300 PKG_CONFIG=$ac_pt_PKG_CONFIG
9301 fi
9302else
9303 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9304fi
9305
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009306fi
9307if test -n "$PKG_CONFIG"; then
9308 _pkg_min_version=0.9.0
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9310$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9311 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9313$as_echo "yes" >&6; }
9314 else
9315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9316$as_echo "no" >&6; }
9317 PKG_CONFIG=""
9318 fi
9319fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009320
9321# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9323$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009324
9325# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009327 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009328else
9329 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009330fi
9331
9332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9334$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009335
9336# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9338$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009339
9340# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009342 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009343else
9344 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009345fi
9346
9347
9348if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009349 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9350else
9351 LIBFFI_INCLUDEDIR=""
9352fi
9353
9354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9356$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009357
Ned Deilya2a9f572013-10-25 00:30:10 -07009358# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9359
9360
9361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9362$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9363
9364# Check whether --with-tcltk-includes was given.
9365if test "${with_tcltk_includes+set}" = set; then :
9366 withval=$with_tcltk_includes;
9367else
9368 with_tcltk_includes="default"
9369fi
9370
9371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9372$as_echo "$with_tcltk_includes" >&6; }
9373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9374$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9375
9376# Check whether --with-tcltk-libs was given.
9377if test "${with_tcltk_libs+set}" = set; then :
9378 withval=$with_tcltk_libs;
9379else
9380 with_tcltk_libs="default"
9381fi
9382
9383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9384$as_echo "$with_tcltk_libs" >&6; }
9385if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9386then
9387 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9388 then
9389 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9390 fi
9391 TCLTK_INCLUDES=""
9392 TCLTK_LIBS=""
9393else
9394 TCLTK_INCLUDES="$with_tcltk_includes"
9395 TCLTK_LIBS="$with_tcltk_libs"
9396fi
9397
Benjamin Peterson867475c2009-04-29 20:36:25 +00009398# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9400$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009401
9402# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009404 withval=$with_dbmliborder;
9405if test x$with_dbmliborder = xyes
9406then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009407as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009408else
9409 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9410 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9411 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009412 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009413 fi
9414 done
9415fi
9416fi
9417
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9419$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009420
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009421# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009422
9423
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9425$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009426
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009428if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009429 withval=$with_signal_module;
9430fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009431
9432
9433if test -z "$with_signal_module"
9434then with_signal_module="yes"
9435fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9437$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009438
9439if test "${with_signal_module}" = "yes"; then
9440 USE_SIGNAL_MODULE=""
9441 SIGNAL_OBJS=""
9442else
9443 USE_SIGNAL_MODULE="#"
9444 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9445fi
9446
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009447# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009448
Barry Warsawc0d24d82000-06-29 16:12:00 +00009449USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9452$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009453
Guido van Rossumec2f0731997-01-22 20:54:01 +00009454
Martin v. Löwiseba40652007-08-30 20:10:57 +00009455# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009457 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9459$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009460LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009461if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009462 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009463fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9466$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009467fi
9468
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
9470# Templates for things AC_DEFINEd more than once.
9471# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009472
9473
Martin v. Löwis11437992002-04-12 09:54:03 +00009474
9475
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9477$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009478
Martin v. Löwiseba40652007-08-30 20:10:57 +00009479# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481 withval=$with_threads;
9482fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009483
9484
Barry Warsawc0d24d82000-06-29 16:12:00 +00009485# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009488if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 withval=$with_thread; with_threads=$with_thread
9490fi
9491
Barry Warsawc0d24d82000-06-29 16:12:00 +00009492
9493if test -z "$with_threads"
9494then with_threads="yes"
9495fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9497$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009498
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009499
Barry Warsawc0d24d82000-06-29 16:12:00 +00009500if test "$with_threads" = "no"
9501then
9502 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009503elif test "$ac_cv_pthread_is_default" = yes
9504then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009505 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009506
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009507 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009508 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009509
9510 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009511 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009512elif test "$ac_cv_kpthread" = "yes"
9513then
9514 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009515 if test "$ac_cv_cxx_thread" = "yes"; then
9516 CXX="$CXX -Kpthread"
9517 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009518 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009520 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009521 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009522elif test "$ac_cv_kthread" = "yes"
9523then
9524 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009525 if test "$ac_cv_cxx_thread" = "yes"; then
9526 CXX="$CXX -Kthread"
9527 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009528 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009529
9530 posix_threads=yes
9531 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009532elif test "$ac_cv_pthread" = "yes"
9533then
9534 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009535 if test "$ac_cv_cxx_thread" = "yes"; then
9536 CXX="$CXX -pthread"
9537 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009538 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009539
9540 posix_threads=yes
9541 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009542else
9543 if test ! -z "$with_threads" -a -d "$with_threads"
9544 then LDFLAGS="$LDFLAGS -L$with_threads"
9545 fi
9546 if test ! -z "$withval" -a -d "$withval"
9547 then LDFLAGS="$LDFLAGS -L$withval"
9548 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009549
9550 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009551 # define _POSIX_THREADS in unistd.h. Some apparently don't
9552 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9554$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009557
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009558#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009559#ifdef _POSIX_THREADS
9560yes
9561#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009562
9563_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009564if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009566 unistd_defines_pthreads=yes
9567else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009568 unistd_defines_pthreads=no
9569fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009570rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009571
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9573$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009574
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009575 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009576
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009577 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009578if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009579 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009580
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009581 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009584$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009585
9586 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009587 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009588else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009589
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590 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 +01009591if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009593
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009595
Martin v. Löwis11437992002-04-12 09:54:03 +00009596
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009598
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009599 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009600else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009601
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9603$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009604
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606if test "${with_pth+set}" = set; then :
9607 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9608$as_echo "$withval" >&6; }
9609 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009610
9611
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009613
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009614 LIBS="-lpth $LIBS"
9615 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009616else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009619
9620 # Just looking for pthread_create in libpthread is not enough:
9621 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9622 # So we really have to include pthread.h, and then link.
9623 _libs=$LIBS
9624 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9626$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009629
9630#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009631#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009632
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009633void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009634int
9635main ()
9636{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009637
9638pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ;
9640 return 0;
9641}
9642_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009644
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9646$as_echo "yes" >&6; }
9647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009648
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009649 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009650 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009653 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009655if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009657
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009658 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009659 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009660else
Guido van Rossumad678af1998-10-02 14:42:15 +00009661
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662 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 +01009663if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009664 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009665
9666
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009667$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009668
9669 THREADOBJ="Python/thread.o"
9670else
9671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009672 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 +01009673if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009674 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
9676
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009677$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009678
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009679 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009680else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009681
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9683$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009684if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009686else
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009688LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692/* Override any GCC internal prototype to avoid an error.
9693 Use char because int might match the return type of a GCC
9694 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695#ifdef __cplusplus
9696extern "C"
9697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009698char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009699int
9700main ()
9701{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ;
9704 return 0;
9705}
9706_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009707if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009709else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009710 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009711fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009712rm -f core conftest.err conftest.$ac_objext \
9713 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009714LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9717$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009718if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009719 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009720
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009721 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009722 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009723 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009724else
Greg Steinadf63d62000-07-05 10:38:09 +00009725
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9727$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009728if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009729 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009730else
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009732LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009735
Martin v. Löwiseba40652007-08-30 20:10:57 +00009736/* Override any GCC internal prototype to avoid an error.
9737 Use char because int might match the return type of a GCC
9738 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739#ifdef __cplusplus
9740extern "C"
9741#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009742char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009743int
9744main ()
9745{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009746return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009747 ;
9748 return 0;
9749}
9750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009754 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009755fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009756rm -f core conftest.err conftest.$ac_objext \
9757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9761$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009762if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009763 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009764
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009765 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009766 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009767 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009768else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009769
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9771$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009772if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009774else
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009776LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009779
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780/* Override any GCC internal prototype to avoid an error.
9781 Use char because int might match the return type of a GCC
9782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783#ifdef __cplusplus
9784extern "C"
9785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009786char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009787int
9788main ()
9789{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ;
9792 return 0;
9793}
9794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009795if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009800rm -f core conftest.err conftest.$ac_objext \
9801 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009802LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9805$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009806if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009808
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009809 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009810 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009811 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009812else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009813
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9815$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009816if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009817 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009818else
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009820LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009823
Martin v. Löwiseba40652007-08-30 20:10:57 +00009824/* Override any GCC internal prototype to avoid an error.
9825 Use char because int might match the return type of a GCC
9826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009827#ifdef __cplusplus
9828extern "C"
9829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009830char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009831int
9832main ()
9833{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009834return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009835 ;
9836 return 0;
9837}
9838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009839if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009842 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009843fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844rm -f core conftest.err conftest.$ac_objext \
9845 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009846LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9849$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009850if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009851 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009852
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009853 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009854 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009855 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009856else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009857
Martin v. Löwis130fb172001-07-19 11:00:41 +00009858 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009859fi
9860
Guido van Rossum627b2d71993-12-24 10:39:16 +00009861
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009862fi
9863
Guido van Rossum0be3e491997-05-22 20:33:33 +00009864fi
9865
Guido van Rossum49545951997-12-02 19:28:29 +00009866fi
9867
Guido van Rossumb93a8621998-05-07 13:27:32 +00009868fi
9869
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009870
Michael W. Hudson54241132001-12-07 15:38:26 +00009871fi
9872
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009873
9874fi
9875
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009876fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877rm -f core conftest.err conftest.$ac_objext \
9878 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009879fi
9880
Martin v. Löwis11437992002-04-12 09:54:03 +00009881fi
9882
9883
9884fi
9885
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009886
Michael W. Hudson54241132001-12-07 15:38:26 +00009887
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9889$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009890if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009892else
Martin v. Löwis11437992002-04-12 09:54:03 +00009893 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009894LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009897
Martin v. Löwiseba40652007-08-30 20:10:57 +00009898/* Override any GCC internal prototype to avoid an error.
9899 Use char because int might match the return type of a GCC
9900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009901#ifdef __cplusplus
9902extern "C"
9903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009904char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009905int
9906main ()
9907{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ;
9910 return 0;
9911}
9912_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009913if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009916 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009918rm -f core conftest.err conftest.$ac_objext \
9919 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009920LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9923$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009924if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009925 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009926
Martin v. Löwis130fb172001-07-19 11:00:41 +00009927 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009928 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009929 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009930fi
9931
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009932
Neal Norwitza978ab02002-11-02 16:58:05 +00009933 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9935$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009936if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009938else
Martin v. Löwis11437992002-04-12 09:54:03 +00009939 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009940LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009942/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009943
Martin v. Löwiseba40652007-08-30 20:10:57 +00009944/* Override any GCC internal prototype to avoid an error.
9945 Use char because int might match the return type of a GCC
9946 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009947#ifdef __cplusplus
9948extern "C"
9949#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009950char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009951int
9952main ()
9953{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009954return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ;
9956 return 0;
9957}
9958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009959if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009960 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009962 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009964rm -f core conftest.err conftest.$ac_objext \
9965 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009966LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9969$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009970if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009971 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009972
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009973 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009974 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009975 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009976fi
9977
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009978 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009979
Martin v. Löwis130fb172001-07-19 11:00:41 +00009980 if test "$USE_THREAD_MODULE" != "#"
9981 then
9982 # If the above checks didn't disable threads, (at least) OSF1
9983 # needs this '-threads' argument during linking.
9984 case $ac_sys_system in
9985 OSF1) LDLAST=-threads;;
9986 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009987 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009988fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009989
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009990if test "$posix_threads" = "yes"; then
9991 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009992
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009993$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009994
9995 fi
9996
9997 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9998 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009999 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010000$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010001
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010002 ;;
10003 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010005
10006 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010007 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010009
10010 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010011 esac
10012
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10014$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010015 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010016 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019 ac_cv_pthread_system_supported=no
10020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010022/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010023
10024 #include <stdio.h>
10025 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010026 void *foo(void *parm) {
10027 return NULL;
10028 }
10029 main() {
10030 pthread_attr_t attr;
10031 pthread_t id;
10032 if (pthread_attr_init(&attr)) exit(-1);
10033 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10034 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10035 exit(0);
10036 }
10037_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010039 ac_cv_pthread_system_supported=yes
10040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010041 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10044 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010045fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010046
Martin v. Löwiseba40652007-08-30 20:10:57 +000010047
Guido van Rossum627b2d71993-12-24 10:39:16 +000010048fi
10049
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10051$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010052 if test "$ac_cv_pthread_system_supported" = "yes"; then
10053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010055
10056 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010057 for ac_func in pthread_sigmask
10058do :
10059 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010060if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010061 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010062#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010063_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010064 case $ac_sys_system in
10065 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010066
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010067$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010068
10069 ;;
10070 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010071fi
10072done
10073
Christian Heimes0d604cf2013-08-21 13:26:05 +020010074 for ac_func in pthread_atfork
10075do :
10076 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10077if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10078 cat >>confdefs.h <<_ACEOF
10079#define HAVE_PTHREAD_ATFORK 1
10080_ACEOF
10081
10082fi
10083done
10084
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010085fi
10086
10087
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10091$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010092# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010093if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010095 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010098 ipv6=no
10099 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010100 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10101$as_echo "yes" >&6; }
10102 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010103
10104 ipv6=yes
10105 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107else
Martin v. Löwis11437992002-04-12 09:54:03 +000010108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010111 /* AF_INET6 available check */
10112#include <sys/types.h>
10113#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010114int
10115main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010116{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010117int domain = AF_INET6;
10118 ;
10119 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120}
Martin v. Löwis11437992002-04-12 09:54:03 +000010121_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010122if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10125$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010127
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010128else
Matthias Klosec511b472010-05-08 11:01:39 +000010129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10131$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010133
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010137if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10139$as_echo_n "checking if RFC2553 API is available... " >&6; }
10140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010141/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010142
10143 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010144#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010145int
10146main ()
10147{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010148struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010149 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 ;
10151 return 0;
10152}
Matthias Klosec511b472010-05-08 11:01:39 +000010153
Martin v. Löwis11437992002-04-12 09:54:03 +000010154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010156
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010158$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010159 ipv6=yes
10160
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010161else
Matthias Klosec511b472010-05-08 11:01:39 +000010162
10163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010164$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010165 ipv6=no
10166
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010167fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010169fi
10170
10171if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010172 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010173
10174fi
10175
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176fi
10177
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010178
10179ipv6type=unknown
10180ipv6lib=none
10181ipv6trylibc=no
10182
10183if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10185$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010186 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10187 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010188 case $i in
10189 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010191/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010192
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010193#include <netinet/in.h>
10194#ifdef IPV6_INRIA_VERSION
10195yes
10196#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010197_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010198if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010199 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010200 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010201fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010202rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010203
10204 ;;
10205 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010208
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010209#include <netinet/in.h>
10210#ifdef __KAME__
10211yes
10212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010213_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010215 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010216 ipv6type=$i;
10217 ipv6lib=inet6
10218 ipv6libdir=/usr/local/v6/lib
10219 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010220fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010221rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010222
10223 ;;
10224 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010226/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010227
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228#include <features.h>
10229#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10230yes
10231#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010232_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010233if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010235 ipv6type=$i;
10236 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010237fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010238rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010239
10240 ;;
10241 linux-inet6)
10242 if test -d /usr/inet6; then
10243 ipv6type=$i
10244 ipv6lib=inet6
10245 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010246 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010247 fi
10248 ;;
10249 solaris)
10250 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010251 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010252 ipv6type=$i
10253 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010254 fi
10255 fi
10256 ;;
10257 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010259/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010260
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261#include <sys/param.h>
10262#ifdef _TOSHIBA_INET6
10263yes
10264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010265_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268 ipv6type=$i;
10269 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010270 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010271fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010272rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010273
10274 ;;
10275 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010277/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010278
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010279#include </usr/local/v6/include/sys/v6config.h>
10280#ifdef __V6D__
10281yes
10282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010283_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010286 ipv6type=$i;
10287 ipv6lib=v6;
10288 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010289 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010290fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010291rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010292
10293 ;;
10294 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010296/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010297
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010298#include <sys/param.h>
10299#ifdef _ZETA_MINAMI_INET6
10300yes
10301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010302_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010303if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010304 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010305 ipv6type=$i;
10306 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010307 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010308fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010309rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010310
10311 ;;
10312 esac
10313 if test "$ipv6type" != "unknown"; then
10314 break
10315 fi
10316 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10318$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319fi
10320
10321if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10322 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10323 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10324 echo "using lib$ipv6lib"
10325 else
10326 if test $ipv6trylibc = "yes"; then
10327 echo "using libc"
10328 else
10329 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10330 echo "You need to fetch lib$ipv6lib.a from appropriate"
10331 echo 'ipv6 kit and compile beforehand.'
10332 exit 1
10333 fi
10334 fi
10335fi
10336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10338$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010340/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010341
10342 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010343int
10344main ()
10345{
10346FSIORefNum fRef = 0
10347 ;
10348 return 0;
10349}
Mark Dickinson0712b562010-05-08 19:13:21 +000010350
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010351_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010353
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010355$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10358$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010359
Mark Dickinson0712b562010-05-08 19:13:21 +000010360else
10361
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10363$as_echo "no" >&6; }
10364
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010365fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10367
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010368# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10370$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010371
Martin v. Löwiseba40652007-08-30 20:10:57 +000010372# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010373if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010374 withval=$with_doc_strings;
10375fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010376
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010377
10378if test -z "$with_doc_strings"
10379then with_doc_strings="yes"
10380fi
10381if test "$with_doc_strings" != "no"
10382then
10383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010385
10386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10388$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010389
Neil Schemenauera35c6882001-02-27 04:45:05 +000010390# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10392$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010393
Martin v. Löwiseba40652007-08-30 20:10:57 +000010394# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010396 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010397if test "$withval" != no
10398then
10399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010400$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10403$as_echo "yes" >&6; }
10404else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10405$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010406fi
10407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10409$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010410fi
10411
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010412
10413# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10415$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010416
Martin v. Löwiseba40652007-08-30 20:10:57 +000010417# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010418if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010419 withval=$with_pymalloc;
10420fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010421
Neil Schemenauera35c6882001-02-27 04:45:05 +000010422
Neil Schemenauer16c22972002-03-22 15:34:49 +000010423if test -z "$with_pymalloc"
10424then with_pymalloc="yes"
10425fi
10426if test "$with_pymalloc" != "no"
10427then
Martin v. Löwis11437992002-04-12 09:54:03 +000010428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010430
10431fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10433$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010434
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010435# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10437$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010438
10439# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010441 withval=$with_valgrind;
10442else
10443 with_valgrind=no
10444fi
10445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10447$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010448if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449 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 +010010450if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010452$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010453
10454else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010455 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010456
10457fi
10458
10459
10460fi
10461
Barry Warsawef82cd72000-06-30 16:21:01 +000010462# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10464$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010465
Martin v. Löwiseba40652007-08-30 20:10:57 +000010466# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010468 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010469if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010470then
10471
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010472$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010473
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10475$as_echo "yes" >&6; }
10476else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010478fi
10479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010482fi
10483
Barry Warsawef82cd72000-06-30 16:21:01 +000010484
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010485# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010486
Guido van Rossum98935bf2001-09-05 19:13:16 +000010487DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010488
Guido van Rossume97ee181999-12-20 21:27:22 +000010489# the dlopen() function means we might want to use dynload_shlib.o. some
10490# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010491for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492do :
10493 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010494if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010495 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010497_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010498
Guido van Rossume97ee181999-12-20 21:27:22 +000010499fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010500done
Guido van Rossume97ee181999-12-20 21:27:22 +000010501
Michael W. Hudson54241132001-12-07 15:38:26 +000010502
Guido van Rossume97ee181999-12-20 21:27:22 +000010503# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10504# loading of modules.
10505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10507$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010508if test -z "$DYNLOADFILE"
10509then
10510 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010511 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10512 if test "$ac_cv_func_dlopen" = yes
10513 then DYNLOADFILE="dynload_shlib.o"
10514 else DYNLOADFILE="dynload_aix.o"
10515 fi
10516 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010517 BeOS*) DYNLOADFILE="dynload_beos.o";;
10518 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010519 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10520 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010521 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010522 *)
10523 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10524 # out any dynamic loading
10525 if test "$ac_cv_func_dlopen" = yes
10526 then DYNLOADFILE="dynload_shlib.o"
10527 else DYNLOADFILE="dynload_stub.o"
10528 fi
10529 ;;
10530 esac
10531fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10533$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010534if test "$DYNLOADFILE" != "dynload_stub.o"
10535then
Martin v. Löwis11437992002-04-12 09:54:03 +000010536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010537$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010538
10539fi
10540
Neil Schemenauer4e425612001-06-19 15:44:15 +000010541# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10542
Michael W. Hudson54241132001-12-07 15:38:26 +000010543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10545$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010546if test -z "$MACHDEP_OBJS"
10547then
Jack Jansene578a632001-08-15 01:27:14 +000010548 MACHDEP_OBJS=$extra_machdep_objs
10549else
10550 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10553$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010554
Guido van Rossum627b2d71993-12-24 10:39:16 +000010555# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010556for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10557 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010558 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10559 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010560 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010561 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010562 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010563 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010564 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10565 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010566 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010567 setlocale setregid setreuid setresuid setresgid \
10568 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010569 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010570 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010571 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572do :
10573 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10574ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010575if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010576 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010577#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010578_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010579
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010580fi
10581done
10582
Michael W. Hudson54241132001-12-07 15:38:26 +000010583
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010584# For some functions, having a definition is not sufficient, since
10585# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10587$as_echo_n "checking for chroot... " >&6; }
10588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010589/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010590#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010591int
10592main ()
10593{
10594void *x=chroot
10595 ;
10596 return 0;
10597}
10598_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010602
Matthias Klosec511b472010-05-08 11:01:39 +000010603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010604$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10607$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010608
10609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10612$as_echo_n "checking for link... " >&6; }
10613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010615#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010616int
10617main ()
10618{
10619void *x=link
10620 ;
10621 return 0;
10622}
10623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010625
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010626$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010627
Matthias Klosec511b472010-05-08 11:01:39 +000010628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010629$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10632$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010633
10634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10637$as_echo_n "checking for symlink... " >&6; }
10638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010639/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010640#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010641int
10642main ()
10643{
10644void *x=symlink
10645 ;
10646 return 0;
10647}
10648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010651$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010652
Matthias Klosec511b472010-05-08 11:01:39 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010658
10659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10662$as_echo_n "checking for fchdir... " >&6; }
10663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010665#include <unistd.h>
10666int
10667main ()
10668{
10669void *x=fchdir
10670 ;
10671 return 0;
10672}
10673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010674if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010676$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010677
Matthias Klosec511b472010-05-08 11:01:39 +000010678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10682$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010683
10684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10687$as_echo_n "checking for fsync... " >&6; }
10688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010689/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010690#include <unistd.h>
10691int
10692main ()
10693{
10694void *x=fsync
10695 ;
10696 return 0;
10697}
10698_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010699if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010701$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010702
Matthias Klosec511b472010-05-08 11:01:39 +000010703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010704$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10707$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010708
10709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10712$as_echo_n "checking for fdatasync... " >&6; }
10713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010715#include <unistd.h>
10716int
10717main ()
10718{
10719void *x=fdatasync
10720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010724if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010725
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010726$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010727
Matthias Klosec511b472010-05-08 11:01:39 +000010728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010729$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010733
10734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10737$as_echo_n "checking for epoll... " >&6; }
10738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010739/* end confdefs.h. */
10740#include <sys/epoll.h>
10741int
10742main ()
10743{
10744void *x=epoll_create
10745 ;
10746 return 0;
10747}
10748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010749if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010752
Matthias Klosec511b472010-05-08 11:01:39 +000010753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010754$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010758
10759fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10762$as_echo_n "checking for kqueue... " >&6; }
10763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010764/* end confdefs.h. */
10765
10766#include <sys/types.h>
10767#include <sys/event.h>
10768
10769int
10770main ()
10771{
10772int x=kqueue()
10773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010777if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010779$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010780
Matthias Klosec511b472010-05-08 11:01:39 +000010781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010782$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10785$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010786
10787fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010789# On some systems (eg. FreeBSD 5), we would find a definition of the
10790# functions ctermid_r, setgroups in the library, but no prototype
10791# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10792# address to avoid compiler warnings and potential miscompilations
10793# because of the missing prototypes.
10794
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10796$as_echo_n "checking for ctermid_r... " >&6; }
10797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010798/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010799
Martin v. Löwisd5843682002-11-21 20:41:28 +000010800#include <stdio.h>
10801
Martin v. Löwisd5843682002-11-21 20:41:28 +000010802int
10803main ()
10804{
10805void* p = ctermid_r
10806 ;
10807 return 0;
10808}
10809_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010813
Matthias Klosec511b472010-05-08 11:01:39 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010819
10820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10822
Antoine Pitroub170f172010-09-10 18:47:36 +000010823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10824$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010825if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010826 $as_echo_n "(cached) " >&6
10827else
10828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010830#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010831int
10832main ()
10833{
10834void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010835
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010836 ;
10837 return 0;
10838}
10839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010840if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010841 ac_cv_flock_decl=yes
10842else
10843 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010844
10845fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010847
Antoine Pitroub170f172010-09-10 18:47:36 +000010848fi
10849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10850$as_echo "$ac_cv_flock_decl" >&6; }
10851if test "x${ac_cv_flock_decl}" = xyes; then
10852 for ac_func in flock
10853do :
10854 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010855if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010856 cat >>confdefs.h <<_ACEOF
10857#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010858_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010859
Antoine Pitrou85729812010-09-07 14:55:24 +000010860else
Antoine Pitroub170f172010-09-10 18:47:36 +000010861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010862$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010863if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010864 $as_echo_n "(cached) " >&6
10865else
10866 ac_check_lib_save_LIBS=$LIBS
10867LIBS="-lbsd $LIBS"
10868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869/* end confdefs.h. */
10870
10871/* Override any GCC internal prototype to avoid an error.
10872 Use char because int might match the return type of a GCC
10873 builtin and then its argument prototype would still apply. */
10874#ifdef __cplusplus
10875extern "C"
10876#endif
10877char flock ();
10878int
10879main ()
10880{
10881return flock ();
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886if ac_fn_c_try_link "$LINENO"; then :
10887 ac_cv_lib_bsd_flock=yes
10888else
10889 ac_cv_lib_bsd_flock=no
10890fi
10891rm -f core conftest.err conftest.$ac_objext \
10892 conftest$ac_exeext conftest.$ac_ext
10893LIBS=$ac_check_lib_save_LIBS
10894fi
10895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10896$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010897if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010898 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010899
10900
10901$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10902
10903
10904fi
10905
10906
10907fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010908done
10909
Antoine Pitrou85729812010-09-07 14:55:24 +000010910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010911
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10913$as_echo_n "checking for getpagesize... " >&6; }
10914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010915/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010916
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010917#include <unistd.h>
10918
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010919int
10920main ()
10921{
10922void* p = getpagesize
10923 ;
10924 return 0;
10925}
10926_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010928
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010929$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010930
Matthias Klosec511b472010-05-08 11:01:39 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010932$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010933else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10935$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010936
10937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010939
Charles-François Natali93a11752011-11-27 13:01:35 +010010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10941$as_echo_n "checking for broken unsetenv... " >&6; }
10942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10943/* end confdefs.h. */
10944
10945#include <stdlib.h>
10946
10947int
10948main ()
10949{
10950int res = unsetenv("DUMMY")
10951 ;
10952 return 0;
10953}
10954_ACEOF
10955if ac_fn_c_try_compile "$LINENO"; then :
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957$as_echo "no" >&6; }
10958else
10959
10960$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10961
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10963$as_echo "yes" >&6; }
10964
10965fi
10966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10967
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010968for ac_prog in true
10969do
10970 # Extract the first word of "$ac_prog", so it can be a program name with args.
10971set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10973$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010974if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010975 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010976else
10977 if test -n "$TRUE"; then
10978 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10979else
10980as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10981for as_dir in $PATH
10982do
10983 IFS=$as_save_IFS
10984 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010985 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010987 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010988 $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 +000010989 break 2
10990 fi
10991done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010993IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010994
10995fi
10996fi
10997TRUE=$ac_cv_prog_TRUE
10998if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11000$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11003$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011004fi
11005
Martin v. Löwiseba40652007-08-30 20:10:57 +000011006
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011007 test -n "$TRUE" && break
11008done
11009test -n "$TRUE" || TRUE="/bin/true"
11010
11011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11013$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011014if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011016else
11017 ac_check_lib_save_LIBS=$LIBS
11018LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011020/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011021
Martin v. Löwiseba40652007-08-30 20:10:57 +000011022/* Override any GCC internal prototype to avoid an error.
11023 Use char because int might match the return type of a GCC
11024 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011025#ifdef __cplusplus
11026extern "C"
11027#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011028char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011029int
11030main ()
11031{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011032return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011033 ;
11034 return 0;
11035}
11036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011038 ac_cv_lib_c_inet_aton=yes
11039else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011040 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011041fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011042rm -f core conftest.err conftest.$ac_objext \
11043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011044LIBS=$ac_check_lib_save_LIBS
11045fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11047$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011048if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011049 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011050else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11052$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011053if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011055else
11056 ac_check_lib_save_LIBS=$LIBS
11057LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011059/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011060
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061/* Override any GCC internal prototype to avoid an error.
11062 Use char because int might match the return type of a GCC
11063 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064#ifdef __cplusplus
11065extern "C"
11066#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011067char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011068int
11069main ()
11070{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011071return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011072 ;
11073 return 0;
11074}
11075_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011077 ac_cv_lib_resolv_inet_aton=yes
11078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081rm -f core conftest.err conftest.$ac_objext \
11082 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011083LIBS=$ac_check_lib_save_LIBS
11084fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11086$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011087if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011088 cat >>confdefs.h <<_ACEOF
11089#define HAVE_LIBRESOLV 1
11090_ACEOF
11091
11092 LIBS="-lresolv $LIBS"
11093
11094fi
11095
11096
11097fi
11098
11099
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011100# On Tru64, chflags seems to be present, but calling it will
11101# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11103$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011104if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011105 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011107 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011108 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011109else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011111/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011112
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011113#include <sys/stat.h>
11114#include <unistd.h>
11115int main(int argc, char*argv[])
11116{
11117 if(chflags(argv[0], 0) != 0)
11118 return 1;
11119 return 0;
11120}
Ned Deily43e10542011-06-27 23:41:53 -070011121
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011122_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011123if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011124 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011126 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11129 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011130fi
11131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011132
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011133fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11135$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011136if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011138if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011139 ac_cv_have_chflags="yes"
11140else
11141 ac_cv_have_chflags="no"
11142fi
11143
11144fi
11145if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011148
11149fi
11150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11152$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011153if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011154 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011157 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011158else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011160/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011161
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011162#include <sys/stat.h>
11163#include <unistd.h>
11164int main(int argc, char*argv[])
11165{
11166 if(lchflags(argv[0], 0) != 0)
11167 return 1;
11168 return 0;
11169}
Ned Deily43e10542011-06-27 23:41:53 -070011170
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011171_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011172if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011173 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011175 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011176fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011179fi
11180
11181
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11184$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011185if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011187if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011188 ac_cv_have_lchflags="yes"
11189else
11190 ac_cv_have_lchflags="no"
11191fi
11192
11193fi
11194if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011196$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011197
11198fi
11199
Ronald Oussorenf8752642006-07-06 10:13:35 +000011200case $ac_sys_system/$ac_sys_release in
11201Darwin/*)
11202 _CUR_CFLAGS="${CFLAGS}"
11203 _CUR_LDFLAGS="${LDFLAGS}"
11204 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11205 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11206 ;;
11207esac
11208
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11210$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011211if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011213else
11214 ac_check_lib_save_LIBS=$LIBS
11215LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011217/* end confdefs.h. */
11218
Martin v. Löwiseba40652007-08-30 20:10:57 +000011219/* Override any GCC internal prototype to avoid an error.
11220 Use char because int might match the return type of a GCC
11221 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011222#ifdef __cplusplus
11223extern "C"
11224#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011225char inflateCopy ();
11226int
11227main ()
11228{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011229return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011235 ac_cv_lib_z_inflateCopy=yes
11236else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011238fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011239rm -f core conftest.err conftest.$ac_objext \
11240 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011241LIBS=$ac_check_lib_save_LIBS
11242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11244$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011245if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011247$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011248
11249fi
11250
11251
Ronald Oussorenf8752642006-07-06 10:13:35 +000011252case $ac_sys_system/$ac_sys_release in
11253Darwin/*)
11254 CFLAGS="${_CUR_CFLAGS}"
11255 LDFLAGS="${_CUR_LDFLAGS}"
11256 ;;
11257esac
11258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11260$as_echo_n "checking for hstrerror... " >&6; }
11261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011262/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011263
Martin v. Löwise9416172003-05-03 10:12:45 +000011264#include <netdb.h>
11265
Martin v. Löwise9416172003-05-03 10:12:45 +000011266int
11267main ()
11268{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011269void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011275
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011277
Matthias Klosec511b472010-05-08 11:01:39 +000011278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011280else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011283
11284fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011285rm -f core conftest.err conftest.$ac_objext \
11286 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11289$as_echo_n "checking for inet_aton... " >&6; }
11290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011291/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011292
Martin v. Löwis86d66262006-02-17 08:40:11 +000011293#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011294#include <sys/socket.h>
11295#include <netinet/in.h>
11296#include <arpa/inet.h>
11297
Martin v. Löwise9416172003-05-03 10:12:45 +000011298int
11299main ()
11300{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011301void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011302 ;
11303 return 0;
11304}
11305_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011306if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011309
Matthias Klosec511b472010-05-08 11:01:39 +000011310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11314$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011315
11316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011317rm -f core conftest.err conftest.$ac_objext \
11318 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11321$as_echo_n "checking for inet_pton... " >&6; }
11322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011324
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011325#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011326#include <sys/socket.h>
11327#include <netinet/in.h>
11328#include <arpa/inet.h>
11329
Martin v. Löwise9416172003-05-03 10:12:45 +000011330int
11331main ()
11332{
11333void* p = inet_pton
11334 ;
11335 return 0;
11336}
11337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011339
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011340$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011341
Matthias Klosec511b472010-05-08 11:01:39 +000011342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11346$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011347
11348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011350
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011351# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11353$as_echo_n "checking for setgroups... " >&6; }
11354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011355/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011356
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011357#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011358#ifdef HAVE_GRP_H
11359#include <grp.h>
11360#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011361
Martin v. Löwisd5843682002-11-21 20:41:28 +000011362int
11363main ()
11364{
11365void* p = setgroups
11366 ;
11367 return 0;
11368}
11369_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011371
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011373
Matthias Klosec511b472010-05-08 11:01:39 +000011374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011375$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011379
11380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011382
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011383# check for openpty and forkpty
11384
11385for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386do :
11387 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011388if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011389 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011390#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011391_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11395$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011396if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011397 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011398else
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011400LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
Martin v. Löwiseba40652007-08-30 20:10:57 +000011404/* Override any GCC internal prototype to avoid an error.
11405 Use char because int might match the return type of a GCC
11406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011407#ifdef __cplusplus
11408extern "C"
11409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011410char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011411int
11412main ()
11413{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011414return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011415 ;
11416 return 0;
11417}
11418_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011420 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011424rm -f core conftest.err conftest.$ac_objext \
11425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011426LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011427fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11429$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011430if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011431 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011432 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011433else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11435$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011436if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011437 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011438else
11439 ac_check_lib_save_LIBS=$LIBS
11440LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011442/* end confdefs.h. */
11443
Martin v. Löwiseba40652007-08-30 20:10:57 +000011444/* Override any GCC internal prototype to avoid an error.
11445 Use char because int might match the return type of a GCC
11446 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011447#ifdef __cplusplus
11448extern "C"
11449#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011450char openpty ();
11451int
11452main ()
11453{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011455 ;
11456 return 0;
11457}
11458_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011459if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011460 ac_cv_lib_bsd_openpty=yes
11461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011462 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011463fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011464rm -f core conftest.err conftest.$ac_objext \
11465 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011466LIBS=$ac_check_lib_save_LIBS
11467fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11469$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011470if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011472 LIBS="$LIBS -lbsd"
11473fi
11474
11475
11476fi
11477
Fred Drake8cef4cf2000-06-28 16:40:38 +000011478
11479fi
11480done
11481
11482for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483do :
11484 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011485if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011486 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011488_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011489
Fred Drake8cef4cf2000-06-28 16:40:38 +000011490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11492$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011493if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495else
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011497LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011500
Martin v. Löwiseba40652007-08-30 20:10:57 +000011501/* Override any GCC internal prototype to avoid an error.
11502 Use char because int might match the return type of a GCC
11503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011504#ifdef __cplusplus
11505extern "C"
11506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011507char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011508int
11509main ()
11510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011518else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521rm -f core conftest.err conftest.$ac_objext \
11522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011523LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011524fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11526$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011527if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011528 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011529 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11532$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011533if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011534 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011535else
11536 ac_check_lib_save_LIBS=$LIBS
11537LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011539/* end confdefs.h. */
11540
Martin v. Löwiseba40652007-08-30 20:10:57 +000011541/* Override any GCC internal prototype to avoid an error.
11542 Use char because int might match the return type of a GCC
11543 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011544#ifdef __cplusplus
11545extern "C"
11546#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011547char forkpty ();
11548int
11549main ()
11550{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011552 ;
11553 return 0;
11554}
11555_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011556if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011557 ac_cv_lib_bsd_forkpty=yes
11558else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011559 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011560fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561rm -f core conftest.err conftest.$ac_objext \
11562 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011563LIBS=$ac_check_lib_save_LIBS
11564fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11566$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011567if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011568 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011569 LIBS="$LIBS -lbsd"
11570fi
11571
11572
11573fi
11574
Fred Drake8cef4cf2000-06-28 16:40:38 +000011575
11576fi
11577done
11578
Jack Jansendd19cf82001-12-06 22:36:17 +000011579
Brett Cannonaa5778d2008-03-18 04:09:00 +000011580# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011581for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582do :
11583 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011584if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011585 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011587_ACEOF
11588
11589fi
11590done
11591
11592
Michael W. Hudson54241132001-12-07 15:38:26 +000011593# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011594for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595do :
11596 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11597ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011598if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011599 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011601_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011602
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011603fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011604done
11605
Michael W. Hudson54241132001-12-07 15:38:26 +000011606
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011607ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011608if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011609 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011610
Martin v. Löwis1142de32002-03-29 16:28:31 +000011611else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011612 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011613 *" dup2.$ac_objext "* ) ;;
11614 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011615 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011616esac
11617
Martin v. Löwis1142de32002-03-29 16:28:31 +000011618fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011619
11620ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011621if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011622 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11623
11624else
11625 case " $LIBOBJS " in
11626 *" getcwd.$ac_objext "* ) ;;
11627 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11628 ;;
11629esac
11630
11631fi
11632
11633ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011634if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011635 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11636
11637else
11638 case " $LIBOBJS " in
11639 *" strdup.$ac_objext "* ) ;;
11640 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11641 ;;
11642esac
11643
11644fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011645
11646
11647for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011648do :
11649 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011650if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011652#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011653_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011655/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011656#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011657int
11658main ()
11659{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011660getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011661 ;
11662 return 0;
11663}
11664_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011665if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011666
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011667$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011668
Guido van Rossum627b2d71993-12-24 10:39:16 +000011669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011671
Guido van Rossum627b2d71993-12-24 10:39:16 +000011672fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011673done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011674
Jack Jansen150753c2003-03-29 22:07:47 +000011675for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011676do :
11677 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011678if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011679 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011681_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011684#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011685int
11686main ()
11687{
11688setpgrp(0,0);
11689 ;
11690 return 0;
11691}
11692_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011693if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011694
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011695$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011696
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011697fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011699
11700fi
11701done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011702
Thomas Wouters3a584202000-08-05 23:28:51 +000011703for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011704do :
11705 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011706if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011708#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011709_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011711/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011712#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011713int
11714main ()
11715{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011716gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011717 ;
11718 return 0;
11719}
11720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011721if ac_fn_c_try_compile "$LINENO"; then :
11722
Guido van Rossum627b2d71993-12-24 10:39:16 +000011723else
Skip Montanaro6dead952003-09-25 14:50:04 +000011724
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011725$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011726
Martin v. Löwis11437992002-04-12 09:54:03 +000011727
Guido van Rossum627b2d71993-12-24 10:39:16 +000011728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011730
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011732done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011733
Michael W. Hudson54241132001-12-07 15:38:26 +000011734
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11736$as_echo_n "checking for major... " >&6; }
11737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011738/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011739
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011740#if defined(MAJOR_IN_MKDEV)
11741#include <sys/mkdev.h>
11742#elif defined(MAJOR_IN_SYSMACROS)
11743#include <sys/sysmacros.h>
11744#else
11745#include <sys/types.h>
11746#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011747
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011748int
11749main ()
11750{
11751
11752 makedev(major(0),minor(0));
11753
11754 ;
11755 return 0;
11756}
11757_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011759
11760
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011761$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11764$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011765
11766else
Skip Montanaro6dead952003-09-25 14:50:04 +000011767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11769$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011770
11771fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772rm -f core conftest.err conftest.$ac_objext \
11773 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011774
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011775# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011776# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11778$as_echo_n "checking for getaddrinfo... " >&6; }
11779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011780/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011781
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011782#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011783#include <sys/socket.h>
11784#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011785#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011786
Martin v. Löwis11437992002-04-12 09:54:03 +000011787int
11788main ()
11789{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011790getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 ;
11792 return 0;
11793}
11794_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011795if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011796 have_getaddrinfo=yes
11797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011798 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011799fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
11802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11803$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011804if test $have_getaddrinfo = yes
11805then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11807$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011808 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011812
11813if test "${enable_ipv6+set}" = set; then
11814 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11815else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011816 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011817fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011820/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011821
Stefan Krah0afe4e42012-11-22 23:56:51 +010011822#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011823#include <sys/types.h>
11824#include <netdb.h>
11825#include <string.h>
11826#include <sys/socket.h>
11827#include <netinet/in.h>
11828
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011829int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011830{
11831 int passive, gaierr, inet4 = 0, inet6 = 0;
11832 struct addrinfo hints, *ai, *aitop;
11833 char straddr[INET6_ADDRSTRLEN], strport[16];
11834
11835 for (passive = 0; passive <= 1; passive++) {
11836 memset(&hints, 0, sizeof(hints));
11837 hints.ai_family = AF_UNSPEC;
11838 hints.ai_flags = passive ? AI_PASSIVE : 0;
11839 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011840 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011841 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11842 (void)gai_strerror(gaierr);
11843 goto bad;
11844 }
11845 for (ai = aitop; ai; ai = ai->ai_next) {
11846 if (ai->ai_addr == NULL ||
11847 ai->ai_addrlen == 0 ||
11848 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11849 straddr, sizeof(straddr), strport, sizeof(strport),
11850 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11851 goto bad;
11852 }
11853 switch (ai->ai_family) {
11854 case AF_INET:
11855 if (strcmp(strport, "54321") != 0) {
11856 goto bad;
11857 }
11858 if (passive) {
11859 if (strcmp(straddr, "0.0.0.0") != 0) {
11860 goto bad;
11861 }
11862 } else {
11863 if (strcmp(straddr, "127.0.0.1") != 0) {
11864 goto bad;
11865 }
11866 }
11867 inet4++;
11868 break;
11869 case AF_INET6:
11870 if (strcmp(strport, "54321") != 0) {
11871 goto bad;
11872 }
11873 if (passive) {
11874 if (strcmp(straddr, "::") != 0) {
11875 goto bad;
11876 }
11877 } else {
11878 if (strcmp(straddr, "::1") != 0) {
11879 goto bad;
11880 }
11881 }
11882 inet6++;
11883 break;
11884 case AF_UNSPEC:
11885 goto bad;
11886 break;
11887 default:
11888 /* another family support? */
11889 break;
11890 }
11891 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011892 freeaddrinfo(aitop);
11893 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011894 }
11895
11896 if (!(inet4 == 0 || inet4 == 2))
11897 goto bad;
11898 if (!(inet6 == 0 || inet6 == 2))
11899 goto bad;
11900
11901 if (aitop)
11902 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011903 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011904
11905 bad:
11906 if (aitop)
11907 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011908 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011909}
11910
Martin v. Löwis11437992002-04-12 09:54:03 +000011911_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011912if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011913 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011914else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011915 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011916fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11918 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011920
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011921fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011922
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011924
Benjamin Peterson75fed812010-11-01 01:47:19 +000011925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11926$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11927
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011928if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011929then
11930 if test $ipv6 = yes
11931 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011932 echo 'Fatal: You must get working getaddrinfo() function.'
11933 echo ' or you can specify "--disable-ipv6"'.
11934 exit 1
11935 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011936else
Martin v. Löwis11437992002-04-12 09:54:03 +000011937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011939
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011940fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011941
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011942for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943do :
11944 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011945if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011946 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011947#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011948_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011949
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011950fi
11951done
11952
Michael W. Hudson54241132001-12-07 15:38:26 +000011953
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011954# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11956$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011957if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011958 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011959else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011961/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011962#include <sys/types.h>
11963#include <sys/time.h>
11964#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011965
Martin v. Löwis11437992002-04-12 09:54:03 +000011966int
11967main ()
11968{
11969if ((struct tm *) 0)
11970return 0;
11971 ;
11972 return 0;
11973}
11974_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011976 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011978 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11983$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011984if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011985
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011987
11988fi
11989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11991$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011992if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011993 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011996/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011997#include <sys/types.h>
11998#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Martin v. Löwis11437992002-04-12 09:54:03 +000012000int
12001main ()
12002{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012003struct tm tm;
12004 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012005 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012006 ;
12007 return 0;
12008}
12009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012010if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011 ac_cv_struct_tm=time.h
12012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012013 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12018$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012019if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022
12023fi
12024
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012025ac_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 +000012026#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012028"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012029if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012030
12031cat >>confdefs.h <<_ACEOF
12032#define HAVE_STRUCT_TM_TM_ZONE 1
12033_ACEOF
12034
12035
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12039
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012040$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041
12042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12044"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012045if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012046 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012048 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012049fi
12050
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012053_ACEOF
12054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12056$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012057if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012062#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012063#if !HAVE_DECL_TZNAME
12064extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Martin v. Löwis11437992002-04-12 09:54:03 +000012067int
12068main ()
12069{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012070return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012071 ;
12072 return 0;
12073}
12074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012076 ac_cv_var_tzname=yes
12077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012078 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012080rm -f core conftest.err conftest.$ac_objext \
12081 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12084$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012085 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012087$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012088
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089 fi
12090fi
12091
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092ac_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 +010012093if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
12095cat >>confdefs.h <<_ACEOF
12096#define HAVE_STRUCT_STAT_ST_RDEV 1
12097_ACEOF
12098
12099
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012100fi
12101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102ac_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 +010012103if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012104
Martin v. Löwis11437992002-04-12 09:54:03 +000012105cat >>confdefs.h <<_ACEOF
12106#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12107_ACEOF
12108
12109
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012110fi
12111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012112ac_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 +010012113if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012114
12115cat >>confdefs.h <<_ACEOF
12116#define HAVE_STRUCT_STAT_ST_FLAGS 1
12117_ACEOF
12118
12119
12120fi
12121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012122ac_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 +010012123if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012124
12125cat >>confdefs.h <<_ACEOF
12126#define HAVE_STRUCT_STAT_ST_GEN 1
12127_ACEOF
12128
12129
12130fi
12131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012132ac_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 +010012133if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012134
12135cat >>confdefs.h <<_ACEOF
12136#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12137_ACEOF
12138
12139
12140fi
12141
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142ac_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 +010012143if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012144
Martin v. Löwis11437992002-04-12 09:54:03 +000012145cat >>confdefs.h <<_ACEOF
12146#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12147_ACEOF
12148
12149
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012150fi
12151
Michael W. Hudson54241132001-12-07 15:38:26 +000012152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12154$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012155if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012157else
Matthias Klosec511b472010-05-08 11:01:39 +000012158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012160/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012161#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012162int
12163main ()
12164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012165return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171 ac_cv_header_time_altzone=yes
12172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012176
Martin v. Löwiseba40652007-08-30 20:10:57 +000012177fi
12178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12180$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012181if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012182
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012183$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012184
12185fi
12186
Guido van Rossumda88dad1995-01-26 00:46:29 +000012187was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12189$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012191/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012192
12193#include <sys/types.h>
12194#include <sys/select.h>
12195#include <sys/time.h>
12196
Martin v. Löwis11437992002-04-12 09:54:03 +000012197int
12198main ()
12199{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200;
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 ;
12202 return 0;
12203}
12204_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012205if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012206
12207
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012209
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012210 was_it_defined=yes
12211
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12215$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012216
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12218$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012219if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012220 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012223/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012224#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012225int
12226main ()
12227{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012228struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012229 ;
12230 return 0;
12231}
12232_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012234 ac_cv_struct_addrinfo=yes
12235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12239fi
12240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12242$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012243if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012244
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012245$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012246
12247fi
12248
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12250$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012251if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012253else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012256
12257# include <sys/types.h>
12258# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012259int
12260main ()
12261{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012262struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012267if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012268 ac_cv_struct_sockaddr_storage=yes
12269else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012270 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12273fi
12274
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12276$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012277if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012279$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012280
12281fi
12282
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12286$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012287if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012289else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012292$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012293int
12294main ()
12295{
12296static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012297test_array [0] = 0;
12298return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012299
12300 ;
12301 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012302}
Martin v. Löwis11437992002-04-12 09:54:03 +000012303_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012305 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012310fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12312$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012313if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012314 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012315
12316fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012317
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12319$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012320if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012321 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012322else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012324/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325
Martin v. Löwis11437992002-04-12 09:54:03 +000012326int
12327main ()
12328{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012331 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012333 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012335 char const *const *pcpcc;
12336 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 /* NEC SVR4.0.2 mips cc rejects this. */
12338 struct point {int x, y;};
12339 static struct point const zero = {0,0};
12340 /* AIX XL C 1.02.0.0 rejects this.
12341 It does not let you subtract one const X* pointer from another in
12342 an arm of an if-expression whose if-part is not a constant
12343 expression */
12344 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347 ++pcpcc;
12348 ppc = (char**) pcpcc;
12349 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012350 { /* SCO 3.2v4 cc rejects this sort of thing. */
12351 char tx;
12352 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012353 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012356 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 }
12358 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12359 int x[] = {25, 17};
12360 const int *foo = &x[0];
12361 ++foo;
12362 }
12363 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12364 typedef const int *iptr;
12365 iptr p = 0;
12366 ++p;
12367 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012368 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012370 struct s { int j; const int *ap[3]; } bx;
12371 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012372 }
12373 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12374 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012377 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012378#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012379
Martin v. Löwis11437992002-04-12 09:54:03 +000012380 ;
12381 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012382}
Martin v. Löwis11437992002-04-12 09:54:03 +000012383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012384if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385 ac_cv_c_const=yes
12386else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012387 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012388fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12392$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012393if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012395$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012396
12397fi
12398
Michael W. Hudson54241132001-12-07 15:38:26 +000012399
Guido van Rossumda88dad1995-01-26 00:46:29 +000012400works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12402$as_echo_n "checking for working volatile... " >&6; }
12403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012404/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012405
Martin v. Löwis11437992002-04-12 09:54:03 +000012406int
12407main ()
12408{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012415 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012416else
Skip Montanaro6dead952003-09-25 14:50:04 +000012417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012418$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012419
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012420
Guido van Rossum627b2d71993-12-24 10:39:16 +000012421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12424$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012425
Guido van Rossumda88dad1995-01-26 00:46:29 +000012426works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12428$as_echo_n "checking for working signed char... " >&6; }
12429cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012430/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012431
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012441 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012442else
Skip Montanaro6dead952003-09-25 14:50:04 +000012443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012444$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012445
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012446
Guido van Rossum7f43da71994-08-01 12:15:30 +000012447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12450$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012451
Guido van Rossumda88dad1995-01-26 00:46:29 +000012452have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12454$as_echo_n "checking for prototypes... " >&6; }
12455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012456/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012457int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012458int
12459main ()
12460{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012461return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012462 ;
12463 return 0;
12464}
12465_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012468$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
Matthias Klosec511b472010-05-08 11:01:39 +000012470 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12474$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475
Guido van Rossumda88dad1995-01-26 00:46:29 +000012476works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12478$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012480/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012481
12482#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012483int foo(int x, ...) {
12484 va_list va;
12485 va_start(va, x);
12486 va_arg(va, int);
12487 va_arg(va, char *);
12488 va_arg(va, double);
12489 return 0;
12490}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012491
Martin v. Löwis11437992002-04-12 09:54:03 +000012492int
12493main ()
12494{
Guido van Rossum90eea071996-08-30 20:58:57 +000012495return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012496 ;
12497 return 0;
12498}
12499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012500if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012501
12502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012504
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012505 works=yes
12506
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12510$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511
Martin v. Löwisd6320502004-08-12 13:45:08 +000012512# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12514$as_echo_n "checking for socketpair... " >&6; }
12515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012516/* end confdefs.h. */
12517
12518#include <sys/types.h>
12519#include <sys/socket.h>
12520
12521int
12522main ()
12523{
12524void *x=socketpair
12525 ;
12526 return 0;
12527}
12528_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012531$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012532
Matthias Klosec511b472010-05-08 11:01:39 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012534$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12537$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012538
12539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012541
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012542# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12544$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012546/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012547#include <sys/types.h>
12548#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012549int
12550main ()
12551{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012552struct sockaddr x;
12553x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012554 ;
12555 return 0;
12556}
12557_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558if ac_fn_c_try_compile "$LINENO"; then :
12559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12560$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012563
12564else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12566$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012567
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012570
Guido van Rossumda88dad1995-01-26 00:46:29 +000012571va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12573$as_echo_n "checking whether va_list is an array... " >&6; }
12574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576
12577#ifdef HAVE_STDARG_PROTOTYPES
12578#include <stdarg.h>
12579#else
12580#include <varargs.h>
12581#endif
12582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012586va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 ;
12588 return 0;
12589}
12590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012591if ac_fn_c_try_compile "$LINENO"; then :
12592
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012593else
Skip Montanaro6dead952003-09-25 14:50:04 +000012594
Martin v. Löwis11437992002-04-12 09:54:03 +000012595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012596$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012597
Guido van Rossumda88dad1995-01-26 00:46:29 +000012598 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012599
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12603$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012605# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012606
12607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012608ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012609if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12614$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012615 OLD_CFLAGS=$CFLAGS
12616 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012619
12620# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012621
Martin v. Löwis11437992002-04-12 09:54:03 +000012622int
12623main ()
12624{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012625
12626 char *name;
12627 struct hostent *he, *res;
12628 char buffer[2048];
12629 int buflen = 2048;
12630 int h_errnop;
12631
12632 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012633
12634 ;
12635 return 0;
12636}
12637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012641
Martin v. Löwis11437992002-04-12 09:54:03 +000012642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012643$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012644
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12646$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012647
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012648else
Skip Montanaro6dead952003-09-25 14:50:04 +000012649
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12651$as_echo "no" >&6; }
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12653$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012655/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012657# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
Martin v. Löwis11437992002-04-12 09:54:03 +000012659int
12660main ()
12661{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012662
12663 char *name;
12664 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012665 char buffer[2048];
12666 int buflen = 2048;
12667 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012668
Matthias Klosec511b472010-05-08 11:01:39 +000012669 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012670
12671 ;
12672 return 0;
12673}
12674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012677 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679
Matthias Klosec511b472010-05-08 11:01:39 +000012680$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12683$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012685else
Skip Montanaro6dead952003-09-25 14:50:04 +000012686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12688$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12690$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12692/* end confdefs.h. */
12693
12694# include <netdb.h>
12695
12696int
12697main ()
12698{
12699
12700 char *name;
12701 struct hostent *he;
12702 struct hostent_data data;
12703
12704 (void) gethostbyname_r(name, he, &data);
12705
12706 ;
12707 return 0;
12708}
12709_ACEOF
12710if ac_fn_c_try_compile "$LINENO"; then :
12711
12712 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12713
12714
12715$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12716
12717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12718$as_echo "yes" >&6; }
12719
12720else
12721
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12723$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012724
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012727
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012730
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012733 CFLAGS=$OLD_CFLAGS
12734
12735else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012736
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012737 for ac_func in gethostbyname
12738do :
12739 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012740if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012743_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012745fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012746done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012747
Michael W. Hudson54241132001-12-07 15:38:26 +000012748
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012749fi
12750
Michael W. Hudson54241132001-12-07 15:38:26 +000012751
12752
12753
12754
12755
12756
Guido van Rossum627b2d71993-12-24 10:39:16 +000012757# checks for system services
12758# (none yet)
12759
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012760# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012762if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012763
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12766$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012767if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012768 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012771LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775/* Override any GCC internal prototype to avoid an error.
12776 Use char because int might match the return type of a GCC
12777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012778#ifdef __cplusplus
12779extern "C"
12780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012781char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012785return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ;
12787 return 0;
12788}
12789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012791 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012793 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012797LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12800$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012801if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 cat >>confdefs.h <<_ACEOF
12803#define HAVE_LIBIEEE 1
12804_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012806 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808fi
12809
Michael W. Hudson54241132001-12-07 15:38:26 +000012810
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012811fi
12812
Michael W. Hudson54241132001-12-07 15:38:26 +000012813
Guido van Rossum7f253911997-05-09 02:42:48 +000012814# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12816$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Martin v. Löwiseba40652007-08-30 20:10:57 +000012818# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012819if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012820 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012821if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012822then
12823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12827$as_echo "yes" >&6; }
12828else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12829$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012830fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012831else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12833$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834fi
12835
Guido van Rossum7f253911997-05-09 02:42:48 +000012836
Guido van Rossum7f43da71994-08-01 12:15:30 +000012837# check for --with-libm=...
12838
Guido van Rossum563e7081996-09-10 18:20:48 +000012839case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012840Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012841BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012842*) LIBM=-lm
12843esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12845$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012846
Martin v. Löwiseba40652007-08-30 20:10:57 +000012847# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012849 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012850if test "$withval" = no
12851then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12853$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012854elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012855then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12857$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012858else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012859fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12862$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863fi
12864
Guido van Rossum7f43da71994-08-01 12:15:30 +000012865
12866# check for --with-libc=...
12867
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12869$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012873 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012874if test "$withval" = no
12875then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12877$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012878elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012879then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12881$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012882else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012883fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012884else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12886$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887fi
12888
Guido van Rossum7f43da71994-08-01 12:15:30 +000012889
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012890# **************************************************
12891# * Check for various properties of floating point *
12892# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12895$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012896if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012898else
12899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012901 ac_cv_little_endian_double=no
12902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012904/* end confdefs.h. */
12905
12906#include <string.h>
12907int main() {
12908 double x = 9006104071832581.0;
12909 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12910 return 0;
12911 else
12912 return 1;
12913}
12914
12915_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012917 ac_cv_little_endian_double=yes
12918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12922 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012923fi
12924
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012925fi
12926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12928$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012929if test "$ac_cv_little_endian_double" = yes
12930then
12931
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012932$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012933
12934fi
12935
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12937$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012938if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012940else
12941
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012943 ac_cv_big_endian_double=no
12944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012946/* end confdefs.h. */
12947
12948#include <string.h>
12949int main() {
12950 double x = 9006104071832581.0;
12951 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12952 return 0;
12953 else
12954 return 1;
12955}
12956
12957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012958if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012959 ac_cv_big_endian_double=yes
12960else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012961 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012962fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12964 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012965fi
12966
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012967fi
12968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12970$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012971if test "$ac_cv_big_endian_double" = yes
12972then
12973
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012975
12976fi
12977
12978# Some ARM platforms use a mixed-endian representation for doubles.
12979# While Python doesn't currently have full support for these platforms
12980# (see e.g., issue 1762561), we can at least make sure that float <-> string
12981# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12983$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012984if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012985 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012986else
12987
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012989 ac_cv_mixed_endian_double=no
12990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012992/* end confdefs.h. */
12993
12994#include <string.h>
12995int main() {
12996 double x = 9006104071832581.0;
12997 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12998 return 0;
12999 else
13000 return 1;
13001}
13002
13003_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013005 ac_cv_mixed_endian_double=yes
13006else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013007 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013008fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13010 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013011fi
13012
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013013fi
13014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13016$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013017if test "$ac_cv_mixed_endian_double" = yes
13018then
13019
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013021
13022fi
13023
13024# The short float repr introduced in Python 3.1 requires the
13025# correctly-rounded string <-> double conversion functions from
13026# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13027# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013028# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013029# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013030
13031# This inline assembler syntax may also work for suncc and icc,
13032# so we try it on all platforms.
13033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13035$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013037/* end confdefs.h. */
13038
13039int
13040main ()
13041{
13042
Mark Dickinsona548dee2009-11-15 13:12:43 +000013043 unsigned short cw;
13044 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13045 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013046
13047 ;
13048 return 0;
13049}
13050_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013051if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013052 have_gcc_asm_for_x87=yes
13053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013055fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013056rm -f core conftest.err conftest.$ac_objext \
13057 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13059$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013060if test "$have_gcc_asm_for_x87" = yes
13061then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013064
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013065fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013066
Mark Dickinson04b27232009-01-04 12:29:36 +000013067# Detect whether system arithmetic is subject to x87-style double
13068# rounding issues. The result of this test has little meaning on non
13069# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13070# mode is round-to-nearest and double rounding issues are present, and
13071# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13073$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013074# $BASECFLAGS may affect the result
13075ac_save_cc="$CC"
13076CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013078 ac_cv_x87_double_rounding=no
13079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013081/* end confdefs.h. */
13082
13083#include <stdlib.h>
13084#include <math.h>
13085int main() {
13086 volatile double x, y, z;
13087 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13088 x = 0.99999999999999989; /* 1-2**-53 */
13089 y = 1./x;
13090 if (y != 1.)
13091 exit(0);
13092 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13093 x = 1e16;
13094 y = 2.99999;
13095 z = x + y;
13096 if (z != 1e16+4.)
13097 exit(0);
13098 /* both tests show evidence of double rounding */
13099 exit(1);
13100}
13101
13102_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013104 ac_cv_x87_double_rounding=no
13105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013107fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13109 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013110fi
13111
Mark Dickinson99abd142009-10-24 13:44:16 +000013112CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13114$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013115if test "$ac_cv_x87_double_rounding" = yes
13116then
13117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013118$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013119
13120fi
13121
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013122# ************************************
13123# * Check for mathematical functions *
13124# ************************************
13125
13126LIBS_SAVE=$LIBS
13127LIBS="$LIBS $LIBM"
13128
Mark Dickinson265d7382008-04-21 22:32:24 +000013129# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13130# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13132$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013133if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013135else
13136
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013137if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013138 ac_cv_tanh_preserves_zero_sign=no
13139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013141/* end confdefs.h. */
13142
13143#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013144#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013145int main() {
13146 /* return 0 if either negative zeros don't exist
13147 on this platform or if negative zeros exist
13148 and tanh(-0.) == -0. */
13149 if (atan2(0., -1.) == atan2(-0., -1.) ||
13150 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13151 else exit(1);
13152}
13153
13154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013156 ac_cv_tanh_preserves_zero_sign=yes
13157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013162fi
13163
Mark Dickinson265d7382008-04-21 22:32:24 +000013164fi
13165
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13167$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013168if test "$ac_cv_tanh_preserves_zero_sign" = yes
13169then
13170
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013171$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013172
13173fi
13174
Mark Dickinson65898e02009-09-05 10:27:00 +000013175for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176do :
13177 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13178ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013179if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013180 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013182_ACEOF
13183
13184fi
13185done
13186
Mark Dickinson65898e02009-09-05 10:27:00 +000013187for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188do :
13189 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13190ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013191if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013192 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013193#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013194_ACEOF
13195
13196fi
13197done
13198
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013199ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13200"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013201if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013202 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013203else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013204 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013205fi
13206
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013207cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013208#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013209_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13211"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013212if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013216fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013217
13218cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013220_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013221ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13222"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013223if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013226 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013227fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013228
13229cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013230#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013231_ACEOF
13232
13233
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013234LIBS=$LIBS_SAVE
13235
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013236# For multiprocessing module, check that sem_open
13237# actually works. For FreeBSD versions <= 7.2,
13238# the kernel module that provides POSIX semaphores
13239# isn't loaded by default, so an attempt to call
13240# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13242$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013243if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013247 ac_cv_posix_semaphores_enabled=yes
13248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013250/* end confdefs.h. */
13251
13252#include <unistd.h>
13253#include <fcntl.h>
13254#include <stdio.h>
13255#include <semaphore.h>
13256#include <sys/stat.h>
13257
13258int main(void) {
13259 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13260 if (a == SEM_FAILED) {
13261 perror("sem_open");
13262 return 1;
13263 }
13264 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013265 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013266 return 0;
13267}
13268
13269_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013270if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013271 ac_cv_posix_semaphores_enabled=yes
13272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13276 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013277fi
13278
13279
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013280fi
13281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13283$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013284if test $ac_cv_posix_semaphores_enabled = no
13285then
13286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013288
13289fi
13290
13291# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13293$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013294if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013297 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013298 ac_cv_broken_sem_getvalue=yes
13299else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013301/* end confdefs.h. */
13302
13303#include <unistd.h>
13304#include <fcntl.h>
13305#include <stdio.h>
13306#include <semaphore.h>
13307#include <sys/stat.h>
13308
13309int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013310 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013311 int count;
13312 int res;
13313 if(a==SEM_FAILED){
13314 perror("sem_open");
13315 return 1;
13316
13317 }
13318 res = sem_getvalue(a, &count);
13319 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013320 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013321 return res==-1 ? 1 : 0;
13322}
13323
13324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013326 ac_cv_broken_sem_getvalue=no
13327else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013329fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013332fi
13333
13334
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013335fi
13336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13338$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013339if test $ac_cv_broken_sem_getvalue = yes
13340then
13341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013343
13344fi
13345
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013346# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13348$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013349# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013350if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013351 enableval=$enable_big_digits; case $enable_big_digits in
13352yes)
13353 enable_big_digits=30 ;;
13354no)
13355 enable_big_digits=15 ;;
1335615|30)
13357 ;;
13358*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013359 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 +000013360esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13362$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013363
13364cat >>confdefs.h <<_ACEOF
13365#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13366_ACEOF
13367
13368
13369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13371$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013372fi
13373
13374
Guido van Rossumef2255b2000-03-10 22:30:29 +000013375# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013376ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013377if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
13379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013380$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013382 wchar_h="yes"
13383
Guido van Rossumef2255b2000-03-10 22:30:29 +000013384else
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013386
13387fi
13388
Michael W. Hudson54241132001-12-07 15:38:26 +000013389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013391# determine wchar_t size
13392if test "$wchar_h" = yes
13393then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013394 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013395# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13396# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13397# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13399$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013400if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013401 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013403 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13404"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013405
Martin v. Löwis11437992002-04-12 09:54:03 +000013406else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407 if test "$ac_cv_type_wchar_t" = yes; then
13408 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013410as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013411See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013412 else
13413 ac_cv_sizeof_wchar_t=0
13414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013415fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013416
Martin v. Löwis11437992002-04-12 09:54:03 +000013417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13419$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013420
13421
13422
Martin v. Löwis11437992002-04-12 09:54:03 +000013423cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013424#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013425_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013426
Michael W. Hudson54241132001-12-07 15:38:26 +000013427
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013428fi
13429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13431$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013432have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013435
13436#include <tcl.h>
13437#if TCL_UTF_MAX != 6
13438# error "NOT UCS4_TCL"
13439#endif
13440int
13441main ()
13442{
13443
13444 ;
13445 return 0;
13446}
13447_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013449
13450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013452
13453 have_ucs4_tcl=yes
13454
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013455fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13458$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013459
Skip Montanaro6dead952003-09-25 14:50:04 +000013460# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013461if test "$wchar_h" = yes
13462then
13463 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13465$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013466 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013467 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013468else
13469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013471 ac_cv_wchar_t_signed=yes
13472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013474/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013475
13476 #include <wchar.h>
13477 int main()
13478 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013479 /* Success: exit code 0 */
13480 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013481 }
13482
13483_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013485 ac_cv_wchar_t_signed=yes
13486else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013487 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013488fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13490 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013491fi
13492
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013493fi
13494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13496$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013497fi
13498
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13500$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013501# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013502if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013504else
13505 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013506fi
13507
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013508
13509if test $enable_unicode = yes
13510then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013511 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013512 case "$have_ucs4_tcl" in
13513 yes) enable_unicode="ucs4"
13514 ;;
13515 *) enable_unicode="ucs2"
13516 ;;
13517 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013518fi
13519
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013520
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013521case "$enable_unicode" in
13522ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013524
13525 ;;
13526ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013527 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013528
13529 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013530no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013531*) 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 +000013532esac
13533
Michael W. Hudson54241132001-12-07 15:38:26 +000013534
Martin v. Löwis11437992002-04-12 09:54:03 +000013535
13536
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013537if test "$enable_unicode" = "no"
13538then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013539 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13541$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013542else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013543 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013546
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013547
13548 # wchar_t is only usable if it maps to an unsigned type
13549 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013550 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013551 then
13552 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013553
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013556 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013557
13558 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13559 then
13560 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013561 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013562
13563 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13564 then
13565 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013567
13568 else
13569 PY_UNICODE_TYPE="no type found"
13570 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13572$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013573fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013574
13575# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13577$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013578if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013579 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013581 ac_cv_c_bigendian=unknown
13582 # See if we're dealing with a universal compiler.
13583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13584/* end confdefs.h. */
13585#ifndef __APPLE_CC__
13586 not a universal capable compiler
13587 #endif
13588 typedef int dummy;
13589
Skip Montanaro6dead952003-09-25 14:50:04 +000013590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013591if ac_fn_c_try_compile "$LINENO"; then :
13592
13593 # Check for potential -arch flags. It is not universal unless
13594 # there are at least two -arch flags with different values.
13595 ac_arch=
13596 ac_prev=
13597 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13598 if test -n "$ac_prev"; then
13599 case $ac_word in
13600 i?86 | x86_64 | ppc | ppc64)
13601 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13602 ac_arch=$ac_word
13603 else
13604 ac_cv_c_bigendian=universal
13605 break
13606 fi
13607 ;;
13608 esac
13609 ac_prev=
13610 elif test "x$ac_word" = "x-arch"; then
13611 ac_prev=arch
13612 fi
13613 done
13614fi
13615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13616 if test $ac_cv_c_bigendian = unknown; then
13617 # See if sys/param.h defines the BYTE_ORDER macro.
13618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013619/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013620#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013622
Martin v. Löwis11437992002-04-12 09:54:03 +000013623int
13624main ()
13625{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013626#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13627 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13628 && LITTLE_ENDIAN)
13629 bogus endian macros
13630 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
13632 ;
13633 return 0;
13634}
13635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013637 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013639/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013640#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013641 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013642
Martin v. Löwis11437992002-04-12 09:54:03 +000013643int
13644main ()
13645{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013646#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013647 not big endian
13648 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
13650 ;
13651 return 0;
13652}
13653_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013654if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013655 ac_cv_c_bigendian=yes
13656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013657 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013658fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660fi
13661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13662 fi
13663 if test $ac_cv_c_bigendian = unknown; then
13664 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013666/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667#include <limits.h>
13668
Martin v. Löwis11437992002-04-12 09:54:03 +000013669int
13670main ()
13671{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013672#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13673 bogus endian macros
13674 #endif
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 ;
13677 return 0;
13678}
13679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680if ac_fn_c_try_compile "$LINENO"; then :
13681 # It does; now see whether it defined to _BIG_ENDIAN or not.
13682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13683/* end confdefs.h. */
13684#include <limits.h>
13685
13686int
13687main ()
13688{
13689#ifndef _BIG_ENDIAN
13690 not big endian
13691 #endif
13692
13693 ;
13694 return 0;
13695}
13696_ACEOF
13697if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013700 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013701fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13703fi
13704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13705 fi
13706 if test $ac_cv_c_bigendian = unknown; then
13707 # Compile a test program.
13708 if test "$cross_compiling" = yes; then :
13709 # Try to guess by grepping values from an object file.
13710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13711/* end confdefs.h. */
13712short int ascii_mm[] =
13713 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13714 short int ascii_ii[] =
13715 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13716 int use_ascii (int i) {
13717 return ascii_mm[i] + ascii_ii[i];
13718 }
13719 short int ebcdic_ii[] =
13720 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13721 short int ebcdic_mm[] =
13722 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13723 int use_ebcdic (int i) {
13724 return ebcdic_mm[i] + ebcdic_ii[i];
13725 }
13726 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013727
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728int
13729main ()
13730{
13731return use_ascii (foo) == use_ebcdic (foo);
13732 ;
13733 return 0;
13734}
13735_ACEOF
13736if ac_fn_c_try_compile "$LINENO"; then :
13737 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13738 ac_cv_c_bigendian=yes
13739 fi
13740 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13741 if test "$ac_cv_c_bigendian" = unknown; then
13742 ac_cv_c_bigendian=no
13743 else
13744 # finding both strings is unlikely to happen, but who knows?
13745 ac_cv_c_bigendian=unknown
13746 fi
13747 fi
13748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013752/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013753$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013754int
13755main ()
13756{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758 /* Are we little or big endian? From Harbison&Steele. */
13759 union
13760 {
13761 long int l;
13762 char c[sizeof (long int)];
13763 } u;
13764 u.l = 1;
13765 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013766
13767 ;
13768 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013769}
Martin v. Löwis11437992002-04-12 09:54:03 +000013770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013771if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013772 ac_cv_c_bigendian=no
13773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013774 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013775fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13783$as_echo "$ac_cv_c_bigendian" >&6; }
13784 case $ac_cv_c_bigendian in #(
13785 yes)
13786 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13787;; #(
13788 no)
13789 ;; #(
13790 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013791
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013792$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794 ;; #(
13795 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013796 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013797 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013798 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013799
Michael W. Hudson54241132001-12-07 15:38:26 +000013800
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013801# Check whether right shifting a negative integer extends the sign bit
13802# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13804$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013805if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013807else
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013810 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013814
13815int main()
13816{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013817 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013818}
13819
Martin v. Löwis11437992002-04-12 09:54:03 +000013820_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013821if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013822 ac_cv_rshift_extends_sign=yes
13823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013824 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13827 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013828fi
13829
Martin v. Löwiseba40652007-08-30 20:10:57 +000013830fi
13831
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13833$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013834if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013835then
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013837$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013838
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013839fi
13840
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013841# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13843$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013844if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013846else
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013849/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013850#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013851int
13852main ()
13853{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013854
13855 FILE *f = fopen("/dev/null", "r");
13856 flockfile(f);
13857 getc_unlocked(f);
13858 funlockfile(f);
13859
Martin v. Löwis11437992002-04-12 09:54:03 +000013860 ;
13861 return 0;
13862}
13863_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013864if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013865 ac_cv_have_getc_unlocked=yes
13866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867 ac_cv_have_getc_unlocked=no
13868fi
13869rm -f core conftest.err conftest.$ac_objext \
13870 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13874$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013875if test "$ac_cv_have_getc_unlocked" = yes
13876then
Martin v. Löwis11437992002-04-12 09:54:03 +000013877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013879
13880fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013881
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013882# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013883# save the value of LIBS so we don't actually link Python with readline
13884LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013885
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013886# On some systems we need to link readline to a termcap compatible
13887# library. NOTE: Keep the precedence of listed libraries synchronised
13888# with setup.py.
13889py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13891$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013892for py_libtermcap in "" ncursesw ncurses curses termcap; do
13893 if test -z "$py_libtermcap"; then
13894 READLINE_LIBS="-lreadline"
13895 else
13896 READLINE_LIBS="-lreadline -l$py_libtermcap"
13897 fi
13898 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013900/* end confdefs.h. */
13901
Martin v. Löwiseba40652007-08-30 20:10:57 +000013902/* Override any GCC internal prototype to avoid an error.
13903 Use char because int might match the return type of a GCC
13904 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013905#ifdef __cplusplus
13906extern "C"
13907#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013908char readline ();
13909int
13910main ()
13911{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013912return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013913 ;
13914 return 0;
13915}
13916_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013917if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013918 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920rm -f core conftest.err conftest.$ac_objext \
13921 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013922 if test $py_cv_lib_readline = yes; then
13923 break
13924 fi
13925done
13926# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13927#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013928if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13930$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013931else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13933$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013934
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013935$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013936
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013937fi
13938
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013939# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13941$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013942if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013944else
13945 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013946LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013948/* end confdefs.h. */
13949
Martin v. Löwiseba40652007-08-30 20:10:57 +000013950/* Override any GCC internal prototype to avoid an error.
13951 Use char because int might match the return type of a GCC
13952 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013953#ifdef __cplusplus
13954extern "C"
13955#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013956char rl_callback_handler_install ();
13957int
13958main ()
13959{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013960return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013961 ;
13962 return 0;
13963}
13964_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013965if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013966 ac_cv_lib_readline_rl_callback_handler_install=yes
13967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013968 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013970rm -f core conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013972LIBS=$ac_check_lib_save_LIBS
13973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13975$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013976if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013977
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013978$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013979
13980fi
13981
13982
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013983# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013985/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013986#include <readline/readline.h>
13987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013988if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013989 have_readline=yes
13990else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013991 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013992
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013993fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013994rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013995if test $have_readline = yes
13996then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013998/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013999#include <readline/readline.h>
14000
14001_ACEOF
14002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014005$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014006
14007fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014008rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014011/* end confdefs.h. */
14012#include <readline/readline.h>
14013
14014_ACEOF
14015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014016 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014018$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014019
14020fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014021rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014022
14023fi
14024
Martin v. Löwis0daad592001-09-30 21:09:59 +000014025# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14027$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014028if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014029 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014030else
Martin v. Löwis11437992002-04-12 09:54:03 +000014031 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014032LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014035
Martin v. Löwiseba40652007-08-30 20:10:57 +000014036/* Override any GCC internal prototype to avoid an error.
14037 Use char because int might match the return type of a GCC
14038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014039#ifdef __cplusplus
14040extern "C"
14041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014042char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014043int
14044main ()
14045{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014047 ;
14048 return 0;
14049}
14050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014052 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014056rm -f core conftest.err conftest.$ac_objext \
14057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014058LIBS=$ac_check_lib_save_LIBS
14059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14061$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014062if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014064$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014065
Martin v. Löwis0daad592001-09-30 21:09:59 +000014066fi
14067
Michael W. Hudson54241132001-12-07 15:38:26 +000014068
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014069# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14071$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014072if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014074else
14075 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014076LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014078/* end confdefs.h. */
14079
14080/* Override any GCC internal prototype to avoid an error.
14081 Use char because int might match the return type of a GCC
14082 builtin and then its argument prototype would still apply. */
14083#ifdef __cplusplus
14084extern "C"
14085#endif
14086char rl_completion_display_matches_hook ();
14087int
14088main ()
14089{
14090return rl_completion_display_matches_hook ();
14091 ;
14092 return 0;
14093}
14094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014095if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014096 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014098 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014099fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014100rm -f core conftest.err conftest.$ac_objext \
14101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014102LIBS=$ac_check_lib_save_LIBS
14103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14105$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014106if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014109
14110fi
14111
14112
Martin Pantera70c3232016-04-03 02:54:58 +000014113# also in 4.0, but not in editline
14114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14115$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14116if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14117 $as_echo_n "(cached) " >&6
14118else
14119 ac_check_lib_save_LIBS=$LIBS
14120LIBS="-lreadline $READLINE_LIBS $LIBS"
14121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14122/* end confdefs.h. */
14123
14124/* Override any GCC internal prototype to avoid an error.
14125 Use char because int might match the return type of a GCC
14126 builtin and then its argument prototype would still apply. */
14127#ifdef __cplusplus
14128extern "C"
14129#endif
14130char rl_resize_terminal ();
14131int
14132main ()
14133{
14134return rl_resize_terminal ();
14135 ;
14136 return 0;
14137}
14138_ACEOF
14139if ac_fn_c_try_link "$LINENO"; then :
14140 ac_cv_lib_readline_rl_resize_terminal=yes
14141else
14142 ac_cv_lib_readline_rl_resize_terminal=no
14143fi
14144rm -f core conftest.err conftest.$ac_objext \
14145 conftest$ac_exeext conftest.$ac_ext
14146LIBS=$ac_check_lib_save_LIBS
14147fi
14148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14149$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14150if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14151
14152$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14153
14154fi
14155
14156
Martin v. Löwis0daad592001-09-30 21:09:59 +000014157# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14159$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014160if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014162else
Martin v. Löwis11437992002-04-12 09:54:03 +000014163 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014164LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014167
Martin v. Löwiseba40652007-08-30 20:10:57 +000014168/* Override any GCC internal prototype to avoid an error.
14169 Use char because int might match the return type of a GCC
14170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014171#ifdef __cplusplus
14172extern "C"
14173#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014174char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014175int
14176main ()
14177{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014178return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 ;
14180 return 0;
14181}
14182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014184 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014188rm -f core conftest.err conftest.$ac_objext \
14189 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014190LIBS=$ac_check_lib_save_LIBS
14191fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14193$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014194if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014197
Guido van Rossum353ae582001-07-10 16:45:32 +000014198fi
14199
Jack Jansendd19cf82001-12-06 22:36:17 +000014200
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014201# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014203/* end confdefs.h. */
14204#include <readline/readline.h>
14205_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014206if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014207 have_readline=yes
14208else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014209 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014210
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014211fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014212rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014213if test $have_readline = yes
14214then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014216/* end confdefs.h. */
14217#include <readline/readline.h>
14218
14219_ACEOF
14220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014221 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014224
14225fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014226rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014227
14228fi
14229
Martin v. Löwis82bca632006-02-10 20:49:30 +000014230# End of readline checks: restore LIBS
14231LIBS=$LIBS_no_readline
14232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14234$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014235if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014236 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014237else
Martin v. Löwis11437992002-04-12 09:54:03 +000014238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014239if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014240 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014243/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014244
14245int main()
14246{
14247 int val1 = nice(1);
14248 if (val1 != -1 && val1 == nice(2))
14249 exit(0);
14250 exit(1);
14251}
14252
Martin v. Löwis11437992002-04-12 09:54:03 +000014253_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014254if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014255 ac_cv_broken_nice=yes
14256else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014257 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014258fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014259rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14260 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014261fi
14262
Martin v. Löwiseba40652007-08-30 20:10:57 +000014263fi
14264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14266$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014267if test "$ac_cv_broken_nice" = yes
14268then
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014271
14272fi
14273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14275$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014276if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014277 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014279 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014280 ac_cv_broken_poll=no
14281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014283/* end confdefs.h. */
14284
14285#include <poll.h>
14286
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014287int main()
14288{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014289 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014290 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014291
14292 close (42);
14293
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014294 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014295 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014296 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014297 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014298 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014299 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014300 return 1;
14301}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014302
14303_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014304if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014305 ac_cv_broken_poll=yes
14306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014307 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014308fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014313fi
14314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14316$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014317if test "$ac_cv_broken_poll" = yes
14318then
14319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014320$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014321
14322fi
14323
Brett Cannon43802422005-02-10 20:48:03 +000014324# 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 +000014325# (which is not required by ISO C or UNIX spec) and/or if we support
14326# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327ac_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 +000014328#include <$ac_cv_struct_tm>
14329
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014330"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014331if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014332
14333cat >>confdefs.h <<_ACEOF
14334#define HAVE_STRUCT_TM_TM_ZONE 1
14335_ACEOF
14336
14337
14338fi
14339
14340if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014342$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014343
14344else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014345 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14346"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014347if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014348 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014349else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351fi
14352
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014355_ACEOF
14356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14358$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014359if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014363/* end confdefs.h. */
14364#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365#if !HAVE_DECL_TZNAME
14366extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014367#endif
14368
14369int
14370main ()
14371{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014372return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014373 ;
14374 return 0;
14375}
14376_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014377if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014378 ac_cv_var_tzname=yes
14379else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014380 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014381fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014382rm -f core conftest.err conftest.$ac_objext \
14383 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014384fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14386$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014387 if test $ac_cv_var_tzname = yes; then
14388
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014389$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014390
14391 fi
14392fi
14393
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014394
Martin v. Löwis1d459062005-03-14 21:23:33 +000014395# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14397$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014398if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014399 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014400else
14401
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014402if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014403 ac_cv_working_tzset=no
14404else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014406/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014407
14408#include <stdlib.h>
14409#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014410#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014411
14412#if HAVE_TZNAME
14413extern char *tzname[];
14414#endif
14415
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014416int main()
14417{
Brett Cannon18367812003-09-19 00:59:16 +000014418 /* Note that we need to ensure that not only does tzset(3)
14419 do 'something' with localtime, but it works as documented
14420 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014421 This includes making sure that tzname is set properly if
14422 tm->tm_zone does not exist since it is the alternative way
14423 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014424
14425 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014426 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014427 */
14428
Martin v. Löwis1d459062005-03-14 21:23:33 +000014429 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014430 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14431
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014432 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014433 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014434 if (localtime(&groundhogday)->tm_hour != 0)
14435 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014436#if HAVE_TZNAME
14437 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14438 if (strcmp(tzname[0], "UTC") ||
14439 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14440 exit(1);
14441#endif
Brett Cannon18367812003-09-19 00:59:16 +000014442
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014443 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014444 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014445 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014446 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014447#if HAVE_TZNAME
14448 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14449 exit(1);
14450#endif
Brett Cannon18367812003-09-19 00:59:16 +000014451
14452 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14453 tzset();
14454 if (localtime(&groundhogday)->tm_hour != 11)
14455 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014456#if HAVE_TZNAME
14457 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14458 exit(1);
14459#endif
14460
14461#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014462 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14463 exit(1);
14464 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14465 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014466#endif
Brett Cannon18367812003-09-19 00:59:16 +000014467
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014468 exit(0);
14469}
14470
14471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014472if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014473 ac_cv_working_tzset=yes
14474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014476fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014477rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14478 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014479fi
14480
Martin v. Löwiseba40652007-08-30 20:10:57 +000014481fi
14482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14484$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014485if test "$ac_cv_working_tzset" = yes
14486then
14487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014488$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014489
14490fi
14491
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014492# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14494$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014495if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014496 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014497else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014499/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014500#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014501int
14502main ()
14503{
14504
14505struct stat st;
14506st.st_mtim.tv_nsec = 1;
14507
14508 ;
14509 return 0;
14510}
14511_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014513 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014515 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14518fi
14519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14521$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014522if test "$ac_cv_stat_tv_nsec" = yes
14523then
14524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014525$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014526
14527fi
14528
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014529# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14531$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014532if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014536/* end confdefs.h. */
14537#include <sys/stat.h>
14538int
14539main ()
14540{
14541
14542struct stat st;
14543st.st_mtimespec.tv_nsec = 1;
14544
14545 ;
14546 return 0;
14547}
14548_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014550 ac_cv_stat_tv_nsec2=yes
14551else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014552 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14555fi
14556
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14558$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014559if test "$ac_cv_stat_tv_nsec2" = yes
14560then
14561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014563
14564fi
14565
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014566# first curses configure check
14567ac_save_cppflags="$CPPFLAGS"
14568CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14569
14570for ac_header in curses.h ncurses.h
14571do :
14572 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14573ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14574if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14575 cat >>confdefs.h <<_ACEOF
14576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14577_ACEOF
14578
14579fi
14580
14581done
14582
14583
14584# On Solaris, term.h requires curses.h
14585for ac_header in term.h
14586do :
14587 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14588#ifdef HAVE_CURSES_H
14589#include <curses.h>
14590#endif
14591
14592"
14593if test "x$ac_cv_header_term_h" = xyes; then :
14594 cat >>confdefs.h <<_ACEOF
14595#define HAVE_TERM_H 1
14596_ACEOF
14597
14598fi
14599
14600done
14601
14602
Jack Jansen666b1e72001-10-31 12:11:48 +000014603# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14605$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014606if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014607 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014610/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014611#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014612int
14613main ()
14614{
Jack Jansen666b1e72001-10-31 12:11:48 +000014615
14616 int rtn;
14617 rtn = mvwdelch(0,0,0);
14618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619 ;
14620 return 0;
14621}
14622_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014623if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014624 ac_cv_mvwdelch_is_expression=yes
14625else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014626 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14629fi
14630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14632$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014633
14634if test "$ac_cv_mvwdelch_is_expression" = yes
14635then
Martin v. Löwis11437992002-04-12 09:54:03 +000014636
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014638
14639fi
14640
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14642$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014643if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014644 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014647/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014648#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014649int
14650main ()
14651{
Jack Jansen666b1e72001-10-31 12:11:48 +000014652
14653 WINDOW *w;
14654 w->_flags = 0;
14655
Martin v. Löwis11437992002-04-12 09:54:03 +000014656 ;
14657 return 0;
14658}
14659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014660if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014661 ac_cv_window_has_flags=yes
14662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014663 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014664fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14666fi
14667
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14669$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014670
Jack Jansen666b1e72001-10-31 12:11:48 +000014671
14672if test "$ac_cv_window_has_flags" = yes
14673then
Martin v. Löwis11437992002-04-12 09:54:03 +000014674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014675$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014676
14677fi
14678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14680$as_echo_n "checking for is_term_resized... " >&6; }
14681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014682/* end confdefs.h. */
14683#include <curses.h>
14684int
14685main ()
14686{
14687void *x=is_term_resized
14688 ;
14689 return 0;
14690}
14691_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014692if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014694$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014695
Matthias Klosec511b472010-05-08 11:01:39 +000014696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014697$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14700$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014701
14702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14704
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14706$as_echo_n "checking for resize_term... " >&6; }
14707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014708/* end confdefs.h. */
14709#include <curses.h>
14710int
14711main ()
14712{
14713void *x=resize_term
14714 ;
14715 return 0;
14716}
14717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014718if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014719
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014720$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014721
Matthias Klosec511b472010-05-08 11:01:39 +000014722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014723$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014724else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14726$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014727
14728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14730
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14732$as_echo_n "checking for resizeterm... " >&6; }
14733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014734/* end confdefs.h. */
14735#include <curses.h>
14736int
14737main ()
14738{
14739void *x=resizeterm
14740 ;
14741 return 0;
14742}
14743_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014746$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014747
Matthias Klosec511b472010-05-08 11:01:39 +000014748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14752$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014753
14754fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014756# last curses configure check
14757CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014758
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14760$as_echo "$as_me: checking for device files" >&6;}
14761
14762if test "x$cross_compiling" = xyes; then
14763 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14765$as_echo_n "checking for /dev/ptmx... " >&6; }
14766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14767$as_echo "not set" >&6; }
14768 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14769 fi
14770 if test "${ac_cv_file__dev_ptc+set}" != set; then
14771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14772$as_echo_n "checking for /dev/ptc... " >&6; }
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14774$as_echo "not set" >&6; }
14775 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14776 fi
14777fi
14778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14780$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014781if ${ac_cv_file__dev_ptmx+:} false; then :
14782 $as_echo_n "(cached) " >&6
14783else
14784 test "$cross_compiling" = yes &&
14785 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14786if test -r "/dev/ptmx"; then
14787 ac_cv_file__dev_ptmx=yes
14788else
14789 ac_cv_file__dev_ptmx=no
14790fi
14791fi
14792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14793$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14794if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014795
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014796fi
14797
14798if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014799
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014800$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014801
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14804$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014805if ${ac_cv_file__dev_ptc+:} false; then :
14806 $as_echo_n "(cached) " >&6
14807else
14808 test "$cross_compiling" = yes &&
14809 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14810if test -r "/dev/ptc"; then
14811 ac_cv_file__dev_ptc=yes
14812else
14813 ac_cv_file__dev_ptc=no
14814fi
14815fi
14816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14817$as_echo "$ac_cv_file__dev_ptc" >&6; }
14818if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014819
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014820fi
14821
14822if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014824$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014825
Neal Norwitz865400f2003-03-21 01:42:58 +000014826fi
14827
Mark Dickinson82864d12009-11-15 16:18:58 +000014828if test "$have_long_long" = yes
14829then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14831$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014832 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014833 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014835 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014836 ac_cv_have_long_long_format="cross -- assuming no"
14837 if test x$GCC = xyes; then
14838 save_CFLAGS=$CFLAGS
14839 CFLAGS="$CFLAGS -Werror -Wformat"
14840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14841/* end confdefs.h. */
14842
14843 #include <stdio.h>
14844 #include <stddef.h>
14845
14846int
14847main ()
14848{
14849
14850 char *buffer;
14851 sprintf(buffer, "%lld", (long long)123);
14852 sprintf(buffer, "%lld", (long long)-123);
14853 sprintf(buffer, "%llu", (unsigned long long)123);
14854
14855 ;
14856 return 0;
14857}
14858_ACEOF
14859if ac_fn_c_try_compile "$LINENO"; then :
14860 ac_cv_have_long_long_format=yes
14861
14862fi
14863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14864 CFLAGS=$save_CFLAGS
14865 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014866else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014868/* end confdefs.h. */
14869
14870 #include <stdio.h>
14871 #include <stddef.h>
14872 #include <string.h>
14873
14874 #ifdef HAVE_SYS_TYPES_H
14875 #include <sys/types.h>
14876 #endif
14877
14878 int main()
14879 {
14880 char buffer[256];
14881
14882 if (sprintf(buffer, "%lld", (long long)123) < 0)
14883 return 1;
14884 if (strcmp(buffer, "123"))
14885 return 1;
14886
14887 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14888 return 1;
14889 if (strcmp(buffer, "-123"))
14890 return 1;
14891
14892 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14893 return 1;
14894 if (strcmp(buffer, "123"))
14895 return 1;
14896
14897 return 0;
14898 }
14899
14900_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014901if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014902 ac_cv_have_long_long_format=yes
14903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014904 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14907 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014908fi
14909
14910
Mark Dickinson82864d12009-11-15 16:18:58 +000014911fi
14912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14914$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014915fi
14916
Mark Dickinson5ce84742009-12-31 20:48:04 +000014917if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014918then
14919
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014920$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014921
14922fi
14923
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014924if test $ac_sys_system = Darwin
14925then
14926 LIBS="$LIBS -framework CoreFoundation"
14927fi
14928
Mark Dickinson82864d12009-11-15 16:18:58 +000014929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14931$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014932if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014933 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014934else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014935 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014936 ac_cv_have_size_t_format="cross -- assuming yes"
14937
Brett Cannon09d12362006-05-11 05:11:33 +000014938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014940/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014941
Brett Cannon09d12362006-05-11 05:11:33 +000014942#include <stdio.h>
14943#include <stddef.h>
14944#include <string.h>
14945
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014946#ifdef HAVE_SYS_TYPES_H
14947#include <sys/types.h>
14948#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014949
14950#ifdef HAVE_SSIZE_T
14951typedef ssize_t Py_ssize_t;
14952#elif SIZEOF_VOID_P == SIZEOF_LONG
14953typedef long Py_ssize_t;
14954#else
14955typedef int Py_ssize_t;
14956#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014957
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014958int main()
14959{
14960 char buffer[256];
14961
Brett Cannon09d12362006-05-11 05:11:33 +000014962 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14963 return 1;
14964
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014965 if (strcmp(buffer, "123"))
14966 return 1;
14967
14968 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14969 return 1;
14970
14971 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014972 return 1;
14973
14974 return 0;
14975}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014976
Brett Cannon09d12362006-05-11 05:11:33 +000014977_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014978if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014979 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014980else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014981 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014982fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14984 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014985fi
14986
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14989$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014990if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014992$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014993
14994fi
14995
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014996ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014997#ifdef HAVE_SYS_TYPES_H
14998#include <sys/types.h>
14999#endif
15000#ifdef HAVE_SYS_SOCKET_H
15001#include <sys/socket.h>
15002#endif
15003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015004"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015005if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015006
Martin v. Löwis11437992002-04-12 09:54:03 +000015007else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015009$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015010
15011fi
15012
Michael W. Hudson54241132001-12-07 15:38:26 +000015013
Benjamin Peterson7497e912010-10-16 00:53:39 +000015014case $ac_sys_system in
15015AIX*)
15016
15017$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15018 ;;
15019esac
15020
15021
Michael W. Hudson54241132001-12-07 15:38:26 +000015022
15023
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015024for h in `(cd $srcdir;echo Python/thread_*.h)`
15025do
15026 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15027done
15028
Michael W. Hudson54241132001-12-07 15:38:26 +000015029
Victor Stinner5f4056a2017-04-28 03:41:40 +020015030SRCDIRS="Parser Objects Python Modules"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15032$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015033for dir in $SRCDIRS; do
15034 if test ! -d $dir; then
15035 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015036 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015037done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015038
15039# BEGIN_COMPUTED_GOTO
15040# Check for --with-computed-gotos
15041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15042$as_echo_n "checking for --with-computed-gotos... " >&6; }
15043
15044# Check whether --with-computed-gotos was given.
15045if test "${with_computed_gotos+set}" = set; then :
15046 withval=$with_computed_gotos;
15047if test "$withval" = yes
15048then
15049
15050$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15051
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15053$as_echo "yes" >&6; }
15054fi
15055if test "$withval" = no
15056then
15057
15058$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15059
15060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15061$as_echo "no" >&6; }
15062fi
15063
15064else
15065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15066$as_echo "no value specified" >&6; }
15067fi
15068
15069
15070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15071$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15072if ${ac_cv_computed_gotos+:} false; then :
15073 $as_echo_n "(cached) " >&6
15074else
15075 if test "$cross_compiling" = yes; then :
15076 if test "${with_computed_gotos+set}" = set; then
15077 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15078 else
15079 ac_cv_computed_gotos=no
15080 fi
15081else
15082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15083/* end confdefs.h. */
15084
15085int main(int argc, char **argv)
15086{
15087 static void *targets[1] = { &&LABEL1 };
15088 goto LABEL2;
15089LABEL1:
15090 return 0;
15091LABEL2:
15092 goto *targets[0];
15093 return 1;
15094}
15095
15096_ACEOF
15097if ac_fn_c_try_run "$LINENO"; then :
15098 ac_cv_computed_gotos=yes
15099else
15100 ac_cv_computed_gotos=no
15101fi
15102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15103 conftest.$ac_objext conftest.beam conftest.$ac_ext
15104fi
15105
15106fi
15107
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15109$as_echo "$ac_cv_computed_gotos" >&6; }
15110case "$ac_cv_computed_gotos" in yes*)
15111
15112$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15113
15114esac
15115# END_COMPUTED_GOTO
15116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15118$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015119
Ned Deily3f1d0b32014-11-20 02:11:03 -080015120# ensurepip option
15121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15122$as_echo_n "checking for ensurepip... " >&6; }
15123
15124# Check whether --with-ensurepip was given.
15125if test "${with_ensurepip+set}" = set; then :
15126 withval=$with_ensurepip;
15127else
15128 with_ensurepip=no
15129fi
15130
15131case $with_ensurepip in #(
15132 yes|upgrade) :
15133 ENSUREPIP=upgrade ;; #(
15134 install) :
15135 ENSUREPIP=install ;; #(
15136 no) :
15137 ENSUREPIP=no ;; #(
15138 *) :
15139 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15140esac
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15142$as_echo "$ENSUREPIP" >&6; }
15143
15144
Guido van Rossum627b2d71993-12-24 10:39:16 +000015145# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015146ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015147
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015148ac_config_files="$ac_config_files Modules/ld_so_aix"
15149
Martin v. Löwis11437992002-04-12 09:54:03 +000015150cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015151# This file is a shell script that caches the results of configure
15152# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015153# scripts and configure runs, see configure's option --config-cache.
15154# It is not useful on other systems. If it contains results you don't
15155# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015156#
Martin v. Löwis11437992002-04-12 09:54:03 +000015157# config.status only pays attention to the cache file if you give it
15158# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015159#
Skip Montanaro6dead952003-09-25 14:50:04 +000015160# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015161# loading this file, other *unset* `ac_cv_foo' will be assigned the
15162# following values.
15163
15164_ACEOF
15165
Guido van Rossumf78abae1997-01-21 22:02:36 +000015166# The following way of writing the cache mishandles newlines in values,
15167# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015169# Ultrix sh set writes to stderr and can't be redirected directly,
15170# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015171(
15172 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15173 eval ac_val=\$$ac_var
15174 case $ac_val in #(
15175 *${as_nl}*)
15176 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015177 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15178$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015179 esac
15180 case $ac_var in #(
15181 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015182 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15183 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184 esac ;;
15185 esac
15186 done
15187
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015189 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15190 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015191 # `set' does not quote correctly, so add quotes: double-quote
15192 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015194 "s/'/'\\\\''/g;
15195 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015196 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 *)
15198 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201 esac |
15202 sort
15203) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015207 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015208 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15209 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15211 :end' >>confcache
15212if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15213 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015214 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015215 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15216$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015217 if test ! -f "$cache_file" || test -h "$cache_file"; then
15218 cat confcache >"$cache_file"
15219 else
15220 case $cache_file in #(
15221 */* | ?:*)
15222 mv -f confcache "$cache_file"$$ &&
15223 mv -f "$cache_file"$$ "$cache_file" ;; #(
15224 *)
15225 mv -f confcache "$cache_file" ;;
15226 esac
15227 fi
15228 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015229 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015230 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15231$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015232 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015233fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015234rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015235
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015236test "x$prefix" = xNONE && prefix=$ac_default_prefix
15237# Let make expand exec_prefix.
15238test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015239
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015240DEFS=-DHAVE_CONFIG_H
15241
Skip Montanaro6dead952003-09-25 14:50:04 +000015242ac_libobjs=
15243ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015244U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015245for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15246 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015247 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015248 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015249 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15250 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015251 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15252 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015253done
15254LIBOBJS=$ac_libobjs
15255
15256LTLIBOBJS=$ac_ltlibobjs
15257
15258
Martin v. Löwis11437992002-04-12 09:54:03 +000015259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015260
Matthias Klose3cef2a92012-03-14 23:39:33 +010015261: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015262ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015263ac_clean_files_save=$ac_clean_files
15264ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015265{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15266$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15267as_write_fail=0
15268cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015269#! $SHELL
15270# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015271# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015272# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015273# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015274
Martin v. Löwis11437992002-04-12 09:54:03 +000015275debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015276ac_cs_recheck=false
15277ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015279SHELL=\${CONFIG_SHELL-$SHELL}
15280export SHELL
15281_ASEOF
15282cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15283## -------------------- ##
15284## M4sh Initialization. ##
15285## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015286
Martin v. Löwiseba40652007-08-30 20:10:57 +000015287# Be more Bourne compatible
15288DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015289if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 emulate sh
15291 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015292 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015293 # is contrary to our usage. Disable this feature.
15294 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015296else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015297 case `(set -o) 2>/dev/null` in #(
15298 *posix*) :
15299 set -o posix ;; #(
15300 *) :
15301 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015303fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015304
Skip Montanaro6dead952003-09-25 14:50:04 +000015305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306as_nl='
15307'
15308export as_nl
15309# Printing a long string crashes Solaris 7 /usr/bin/printf.
15310as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15311as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15312as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15313# Prefer a ksh shell builtin over an external printf program on Solaris,
15314# but without wasting forks for bash or zsh.
15315if test -z "$BASH_VERSION$ZSH_VERSION" \
15316 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15317 as_echo='print -r --'
15318 as_echo_n='print -rn --'
15319elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15320 as_echo='printf %s\n'
15321 as_echo_n='printf %s'
15322else
15323 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15324 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15325 as_echo_n='/usr/ucb/echo -n'
15326 else
15327 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15328 as_echo_n_body='eval
15329 arg=$1;
15330 case $arg in #(
15331 *"$as_nl"*)
15332 expr "X$arg" : "X\\(.*\\)$as_nl";
15333 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15334 esac;
15335 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15336 '
15337 export as_echo_n_body
15338 as_echo_n='sh -c $as_echo_n_body as_echo'
15339 fi
15340 export as_echo_body
15341 as_echo='sh -c $as_echo_body as_echo'
15342fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015343
15344# The user is always right.
15345if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015346 PATH_SEPARATOR=:
15347 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15348 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15349 PATH_SEPARATOR=';'
15350 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015352
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353
15354# IFS
15355# We need space, tab and new line, in precisely that order. Quoting is
15356# there to prevent editors from complaining about space-tab.
15357# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15358# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359IFS=" "" $as_nl"
15360
15361# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015362as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015363case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364 *[\\/]* ) as_myself=$0 ;;
15365 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015366for as_dir in $PATH
15367do
15368 IFS=$as_save_IFS
15369 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015370 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15371 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015373
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374 ;;
15375esac
15376# We did not find ourselves, most probably we were run as `sh COMMAND'
15377# in which case we are not to be found in the path.
15378if test "x$as_myself" = x; then
15379 as_myself=$0
15380fi
15381if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015382 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15383 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384fi
15385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015386# Unset variables that we do not need and which cause bugs (e.g. in
15387# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15388# suppresses any "Segmentation fault" message there. '((' could
15389# trigger a bug in pdksh 5.2.14.
15390for as_var in BASH_ENV ENV MAIL MAILPATH
15391do eval test x\${$as_var+set} = xset \
15392 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015393done
15394PS1='$ '
15395PS2='> '
15396PS4='+ '
15397
15398# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015399LC_ALL=C
15400export LC_ALL
15401LANGUAGE=C
15402export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015404# CDPATH.
15405(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15406
15407
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015408# as_fn_error STATUS ERROR [LINENO LOG_FD]
15409# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015410# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15411# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015412# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015413as_fn_error ()
15414{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015415 as_status=$1; test $as_status -eq 0 && as_status=1
15416 if test "$4"; then
15417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015419 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015420 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015421 as_fn_exit $as_status
15422} # as_fn_error
15423
15424
15425# as_fn_set_status STATUS
15426# -----------------------
15427# Set $? to STATUS, without forking.
15428as_fn_set_status ()
15429{
15430 return $1
15431} # as_fn_set_status
15432
15433# as_fn_exit STATUS
15434# -----------------
15435# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15436as_fn_exit ()
15437{
15438 set +e
15439 as_fn_set_status $1
15440 exit $1
15441} # as_fn_exit
15442
15443# as_fn_unset VAR
15444# ---------------
15445# Portably unset VAR.
15446as_fn_unset ()
15447{
15448 { eval $1=; unset $1;}
15449}
15450as_unset=as_fn_unset
15451# as_fn_append VAR VALUE
15452# ----------------------
15453# Append the text in VALUE to the end of the definition contained in VAR. Take
15454# advantage of any shell optimizations that allow amortized linear growth over
15455# repeated appends, instead of the typical quadratic growth present in naive
15456# implementations.
15457if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15458 eval 'as_fn_append ()
15459 {
15460 eval $1+=\$2
15461 }'
15462else
15463 as_fn_append ()
15464 {
15465 eval $1=\$$1\$2
15466 }
15467fi # as_fn_append
15468
15469# as_fn_arith ARG...
15470# ------------------
15471# Perform arithmetic evaluation on the ARGs, and store the result in the
15472# global $as_val. Take advantage of shells that can avoid forks. The arguments
15473# must be portable across $(()) and expr.
15474if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15475 eval 'as_fn_arith ()
15476 {
15477 as_val=$(( $* ))
15478 }'
15479else
15480 as_fn_arith ()
15481 {
15482 as_val=`expr "$@" || test $? -eq 1`
15483 }
15484fi # as_fn_arith
15485
15486
Martin v. Löwiseba40652007-08-30 20:10:57 +000015487if expr a : '\(a\)' >/dev/null 2>&1 &&
15488 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15489 as_expr=expr
15490else
15491 as_expr=false
15492fi
15493
15494if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15495 as_basename=basename
15496else
15497 as_basename=false
15498fi
15499
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015500if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15501 as_dirname=dirname
15502else
15503 as_dirname=false
15504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505
Martin v. Löwiseba40652007-08-30 20:10:57 +000015506as_me=`$as_basename -- "$0" ||
15507$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15508 X"$0" : 'X\(//\)$' \| \
15509 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015510$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015511 sed '/^.*\/\([^/][^/]*\)\/*$/{
15512 s//\1/
15513 q
15514 }
15515 /^X\/\(\/\/\)$/{
15516 s//\1/
15517 q
15518 }
15519 /^X\/\(\/\).*/{
15520 s//\1/
15521 q
15522 }
15523 s/.*/./; q'`
15524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015525# Avoid depending upon Character Ranges.
15526as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15527as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15528as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15529as_cr_digits='0123456789'
15530as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531
15532ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015533case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015535 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015536 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015537 xy) ECHO_C='\c';;
15538 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15539 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540 esac;;
15541*)
15542 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015543esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015544
Martin v. Löwis11437992002-04-12 09:54:03 +000015545rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015546if test -d conf$$.dir; then
15547 rm -f conf$$.dir/conf$$.file
15548else
15549 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015550 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015552if (echo >conf$$.file) 2>/dev/null; then
15553 if ln -s conf$$.file conf$$ 2>/dev/null; then
15554 as_ln_s='ln -s'
15555 # ... but there are two gotchas:
15556 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15557 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015558 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015559 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015560 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015561 elif ln conf$$.file conf$$ 2>/dev/null; then
15562 as_ln_s=ln
15563 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015564 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015565 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015566else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015567 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15570rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015572
15573# as_fn_mkdir_p
15574# -------------
15575# Create "$as_dir" as a directory, including parents if necessary.
15576as_fn_mkdir_p ()
15577{
15578
15579 case $as_dir in #(
15580 -*) as_dir=./$as_dir;;
15581 esac
15582 test -d "$as_dir" || eval $as_mkdir_p || {
15583 as_dirs=
15584 while :; do
15585 case $as_dir in #(
15586 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15587 *) as_qdir=$as_dir;;
15588 esac
15589 as_dirs="'$as_qdir' $as_dirs"
15590 as_dir=`$as_dirname -- "$as_dir" ||
15591$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15592 X"$as_dir" : 'X\(//\)[^/]' \| \
15593 X"$as_dir" : 'X\(//\)$' \| \
15594 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15595$as_echo X"$as_dir" |
15596 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15597 s//\1/
15598 q
15599 }
15600 /^X\(\/\/\)[^/].*/{
15601 s//\1/
15602 q
15603 }
15604 /^X\(\/\/\)$/{
15605 s//\1/
15606 q
15607 }
15608 /^X\(\/\).*/{
15609 s//\1/
15610 q
15611 }
15612 s/.*/./; q'`
15613 test -d "$as_dir" && break
15614 done
15615 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015616 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015617
15618
15619} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015620if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015621 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015622else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015623 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015624 as_mkdir_p=false
15625fi
15626
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015627
15628# as_fn_executable_p FILE
15629# -----------------------
15630# Test if FILE is an executable regular file.
15631as_fn_executable_p ()
15632{
15633 test -f "$1" && test -x "$1"
15634} # as_fn_executable_p
15635as_test_x='test -x'
15636as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
15638# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015639as_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 +000015640
15641# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015642as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
15644
Martin v. Löwis11437992002-04-12 09:54:03 +000015645exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015646## ----------------------------------- ##
15647## Main body of $CONFIG_STATUS script. ##
15648## ----------------------------------- ##
15649_ASEOF
15650test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15653# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015654# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655# values after options handling.
15656ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015657This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015658generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015659
15660 CONFIG_FILES = $CONFIG_FILES
15661 CONFIG_HEADERS = $CONFIG_HEADERS
15662 CONFIG_LINKS = $CONFIG_LINKS
15663 CONFIG_COMMANDS = $CONFIG_COMMANDS
15664 $ $0 $@
15665
Martin v. Löwiseba40652007-08-30 20:10:57 +000015666on `(hostname || uname -n) 2>/dev/null | sed 1q`
15667"
15668
Martin v. Löwis11437992002-04-12 09:54:03 +000015669_ACEOF
15670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015671case $ac_config_files in *"
15672"*) set x $ac_config_files; shift; ac_config_files=$*;;
15673esac
15674
15675case $ac_config_headers in *"
15676"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15677esac
15678
15679
15680cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015681# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015682config_files="$ac_config_files"
15683config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015684
Martin v. Löwiseba40652007-08-30 20:10:57 +000015685_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015688ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015689\`$as_me' instantiates files and other configuration actions
15690from templates according to the current configuration. Unless the files
15691and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015693Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
15695 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015696 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015697 --config print configuration, then exit
15698 -q, --quiet, --silent
15699 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015700 -d, --debug don't remove temporary files
15701 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015702 --file=FILE[:TEMPLATE]
15703 instantiate the configuration file FILE
15704 --header=FILE[:TEMPLATE]
15705 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
15707Configuration files:
15708$config_files
15709
15710Configuration headers:
15711$config_headers
15712
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015713Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015714
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015716cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15717ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015718ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015719python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015720configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015721 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015722
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015723Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015724This config.status script is free software; the Free Software Foundation
15725gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015726
15727ac_pwd='$ac_pwd'
15728srcdir='$srcdir'
15729INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015730MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015731test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
15733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015734cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15735# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015736ac_need_defaults=:
15737while test $# != 0
15738do
15739 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015740 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015741 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15742 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015744 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015745 --*=)
15746 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15747 ac_optarg=
15748 ac_shift=:
15749 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015751 ac_option=$1
15752 ac_optarg=$2
15753 ac_shift=shift
15754 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015755 esac
15756
Skip Montanaro6dead952003-09-25 14:50:04 +000015757 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015759 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15760 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015761 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015762 $as_echo "$ac_cs_version"; exit ;;
15763 --config | --confi | --conf | --con | --co | --c )
15764 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015766 debug=: ;;
15767 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015768 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015769 case $ac_optarg in
15770 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015771 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015772 esac
15773 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 ac_need_defaults=false;;
15775 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015776 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015777 case $ac_optarg in
15778 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15779 esac
15780 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015782 --he | --h)
15783 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015784 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015785Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015786 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015787 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015788 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15789 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15790 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015791
15792 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015793 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015794Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015795
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015796 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015797 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015798
15799 esac
15800 shift
15801done
15802
Skip Montanaro6dead952003-09-25 14:50:04 +000015803ac_configure_extra_args=
15804
15805if $ac_cs_silent; then
15806 exec 6>/dev/null
15807 ac_configure_extra_args="$ac_configure_extra_args --silent"
15808fi
15809
15810_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015812if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015813 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015814 shift
15815 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15816 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015818 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015819fi
15820
Martin v. Löwis11437992002-04-12 09:54:03 +000015821_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015822cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823exec 5>>config.log
15824{
15825 echo
15826 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15827## Running $as_me. ##
15828_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015829 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015830} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015831
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015833cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015834_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837
15838# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015839for ac_config_target in $ac_config_targets
15840do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841 case $ac_config_target in
15842 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15843 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15844 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15845 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015846 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15847 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15849 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015850 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015851 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852
Matthias Klose3cef2a92012-03-14 23:39:33 +010015853 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015854 esac
15855done
15856
Martin v. Löwiseba40652007-08-30 20:10:57 +000015857
Martin v. Löwis11437992002-04-12 09:54:03 +000015858# If the user did not use the arguments to specify the items to instantiate,
15859# then the envvar interface is used. Set only those that are not.
15860# We use the long form for the default assignment because of an extremely
15861# bizarre bug on SunOS 4.1.3.
15862if $ac_need_defaults; then
15863 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15864 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15865fi
15866
Skip Montanaro6dead952003-09-25 14:50:04 +000015867# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015868# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015869# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015870# Hook for its removal unless debugging.
15871# Note that there is a small window in which the directory will not be cleaned:
15872# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015873$debug ||
15874{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015875 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015876 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015877 : "${ac_tmp:=$tmp}"
15878 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015880 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015881}
Martin v. Löwis11437992002-04-12 09:54:03 +000015882# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015883
Martin v. Löwis11437992002-04-12 09:54:03 +000015884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015885 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015886 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015887} ||
15888{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889 tmp=./conf$$-$RANDOM
15890 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015891} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015892ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015894# Set up the scripts for CONFIG_FILES section.
15895# No need to generate them if there are no CONFIG_FILES.
15896# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015899
15900ac_cr=`echo X | tr X '\015'`
15901# On cygwin, bash can eat \r inside `` if the user requested igncr.
15902# But we know of no other shell where ac_cr would be empty at this
15903# point, so we can use a bashism as a fallback.
15904if test "x$ac_cr" = x; then
15905 eval ac_cr=\$\'\\r\'
15906fi
15907ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15908if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015909 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015910else
15911 ac_cs_awk_cr=$ac_cr
15912fi
15913
Matthias Klose3cef2a92012-03-14 23:39:33 +010015914echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015915_ACEOF
15916
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015918{
15919 echo "cat >conf$$subs.awk <<_ACEOF" &&
15920 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15921 echo "_ACEOF"
15922} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015923 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15924ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925ac_delim='%!_!# '
15926for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015927 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015928 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015930 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15931 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015932 break
15933 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015934 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015935 else
15936 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015938done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015939rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015941cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015942cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015944sed -n '
15945h
15946s/^/S["/; s/!.*/"]=/
15947p
15948g
15949s/^[^!]*!//
15950:repl
15951t repl
15952s/'"$ac_delim"'$//
15953t delim
15954:nl
15955h
15956s/\(.\{148\}\)..*/\1/
15957t more1
15958s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15959p
15960n
15961b repl
15962:more1
15963s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15964p
15965g
15966s/.\{148\}//
15967t nl
15968:delim
15969h
15970s/\(.\{148\}\)..*/\1/
15971t more2
15972s/["\\]/\\&/g; s/^/"/; s/$/"/
15973p
15974b
15975:more2
15976s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15977p
15978g
15979s/.\{148\}//
15980t delim
15981' <conf$$subs.awk | sed '
15982/^[^""]/{
15983 N
15984 s/\n//
15985}
15986' >>$CONFIG_STATUS || ac_write_fail=1
15987rm -f conf$$subs.awk
15988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15989_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015990cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015991 for (key in S) S_is_set[key] = 1
15992 FS = ""
15993
15994}
15995{
15996 line = $ 0
15997 nfields = split(line, field, "@")
15998 substed = 0
15999 len = length(field[1])
16000 for (i = 2; i < nfields; i++) {
16001 key = field[i]
16002 keylen = length(key)
16003 if (S_is_set[key]) {
16004 value = S[key]
16005 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16006 len += length(value) + length(field[++i])
16007 substed = 1
16008 } else
16009 len += 1 + keylen
16010 }
16011
16012 print line
16013}
16014
16015_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016016_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16018if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16019 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16020else
16021 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016022fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016023 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016024_ACEOF
16025
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016026# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16027# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016028# trailing colons and then remove the whole line if VPATH becomes empty
16029# (actually we leave an empty line to preserve line numbers).
16030if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016031 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16032h
16033s///
16034s/^/:/
16035s/[ ]*$/:/
16036s/:\$(srcdir):/:/g
16037s/:\${srcdir}:/:/g
16038s/:@srcdir@:/:/g
16039s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016041x
16042s/\(=[ ]*\).*/\1/
16043G
16044s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016045s/^[^=]*=[ ]*$//
16046}'
16047fi
16048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016049cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016050fi # test -n "$CONFIG_FILES"
16051
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016052# Set up the scripts for CONFIG_HEADERS section.
16053# No need to generate them if there are no CONFIG_HEADERS.
16054# This happens for instance with `./config.status Makefile'.
16055if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016056cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016057BEGIN {
16058_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016059
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016060# Transform confdefs.h into an awk script `defines.awk', embedded as
16061# here-document in config.status, that substitutes the proper values into
16062# config.h.in to produce config.h.
16063
16064# Create a delimiter string that does not exist in confdefs.h, to ease
16065# handling of long lines.
16066ac_delim='%!_!# '
16067for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016068 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16069 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016070 break
16071 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016072 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016073 else
16074 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16075 fi
16076done
16077
16078# For the awk script, D is an array of macro values keyed by name,
16079# likewise P contains macro parameters if any. Preserve backslash
16080# newline sequences.
16081
16082ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16083sed -n '
16084s/.\{148\}/&'"$ac_delim"'/g
16085t rset
16086:rset
16087s/^[ ]*#[ ]*define[ ][ ]*/ /
16088t def
16089d
16090:def
16091s/\\$//
16092t bsnl
16093s/["\\]/\\&/g
16094s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16095D["\1"]=" \3"/p
16096s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16097d
16098:bsnl
16099s/["\\]/\\&/g
16100s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16101D["\1"]=" \3\\\\\\n"\\/p
16102t cont
16103s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16104t cont
16105d
16106:cont
16107n
16108s/.\{148\}/&'"$ac_delim"'/g
16109t clear
16110:clear
16111s/\\$//
16112t bsnlc
16113s/["\\]/\\&/g; s/^/"/; s/$/"/p
16114d
16115:bsnlc
16116s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16117b cont
16118' <confdefs.h | sed '
16119s/'"$ac_delim"'/"\\\
16120"/g' >>$CONFIG_STATUS || ac_write_fail=1
16121
16122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16123 for (key in D) D_is_set[key] = 1
16124 FS = ""
16125}
16126/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16127 line = \$ 0
16128 split(line, arg, " ")
16129 if (arg[1] == "#") {
16130 defundef = arg[2]
16131 mac1 = arg[3]
16132 } else {
16133 defundef = substr(arg[1], 2)
16134 mac1 = arg[2]
16135 }
16136 split(mac1, mac2, "(") #)
16137 macro = mac2[1]
16138 prefix = substr(line, 1, index(line, defundef) - 1)
16139 if (D_is_set[macro]) {
16140 # Preserve the white space surrounding the "#".
16141 print prefix "define", macro P[macro] D[macro]
16142 next
16143 } else {
16144 # Replace #undef with comments. This is necessary, for example,
16145 # in the case of _POSIX_SOURCE, which is predefined and required
16146 # on some systems where configure will not decide to define it.
16147 if (defundef == "undef") {
16148 print "/*", prefix defundef, macro, "*/"
16149 next
16150 }
16151 }
16152}
16153{ print }
16154_ACAWK
16155_ACEOF
16156cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016157 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016158fi # test -n "$CONFIG_HEADERS"
16159
16160
16161eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16162shift
16163for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164do
16165 case $ac_tag in
16166 :[FHLC]) ac_mode=$ac_tag; continue;;
16167 esac
16168 case $ac_mode$ac_tag in
16169 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016170 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171 :[FH]-) ac_tag=-:-;;
16172 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16173 esac
16174 ac_save_IFS=$IFS
16175 IFS=:
16176 set x $ac_tag
16177 IFS=$ac_save_IFS
16178 shift
16179 ac_file=$1
16180 shift
16181
16182 case $ac_mode in
16183 :L) ac_source=$1;;
16184 :[FH])
16185 ac_file_inputs=
16186 for ac_f
16187 do
16188 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016189 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190 *) # Look for the file first in the build tree, then in the source tree
16191 # (if the path is not absolute). The absolute path cannot be DOS-style,
16192 # because $ac_f cannot contain `:'.
16193 test -f "$ac_f" ||
16194 case $ac_f in
16195 [\\/$]*) false;;
16196 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16197 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016198 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016200 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16201 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202 done
16203
16204 # Let's still pretend it is `configure' which instantiates (i.e., don't
16205 # use $as_me), people would be surprised to read:
16206 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016207 configure_input='Generated from '`
16208 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16209 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210 if test x"$ac_file" != x-; then
16211 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016212 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16213$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016214 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016215 # Neutralize special characters interpreted by sed in replacement strings.
16216 case $configure_input in #(
16217 *\&* | *\|* | *\\* )
16218 ac_sed_conf_input=`$as_echo "$configure_input" |
16219 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16220 *) ac_sed_conf_input=$configure_input;;
16221 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222
16223 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016224 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16225 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016226 esac
16227 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016228 esac
16229
Martin v. Löwiseba40652007-08-30 20:10:57 +000016230 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016231$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016232 X"$ac_file" : 'X\(//\)[^/]' \| \
16233 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016235$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16237 s//\1/
16238 q
16239 }
16240 /^X\(\/\/\)[^/].*/{
16241 s//\1/
16242 q
16243 }
16244 /^X\(\/\/\)$/{
16245 s//\1/
16246 q
16247 }
16248 /^X\(\/\).*/{
16249 s//\1/
16250 q
16251 }
16252 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016253 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016254 ac_builddir=.
16255
Martin v. Löwiseba40652007-08-30 20:10:57 +000016256case "$ac_dir" in
16257.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16258*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016259 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016260 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016261 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016262 case $ac_top_builddir_sub in
16263 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16264 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16265 esac ;;
16266esac
16267ac_abs_top_builddir=$ac_pwd
16268ac_abs_builddir=$ac_pwd$ac_dir_suffix
16269# for backward compatibility:
16270ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016271
16272case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016273 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016274 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 ac_top_srcdir=$ac_top_builddir_sub
16276 ac_abs_top_srcdir=$ac_pwd ;;
16277 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016279 ac_top_srcdir=$srcdir
16280 ac_abs_top_srcdir=$srcdir ;;
16281 *) # Relative name.
16282 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16283 ac_top_srcdir=$ac_top_build_prefix$srcdir
16284 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016285esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016287
Martin v. Löwis11437992002-04-12 09:54:03 +000016288
Martin v. Löwiseba40652007-08-30 20:10:57 +000016289 case $ac_mode in
16290 :F)
16291 #
16292 # CONFIG_FILE
16293 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016294
16295 case $INSTALL in
16296 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016297 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016299 ac_MKDIR_P=$MKDIR_P
16300 case $MKDIR_P in
16301 [\\/$]* | ?:[\\/]* ) ;;
16302 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16303 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016304_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016307# If the template does not know about datarootdir, expand it.
16308# FIXME: This hack should be removed a few years after 2.60.
16309ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016310ac_sed_dataroot='
16311/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312 p
16313 q
16314}
16315/@datadir@/p
16316/@docdir@/p
16317/@infodir@/p
16318/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016319/@mandir@/p'
16320case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321*datarootdir*) ac_datarootdir_seen=yes;;
16322*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16324$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016326cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016327 ac_datarootdir_hack='
16328 s&@datadir@&$datadir&g
16329 s&@docdir@&$docdir&g
16330 s&@infodir@&$infodir&g
16331 s&@localedir@&$localedir&g
16332 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016333 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016334esac
16335_ACEOF
16336
16337# Neutralize VPATH when `$srcdir' = `.'.
16338# Shell code in configure.ac might set extrasub.
16339# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016340cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16341ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016342$extrasub
16343_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016344cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016345:t
16346/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016347s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016348s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016349s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016350s&@srcdir@&$ac_srcdir&;t t
16351s&@abs_srcdir@&$ac_abs_srcdir&;t t
16352s&@top_srcdir@&$ac_top_srcdir&;t t
16353s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16354s&@builddir@&$ac_builddir&;t t
16355s&@abs_builddir@&$ac_abs_builddir&;t t
16356s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16357s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016358s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016359$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016360"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016361eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16362 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016363
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016365 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16366 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16367 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016368 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016369which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016370$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016371which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016372
Matthias Klose3cef2a92012-03-14 23:39:33 +010016373 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016375 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16376 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016377 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016378 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016379 ;;
16380 :H)
16381 #
16382 # CONFIG_HEADER
16383 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016384 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016385 {
16386 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016387 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16388 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016389 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016390 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016391 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16392$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016393 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016394 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016395 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016396 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016397 fi
16398 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016399 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016400 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016401 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016404
Martin v. Löwiseba40652007-08-30 20:10:57 +000016405
16406 esac
16407
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016408
16409 case $ac_file$ac_mode in
16410 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16411
16412 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016413done # for ac_tag
16414
Guido van Rossum627b2d71993-12-24 10:39:16 +000016415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016416as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016417_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016418ac_clean_files=$ac_clean_files_save
16419
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016420test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016421 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016422
Martin v. Löwis11437992002-04-12 09:54:03 +000016423
16424# configure is writing to config.log, and then calls config.status.
16425# config.status does its own redirection, appending to config.log.
16426# Unfortunately, on DOS this fails, as config.log is still kept open
16427# by configure, so config.status won't be able to write to it; its
16428# output is simply discarded. So we exec the FD to /dev/null,
16429# effectively closing config.log, so it can be properly (re)opened and
16430# appended to by config.status. When coming back to configure, we
16431# need to make the FD available again.
16432if test "$no_create" != yes; then
16433 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016434 ac_config_status_args=
16435 test "$silent" = yes &&
16436 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016437 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016438 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016439 exec 5>>config.log
16440 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16441 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016442 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016443fi
16444if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16445 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16446$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016447fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016448
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016449
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016450echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016451if test ! -f Modules/Setup
16452then
16453 cp $srcdir/Modules/Setup.dist Modules/Setup
16454fi
16455
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016456echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016457if test ! -f Modules/Setup.local
16458then
16459 echo "# Edit this file for local setup changes" >Modules/Setup.local
16460fi
16461
16462echo "creating Makefile"
16463$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16464 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016465 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016466
16467case $ac_sys_system in
16468BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016469 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016470
16471 Support for BeOS is deprecated as of Python 2.6.
16472 See PEP 11 for the gory details.
16473 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016474$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016475
16476 Support for BeOS is deprecated as of Python 2.6.
16477 See PEP 11 for the gory details.
16478 " >&2;}
16479 ;;
16480*) ;;
16481esac
16482
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016483mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016484
16485if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16486 echo "" >&6
16487 echo "" >&6
16488 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 +000016489 echo "please run ./configure --enable-optimizations" >&6
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016490 echo "" >&6
16491 echo "" >&6
16492fi