blob: 6cbdf2a17a987772ef1f066b811b5ece4ad5b4d4 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07006# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700586PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
Gregory P. Smith794b2912016-09-08 00:07:40 -0700665target_os
666target_vendor
667target_cpu
668target
669LLVM_PROFDATA
Brett Cannon4ff151a2015-09-18 15:09:42 -0700670LLVM_PROF_ERR
671LLVM_PROF_FILE
672LLVM_PROF_MERGER
673PGO_PROF_USE_FLAG
674PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000675LTOFLAGS
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700676DEF_MAKE_RULE
677DEF_MAKE_ALL_RULE
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000678UNIVERSAL_ARCH_FLAGS
679BASECFLAGS
680OPT
681LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000682MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683INSTALL_DATA
684INSTALL_SCRIPT
685INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100686HAS_HG
687HGBRANCH
688HGTAG
689HGVERSION
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000690SVNVERSION
691ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100692ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000693AR
694RANLIB
695GNULD
696LINKCC
697RUNSHARED
698INSTSONAME
699LDLIBRARYDIR
700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
706GREP
707CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100708MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100709ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000710MAINCC
711CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719EXPORT_MACOSX_DEPLOYMENT_TARGET
720CONFIGURE_MACOSX_DEPLOYMENT_TARGET
721EXTRAMACHDEPPATH
722EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200723PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000724SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100725_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000726MACHDEP
727FRAMEWORKINSTALLAPPSPREFIX
728FRAMEWORKUNIXTOOLSPREFIX
729FRAMEWORKALTINSTALLLAST
730FRAMEWORKALTINSTALLFIRST
731FRAMEWORKINSTALLLAST
732FRAMEWORKINSTALLFIRST
733PYTHONFRAMEWORKINSTALLDIR
734PYTHONFRAMEWORKPREFIX
735PYTHONFRAMEWORKDIR
736PYTHONFRAMEWORKIDENTIFIER
737PYTHONFRAMEWORK
738LIPO_32BIT_FLAGS
739ARCH_RUN_32BIT
740UNIVERSALSDK
741CONFIG_ARGS
742SOVERSION
743VERSION
Martin Panterbc82de02016-07-29 05:52:32 +0000744GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100745PYTHON_FOR_BUILD
746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000754target_alias
755host_alias
756build_alias
757LIBS
758ECHO_T
759ECHO_N
760ECHO_C
761DEFS
762mandir
763localedir
764libdir
765psdir
766pdfdir
767dvidir
768htmldir
769infodir
770docdir
771oldincludedir
772includedir
Benjamin Peterson42e10292016-07-07 00:02:31 -0700773runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000774localstatedir
775sharedstatedir
776sysconfdir
777datadir
778datarootdir
779libexecdir
780sbindir
781bindir
782program_transform_name
783prefix
784exec_prefix
785PACKAGE_URL
786PACKAGE_BUGREPORT
787PACKAGE_STRING
788PACKAGE_VERSION
789PACKAGE_TARNAME
790PACKAGE_NAME
791PATH_SEPARATOR
792SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000793ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000794ac_user_opts='
795enable_option_checking
796enable_universalsdk
797with_universal_archs
798with_framework_name
799enable_framework
800with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600801with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000802with_cxx_main
803with_suffix
804enable_shared
805enable_profiling
806with_pydebug
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700807with_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000808with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000809enable_toolbox_glue
810with_libs
811with_system_expat
812with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700813with_tcltk_includes
814with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000815with_dbmliborder
816with_signal_module
817with_dec_threads
818with_threads
819with_thread
820with_pth
821enable_ipv6
822with_doc_strings
823with_tsc
824with_pymalloc
825with_valgrind
826with_wctype_functions
827with_fpectl
828with_libm
829with_libc
830enable_big_digits
831enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500832with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800833with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000834'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 ac_precious_vars='build_alias
836host_alias
837target_alias
838CC
839CFLAGS
840LDFLAGS
841LIBS
842CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500843CPP
844PKG_CONFIG
845PKG_CONFIG_PATH
846PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000847
Guido van Rossum627b2d71993-12-24 10:39:16 +0000848
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850ac_init_help=
851ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000852ac_unrecognized_opts=
853ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854# The variables have the same names as the options, with
855# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000857exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859no_recursion=
860prefix=NONE
861program_prefix=NONE
862program_suffix=NONE
863program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868x_includes=NONE
869x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000870
871# Installation directory options.
872# These are left unexpanded so users can "make install exec_prefix=/foo"
873# and all the variables that are supposed to be based on exec_prefix
874# by default will actually change.
875# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877bindir='${exec_prefix}/bin'
878sbindir='${exec_prefix}/sbin'
879libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000880datarootdir='${prefix}/share'
881datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882sysconfdir='${prefix}/etc'
883sharedstatedir='${prefix}/com'
884localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700885runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886includedir='${prefix}/include'
887oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000888docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
889infodir='${datarootdir}/info'
890htmldir='${docdir}'
891dvidir='${docdir}'
892pdfdir='${docdir}'
893psdir='${docdir}'
894libdir='${exec_prefix}/lib'
895localedir='${datarootdir}/locale'
896mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000897
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000899ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000901do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 # If the previous option needs an argument, assign it.
903 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000904 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 ac_prev=
906 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000907 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000910 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
911 *=) ac_optarg= ;;
912 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000913 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000915 # Accept the important Cygnus configure options, so we can diagnose typos.
916
Martin v. Löwiseba40652007-08-30 20:10:57 +0000917 case $ac_dashdash$ac_option in
918 --)
919 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 -bindir | --bindir | --bindi | --bind | --bin | --bi)
922 ac_prev=bindir ;;
923 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000931 -cache-file | --cache-file | --cache-fil | --cache-fi \
932 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
933 ac_prev=cache_file ;;
934 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
935 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 cache_file=$ac_optarg ;;
937
938 --config-cache | -C)
939 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000943 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945
Martin v. Löwiseba40652007-08-30 20:10:57 +0000946 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
947 | --dataroo | --dataro | --datar)
948 ac_prev=datarootdir ;;
949 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
950 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
951 datarootdir=$ac_optarg ;;
952
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000956 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000957 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000958 ac_useropt_orig=$ac_useropt
959 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
960 case $ac_user_opts in
961 *"
962"enable_$ac_useropt"
963"*) ;;
964 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
965 ac_unrecognized_sep=', ';;
966 esac
967 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000968
969 -docdir | --docdir | --docdi | --doc | --do)
970 ac_prev=docdir ;;
971 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
972 docdir=$ac_optarg ;;
973
974 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
975 ac_prev=dvidir ;;
976 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
977 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
979 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000980 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000981 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000982 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000983 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000984 ac_useropt_orig=$ac_useropt
985 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
986 case $ac_user_opts in
987 *"
988"enable_$ac_useropt"
989"*) ;;
990 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
991 ac_unrecognized_sep=', ';;
992 esac
993 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994
Guido van Rossum7f43da71994-08-01 12:15:30 +0000995 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
996 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
997 | --exec | --exe | --ex)
998 ac_prev=exec_prefix ;;
999 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1000 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1001 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001005 # Obsolete; use --with-gas.
1006 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 -help | --help | --hel | --he | -h)
1009 ac_init_help=long ;;
1010 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1011 ac_init_help=recursive ;;
1012 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1013 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwiseba40652007-08-30 20:10:57 +00001020 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1021 ac_prev=htmldir ;;
1022 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1023 | --ht=*)
1024 htmldir=$ac_optarg ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -includedir | --includedir | --includedi | --included | --include \
1027 | --includ | --inclu | --incl | --inc)
1028 ac_prev=includedir ;;
1029 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1030 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -infodir | --infodir | --infodi | --infod | --info | --inf)
1034 ac_prev=infodir ;;
1035 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
1038 -libdir | --libdir | --libdi | --libd)
1039 ac_prev=libdir ;;
1040 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1044 | --libexe | --libex | --libe)
1045 ac_prev=libexecdir ;;
1046 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1047 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
Martin v. Löwiseba40652007-08-30 20:10:57 +00001050 -localedir | --localedir | --localedi | --localed | --locale)
1051 ac_prev=localedir ;;
1052 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1053 localedir=$ac_optarg ;;
1054
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001056 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 ac_prev=localstatedir ;;
1058 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001059 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
1062 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1063 ac_prev=mandir ;;
1064 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Obsolete; use --without-fp.
1069 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073 no_create=yes ;;
1074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1076 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1077 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1080 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1081 | --oldin | --oldi | --old | --ol | --o)
1082 ac_prev=oldincludedir ;;
1083 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1084 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1085 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1089 ac_prev=prefix ;;
1090 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1094 | --program-pre | --program-pr | --program-p)
1095 ac_prev=program_prefix ;;
1096 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1097 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1101 | --program-suf | --program-su | --program-s)
1102 ac_prev=program_suffix ;;
1103 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1104 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-transform-name | --program-transform-name \
1108 | --program-transform-nam | --program-transform-na \
1109 | --program-transform-n | --program-transform- \
1110 | --program-transform | --program-transfor \
1111 | --program-transfo | --program-transf \
1112 | --program-trans | --program-tran \
1113 | --progr-tra | --program-tr | --program-t)
1114 ac_prev=program_transform_name ;;
1115 -program-transform-name=* | --program-transform-name=* \
1116 | --program-transform-nam=* | --program-transform-na=* \
1117 | --program-transform-n=* | --program-transform-=* \
1118 | --program-transform=* | --program-transfor=* \
1119 | --program-transfo=* | --program-transf=* \
1120 | --program-trans=* | --program-tran=* \
1121 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001122 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123
Martin v. Löwiseba40652007-08-30 20:10:57 +00001124 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1125 ac_prev=pdfdir ;;
1126 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1127 pdfdir=$ac_optarg ;;
1128
1129 -psdir | --psdir | --psdi | --psd | --ps)
1130 ac_prev=psdir ;;
1131 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1132 psdir=$ac_optarg ;;
1133
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1135 | -silent | --silent | --silen | --sile | --sil)
1136 silent=yes ;;
1137
Benjamin Peterson42e10292016-07-07 00:02:31 -07001138 -runstatedir | --runstatedir | --runstatedi | --runstated \
1139 | --runstate | --runstat | --runsta | --runst | --runs \
1140 | --run | --ru | --r)
1141 ac_prev=runstatedir ;;
1142 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1143 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1144 | --run=* | --ru=* | --r=*)
1145 runstatedir=$ac_optarg ;;
1146
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001147 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1148 ac_prev=sbindir ;;
1149 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1150 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152
1153 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1154 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1155 | --sharedst | --shareds | --shared | --share | --shar \
1156 | --sha | --sh)
1157 ac_prev=sharedstatedir ;;
1158 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1159 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1160 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1161 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001163
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 -site | --site | --sit)
1165 ac_prev=site ;;
1166 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1170 ac_prev=srcdir ;;
1171 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1175 | --syscon | --sysco | --sysc | --sys | --sy)
1176 ac_prev=sysconfdir ;;
1177 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1178 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1187 verbose=yes ;;
1188
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 -version | --version | --versio | --versi | --vers | -V)
1190 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001193 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001195 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001196 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001197 ac_useropt_orig=$ac_useropt
1198 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1199 case $ac_user_opts in
1200 *"
1201"with_$ac_useropt"
1202"*) ;;
1203 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1204 ac_unrecognized_sep=', ';;
1205 esac
1206 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001209 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001211 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001212 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001213 ac_useropt_orig=$ac_useropt
1214 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1215 case $ac_user_opts in
1216 *"
1217"with_$ac_useropt"
1218"*) ;;
1219 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1220 ac_unrecognized_sep=', ';;
1221 esac
1222 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 --x)
1225 # Obsolete; use --with-x.
1226 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1229 | --x-incl | --x-inc | --x-in | --x-i)
1230 ac_prev=x_includes ;;
1231 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1232 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1236 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1237 ac_prev=x_libraries ;;
1238 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1239 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001242 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1243Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244 ;;
1245
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 *=*)
1247 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1248 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001249 case $ac_envvar in #(
1250 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001251 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001252 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001253 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 export $ac_envvar ;;
1255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001256 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001258 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001260 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001261 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001262 ;;
1263
1264 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001265done
1266
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001269 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270fi
1271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001272if test -n "$ac_unrecognized_opts"; then
1273 case $enable_option_checking in
1274 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001275 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001276 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1277 esac
1278fi
1279
1280# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001281for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1282 datadir sysconfdir sharedstatedir localstatedir includedir \
1283 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001284 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001285do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001286 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001287 # Remove trailing slashes.
1288 case $ac_val in
1289 */ )
1290 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1291 eval $ac_var=\$ac_val;;
1292 esac
1293 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001294 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001295 [\\/$]* | ?:[\\/]* ) continue;;
1296 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001298 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001299done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# There might be people who depend on the old broken behavior: `$host'
1302# used to hold the argument of --host etc.
1303# FIXME: To remove some day.
1304build=$build_alias
1305host=$host_alias
1306target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# FIXME: To remove some day.
1309if test "x$host_alias" != x; then
1310 if test "x$build_alias" = x; then
1311 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001312 elif test "x$build_alias" != "x$host_alias"; then
1313 cross_compiling=yes
1314 fi
1315fi
1316
1317ac_tool_prefix=
1318test -n "$host_alias" && ac_tool_prefix=$host_alias-
1319
1320test "$silent" = yes && exec 6>/dev/null
1321
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322
Martin v. Löwiseba40652007-08-30 20:10:57 +00001323ac_pwd=`pwd` && test -n "$ac_pwd" &&
1324ac_ls_di=`ls -di .` &&
1325ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001326 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001327test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001328 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331# Find the source files, if location was not specified.
1332if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001333 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001334 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001335 ac_confdir=`$as_dirname -- "$as_myself" ||
1336$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1337 X"$as_myself" : 'X\(//\)[^/]' \| \
1338 X"$as_myself" : 'X\(//\)$' \| \
1339 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1340$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001341 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)[^/].*/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\).*/{
1354 s//\1/
1355 q
1356 }
1357 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001358 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001359 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360 srcdir=..
1361 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001362else
1363 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001365if test ! -r "$srcdir/$ac_unique_file"; then
1366 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001367 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001368fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001369ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1370ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001371 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001372 pwd)`
1373# When building in place, set srcdir=.
1374if test "$ac_abs_confdir" = "$ac_pwd"; then
1375 srcdir=.
1376fi
1377# Remove unnecessary trailing slashes from srcdir.
1378# Double slashes in file names in object file debugging info
1379# mess up M-x gdb in Emacs.
1380case $srcdir in
1381*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1382esac
1383for ac_var in $ac_precious_vars; do
1384 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1385 eval ac_env_${ac_var}_value=\$${ac_var}
1386 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1388done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001389
Martin v. Löwis11437992002-04-12 09:54:03 +00001390#
1391# Report the --help message.
1392#
1393if test "$ac_init_help" = "long"; then
1394 # Omit some internal or obsolete options to make the list less imposing.
1395 # This message is too long to be a string in the A/UX 3.1 sh.
1396 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001397\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001398
1399Usage: $0 [OPTION]... [VAR=VALUE]...
1400
1401To assign environment variables (e.g., CC, CFLAGS...), specify them as
1402VAR=VALUE. See below for descriptions of some of the useful variables.
1403
1404Defaults for the options are specified in brackets.
1405
1406Configuration:
1407 -h, --help display this help and exit
1408 --help=short display options specific to this package
1409 --help=recursive display the short help of all the included packages
1410 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001411 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 --cache-file=FILE cache test results in FILE [disabled]
1413 -C, --config-cache alias for \`--cache-file=config.cache'
1414 -n, --no-create do not create output files
1415 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1416
Martin v. Löwis11437992002-04-12 09:54:03 +00001417Installation directories:
1418 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001419 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001421 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
1423By default, \`make install' will install all the files in
1424\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1425an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1426for instance \`--prefix=\$HOME'.
1427
1428For better control, use the options below.
1429
1430Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001431 --bindir=DIR user executables [EPREFIX/bin]
1432 --sbindir=DIR system admin executables [EPREFIX/sbin]
1433 --libexecdir=DIR program executables [EPREFIX/libexec]
1434 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1435 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1436 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001437 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001438 --libdir=DIR object code libraries [EPREFIX/lib]
1439 --includedir=DIR C header files [PREFIX/include]
1440 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1441 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1442 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1443 --infodir=DIR info documentation [DATAROOTDIR/info]
1444 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1445 --mandir=DIR man documentation [DATAROOTDIR/man]
1446 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1447 --htmldir=DIR html documentation [DOCDIR]
1448 --dvidir=DIR dvi documentation [DOCDIR]
1449 --pdfdir=DIR pdf documentation [DOCDIR]
1450 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452
1453 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001454
1455System types:
1456 --build=BUILD configure for building on BUILD [guessed]
1457 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith794b2912016-09-08 00:07:40 -07001458 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460fi
1461
1462if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001463 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001464 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001466 cat <<\_ACEOF
1467
1468Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001469 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1471 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001472 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001473 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --enable-framework[=INSTALLDIR]
1475 Build (MacOSX|Darwin) framework
1476 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001477 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1479 --enable-ipv6 Enable ipv6 (with ipv4) support
1480 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001481 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001482 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001484 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486Optional Packages:
1487 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1488 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001489 --with-universal-archs=ARCH
1490 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001491 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001492 --with-framework-name=FRAMEWORK
1493 specify an alternate name of the framework built
1494 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001496 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001497 --with-cxx-main=<compiler>
1498 compile main() and link python executable with C++
1499 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --with-suffix=.exe set executable suffix
1501 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00001502 --with-optimizations Enable expensive optimizations (PGO, maybe LTO,
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07001503 etc). Disabled by default.
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001506 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001507 --with-system-expat build pyexpat module using an installed expat
1508 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001509 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001510 --with-tcltk-includes='-I...'
1511 override search for Tcl and Tk include files
1512 --with-tcltk-libs='-L...'
1513 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001514 --with-dbmliborder=db1:db2:...
1515 order to check db backends for dbm. Valid value is a
1516 colon separated string with the backend names
1517 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-signal-module disable/enable signal module
1519 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1520 --with(out)-threads[=DIRECTORY]
1521 disable/enable thread support
1522 --with(out)-thread[=DIRECTORY]
1523 deprecated; use --with(out)-threads
1524 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001526 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001528 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with-fpectl enable SIGFPE catching
1531 --with-libm=STRING math library
1532 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001533 --with(out)-computed-gotos
1534 Use computed gotos in evaluation loop (enabled by
1535 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001536 --with(out)-ensurepip=[=OPTION]
1537 "install" or "upgrade" using bundled pip, default is
1538 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001539
1540Some influential environment variables:
1541 CC C compiler command
1542 CFLAGS C compiler flags
1543 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1544 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001546 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001547 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001548 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001549 PKG_CONFIG path to pkg-config utility
1550 PKG_CONFIG_PATH
1551 directories to add to pkg-config's search path
1552 PKG_CONFIG_LIBDIR
1553 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555Use these variables to override the choices made by `configure' or to help
1556it to find libraries and programs with nonstandard names/locations.
1557
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001558Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001559_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001560ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001561fi
1562
1563if test "$ac_init_help" = "recursive"; then
1564 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001566 test -d "$ac_dir" ||
1567 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1568 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 ac_builddir=.
1570
Martin v. Löwiseba40652007-08-30 20:10:57 +00001571case "$ac_dir" in
1572.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1573*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001574 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001576 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 case $ac_top_builddir_sub in
1578 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1579 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1580 esac ;;
1581esac
1582ac_abs_top_builddir=$ac_pwd
1583ac_abs_builddir=$ac_pwd$ac_dir_suffix
1584# for backward compatibility:
1585ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001586
1587case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001590 ac_top_srcdir=$ac_top_builddir_sub
1591 ac_abs_top_srcdir=$ac_pwd ;;
1592 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001593 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001594 ac_top_srcdir=$srcdir
1595 ac_abs_top_srcdir=$srcdir ;;
1596 *) # Relative name.
1597 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1598 ac_top_srcdir=$ac_top_build_prefix$srcdir
1599 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001600esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001602
Martin v. Löwiseba40652007-08-30 20:10:57 +00001603 cd "$ac_dir" || { ac_status=$?; continue; }
1604 # Check for guested configure.
1605 if test -f "$ac_srcdir/configure.gnu"; then
1606 echo &&
1607 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1608 elif test -f "$ac_srcdir/configure"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001612 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001613 fi || ac_status=$?
1614 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001615 done
1616fi
1617
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001619if $ac_init_version; then
1620 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001621python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001622generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001623
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001624Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001625This configure script is free software; the Free Software Foundation
1626gives unlimited permission to copy, distribute and modify it.
1627_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001628 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001630
1631## ------------------------ ##
1632## Autoconf initialization. ##
1633## ------------------------ ##
1634
1635# ac_fn_c_try_compile LINENO
1636# --------------------------
1637# Try to compile conftest.$ac_ext, and return whether this succeeded.
1638ac_fn_c_try_compile ()
1639{
1640 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1641 rm -f conftest.$ac_objext
1642 if { { ac_try="$ac_compile"
1643case "(($ac_try" in
1644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1645 *) ac_try_echo=$ac_try;;
1646esac
1647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1648$as_echo "$ac_try_echo"; } >&5
1649 (eval "$ac_compile") 2>conftest.err
1650 ac_status=$?
1651 if test -s conftest.err; then
1652 grep -v '^ *+' conftest.err >conftest.er1
1653 cat conftest.er1 >&5
1654 mv -f conftest.er1 conftest.err
1655 fi
1656 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1657 test $ac_status = 0; } && {
1658 test -z "$ac_c_werror_flag" ||
1659 test ! -s conftest.err
1660 } && test -s conftest.$ac_objext; then :
1661 ac_retval=0
1662else
1663 $as_echo "$as_me: failed program was:" >&5
1664sed 's/^/| /' conftest.$ac_ext >&5
1665
1666 ac_retval=1
1667fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_compile
1672
1673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001694 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001718 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001721if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
1744
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001757rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
1760
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001780( $as_echo "## --------------------------------------- ##
1781## Report this to https://bugs.python.org/ ##
1782## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001783 ) | sed "s/^/$as_me: WARNING: /" >&2
1784 ;;
1785esac
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001788if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001789 $as_echo_n "(cached) " >&6
1790else
1791 eval "$3=\$ac_header_compiler"
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001798
1799} # ac_fn_c_check_header_mongrel
1800
1801# ac_fn_c_try_run LINENO
1802# ----------------------
1803# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1804# that executables *can* be run.
1805ac_fn_c_try_run ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_link"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_link") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1819 { { case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_try") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; }; }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: program exited with status $ac_status" >&5
1832 $as_echo "$as_me: failed program was:" >&5
1833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
1843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001852if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858#include <$2>
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 eval "$3=yes"
1862else
1863 eval "$3=no"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001871
1872} # ac_fn_c_check_header_compile
1873
1874# ac_fn_c_try_link LINENO
1875# -----------------------
1876# Try to link conftest.$ac_ext, and return whether this succeeded.
1877ac_fn_c_try_link ()
1878{
1879 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880 rm -f conftest.$ac_objext conftest$ac_exeext
1881 if { { ac_try="$ac_link"
1882case "(($ac_try" in
1883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884 *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888 (eval "$ac_link") 2>conftest.err
1889 ac_status=$?
1890 if test -s conftest.err; then
1891 grep -v '^ *+' conftest.err >conftest.er1
1892 cat conftest.er1 >&5
1893 mv -f conftest.er1 conftest.err
1894 fi
1895 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896 test $ac_status = 0; } && {
1897 test -z "$ac_c_werror_flag" ||
1898 test ! -s conftest.err
1899 } && test -s conftest$ac_exeext && {
1900 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001901 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001902 }; then :
1903 ac_retval=0
1904else
1905 $as_echo "$as_me: failed program was:" >&5
1906sed 's/^/| /' conftest.$ac_ext >&5
1907
1908 ac_retval=1
1909fi
1910 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1911 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1912 # interfere with the next link command; also delete a directory that is
1913 # left behind by Apple's compiler. We do this before executing the actions.
1914 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001916 as_fn_set_status $ac_retval
1917
1918} # ac_fn_c_try_link
1919
1920# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1921# -------------------------------------------
1922# Tests whether TYPE exists after having included INCLUDES, setting cache
1923# variable VAR accordingly.
1924ac_fn_c_check_type ()
1925{
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1928$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001929if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001930 $as_echo_n "(cached) " >&6
1931else
1932 eval "$3=no"
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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof (($2)))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959
1960else
1961 eval "$3=yes"
1962fi
1963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1966fi
1967eval ac_res=\$$3
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1969$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001971
1972} # ac_fn_c_check_type
1973
1974# ac_fn_c_find_uintX_t LINENO BITS VAR
1975# ------------------------------------
1976# Finds an unsigned integer type with width BITS, setting cache variable VAR
1977# accordingly.
1978ac_fn_c_find_uintX_t ()
1979{
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1982$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001983if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001984 $as_echo_n "(cached) " >&6
1985else
1986 eval "$3=no"
1987 # Order is important - never check a type that is potentially smaller
1988 # than half of the expected target width.
1989 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1990 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1992/* end confdefs.h. */
1993$ac_includes_default
1994int
1995main ()
1996{
1997static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001998test_array [0] = 0;
1999return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 case $ac_type in #(
2007 uint$2_t) :
2008 eval "$3=yes" ;; #(
2009 *) :
2010 eval "$3=\$ac_type" ;;
2011esac
2012fi
2013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002014 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002015
2016else
2017 break
2018fi
2019 done
2020fi
2021eval ac_res=\$$3
2022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2023$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002024 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002025
2026} # ac_fn_c_find_uintX_t
2027
2028# ac_fn_c_find_intX_t LINENO BITS VAR
2029# -----------------------------------
2030# Finds a signed integer type with width BITS, setting cache variable VAR
2031# accordingly.
2032ac_fn_c_find_intX_t ()
2033{
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2036$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002037if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002038 $as_echo_n "(cached) " >&6
2039else
2040 eval "$3=no"
2041 # Order is important - never check a type that is potentially smaller
2042 # than half of the expected target width.
2043 for ac_type in int$2_t 'int' 'long int' \
2044 'long long int' 'short int' 'signed char'; do
2045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2046/* end confdefs.h. */
2047$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002048 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002049int
2050main ()
2051{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002052static 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 +01002053test_array [0] = 0;
2054return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002055
2056 ;
2057 return 0;
2058}
2059_ACEOF
2060if ac_fn_c_try_compile "$LINENO"; then :
2061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2062/* end confdefs.h. */
2063$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002064 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002065int
2066main ()
2067{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002068static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002069 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002070test_array [0] = 0;
2071return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002072
2073 ;
2074 return 0;
2075}
2076_ACEOF
2077if ac_fn_c_try_compile "$LINENO"; then :
2078
2079else
2080 case $ac_type in #(
2081 int$2_t) :
2082 eval "$3=yes" ;; #(
2083 *) :
2084 eval "$3=\$ac_type" ;;
2085esac
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002090 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002091
2092else
2093 break
2094fi
2095 done
2096fi
2097eval ac_res=\$$3
2098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2099$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002100 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002101
2102} # ac_fn_c_find_intX_t
2103
2104# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2105# --------------------------------------------
2106# Tries to find the compile-time value of EXPR in a program that includes
2107# INCLUDES, setting VAR accordingly. Returns whether the value could be
2108# computed
2109ac_fn_c_compute_int ()
2110{
2111 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2112 if test "$cross_compiling" = yes; then
2113 # Depending upon the size, compute the lo and hi bounds.
2114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117int
2118main ()
2119{
2120static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002121test_array [0] = 0;
2122return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002123
2124 ;
2125 return 0;
2126}
2127_ACEOF
2128if ac_fn_c_try_compile "$LINENO"; then :
2129 ac_lo=0 ac_mid=0
2130 while :; do
2131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2132/* end confdefs.h. */
2133$4
2134int
2135main ()
2136{
2137static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002138test_array [0] = 0;
2139return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_compile "$LINENO"; then :
2146 ac_hi=$ac_mid; break
2147else
2148 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2149 if test $ac_lo -le $ac_mid; then
2150 ac_lo= ac_hi=
2151 break
2152 fi
2153 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2154fi
2155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2156 done
2157else
2158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2159/* end confdefs.h. */
2160$4
2161int
2162main ()
2163{
2164static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002165test_array [0] = 0;
2166return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002167
2168 ;
2169 return 0;
2170}
2171_ACEOF
2172if ac_fn_c_try_compile "$LINENO"; then :
2173 ac_hi=-1 ac_mid=-1
2174 while :; do
2175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2176/* end confdefs.h. */
2177$4
2178int
2179main ()
2180{
2181static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002182test_array [0] = 0;
2183return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002184
2185 ;
2186 return 0;
2187}
2188_ACEOF
2189if ac_fn_c_try_compile "$LINENO"; then :
2190 ac_lo=$ac_mid; break
2191else
2192 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2193 if test $ac_mid -le $ac_hi; then
2194 ac_lo= ac_hi=
2195 break
2196 fi
2197 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200 done
2201else
2202 ac_lo= ac_hi=
2203fi
2204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207# Binary search between lo and hi bounds.
2208while test "x$ac_lo" != "x$ac_hi"; do
2209 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213int
2214main ()
2215{
2216static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002217test_array [0] = 0;
2218return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002219
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_compile "$LINENO"; then :
2225 ac_hi=$ac_mid
2226else
2227 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2228fi
2229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2230done
2231case $ac_lo in #((
2232?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2233'') ac_retval=1 ;;
2234esac
2235 else
2236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237/* end confdefs.h. */
2238$4
2239static long int longval () { return $2; }
2240static unsigned long int ulongval () { return $2; }
2241#include <stdio.h>
2242#include <stdlib.h>
2243int
2244main ()
2245{
2246
2247 FILE *f = fopen ("conftest.val", "w");
2248 if (! f)
2249 return 1;
2250 if (($2) < 0)
2251 {
2252 long int i = longval ();
2253 if (i != ($2))
2254 return 1;
2255 fprintf (f, "%ld", i);
2256 }
2257 else
2258 {
2259 unsigned long int i = ulongval ();
2260 if (i != ($2))
2261 return 1;
2262 fprintf (f, "%lu", i);
2263 }
2264 /* Do not output a trailing newline, as this causes \r\n confusion
2265 on some platforms. */
2266 return ferror (f) || fclose (f) != 0;
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_run "$LINENO"; then :
2273 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2274else
2275 ac_retval=1
2276fi
2277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2278 conftest.$ac_objext conftest.beam conftest.$ac_ext
2279rm -f conftest.val
2280
2281 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002282 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002283 as_fn_set_status $ac_retval
2284
2285} # ac_fn_c_compute_int
2286
2287# ac_fn_c_check_func LINENO FUNC VAR
2288# ----------------------------------
2289# Tests whether FUNC exists, setting the cache variable VAR accordingly
2290ac_fn_c_check_func ()
2291{
2292 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2294$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002295if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002296 $as_echo_n "(cached) " >&6
2297else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h. */
2300/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2301 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2302#define $2 innocuous_$2
2303
2304/* System header to define __stub macros and hopefully few prototypes,
2305 which can conflict with char $2 (); below.
2306 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2307 <limits.h> exists even on freestanding compilers. */
2308
2309#ifdef __STDC__
2310# include <limits.h>
2311#else
2312# include <assert.h>
2313#endif
2314
2315#undef $2
2316
2317/* Override any GCC internal prototype to avoid an error.
2318 Use char because int might match the return type of a GCC
2319 builtin and then its argument prototype would still apply. */
2320#ifdef __cplusplus
2321extern "C"
2322#endif
2323char $2 ();
2324/* The GNU C library defines this for functions which it implements
2325 to always fail with ENOSYS. Some functions are actually named
2326 something starting with __ and the normal name is an alias. */
2327#if defined __stub_$2 || defined __stub___$2
2328choke me
2329#endif
2330
2331int
2332main ()
2333{
2334return $2 ();
2335 ;
2336 return 0;
2337}
2338_ACEOF
2339if ac_fn_c_try_link "$LINENO"; then :
2340 eval "$3=yes"
2341else
2342 eval "$3=no"
2343fi
2344rm -f core conftest.err conftest.$ac_objext \
2345 conftest$ac_exeext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002351
2352} # ac_fn_c_check_func
2353
2354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002363if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002364 $as_echo_n "(cached) " >&6
2365else
2366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
2370main ()
2371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 eval "$4=yes"
2381else
2382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
2386main ()
2387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 eval "$4=yes"
2397else
2398 eval "$4=no"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$4
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002408
2409} # ac_fn_c_check_member
2410
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002411# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2412# ---------------------------------------------
2413# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2414# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002415ac_fn_c_check_decl ()
2416{
2417 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002418 as_decl_name=`echo $2|sed 's/ *(.*//'`
2419 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2421$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002422if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002423 $as_echo_n "(cached) " >&6
2424else
2425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2426/* end confdefs.h. */
2427$4
2428int
2429main ()
2430{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002431#ifndef $as_decl_name
2432#ifdef __cplusplus
2433 (void) $as_decl_use;
2434#else
2435 (void) $as_decl_name;
2436#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002437#endif
2438
2439 ;
2440 return 0;
2441}
2442_ACEOF
2443if ac_fn_c_try_compile "$LINENO"; then :
2444 eval "$3=yes"
2445else
2446 eval "$3=no"
2447fi
2448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449fi
2450eval ac_res=\$$3
2451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2452$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002453 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002454
2455} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002456cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002457This file contains any messages produced by compilers while
2458running configure, to aid debugging if configure makes a mistake.
2459
Martin v. Löwis174440b2008-10-03 08:59:41 +00002460It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002461generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002462
2463 $ $0 $@
2464
2465_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002466exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002467{
2468cat <<_ASUNAME
2469## --------- ##
2470## Platform. ##
2471## --------- ##
2472
2473hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2474uname -m = `(uname -m) 2>/dev/null || echo unknown`
2475uname -r = `(uname -r) 2>/dev/null || echo unknown`
2476uname -s = `(uname -s) 2>/dev/null || echo unknown`
2477uname -v = `(uname -v) 2>/dev/null || echo unknown`
2478
2479/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2480/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2481
2482/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2483/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2484/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002485/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002486/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2487/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2488/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2489
2490_ASUNAME
2491
2492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2493for as_dir in $PATH
2494do
2495 IFS=$as_save_IFS
2496 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002497 $as_echo "PATH: $as_dir"
2498 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002500
2501} >&5
2502
2503cat >&5 <<_ACEOF
2504
2505
2506## ----------- ##
2507## Core tests. ##
2508## ----------- ##
2509
2510_ACEOF
2511
2512
2513# Keep a trace of the command line.
2514# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002515# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002516# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002517# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002518ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002519ac_configure_args0=
2520ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002521ac_must_keep_next=false
2522for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002523do
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 for ac_arg
2525 do
2526 case $ac_arg in
2527 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2528 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2529 | -silent | --silent | --silen | --sile | --sil)
2530 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002531 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 esac
2534 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002535 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002537 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002538 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002539 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002540 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002541 case $ac_arg in
2542 *=* | --config-cache | -C | -disable-* | --disable-* \
2543 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2544 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2545 | -with-* | --with-* | -without-* | --without-* | --x)
2546 case "$ac_configure_args0 " in
2547 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2548 esac
2549 ;;
2550 -* ) ac_must_keep_next=true ;;
2551 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002552 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 ;;
2555 esac
2556 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002557done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002558{ ac_configure_args0=; unset ac_configure_args0;}
2559{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002560
2561# When interrupted or exit'd, cleanup temporary files, and complete
2562# config.log. We remove comments because anyway the quotes in there
2563# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002564# WARNING: Use '\'' to represent an apostrophe within the trap.
2565# 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 +00002566trap 'exit_status=$?
2567 # Save into config.log some information that might help in debugging.
2568 {
2569 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002570
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002571 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002572## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002573## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 echo
2575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576(
2577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2578 eval ac_val=\$$ac_var
2579 case $ac_val in #(
2580 *${as_nl}*)
2581 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2583$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 esac
2585 case $ac_var in #(
2586 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002587 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2588 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002589 esac ;;
2590 esac
2591 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2594 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596 "s/'\''/'\''\\\\'\'''\''/g;
2597 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2598 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002599 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002600 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002601 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 esac |
2603 sort
2604)
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002606
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002607 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002608## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002609## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 echo
2611 for ac_var in $ac_subst_vars
2612 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613 eval ac_val=\$$ac_var
2614 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002615 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002617 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002618 done | sort
2619 echo
2620
2621 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002622 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002624## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002625 echo
2626 for ac_var in $ac_subst_files
2627 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 eval ac_val=\$$ac_var
2629 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002630 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002632 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002633 done | sort
2634 echo
2635 fi
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002638 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002639## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002640## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002642 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 echo
2644 fi
2645 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002646 $as_echo "$as_me: caught signal $ac_signal"
2647 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002649 rm -f core *.core core.conftest.* &&
2650 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002652' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002653for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002654 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002655done
2656ac_signal=0
2657
2658# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002659rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002660
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002661$as_echo "/* confdefs.h */" > confdefs.h
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663# Predefined preprocessor variables.
2664
2665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_NAME "$PACKAGE_NAME"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_VERSION "$PACKAGE_VERSION"
2675_ACEOF
2676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_STRING "$PACKAGE_STRING"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681cat >>confdefs.h <<_ACEOF
2682#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2683_ACEOF
2684
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002685cat >>confdefs.h <<_ACEOF
2686#define PACKAGE_URL "$PACKAGE_URL"
2687_ACEOF
2688
Martin v. Löwis11437992002-04-12 09:54:03 +00002689
2690# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002691# Prefer an explicitly selected file to automatically selected ones.
2692ac_site_file1=NONE
2693ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002694if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002695 # We do not want a PATH search for config.site.
2696 case $CONFIG_SITE in #((
2697 -*) ac_site_file1=./$CONFIG_SITE;;
2698 */*) ac_site_file1=$CONFIG_SITE;;
2699 *) ac_site_file1=./$CONFIG_SITE;;
2700 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002701elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002702 ac_site_file1=$prefix/share/config.site
2703 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 ac_site_file1=$ac_default_prefix/share/config.site
2706 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002707fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002708for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002709do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002710 test "x$ac_site_file" = xNONE && continue
2711 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2713$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002715 . "$ac_site_file" \
2716 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2718as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002719See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002720 fi
2721done
2722
2723if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002724 # Some versions of bash will fail to source /dev/null (special files
2725 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2726 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2728$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2731 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 esac
2733 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002735 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2736$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 >$cache_file
2738fi
2739
2740# Check that the precious variables saved in the cache have kept the same
2741# value.
2742ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002743for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2745 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2747 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 case $ac_old_set,$ac_new_set in
2749 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002750 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2751$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 +00002752 ac_cache_corrupted=: ;;
2753 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002754 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2755$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 ac_cache_corrupted=: ;;
2757 ,);;
2758 *)
2759 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002760 # differences in whitespace do not lead to failure.
2761 ac_old_val_w=`echo x $ac_old_val`
2762 ac_new_val_w=`echo x $ac_new_val`
2763 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2765$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2766 ac_cache_corrupted=:
2767 else
2768 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2769$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2770 eval $ac_var=\$ac_old_val
2771 fi
2772 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2773$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2775$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 fi;;
2777 esac
2778 # Pass precious variables to config.status.
2779 if test "$ac_new_set" = set; then
2780 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002781 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 *) ac_arg=$ac_var=$ac_new_val ;;
2783 esac
2784 case " $ac_configure_args " in
2785 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002786 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 esac
2788 fi
2789done
2790if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002791 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2793 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2794$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002795 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002796fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002797## -------------------- ##
2798## Main body of script. ##
2799## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800
Guido van Rossum7f43da71994-08-01 12:15:30 +00002801ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002802ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2805ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002806
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807
Michael W. Hudson54241132001-12-07 15:38:26 +00002808
Martin v. Löwiseba40652007-08-30 20:10:57 +00002809ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002810
2811
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002812ac_aux_dir=
2813for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2814 if test -f "$ac_dir/install-sh"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/install-sh -c"
2817 break
2818 elif test -f "$ac_dir/install.sh"; then
2819 ac_aux_dir=$ac_dir
2820 ac_install_sh="$ac_aux_dir/install.sh -c"
2821 break
2822 elif test -f "$ac_dir/shtool"; then
2823 ac_aux_dir=$ac_dir
2824 ac_install_sh="$ac_aux_dir/shtool install -c"
2825 break
2826 fi
2827done
2828if test -z "$ac_aux_dir"; then
2829 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2830fi
2831
2832# These three variables are undocumented and unsupported,
2833# and are intended to be withdrawn in a future Autoconf release.
2834# They can cause serious problems if a builder's source tree is in a directory
2835# whose full name contains unusual characters.
2836ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2837ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2838ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2839
2840
2841# Make sure we can run config.sub.
2842$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2843 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2844
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2846$as_echo_n "checking build system type... " >&6; }
2847if ${ac_cv_build+:} false; then :
2848 $as_echo_n "(cached) " >&6
2849else
2850 ac_build_alias=$build_alias
2851test "x$ac_build_alias" = x &&
2852 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2853test "x$ac_build_alias" = x &&
2854 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2855ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2857
2858fi
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2860$as_echo "$ac_cv_build" >&6; }
2861case $ac_cv_build in
2862*-*-*) ;;
2863*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2864esac
2865build=$ac_cv_build
2866ac_save_IFS=$IFS; IFS='-'
2867set x $ac_cv_build
2868shift
2869build_cpu=$1
2870build_vendor=$2
2871shift; shift
2872# Remember, the first character of IFS is used to create $*,
2873# except with old shells:
2874build_os=$*
2875IFS=$ac_save_IFS
2876case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2877
2878
2879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2880$as_echo_n "checking host system type... " >&6; }
2881if ${ac_cv_host+:} false; then :
2882 $as_echo_n "(cached) " >&6
2883else
2884 if test "x$host_alias" = x; then
2885 ac_cv_host=$ac_cv_build
2886else
2887 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2888 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2889fi
2890
2891fi
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2893$as_echo "$ac_cv_host" >&6; }
2894case $ac_cv_host in
2895*-*-*) ;;
2896*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2897esac
2898host=$ac_cv_host
2899ac_save_IFS=$IFS; IFS='-'
2900set x $ac_cv_host
2901shift
2902host_cpu=$1
2903host_vendor=$2
2904shift; shift
2905# Remember, the first character of IFS is used to create $*,
2906# except with old shells:
2907host_os=$*
2908IFS=$ac_save_IFS
2909case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2910
2911
2912
2913
2914
Ned Deily983df862014-08-22 13:30:59 -07002915# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2916rm -f pybuilddir.txt
2917
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002918if test "$cross_compiling" = yes; then
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2920$as_echo_n "checking for python interpreter for cross build... " >&6; }
2921 if test -z "$PYTHON_FOR_BUILD"; then
2922 for interp in python$PACKAGE_VERSION python2 python; do
2923 which $interp >/dev/null 2>&1 || continue
2924 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2925 break
2926 fi
2927 interp=
2928 done
2929 if test x$interp = x; then
2930 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2931 fi
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2933$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002934 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002935 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002936 # Used to comment out stuff for rebuilding generated files
2937 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002938elif test "$cross_compiling" = maybe; then
2939 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2940else
2941 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002942 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002943fi
2944
2945
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Martin Panter801110b2016-07-28 01:28:27 +00002947
Georg Brandlbcd64a32009-03-31 21:45:18 +00002948if test "$prefix" != "/"; then
2949 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
2954
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002955# We don't use PACKAGE_ variables, and they cause conflicts
2956# with other autoconf-based packages that include Python.h
2957grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2958rm confdefs.h
2959mv confdefs.h.new confdefs.h
2960
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002961
Martin v. Löwis174440b2008-10-03 08:59:41 +00002962VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002963
Martin v. Löwis1142de32002-03-29 16:28:31 +00002964
2965SOVERSION=1.0
2966
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002967# The later defininition of _XOPEN_SOURCE disables certain features
2968# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002970$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
2972
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2974# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2975# them.
2976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002977$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978
2979
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2982# them.
2983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002984$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985
2986
Martin v. Löwisd6320502004-08-12 13:45:08 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2988# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002990$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991
2992
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2995# them.
2996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002997$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002998
2999
3000
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003001define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003002
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003003# Arguments passed to configure.
3004
3005CONFIG_ARGS="$ac_configure_args"
3006
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3008$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003009# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003010if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003011 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003012 case $enableval in
3013 yes)
3014 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003015 if test ! -d "${enableval}"
3016 then
3017 enableval=/
3018 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003019 ;;
3020 esac
3021 case $enableval in
3022 no)
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025 ;;
3026 *)
3027 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003028 if test ! -d "${UNIVERSALSDK}"
3029 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003030 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003031 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003032 ;;
3033 esac
3034
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003035
Ronald Oussoren988117f2006-04-29 11:31:35 +00003036else
3037
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040
Martin v. Löwiseba40652007-08-30 20:10:57 +00003041fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003042
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003043if test -n "${UNIVERSALSDK}"
3044then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3046$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003050fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003051
Martin v. Löwiseba40652007-08-30 20:10:57 +00003052
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003053
Ned Deily8e60f6e2013-05-30 00:14:29 -07003054ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003055
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003056UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3059$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003060
3061# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003062if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003063 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3065$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003066 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003067 if test "${enable_universalsdk}" ; then
3068 :
3069 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003070 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003071 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003072
3073else
3074
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3076$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003077
3078fi
3079
3080
3081
3082
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003083
3084# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003085if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003086 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003087 if test "${enable_framework}"; then
3088 :
3089 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003090 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003091 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Martin v. Löwiseba40652007-08-30 20:10:57 +00003104# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003105if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003121 if test "x${prefix}" = "xNONE"; then
3122 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3123 else
3124 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3125 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003126 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
3128 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003129 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003131 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003132 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003133 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3134 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003135 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003136
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003137 if test "x${prefix}" = "xNONE" ; then
3138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003139
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003140 else
3141 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3142 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003143
3144 case "${enableval}" in
3145 /System*)
3146 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3147 if test "${prefix}" = "NONE" ; then
3148 # See below
3149 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3150 fi
3151 ;;
3152
3153 /Library*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 ;;
3156
3157 */Library/Frameworks)
3158 MDIR="`dirname "${enableval}"`"
3159 MDIR="`dirname "${MDIR}"`"
3160 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3161
3162 if test "${prefix}" = "NONE"; then
3163 # User hasn't specified the
3164 # --prefix option, but wants to install
3165 # the framework in a non-default location,
3166 # ensure that the compatibility links get
3167 # installed relative to that prefix as well
3168 # instead of in /usr/local.
3169 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3170 fi
3171 ;;
3172
3173 *)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176 esac
3177
Jack Jansen127e56e2001-09-11 14:41:54 +00003178 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003179
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003180 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003181 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003183
Martin v. Löwiseba40652007-08-30 20:10:57 +00003184 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003185
Martin v. Löwiseba40652007-08-30 20:10:57 +00003186 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003187
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003204 if test "x${prefix}" = "xNONE" ; then
3205 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3206 else
3207 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3208 fi
Jack Jansene578a632001-08-15 01:27:14 +00003209 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003210
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003211
Martin v. Löwiseba40652007-08-30 20:10:57 +00003212fi
3213
Michael W. Hudson54241132001-12-07 15:38:26 +00003214
3215
3216
3217
Jack Jansene578a632001-08-15 01:27:14 +00003218
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003219
3220
Ronald Oussoren5b787322006-06-06 19:50:24 +00003221
3222
3223
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003224
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003225
Jack Jansene578a632001-08-15 01:27:14 +00003226##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003227## AS_HELP_STRING([--with-dyld],
3228## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003229##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003230# Set name for machine-dependent library files
3231
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3233$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003234if test -z "$MACHDEP"
3235then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003236 # avoid using uname for cross builds
3237 if test "$cross_compiling" = yes; then
3238 # ac_sys_system and ac_sys_release are only used for setting
3239 # `define_xopen_source' in the case statement below. For the
3240 # current supported cross builds, this macro is not adjusted.
3241 case "$host" in
3242 *-*-linux*)
3243 ac_sys_system=Linux
3244 ;;
3245 *-*-cygwin*)
3246 ac_sys_system=Cygwin
3247 ;;
3248 *)
3249 # for now, limit cross builds to known configurations
3250 MACHDEP="unknown"
3251 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3252 esac
3253 ac_sys_release=
3254 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003255 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003256 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003257 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003258 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003260 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003262 fi
3263 ac_md_system=`echo $ac_sys_system |
3264 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3265 ac_md_release=`echo $ac_sys_release |
3266 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3267 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003268
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003269 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003270 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003271 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003272 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003273 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003274 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003275 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003276 esac
3277fi
3278
3279
3280if test "$cross_compiling" = yes; then
3281 case "$host" in
3282 *-*-linux*)
3283 case "$host_cpu" in
3284 arm*)
3285 _host_cpu=arm
3286 ;;
3287 *)
3288 _host_cpu=$host_cpu
3289 esac
3290 ;;
3291 *-*-cygwin*)
3292 _host_cpu=
3293 ;;
3294 *)
3295 # for now, limit cross builds to known configurations
3296 MACHDEP="unknown"
3297 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003299 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003300fi
Guido van Rossum91922671997-10-09 20:24:13 +00003301
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003302# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3303# disable features if it is defined, without any means to access these
3304# features as extensions. For these systems, we skip the definition of
3305# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3306# some feature, make sure there is no alternative way to access this
3307# feature. Also, when using wildcards, make sure you have verified the
3308# need for not defining _XOPEN_SOURCE on all systems matching the
3309# wildcard, and that the wildcard does not include future systems
3310# (which may remove their limitations).
3311case $ac_sys_system/$ac_sys_release in
3312 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3313 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003314 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003315 # In addition, Stefan Krah confirms that issue #1244610 exists through
3316 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003317 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003318 define_xopen_source=no
3319 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3320 # also defined. This can be overridden by defining _BSD_SOURCE
3321 # As this has a different meaning on Linux, only define it on OpenBSD
3322
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003323$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003324
3325 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003326 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003327 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3328 # also defined. This can be overridden by defining _BSD_SOURCE
3329 # As this has a different meaning on Linux, only define it on OpenBSD
3330
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003331$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003332
3333 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003334 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3335 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3336 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003337 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 +00003338 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003339 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3340 # request to enable features supported by the standard as a request
3341 # to disable features not supported by the standard. The best way
3342 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3343 # entirely and define __EXTENSIONS__ instead.
3344 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003345 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003346 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3347 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003348 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003349 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003350 define_xopen_source=no;;
3351 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003352 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003353 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003354 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003355 # On FreeBSD 4, the math functions C89 does not cover are never defined
3356 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3357 FreeBSD/4.*)
3358 define_xopen_source=no;;
3359 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3360 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3361 # identifies itself as Darwin/7.*
3362 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3363 # disables platform specific features beyond repair.
3364 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3365 # has no effect, don't bother defining them
3366 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003367 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003368 Darwin/1[0-9].*)
3369 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003370 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3371 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3372 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003373 AIX/4)
3374 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003375 AIX/5)
3376 if test `uname -r` -eq 1; then
3377 define_xopen_source=no
3378 fi
3379 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003380 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3381 # defining NI_NUMERICHOST.
3382 QNX/6.3.2)
3383 define_xopen_source=no
3384 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003385
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003386esac
3387
3388if test $define_xopen_source = yes
3389then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003391$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003392
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
3394 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3395 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3396 # several APIs are not declared. Since this is also needed in some
3397 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003399$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
3401
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003403$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406fi
3407
Guido van Rossum91922671997-10-09 20:24:13 +00003408#
3409# SGI compilers allow the specification of the both the ABI and the
3410# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003411# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003412#
3413# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3414# thus supply support for various ABI/ISA combinations. The MACHDEP
3415# variable is also adjusted.
3416#
3417
3418if test ! -z "$SGI_ABI"
3419then
3420 CC="cc $SGI_ABI"
3421 LDFLAGS="$SGI_ABI $LDFLAGS"
3422 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3423fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3425$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003426
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003427
3428PLATDIR=plat-$MACHDEP
3429
Jack Jansen83f898c2002-12-30 22:23:40 +00003430# And add extra plat-mac for darwin
3431
Jack Jansen7b59b422003-03-17 15:44:10 +00003432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3434$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003435if test -z "$EXTRAPLATDIR"
3436then
3437 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003438 darwin)
3439 EXTRAPLATDIR="\$(PLATMACDIRS)"
3440 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3441 ;;
3442 *)
3443 EXTRAPLATDIR=""
3444 EXTRAMACHDEPPATH=""
3445 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003446 esac
3447fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3449$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003450
Jack Jansen6b08a402004-06-03 12:41:45 +00003451# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3452# it may influence the way we can build extensions, so distutils
3453# needs to check it
3454
Ronald Oussoren988117f2006-04-29 11:31:35 +00003455
Jack Jansen6b08a402004-06-03 12:41:45 +00003456CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003457EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003458
Guido van Rossum627b2d71993-12-24 10:39:16 +00003459# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003460
3461# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3462# for debug/optimization stuff. BASECFLAGS is for flags that are required
3463# just to get things to compile and link. Users are free to override OPT
3464# when running configure or make. The build should not break if they do.
3465# BASECFLAGS should generally not be messed with, however.
3466
3467# XXX shouldn't some/most/all of this code be merged with the stuff later
3468# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3470$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003471
Martin v. Löwiseba40652007-08-30 20:10:57 +00003472# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003473if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003474 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003475 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003476 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003477 without_gcc=yes;;
3478 yes) CC=gcc
3479 without_gcc=no;;
3480 *) CC=$withval
3481 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003482 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003483else
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003485 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003486 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003487 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003488 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003489 case $BE_HOST_CPU in
3490 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003491 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003492 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003493 BASECFLAGS="$BASECFLAGS -export pragma"
3494 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003495 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003496 ;;
3497 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003498 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003499 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003500 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003501 ;;
3502 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003503 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003504 ;;
3505 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003506 AR="\$(srcdir)/Modules/ar_beos"
3507 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003508 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003509 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003510 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003511fi
3512
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3514$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003515
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3517$as_echo_n "checking for --with-icc... " >&6; }
3518
3519# Check whether --with-icc was given.
3520if test "${with_icc+set}" = set; then :
3521 withval=$with_icc;
3522 case $withval in
3523 no) CC=${CC:-cc}
3524 with_icc=no;;
3525 yes) CC=icc
3526 CXX=icpc
3527 with_icc=yes;;
3528 *) CC=$withval
3529 with_icc=$withval;;
3530 esac
3531else
3532
3533 with_icc=no
3534fi
3535
3536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3537$as_echo "$with_icc" >&6; }
3538
Guido van Rossum8b131c51995-03-09 14:10:13 +00003539# If the user switches compilers, we can't believe the cache
3540if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3541then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003542 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003543(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003544fi
3545
Trent Nelson15daa352012-12-13 06:46:39 +00003546if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3547 # Normally, MIPSpro CC treats #error directives as warnings, which means
3548 # a successful exit code is returned (0). This is a problem because IRIX
3549 # has a bunch of system headers with this guard at the top:
3550 #
3551 # #ifndef __c99
3552 # #error This header file is to be used only for c99 mode compilations
3553 # #else
3554 #
3555 # When autoconf tests for such a header, like stdint.h, this happens:
3556 #
3557 # configure:4619: cc -c conftest.c >&5
3558 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3559 # #error directive: This header file is to be used only for c99 mode
3560 # compilations
3561 #
3562 # #error This header file is to be used only for c99 mode compilations
3563 # ^
3564 #
3565 # configure:4619: $? = 0
3566 # configure:4619: result: yes
3567 #
3568 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3569 # warning as an error, which causes cc to return a non-zero result,
3570 # which autoconf can interpret correctly.
3571 CFLAGS="$CFLAGS -diag_error 1035"
3572 # Whilst we're here, we might as well make sure CXX defaults to something
3573 # sensible if we're not using gcc.
3574 if test -z "$CXX"; then
3575 CXX="CC"
3576 fi
3577fi
3578
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003579# If the user set CFLAGS, use this instead of the automatically
3580# determined setting
3581preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003582ac_ext=c
3583ac_cpp='$CPP $CPPFLAGS'
3584ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3585ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3586ac_compiler_gnu=$ac_cv_c_compiler_gnu
3587if test -n "$ac_tool_prefix"; then
3588 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3589set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003592if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003593 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003594else
3595 if test -n "$CC"; then
3596 ac_cv_prog_CC="$CC" # Let the user override the test.
3597else
Martin v. Löwis11437992002-04-12 09:54:03 +00003598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3599for as_dir in $PATH
3600do
3601 IFS=$as_save_IFS
3602 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003606 $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 +00003607 break 2
3608 fi
3609done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003610 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003612
Jack Jansendd19cf82001-12-06 22:36:17 +00003613fi
3614fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003616if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3618$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3621$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003622fi
3623
Martin v. Löwiseba40652007-08-30 20:10:57 +00003624
Martin v. Löwis11437992002-04-12 09:54:03 +00003625fi
3626if test -z "$ac_cv_prog_CC"; then
3627 ac_ct_CC=$CC
3628 # Extract the first word of "gcc", so it can be a program name with args.
3629set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003632if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003634else
3635 if test -n "$ac_ct_CC"; then
3636 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3637else
3638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003646 $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 +00003647 break 2
3648 fi
3649done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655ac_ct_CC=$ac_cv_prog_ac_ct_CC
3656if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3658$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Martin v. Löwiseba40652007-08-30 20:10:57 +00003664 if test "x$ac_ct_CC" = x; then
3665 CC=""
3666 else
3667 case $cross_compiling:$ac_tool_warned in
3668yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3670$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671ac_tool_warned=yes ;;
3672esac
3673 CC=$ac_ct_CC
3674 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003675else
3676 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003677fi
3678
Jack Jansendd19cf82001-12-06 22:36:17 +00003679if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003680 if test -n "$ac_tool_prefix"; then
3681 # 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 +00003682set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3684$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003685if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003687else
3688 if test -n "$CC"; then
3689 ac_cv_prog_CC="$CC" # Let the user override the test.
3690else
Martin v. Löwis11437992002-04-12 09:54:03 +00003691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3692for as_dir in $PATH
3693do
3694 IFS=$as_save_IFS
3695 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003696 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003697 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003699 $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 +00003700 break 2
3701 fi
3702done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003703 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003704IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003705
3706fi
3707fi
3708CC=$ac_cv_prog_CC
3709if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3711$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3714$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716
Martin v. Löwiseba40652007-08-30 20:10:57 +00003717
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003719fi
3720if test -z "$CC"; then
3721 # Extract the first word of "cc", so it can be a program name with args.
3722set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3724$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003725if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003727else
3728 if test -n "$CC"; then
3729 ac_cv_prog_CC="$CC" # Let the user override the test.
3730else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003732as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733for as_dir in $PATH
3734do
3735 IFS=$as_save_IFS
3736 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003737 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003738 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3740 ac_prog_rejected=yes
3741 continue
3742 fi
3743 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003748 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751if test $ac_prog_rejected = yes; then
3752 # We found a bogon in the path, so make sure we never use it.
3753 set dummy $ac_cv_prog_CC
3754 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 # We chose a different compiler from the bogus one.
3757 # However, it has the same basename, so the bogon will be chosen
3758 # first if we set CC to just the basename; use the full file name.
3759 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003760 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761 fi
3762fi
3763fi
3764fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003765CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003766if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3768$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003772fi
3773
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775fi
3776if test -z "$CC"; then
3777 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003779 do
3780 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3781set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3783$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003784if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003786else
3787 if test -n "$CC"; then
3788 ac_cv_prog_CC="$CC" # Let the user override the test.
3789else
Martin v. Löwis11437992002-04-12 09:54:03 +00003790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3791for as_dir in $PATH
3792do
3793 IFS=$as_save_IFS
3794 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003795 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003798 $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 +00003799 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003800 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003801done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003802 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003804
3805fi
3806fi
3807CC=$ac_cv_prog_CC
3808if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3810$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3813$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003814fi
3815
Martin v. Löwiseba40652007-08-30 20:10:57 +00003816
Martin v. Löwis11437992002-04-12 09:54:03 +00003817 test -n "$CC" && break
3818 done
3819fi
3820if test -z "$CC"; then
3821 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003822 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003823do
3824 # Extract the first word of "$ac_prog", so it can be a program name with args.
3825set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3827$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003828if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003830else
3831 if test -n "$ac_ct_CC"; then
3832 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3833else
3834as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3835for as_dir in $PATH
3836do
3837 IFS=$as_save_IFS
3838 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003842 $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 +00003843 break 2
3844 fi
3845done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003846 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003847IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
3850fi
3851ac_ct_CC=$ac_cv_prog_ac_ct_CC
3852if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3854$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003858fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Martin v. Löwiseba40652007-08-30 20:10:57 +00003860
Martin v. Löwis11437992002-04-12 09:54:03 +00003861 test -n "$ac_ct_CC" && break
3862done
Michael W. Hudson54241132001-12-07 15:38:26 +00003863
Martin v. Löwiseba40652007-08-30 20:10:57 +00003864 if test "x$ac_ct_CC" = x; then
3865 CC=""
3866 else
3867 case $cross_compiling:$ac_tool_warned in
3868yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3870$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003871ac_tool_warned=yes ;;
3872esac
3873 CC=$ac_ct_CC
3874 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003875fi
3876
3877fi
3878
3879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003882as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003883See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003884
3885# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3887set X $ac_compile
3888ac_compiler=$2
3889for ac_option in --version -v -V -qversion; do
3890 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
3897 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003899 if test -s conftest.err; then
3900 sed '10a\
3901... rest of stderr output deleted ...
3902 10q' conftest.err >conftest.er1
3903 cat conftest.er1 >&5
3904 fi
3905 rm -f conftest.er1 conftest.err
3906 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3907 test $ac_status = 0; }
3908done
Martin v. Löwis11437992002-04-12 09:54:03 +00003909
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003911/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913int
3914main ()
3915{
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003923# Try to create an executable without -o first, disregard a.out.
3924# It will help us diagnose broken compilers, and finding out an intuition
3925# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3927$as_echo_n "checking whether the C compiler works... " >&6; }
3928ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3929
3930# The possible output files:
3931ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3932
Martin v. Löwiseba40652007-08-30 20:10:57 +00003933ac_rmfiles=
3934for ac_file in $ac_files
3935do
3936 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003937 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003938 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3939 esac
3940done
3941rm -f $ac_rmfiles
3942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003950 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003951 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003952 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003954 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3955# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3956# in a Makefile. We should not override ac_cv_exeext if it was cached,
3957# so that the user can short-circuit this test for compilers unknown to
3958# Autoconf.
3959for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003960do
3961 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003963 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003964 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003965 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003966 # We found the default executable, but exeext='' is most
3967 # certainly right.
3968 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003969 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003970 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003971 then :; else
3972 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 fi
3974 # We set ac_cv_exeext here because the later test for it is not
3975 # safe: cross compilers may not add the suffix if given an `-o'
3976 # argument, so we may need to know it at that point already.
3977 # Even if this section looks crufty: it has the advantage of
3978 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003979 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003980 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003981 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003982 esac
3983done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003984test "$ac_cv_exeext" = no && ac_cv_exeext=
3985
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003986else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003987 ac_file=''
3988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003989if test -z "$ac_file"; then :
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3991$as_echo "no" >&6; }
3992$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003993sed 's/^/| /' conftest.$ac_ext >&5
3994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003995{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003997as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003998See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003999else
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4001$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4004$as_echo_n "checking for C compiler default output file name... " >&6; }
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4006$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004007ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004008
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004009rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004010ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4012$as_echo_n "checking for suffix of executables... " >&6; }
4013if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004014case "(($ac_try" in
4015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4016 *) ac_try_echo=$ac_try;;
4017esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4019$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4023 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4025# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4026# work properly (i.e., refer to `conftest.exe'), while it won't with
4027# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004028for ac_file in conftest.exe conftest conftest.*; do
4029 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004030 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004031 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004032 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004033 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 * ) break;;
4035 esac
4036done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4039$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004040as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004041See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004043rm -f conftest conftest$ac_cv_exeext
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4045$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004046
4047rm -f conftest.$ac_ext
4048EXEEXT=$ac_cv_exeext
4049ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4051/* end confdefs.h. */
4052#include <stdio.h>
4053int
4054main ()
4055{
4056FILE *f = fopen ("conftest.out", "w");
4057 return ferror (f) || fclose (f) != 0;
4058
4059 ;
4060 return 0;
4061}
Skip Montanaro6dead952003-09-25 14:50:04 +00004062_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004063ac_clean_files="$ac_clean_files conftest.out"
4064# Check that the compiler produces executables we can run. If not, either
4065# the compiler is broken, or we cross compile.
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4067$as_echo_n "checking whether we are cross compiling... " >&6; }
4068if test "$cross_compiling" != yes; then
4069 { { ac_try="$ac_link"
4070case "(($ac_try" in
4071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4072 *) ac_try_echo=$ac_try;;
4073esac
4074eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4075$as_echo "$ac_try_echo"; } >&5
4076 (eval "$ac_link") 2>&5
4077 ac_status=$?
4078 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4079 test $ac_status = 0; }
4080 if { ac_try='./conftest$ac_cv_exeext'
4081 { { case "(($ac_try" in
4082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4083 *) ac_try_echo=$ac_try;;
4084esac
4085eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4086$as_echo "$ac_try_echo"; } >&5
4087 (eval "$ac_try") 2>&5
4088 ac_status=$?
4089 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4090 test $ac_status = 0; }; }; then
4091 cross_compiling=no
4092 else
4093 if test "$cross_compiling" = maybe; then
4094 cross_compiling=yes
4095 else
4096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004098as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004099If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004100See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004101 fi
4102 fi
4103fi
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4105$as_echo "$cross_compiling" >&6; }
4106
4107rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4108ac_clean_files=$ac_clean_files_save
4109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4110$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004111if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004112 $as_echo_n "(cached) " >&6
4113else
4114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004116
Martin v. Löwis11437992002-04-12 09:54:03 +00004117int
4118main ()
4119{
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
4125rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004127case "(($ac_try" in
4128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129 *) ac_try_echo=$ac_try;;
4130esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004131eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4132$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4136 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 for ac_file in conftest.o conftest.obj conftest.*; do
4138 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004139 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004141 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4142 break;;
4143 esac
4144done
4145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004146 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004147sed 's/^/| /' conftest.$ac_ext >&5
4148
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004151as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004152See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004154rm -f conftest.$ac_cv_objext conftest.$ac_ext
4155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4157$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004158OBJEXT=$ac_cv_objext
4159ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4161$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004162if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004163 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004164else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004167
Martin v. Löwis11437992002-04-12 09:54:03 +00004168int
4169main ()
4170{
4171#ifndef __GNUC__
4172 choke me
4173#endif
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004180 ac_compiler_gnu=yes
4181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004182 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_cv_c_compiler_gnu=$ac_compiler_gnu
4186
4187fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4189$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4190if test $ac_compiler_gnu = yes; then
4191 GCC=yes
4192else
4193 GCC=
4194fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004195ac_test_CFLAGS=${CFLAGS+set}
4196ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4198$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004199if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004200 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004201else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202 ac_save_c_werror_flag=$ac_c_werror_flag
4203 ac_c_werror_flag=yes
4204 ac_cv_prog_cc_g=no
4205 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004208
Martin v. Löwis11437992002-04-12 09:54:03 +00004209int
4210main ()
4211{
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004217if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004218 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004220 CFLAGS=""
4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004222/* end confdefs.h. */
4223
4224int
4225main ()
4226{
4227
4228 ;
4229 return 0;
4230}
4231_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004234else
4235 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004236 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004238/* end confdefs.h. */
4239
4240int
4241main ()
4242{
4243
4244 ;
4245 return 0;
4246}
4247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004249 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4256 ac_c_werror_flag=$ac_save_c_werror_flag
4257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4259$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004262elif test $ac_cv_prog_cc_g = yes; then
4263 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004264 CFLAGS="-g -O2"
4265 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004266 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267 fi
4268else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004269 if test "$GCC" = yes; then
4270 CFLAGS="-O2"
4271 else
4272 CFLAGS=
4273 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4276$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004277if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004278 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004279else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004280 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004281ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004283/* end confdefs.h. */
4284#include <stdarg.h>
4285#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004286struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004287/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4288struct buf { int x; };
4289FILE * (*rcsopen) (struct buf *, struct stat *, int);
4290static char *e (p, i)
4291 char **p;
4292 int i;
4293{
4294 return p[i];
4295}
4296static char *f (char * (*g) (char **, int), char **p, ...)
4297{
4298 char *s;
4299 va_list v;
4300 va_start (v,p);
4301 s = g (p, va_arg (v,int));
4302 va_end (v);
4303 return s;
4304}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305
4306/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4307 function prototypes and stuff, but not '\xHH' hex character constants.
4308 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004310 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4311 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004312 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004313int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4314
Martin v. Löwiseba40652007-08-30 20:10:57 +00004315/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4316 inside strings and character constants. */
4317#define FOO(x) 'x'
4318int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4319
Skip Montanaro6dead952003-09-25 14:50:04 +00004320int test (int i, double x);
4321struct s1 {int (*f) (int a);};
4322struct s2 {int (*f) (double a);};
4323int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4324int argc;
4325char **argv;
4326int
4327main ()
4328{
4329return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4330 ;
4331 return 0;
4332}
4333_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4335 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004336do
4337 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004338 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004339 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004341rm -f core conftest.err conftest.$ac_objext
4342 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004343done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345CC=$ac_save_CC
4346
4347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348# AC_CACHE_VAL
4349case "x$ac_cv_prog_cc_c89" in
4350 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4352$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004353 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4355$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004356 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004357 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4359$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004360esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004361if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004363fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004364
Martin v. Löwis11437992002-04-12 09:54:03 +00004365ac_ext=c
4366ac_cpp='$CPP $CPPFLAGS'
4367ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4368ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4369ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004370
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004371if test ! -z "$preset_cflags"
4372then
4373 CFLAGS=$preset_cflags
4374fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004375
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004376
4377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4379$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004380
Martin v. Löwiseba40652007-08-30 20:10:57 +00004381# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004382if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004383 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004384
4385 case $withval in
4386 no) with_cxx_main=no
4387 MAINCC='$(CC)';;
4388 yes) with_cxx_main=yes
4389 MAINCC='$(CXX)';;
4390 *) with_cxx_main=yes
4391 MAINCC=$withval
4392 if test -z "$CXX"
4393 then
4394 CXX=$withval
4395 fi;;
4396 esac
4397else
4398
4399 with_cxx_main=no
4400 MAINCC='$(CC)'
4401
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402fi
4403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4405$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004406
4407preset_cxx="$CXX"
4408if test -z "$CXX"
4409then
4410 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004411 gcc) if test -n "$ac_tool_prefix"; then
4412 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4413set dummy ${ac_tool_prefix}g++; ac_word=$2
4414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4415$as_echo_n "checking for $ac_word... " >&6; }
4416if ${ac_cv_path_CXX+:} false; then :
4417 $as_echo_n "(cached) " >&6
4418else
4419 case $CXX in
4420 [\\/]* | ?:[\\/]*)
4421 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4422 ;;
4423 *)
4424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4425for as_dir in notfound
4426do
4427 IFS=$as_save_IFS
4428 test -z "$as_dir" && as_dir=.
4429 for ac_exec_ext in '' $ac_executable_extensions; do
4430 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4431 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4433 break 2
4434 fi
4435done
4436 done
4437IFS=$as_save_IFS
4438
4439 ;;
4440esac
4441fi
4442CXX=$ac_cv_path_CXX
4443if test -n "$CXX"; then
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4445$as_echo "$CXX" >&6; }
4446else
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4448$as_echo "no" >&6; }
4449fi
4450
4451
4452fi
4453if test -z "$ac_cv_path_CXX"; then
4454 ac_pt_CXX=$CXX
4455 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004456set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4458$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004459if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004461else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004462 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004463 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004464 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 +00004465 ;;
4466 *)
4467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4468for as_dir in notfound
4469do
4470 IFS=$as_save_IFS
4471 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004472 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004474 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004475 $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 +00004476 break 2
4477 fi
4478done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004479 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004481
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004482 ;;
4483esac
4484fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004485ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4486if test -n "$ac_pt_CXX"; then
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4488$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004489else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4491$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004493
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004494 if test "x$ac_pt_CXX" = x; then
4495 CXX="g++"
4496 else
4497 case $cross_compiling:$ac_tool_warned in
4498yes:)
4499{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4500$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4501ac_tool_warned=yes ;;
4502esac
4503 CXX=$ac_pt_CXX
4504 fi
4505else
4506 CXX="$ac_cv_path_CXX"
4507fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004508 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004509 cc) if test -n "$ac_tool_prefix"; then
4510 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4511set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4513$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004514if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004515 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004516else
4517 case $CXX in
4518 [\\/]* | ?:[\\/]*)
4519 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4520 ;;
4521 *)
4522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4523for as_dir in notfound
4524do
4525 IFS=$as_save_IFS
4526 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004527 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004529 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004530 $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 +00004531 break 2
4532 fi
4533done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004534 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004535IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004536
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004537 ;;
4538esac
4539fi
4540CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004541if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4543$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4546$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004548
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004549
4550fi
4551if test -z "$ac_cv_path_CXX"; then
4552 ac_pt_CXX=$CXX
4553 # Extract the first word of "c++", so it can be a program name with args.
4554set dummy c++; ac_word=$2
4555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4556$as_echo_n "checking for $ac_word... " >&6; }
4557if ${ac_cv_path_ac_pt_CXX+:} false; then :
4558 $as_echo_n "(cached) " >&6
4559else
4560 case $ac_pt_CXX in
4561 [\\/]* | ?:[\\/]*)
4562 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4563 ;;
4564 *)
4565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4566for as_dir in notfound
4567do
4568 IFS=$as_save_IFS
4569 test -z "$as_dir" && as_dir=.
4570 for ac_exec_ext in '' $ac_executable_extensions; do
4571 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4572 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4574 break 2
4575 fi
4576done
4577 done
4578IFS=$as_save_IFS
4579
4580 ;;
4581esac
4582fi
4583ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4584if test -n "$ac_pt_CXX"; then
4585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4586$as_echo "$ac_pt_CXX" >&6; }
4587else
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4589$as_echo "no" >&6; }
4590fi
4591
4592 if test "x$ac_pt_CXX" = x; then
4593 CXX="c++"
4594 else
4595 case $cross_compiling:$ac_tool_warned in
4596yes:)
4597{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4598$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4599ac_tool_warned=yes ;;
4600esac
4601 CXX=$ac_pt_CXX
4602 fi
4603else
4604 CXX="$ac_cv_path_CXX"
4605fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004606 ;;
4607 esac
4608 if test "$CXX" = "notfound"
4609 then
4610 CXX=""
4611 fi
4612fi
4613if test -z "$CXX"
4614then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004615 if test -n "$ac_tool_prefix"; then
4616 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4617 do
4618 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4619set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004622if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004623 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004624else
4625 if test -n "$CXX"; then
4626 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4627else
4628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in $PATH
4630do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004633 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004635 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004636 $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 +00004637 break 2
4638 fi
4639done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004640 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004641IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004642
4643fi
4644fi
4645CXX=$ac_cv_prog_CXX
4646if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4648$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4651$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004652fi
4653
Martin v. Löwiseba40652007-08-30 20:10:57 +00004654
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004655 test -n "$CXX" && break
4656 done
4657fi
4658if test -z "$CXX"; then
4659 ac_ct_CXX=$CXX
4660 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4661do
4662 # Extract the first word of "$ac_prog", so it can be a program name with args.
4663set dummy $ac_prog; ac_word=$2
4664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4665$as_echo_n "checking for $ac_word... " >&6; }
4666if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4667 $as_echo_n "(cached) " >&6
4668else
4669 if test -n "$ac_ct_CXX"; then
4670 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4671else
4672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in $PATH
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
4677 for ac_exec_ext in '' $ac_executable_extensions; do
4678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4679 ac_cv_prog_ac_ct_CXX="$ac_prog"
4680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 break 2
4682 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004683done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004684 done
4685IFS=$as_save_IFS
4686
4687fi
4688fi
4689ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4690if test -n "$ac_ct_CXX"; then
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4692$as_echo "$ac_ct_CXX" >&6; }
4693else
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698
4699 test -n "$ac_ct_CXX" && break
4700done
4701
4702 if test "x$ac_ct_CXX" = x; then
4703 CXX="notfound"
4704 else
4705 case $cross_compiling:$ac_tool_warned in
4706yes:)
4707{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4708$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4709ac_tool_warned=yes ;;
4710esac
4711 CXX=$ac_ct_CXX
4712 fi
4713fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004714
4715 if test "$CXX" = "notfound"
4716 then
4717 CXX=""
4718 fi
4719fi
4720if test "$preset_cxx" != "$CXX"
4721then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004723
4724 By default, distutils will build C++ extension modules with \"$CXX\".
4725 If this is not intended, then set CXX on the configure command line.
4726 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004727$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004728
4729 By default, distutils will build C++ extension modules with \"$CXX\".
4730 If this is not intended, then set CXX on the configure command line.
4731 " >&2;}
4732fi
4733
doko@python.org4e63fbe2013-01-25 13:08:27 +01004734MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4735
4736
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004737
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004738# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004739
4740ac_ext=c
4741ac_cpp='$CPP $CPPFLAGS'
4742ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4743ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4744ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4746$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004747# On Suns, sometimes $CPP names a directory.
4748if test -n "$CPP" && test -d "$CPP"; then
4749 CPP=
4750fi
4751if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004752 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004753 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004754else
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 # Double quotes because CPP needs to be expanded
4756 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4757 do
4758 ac_preproc_ok=false
4759for ac_c_preproc_warn_flag in '' yes
4760do
4761 # Use a header file that comes with gcc, so configuring glibc
4762 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004763 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4764 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004765 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004768/* end confdefs.h. */
4769#ifdef __STDC__
4770# include <limits.h>
4771#else
4772# include <assert.h>
4773#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004774 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004775_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004776if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004777
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004778else
Martin v. Löwis11437992002-04-12 09:54:03 +00004779 # Broken: fails on valid input.
4780continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004781fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004782rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004783
Martin v. Löwiseba40652007-08-30 20:10:57 +00004784 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004788#include <ac_nonexistent.h>
4789_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004790if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004791 # Broken: success on invalid input.
4792continue
4793else
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # Passes both tests.
4795ac_preproc_ok=:
4796break
4797fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004798rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004799
4800done
4801# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004802rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004803if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004804 break
4805fi
4806
4807 done
4808 ac_cv_prog_CPP=$CPP
4809
4810fi
4811 CPP=$ac_cv_prog_CPP
4812else
4813 ac_cv_prog_CPP=$CPP
4814fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4816$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004817ac_preproc_ok=false
4818for ac_c_preproc_warn_flag in '' yes
4819do
4820 # Use a header file that comes with gcc, so configuring glibc
4821 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004822 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4823 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004824 # On the NeXT, cc -E runs the code through the compiler's parser,
4825 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004827/* end confdefs.h. */
4828#ifdef __STDC__
4829# include <limits.h>
4830#else
4831# include <assert.h>
4832#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004833 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004836
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004837else
Martin v. Löwis11437992002-04-12 09:54:03 +00004838 # Broken: fails on valid input.
4839continue
4840fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004841rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004842
Martin v. Löwiseba40652007-08-30 20:10:57 +00004843 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004844 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004847#include <ac_nonexistent.h>
4848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004849if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 # Broken: success on invalid input.
4851continue
4852else
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 # Passes both tests.
4854ac_preproc_ok=:
4855break
4856fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004857rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004858
4859done
4860# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004861rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004862if $ac_preproc_ok; then :
4863
Martin v. Löwis11437992002-04-12 09:54:03 +00004864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4866$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004867as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004868See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004869fi
4870
4871ac_ext=c
4872ac_cpp='$CPP $CPPFLAGS'
4873ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4874ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4875ac_compiler_gnu=$ac_cv_c_compiler_gnu
4876
4877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4879$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004880if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004883 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885 # Loop through the user's path and test for each of PROGNAME-LIST
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004891 for ac_prog in grep ggrep; do
4892 for ac_exec_ext in '' $ac_executable_extensions; do
4893 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004894 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004895# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004896 # Check for GNU $ac_path_GREP
4897case `"$ac_path_GREP" --version 2>&1` in
4898*GNU*)
4899 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4900*)
4901 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004902 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 while :
4904 do
4905 cat "conftest.in" "conftest.in" >"conftest.tmp"
4906 mv "conftest.tmp" "conftest.in"
4907 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004908 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004909 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4910 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4913 # Best one so far, save it but keep looking for a better one
4914 ac_cv_path_GREP="$ac_path_GREP"
4915 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004916 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917 # 10*(2^10) chars as input seems more than enough
4918 test $ac_count -gt 10 && break
4919 done
4920 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4921esac
4922
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 $ac_path_GREP_found && break 3
4924 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004927IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004928 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004929 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 +00004930 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004931else
4932 ac_cv_path_GREP=$GREP
4933fi
4934
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4937$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 GREP="$ac_cv_path_GREP"
4939
4940
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4942$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004943if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945else
4946 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4947 then ac_cv_path_EGREP="$GREP -E"
4948 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004949 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004950 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004951 # Loop through the user's path and test for each of PROGNAME-LIST
4952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4954do
4955 IFS=$as_save_IFS
4956 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004957 for ac_prog in egrep; do
4958 for ac_exec_ext in '' $ac_executable_extensions; do
4959 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004960 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004961# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962 # Check for GNU $ac_path_EGREP
4963case `"$ac_path_EGREP" --version 2>&1` in
4964*GNU*)
4965 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4966*)
4967 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004968 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969 while :
4970 do
4971 cat "conftest.in" "conftest.in" >"conftest.tmp"
4972 mv "conftest.tmp" "conftest.in"
4973 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004974 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004975 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4976 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004977 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4979 # Best one so far, save it but keep looking for a better one
4980 ac_cv_path_EGREP="$ac_path_EGREP"
4981 ac_path_EGREP_max=$ac_count
4982 fi
4983 # 10*(2^10) chars as input seems more than enough
4984 test $ac_count -gt 10 && break
4985 done
4986 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4987esac
4988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989 $ac_path_EGREP_found && break 3
4990 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004991 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004992 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004993IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004995 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 +00004996 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004997else
4998 ac_cv_path_EGREP=$EGREP
4999fi
5000
Martin v. Löwiseba40652007-08-30 20:10:57 +00005001 fi
5002fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5004$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005005 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005006
5007
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5009$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005010if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005011 $as_echo_n "(cached) " >&6
5012else
5013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005014/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005015#include <stdlib.h>
5016#include <stdarg.h>
5017#include <string.h>
5018#include <float.h>
5019
5020int
5021main ()
5022{
5023
5024 ;
5025 return 0;
5026}
5027_ACEOF
5028if ac_fn_c_try_compile "$LINENO"; then :
5029 ac_cv_header_stdc=yes
5030else
5031 ac_cv_header_stdc=no
5032fi
5033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5034
5035if test $ac_cv_header_stdc = yes; then
5036 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5038/* end confdefs.h. */
5039#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005040
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005041_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005043 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005046 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005047fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005048rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005049
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005050fi
5051
5052if test $ac_cv_header_stdc = yes; then
5053 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055/* end confdefs.h. */
5056#include <stdlib.h>
5057
5058_ACEOF
5059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5060 $EGREP "free" >/dev/null 2>&1; then :
5061
5062else
5063 ac_cv_header_stdc=no
5064fi
5065rm -f conftest*
5066
5067fi
5068
5069if test $ac_cv_header_stdc = yes; then
5070 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5071 if test "$cross_compiling" = yes; then :
5072 :
5073else
5074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075/* end confdefs.h. */
5076#include <ctype.h>
5077#include <stdlib.h>
5078#if ((' ' & 0x0FF) == 0x020)
5079# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5080# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5081#else
5082# define ISLOWER(c) \
5083 (('a' <= (c) && (c) <= 'i') \
5084 || ('j' <= (c) && (c) <= 'r') \
5085 || ('s' <= (c) && (c) <= 'z'))
5086# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5087#endif
5088
5089#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5090int
5091main ()
5092{
5093 int i;
5094 for (i = 0; i < 256; i++)
5095 if (XOR (islower (i), ISLOWER (i))
5096 || toupper (i) != TOUPPER (i))
5097 return 2;
5098 return 0;
5099}
5100_ACEOF
5101if ac_fn_c_try_run "$LINENO"; then :
5102
5103else
5104 ac_cv_header_stdc=no
5105fi
5106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5107 conftest.$ac_objext conftest.beam conftest.$ac_ext
5108fi
5109
5110fi
5111fi
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5113$as_echo "$ac_cv_header_stdc" >&6; }
5114if test $ac_cv_header_stdc = yes; then
5115
5116$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5117
5118fi
5119
5120# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5121for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5122 inttypes.h stdint.h unistd.h
5123do :
5124 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5125ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5126"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005127if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005128 cat >>confdefs.h <<_ACEOF
5129#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5130_ACEOF
5131
5132fi
5133
5134done
5135
5136
5137
5138 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 +01005139if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005140 MINIX=yes
5141else
5142 MINIX=
5143fi
5144
5145
5146 if test "$MINIX" = yes; then
5147
5148$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5149
5150
5151$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5152
5153
5154$as_echo "#define _MINIX 1" >>confdefs.h
5155
5156 fi
5157
5158
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5160$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005161if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005162 $as_echo_n "(cached) " >&6
5163else
5164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5165/* end confdefs.h. */
5166
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005167# define __EXTENSIONS__ 1
5168 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005169int
5170main ()
5171{
5172
5173 ;
5174 return 0;
5175}
5176_ACEOF
5177if ac_fn_c_try_compile "$LINENO"; then :
5178 ac_cv_safe_to_define___extensions__=yes
5179else
5180 ac_cv_safe_to_define___extensions__=no
5181fi
5182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5183fi
5184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5185$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5186 test $ac_cv_safe_to_define___extensions__ = yes &&
5187 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5188
5189 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5190
5191 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5192
5193 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5194
5195 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5196
5197
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199# Check for unsupported systems
5200case $ac_sys_system/$ac_sys_release in
5201atheos*|Linux*/1*)
5202 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5203 echo See README for details.
5204 exit 1;;
5205esac
5206
5207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5209$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005210
5211# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005212if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213 withval=$with_suffix;
5214 case $withval in
5215 no) EXEEXT=;;
5216 yes) EXEEXT=.exe;;
5217 *) EXEEXT=$withval;;
5218 esac
5219fi
5220
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5222$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223
5224# Test whether we're running on a non-case-sensitive system, in which
5225# case we give a warning if no ext is given
5226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5228$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005229if test ! -d CaseSensitiveTestDir; then
5230mkdir CaseSensitiveTestDir
5231fi
5232
5233if test -d casesensitivetestdir
5234then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5236$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237 BUILDEXEEXT=.exe
5238else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005241 BUILDEXEEXT=$EXEEXT
5242fi
5243rmdir CaseSensitiveTestDir
5244
5245case $MACHDEP in
5246bsdos*)
5247 case $CC in
5248 gcc) CC="$CC -D_HAVE_BSDI";;
5249 esac;;
5250esac
5251
5252case $ac_sys_system in
5253hp*|HP*)
5254 case $CC in
5255 cc|*/cc) CC="$CC -Ae";;
5256 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005257SunOS*)
5258 # Some functions have a prototype only with that define, e.g. confstr
5259
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005260$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005261
5262 ;;
5263esac
5264
5265
5266
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5268$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005269if test -z "$LIBRARY"
5270then
5271 LIBRARY='libpython$(VERSION).a'
5272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5274$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275
5276# LDLIBRARY is the name of the library to link against (as opposed to the
5277# name of the library into which to insert object files). BLDLIBRARY is also
5278# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5279# is blank as the main program is not linked directly against LDLIBRARY.
5280# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5281# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5282# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5283# DLLLIBRARY is the shared (i.e., DLL) library.
5284#
5285# RUNSHARED is used to run shared python without installed libraries
5286#
5287# INSTSONAME is the name of the shared library that will be use to install
5288# on the system - some systems like version suffix, others don't
5289
5290
5291
5292
5293
5294
5295LDLIBRARY="$LIBRARY"
5296BLDLIBRARY='$(LDLIBRARY)'
5297INSTSONAME='$(LDLIBRARY)'
5298DLLLIBRARY=''
5299LDLIBRARYDIR=''
5300RUNSHARED=''
5301
5302# LINKCC is the command that links the python executable -- default is $(CC).
5303# If CXX is set, and if it is needed to link a main function that was
5304# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5305# python might then depend on the C++ runtime
5306# This is altered for AIX in order to build the export list before
5307# linking.
5308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5310$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005311if test -z "$LINKCC"
5312then
5313 LINKCC='$(PURIFY) $(MAINCC)'
5314 case $ac_sys_system in
5315 AIX*)
5316 exp_extra="\"\""
5317 if test $ac_sys_release -ge 5 -o \
5318 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5319 exp_extra="."
5320 fi
5321 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005322 QNX*)
5323 # qcc must be used because the other compilers do not
5324 # support -N.
5325 LINKCC=qcc;;
5326 esac
5327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5329$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330
5331# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5332# make sure we default having it set to "no": this is used by
5333# distutils.unixccompiler to know if it should add --enable-new-dtags
5334# to linker command lines, and failing to detect GNU ld simply results
5335# in the same bahaviour as before.
5336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5338$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339ac_prog=ld
5340if test "$GCC" = yes; then
5341 ac_prog=`$CC -print-prog-name=ld`
5342fi
5343case `"$ac_prog" -V 2>&1 < /dev/null` in
5344 *GNU*)
5345 GNULD=yes;;
5346 *)
5347 GNULD=no;;
5348esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5350$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5353$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005354# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005355if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005356 enableval=$enable_shared;
5357fi
5358
5359
5360if test -z "$enable_shared"
5361then
5362 case $ac_sys_system in
5363 CYGWIN* | atheos*)
5364 enable_shared="yes";;
5365 *)
5366 enable_shared="no";;
5367 esac
5368fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5370$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5373$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005375if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005376 enableval=$enable_profiling;
5377fi
5378
5379if test "x$enable_profiling" = xyes; then
5380 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005381 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383/* end confdefs.h. */
5384int main() { return 0; }
5385_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005386if ac_fn_c_try_link "$LINENO"; then :
5387
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005389 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005391rm -f core conftest.err conftest.$ac_objext \
5392 conftest$ac_exeext conftest.$ac_ext
5393 CC="$ac_save_cc"
5394else
5395 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5398$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005399
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005400if test "x$enable_profiling" = xyes; then
5401 BASECFLAGS="-pg $BASECFLAGS"
5402 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005403fi
5404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5406$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005407
5408# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5409# library that we build, but we do not want to link against it (we
5410# will find it with a -framework option). For this reason there is an
5411# extra variable BLDLIBRARY against which Python and the extension
5412# modules are linked, BLDLIBRARY. This is normally the same as
5413# LDLIBRARY, but empty for MacOSX framework builds.
5414if test "$enable_framework"
5415then
5416 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005417 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418 BLDLIBRARY=''
5419else
5420 BLDLIBRARY='$(LDLIBRARY)'
5421fi
5422
5423# Other platforms follow
5424if test $enable_shared = "yes"; then
5425
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005426$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005427
5428 case $ac_sys_system in
5429 BeOS*)
5430 LDLIBRARY='libpython$(VERSION).so'
5431 ;;
5432 CYGWIN*)
5433 LDLIBRARY='libpython$(VERSION).dll.a'
5434 DLLLIBRARY='libpython$(VERSION).dll'
5435 ;;
5436 SunOS*)
5437 LDLIBRARY='libpython$(VERSION).so'
5438 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005439 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005440 INSTSONAME="$LDLIBRARY".$SOVERSION
5441 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005442 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005443 LDLIBRARY='libpython$(VERSION).so'
5444 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005445 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005446 case $ac_sys_system in
5447 FreeBSD*)
5448 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5449 ;;
5450 esac
5451 INSTSONAME="$LDLIBRARY".$SOVERSION
5452 ;;
5453 hp*|HP*)
5454 case `uname -m` in
5455 ia64)
5456 LDLIBRARY='libpython$(VERSION).so'
5457 ;;
5458 *)
5459 LDLIBRARY='libpython$(VERSION).sl'
5460 ;;
5461 esac
5462 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005463 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 ;;
5465 OSF*)
5466 LDLIBRARY='libpython$(VERSION).so'
5467 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005468 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469 ;;
5470 atheos*)
5471 LDLIBRARY='libpython$(VERSION).so'
5472 BLDLIBRARY='-L. -lpython$(VERSION)'
5473 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5474 ;;
5475 Darwin*)
5476 LDLIBRARY='libpython$(VERSION).dylib'
5477 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005478 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005480 AIX*)
5481 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005482 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005483 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005484
5485 esac
5486else # shared is disabled
5487 case $ac_sys_system in
5488 CYGWIN*)
5489 BLDLIBRARY='$(LIBRARY)'
5490 LDLIBRARY='libpython$(VERSION).dll.a'
5491 ;;
5492 esac
5493fi
5494
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005495if test "$cross_compiling" = yes; then
5496 RUNSHARED=
5497fi
5498
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5500$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005501
5502if test -n "$ac_tool_prefix"; then
5503 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5504set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005507if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005508 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005509else
5510 if test -n "$RANLIB"; then
5511 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5512else
5513as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5514for as_dir in $PATH
5515do
5516 IFS=$as_save_IFS
5517 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005518 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005520 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005521 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005522 break 2
5523 fi
5524done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005525 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005526IFS=$as_save_IFS
5527
5528fi
5529fi
5530RANLIB=$ac_cv_prog_RANLIB
5531if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5533$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005537fi
5538
5539
5540fi
5541if test -z "$ac_cv_prog_RANLIB"; then
5542 ac_ct_RANLIB=$RANLIB
5543 # Extract the first word of "ranlib", so it can be a program name with args.
5544set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5546$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005547if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005548 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005549else
5550 if test -n "$ac_ct_RANLIB"; then
5551 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5552else
5553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5554for as_dir in $PATH
5555do
5556 IFS=$as_save_IFS
5557 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005558 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005559 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005560 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005561 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005562 break 2
5563 fi
5564done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005565 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005566IFS=$as_save_IFS
5567
5568fi
5569fi
5570ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5571if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5573$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5576$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005577fi
5578
5579 if test "x$ac_ct_RANLIB" = x; then
5580 RANLIB=":"
5581 else
5582 case $cross_compiling:$ac_tool_warned in
5583yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005584{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5585$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586ac_tool_warned=yes ;;
5587esac
5588 RANLIB=$ac_ct_RANLIB
5589 fi
5590else
5591 RANLIB="$ac_cv_prog_RANLIB"
5592fi
5593
5594
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005595if test -n "$ac_tool_prefix"; then
5596 for ac_prog in ar aal
5597 do
5598 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5599set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5601$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005602if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005604else
5605 if test -n "$AR"; then
5606 ac_cv_prog_AR="$AR" # Let the user override the test.
5607else
5608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5609for as_dir in $PATH
5610do
5611 IFS=$as_save_IFS
5612 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005613 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005615 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005617 break 2
5618 fi
5619done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005620 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005621IFS=$as_save_IFS
5622
5623fi
5624fi
5625AR=$ac_cv_prog_AR
5626if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5628$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5631$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005632fi
5633
5634
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005635 test -n "$AR" && break
5636 done
5637fi
5638if test -z "$AR"; then
5639 ac_ct_AR=$AR
5640 for ac_prog in ar aal
5641do
5642 # Extract the first word of "$ac_prog", so it can be a program name with args.
5643set dummy $ac_prog; ac_word=$2
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if ${ac_cv_prog_ac_ct_AR+:} false; then :
5647 $as_echo_n "(cached) " >&6
5648else
5649 if test -n "$ac_ct_AR"; then
5650 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5651else
5652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5653for as_dir in $PATH
5654do
5655 IFS=$as_save_IFS
5656 test -z "$as_dir" && as_dir=.
5657 for ac_exec_ext in '' $ac_executable_extensions; do
5658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5659 ac_cv_prog_ac_ct_AR="$ac_prog"
5660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5661 break 2
5662 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005663done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005664 done
5665IFS=$as_save_IFS
5666
5667fi
5668fi
5669ac_ct_AR=$ac_cv_prog_ac_ct_AR
5670if test -n "$ac_ct_AR"; then
5671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5672$as_echo "$ac_ct_AR" >&6; }
5673else
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
5676fi
5677
5678
5679 test -n "$ac_ct_AR" && break
5680done
5681
5682 if test "x$ac_ct_AR" = x; then
5683 AR="ar"
5684 else
5685 case $cross_compiling:$ac_tool_warned in
5686yes:)
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5688$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5689ac_tool_warned=yes ;;
5690esac
5691 AR=$ac_ct_AR
5692 fi
5693fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005694
5695
5696# tweak ARFLAGS only if the user didn't set it on the command line
5697
5698if test -z "$ARFLAGS"
5699then
5700 ARFLAGS="rc"
5701fi
5702
5703
5704# Extract the first word of "svnversion", so it can be a program name with args.
5705set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005708if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005709 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005710else
5711 if test -n "$SVNVERSION"; then
5712 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005719 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005721 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005723 break 2
5724 fi
5725done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005726 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727IFS=$as_save_IFS
5728
5729 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5730fi
5731fi
5732SVNVERSION=$ac_cv_prog_SVNVERSION
5733if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5735$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005736else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005739fi
5740
5741
5742if test $SVNVERSION = found
5743then
5744 SVNVERSION="svnversion \$(srcdir)"
5745else
5746 SVNVERSION="echo Unversioned directory"
5747fi
5748
Trent Nelsond86ceec2012-10-16 09:42:45 -04005749
Georg Brandl3a5508e2011-03-06 10:42:21 +01005750
5751
5752# Extract the first word of "hg", so it can be a program name with args.
5753set dummy hg; ac_word=$2
5754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005756if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005757 $as_echo_n "(cached) " >&6
5758else
5759 if test -n "$HAS_HG"; then
5760 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5761else
5762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5763for as_dir in $PATH
5764do
5765 IFS=$as_save_IFS
5766 test -z "$as_dir" && as_dir=.
5767 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005769 ac_cv_prog_HAS_HG="found"
5770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5771 break 2
5772 fi
5773done
5774 done
5775IFS=$as_save_IFS
5776
5777 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5778fi
5779fi
5780HAS_HG=$ac_cv_prog_HAS_HG
5781if test -n "$HAS_HG"; then
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5783$as_echo "$HAS_HG" >&6; }
5784else
5785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786$as_echo "no" >&6; }
5787fi
5788
5789
5790if test $HAS_HG = found
5791then
5792 HGVERSION="hg id -i \$(srcdir)"
5793 HGTAG="hg id -t \$(srcdir)"
5794 HGBRANCH="hg id -b \$(srcdir)"
5795else
5796 HGVERSION=""
5797 HGTAG=""
5798 HGBRANCH=""
5799fi
5800
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005801case $MACHDEP in
5802bsdos*|hp*|HP*)
5803 # install -d does not work on BSDI or HP-UX
5804 if test -z "$INSTALL"
5805 then
5806 INSTALL="${srcdir}/install-sh -c"
5807 fi
5808esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809# Find a good install program. We prefer a C program (faster),
5810# so one script is as good as another. But avoid the broken or
5811# incompatible versions:
5812# SysV /etc/install, /usr/sbin/install
5813# SunOS /usr/etc/install
5814# IRIX /sbin/install
5815# AIX /bin/install
5816# AmigaOS /C/install, which installs bootblocks on floppy discs
5817# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5818# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5819# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5820# OS/2's system install, which has a completely different semantic
5821# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822# Reject install programs that cannot install multiple files.
5823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5824$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005825if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005826if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005828else
5829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830for as_dir in $PATH
5831do
5832 IFS=$as_save_IFS
5833 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005834 # Account for people who put trailing slashes in PATH elements.
5835case $as_dir/ in #((
5836 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005837 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005838 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005839 /usr/ucb/* ) ;;
5840 *)
5841 # OSF1 and SCO ODT 3.0 have their own names for install.
5842 # Don't use installbsd from OSF since it installs stuff as root
5843 # by default.
5844 for ac_prog in ginstall scoinst install; do
5845 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005846 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005847 if test $ac_prog = install &&
5848 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5849 # AIX install. It has an incompatible calling convention.
5850 :
5851 elif test $ac_prog = install &&
5852 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5853 # program-specific install script used by HP pwplus--don't use.
5854 :
5855 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005856 rm -rf conftest.one conftest.two conftest.dir
5857 echo one > conftest.one
5858 echo two > conftest.two
5859 mkdir conftest.dir
5860 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5861 test -s conftest.one && test -s conftest.two &&
5862 test -s conftest.dir/conftest.one &&
5863 test -s conftest.dir/conftest.two
5864 then
5865 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5866 break 3
5867 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005868 fi
5869 fi
5870 done
5871 done
5872 ;;
5873esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005874
5875 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005876IFS=$as_save_IFS
5877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005878rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005879
5880fi
5881 if test "${ac_cv_path_install+set}" = set; then
5882 INSTALL=$ac_cv_path_install
5883 else
5884 # As a last resort, use the slow shell script. Don't cache a
5885 # value for INSTALL within a source directory, because that will
5886 # break other packages using the cache if that directory is
5887 # removed, or if the value is a relative name.
5888 INSTALL=$ac_install_sh
5889 fi
5890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5892$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005893
5894# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5895# It thinks the first close brace ends the variable substitution.
5896test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5897
5898test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5899
5900test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5901
Trent Nelsonf6407a12012-08-30 14:56:13 +00005902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5903$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5904if test -z "$MKDIR_P"; then
5905 if ${ac_cv_path_mkdir+:} false; then :
5906 $as_echo_n "(cached) " >&6
5907else
5908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5909for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5910do
5911 IFS=$as_save_IFS
5912 test -z "$as_dir" && as_dir=.
5913 for ac_prog in mkdir gmkdir; do
5914 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005915 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005916 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5917 'mkdir (GNU coreutils) '* | \
5918 'mkdir (coreutils) '* | \
5919 'mkdir (fileutils) '4.1*)
5920 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5921 break 3;;
5922 esac
5923 done
5924 done
5925 done
5926IFS=$as_save_IFS
5927
5928fi
5929
5930 test -d ./--version && rmdir ./--version
5931 if test "${ac_cv_path_mkdir+set}" = set; then
5932 MKDIR_P="$ac_cv_path_mkdir -p"
5933 else
5934 # As a last resort, use the slow shell script. Don't cache a
5935 # value for MKDIR_P within a source directory, because that will
5936 # break other packages using the cache if that directory is
5937 # removed, or if the value is a relative name.
5938 MKDIR_P="$ac_install_sh -d"
5939 fi
5940fi
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5942$as_echo "$MKDIR_P" >&6; }
5943
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005944
5945# Not every filesystem supports hard links
5946
5947if test -z "$LN" ; then
5948 case $ac_sys_system in
5949 BeOS*) LN="ln -s";;
5950 CYGWIN*) LN="ln -s";;
5951 atheos*) LN="ln -s";;
5952 *) LN=ln;;
5953 esac
5954fi
5955
5956# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5958$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005959
5960# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005961if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005962 withval=$with_pydebug;
5963if test "$withval" != no
5964then
5965
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005966$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5969$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005970 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005973fi
5974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977fi
5978
5979
5980# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5981# merged with this chunk of code?
5982
5983# Optimizer/debugger flags
5984# ------------------------
5985# (The following bit of code is complicated enough - please keep things
5986# indented properly. Just pretend you're editing Python code. ;-)
5987
5988# There are two parallel sets of case statements below, one that checks to
5989# see if OPT was set and one that does BASECFLAGS setting based upon
5990# compiler and platform. BASECFLAGS tweaks need to be made even if the
5991# user set OPT.
5992
5993# tweak OPT based on compiler and platform, only if the user didn't set
5994# it on the command line
5995
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005996if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005997then
5998 case $GCC in
5999 yes)
6000 if test "$CC" != 'g++' ; then
6001 STRICT_PROTO="-Wstrict-prototypes"
6002 fi
6003 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6004 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6005 WRAP="-fwrapv"
6006 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006007
6008 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006009 case $CC in
6010 *clang*) WRAP="-fwrapv"
6011 ;;
6012 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006013
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006014 case $ac_cv_prog_cc_g in
6015 yes)
6016 if test "$Py_DEBUG" = 'true' ; then
6017 # Optimization messes up debuggers, so turn it off for
6018 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006019 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006020 else
6021 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6022 fi
6023 ;;
6024 *)
6025 OPT="-O3 -Wall $STRICT_PROTO"
6026 ;;
6027 esac
6028 case $ac_sys_system in
6029 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6030 ;;
6031 esac
6032 ;;
6033
6034 *)
6035 OPT="-O"
6036 ;;
6037 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006038fi
6039
6040
6041
6042# The -arch flags for universal builds on OSX
6043UNIVERSAL_ARCH_FLAGS=
6044
6045
6046# tweak BASECFLAGS based on compiler and platform
6047case $GCC in
6048yes)
6049 # Python violates C99 rules, by casting between incompatible
6050 # pointer types. GCC may generate bad code as a result of that,
6051 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6053$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006054 ac_save_cc="$CC"
6055 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006056 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006057 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006058else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006060/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006061
6062int
6063main ()
6064{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006065
Gregory P. Smith373469a2009-11-01 21:03:38 +00006066 ;
6067 return 0;
6068}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006070if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006071 ac_cv_no_strict_aliasing_ok=yes
6072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006073 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006076fi
6077
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6080$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006081 if test $ac_cv_no_strict_aliasing_ok = yes
6082 then
6083 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6084 fi
6085
6086 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6087 # support. Without this, treatment of subnormals doesn't follow
6088 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006089 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006090 alpha*)
6091 BASECFLAGS="$BASECFLAGS -mieee"
6092 ;;
6093 esac
6094
6095 case $ac_sys_system in
6096 SCO_SV*)
6097 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6098 ;;
6099 # is there any other compiler on Darwin besides gcc?
6100 Darwin*)
6101 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6102 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006103 if test "${CC}" = gcc
6104 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6106$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006107 case "${UNIVERSALSDK}" in
6108 */MacOSX10.4u.sdk)
6109 # Build using 10.4 SDK, force usage of gcc when the
6110 # compiler is gcc, otherwise the user will get very
6111 # confusing error messages when building on OSX 10.6
6112 CC=gcc-4.0
6113 CPP=cpp-4.0
6114 ;;
6115 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6117$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006118 fi
6119
6120 # Calculate the right deployment target for this build.
6121 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006122 cur_target_major=`sw_vers -productVersion | \
6123 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6124 cur_target_minor=`sw_vers -productVersion | \
6125 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6126 cur_target="${cur_target_major}.${cur_target_minor}"
6127 if test ${cur_target_major} -eq 10 && \
6128 test ${cur_target_minor} -ge 3
6129 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006130 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006131 if test ${enable_universalsdk}; then
6132 if test "${UNIVERSAL_ARCHS}" = "all"; then
6133 # Ensure that the default platform for a
6134 # 4-way universal build is OSX 10.5,
6135 # that's the first OS release where
6136 # 4-way builds make sense.
6137 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006138
6139 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6140 cur_target='10.5'
6141
6142 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6143 cur_target='10.5'
6144
6145 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6146 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006147 fi
6148 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006149 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006150 # On Intel macs default to a deployment
6151 # target of 10.4, that's the first OSX
6152 # release with Intel support.
6153 cur_target="10.4"
6154 fi
6155 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006156 fi
6157 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6158
6159 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6160 # environment with a value that is the same as what we'll use
6161 # in the Makefile to ensure that we'll get the same compiler
6162 # environment during configure and build time.
6163 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6164 export MACOSX_DEPLOYMENT_TARGET
6165 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6166
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006167 if test "${enable_universalsdk}"; then
6168 UNIVERSAL_ARCH_FLAGS=""
6169 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6170 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6171 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006172 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006173
6174 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6175 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6176 LIPO_32BIT_FLAGS=""
6177 ARCH_RUN_32BIT="true"
6178
6179 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6180 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6181 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006182 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006183
6184 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6185 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6186 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006187 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006188
6189 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6190 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6191 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006192 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006193
6194 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006195 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 +00006196
6197 fi
6198
6199
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006200 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6201 if test "${UNIVERSALSDK}" != "/"
6202 then
6203 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6204 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6205 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006206 fi
6207
6208 fi
6209
6210
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006211 ;;
6212 OSF*)
6213 BASECFLAGS="$BASECFLAGS -mieee"
6214 ;;
6215 esac
6216 ;;
6217
6218*)
6219 case $ac_sys_system in
6220 OpenUNIX*|UnixWare*)
6221 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6222 ;;
6223 OSF*)
6224 BASECFLAGS="$BASECFLAGS -ieee -std"
6225 ;;
6226 SCO_SV*)
6227 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6228 ;;
6229 esac
6230 ;;
6231esac
6232
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006233# ICC needs -fp-model strict or floats behave badly
6234case "$CC" in
6235*icc*)
6236 BASECFLAGS="$BASECFLAGS -fp-model strict"
6237 ;;
6238esac
6239
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006240if test "$Py_DEBUG" = 'true'; then
6241 :
6242else
6243 OPT="-DNDEBUG $OPT"
6244fi
6245
6246if test "$ac_arch_flags"
6247then
6248 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6249fi
6250
6251# disable check for icc since it seems to pass, but generates a warning
6252if test "$CC" = icc
6253then
6254 ac_cv_opt_olimit_ok=no
6255fi
6256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6258$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006259if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006260 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006261else
6262 ac_save_cc="$CC"
6263CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006265/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006266
6267int
6268main ()
6269{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006270
Gregory P. Smith373469a2009-11-01 21:03:38 +00006271 ;
6272 return 0;
6273}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006275if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006276 ac_cv_opt_olimit_ok=yes
6277else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006278 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006279
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006282CC="$ac_save_cc"
6283fi
6284
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6286$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287if test $ac_cv_opt_olimit_ok = yes; then
6288 case $ac_sys_system in
6289 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6290 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6291 # environment?
6292 Darwin*)
6293 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006294 # XXX thankfully this useless troublemaker of a flag has been
6295 # eradicated in the 3.x line. For now, make sure it isn't picked
6296 # up by any of our other platforms that use CC.
6297 AIX*|SunOS*|HP-UX*|IRIX*)
6298 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006299 *)
6300 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6301 ;;
6302 esac
6303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6305$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006306 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006307 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308else
6309 ac_save_cc="$CC"
6310 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006313
6314int
6315main ()
6316{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006317
Gregory P. Smith373469a2009-11-01 21:03:38 +00006318 ;
6319 return 0;
6320}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006322if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006323 ac_cv_olimit_ok=yes
6324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006325 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006326
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006329 CC="$ac_save_cc"
6330fi
6331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6333$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006334 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006335 case $ac_sys_system in
6336 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6337 HP-UX*)
6338 ;;
6339 *)
6340 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6341 ;;
6342 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006343 fi
6344fi
6345
6346# Check whether GCC supports PyArg_ParseTuple format
6347if test "$GCC" = "yes"
6348then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6350$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006351 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006352 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006354/* end confdefs.h. */
6355
6356 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006357int
6358main ()
6359{
6360
6361 ;
6362 return 0;
6363}
Matthias Klosec511b472010-05-08 11:01:39 +00006364
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006366if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006367
Matthias Klosec511b472010-05-08 11:01:39 +00006368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006369$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006370
Matthias Klosec511b472010-05-08 11:01:39 +00006371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006372$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006373
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006374else
Matthias Klosec511b472010-05-08 11:01:39 +00006375
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006378
6379fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6381 CFLAGS=$save_CFLAGS
6382fi
6383
Brett Cannon4ff151a2015-09-18 15:09:42 -07006384
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006385# Enable optimization flags
6386
6387
6388Py_OPT='false'
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6390$as_echo_n "checking for --with-optimizations... " >&6; }
6391
6392# Check whether --with-optimizations was given.
6393if test "${with_optimizations+set}" = set; then :
6394 withval=$with_optimizations;
6395if test "$withval" != no
6396then
6397 Py_OPT='true'
6398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6399$as_echo "yes" >&6; };
6400else
6401 Py_OPT='false'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6403$as_echo "no" >&6; };
6404fi
6405else
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; }
6408fi
6409
6410if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)9cbfa792016-09-08 22:44:44 +00006411 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6412 # compile working code using it and both test_distutils and test_gdb are
6413 # broken when you do managed to get a toolchain that works with it. People
6414 # who want LTO need to use --with-lto themselves.
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006415 Py_LTO='true'
6416 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006417 REQUIRE_PGO="yes"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006418 DEF_MAKE_RULE="build_all"
6419else
6420 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006421 REQUIRE_PGO="no"
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006422 DEF_MAKE_RULE="all"
6423fi
6424
6425
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006426# Enable LTO flags
6427
6428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6429$as_echo_n "checking for --with-lto... " >&6; }
6430
6431# Check whether --with-lto was given.
6432if test "${with_lto+set}" = set; then :
6433 withval=$with_lto;
6434if test "$withval" != no
6435then
6436 Py_LTO='true'
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6438$as_echo "yes" >&6; };
6439else
6440 Py_LTO='false'
6441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6442$as_echo "no" >&6; };
6443fi
6444else
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }
6447fi
6448
6449if test "$Py_LTO" = 'true' ; then
6450 case $CC in
6451 *clang*)
6452 # Any changes made here should be reflected in the GCC+Darwin case below
6453 LTOFLAGS="-flto"
6454 ;;
6455 *gcc*)
6456 case $ac_sys_system in
6457 Darwin*)
6458 LTOFLAGS="-flto"
6459 ;;
6460 *)
6461 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6462 ;;
6463 esac
6464 ;;
6465 esac
6466fi
6467
6468
Brett Cannon4ff151a2015-09-18 15:09:42 -07006469# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006470
6471
6472
6473
6474
Gregory P. Smith794b2912016-09-08 00:07:40 -07006475# Make this work on systems where llvm tools are not installed with their
6476# normal names in the default $PATH (ie: Ubuntu). They exist under the
6477# non-suffixed name in their versioned llvm directory.
6478llvm_bin_dir=''
6479llvm_path="${PATH}"
6480if test "${CC}" = "clang"
6481then
6482 clang_bin=`which clang`
6483 # Some systems install clang elsewhere as a symlink to the real path
6484 # which is where the related llvm tools are located.
6485 if test -L "${clang_bin}"
6486 then
6487 clang_dir=`dirname "${clang_bin}"`
6488 clang_bin=`readlink "${clang_bin}"`
6489 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6490 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6491 fi
6492fi
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006493
Gregory P. Smith794b2912016-09-08 00:07:40 -07006494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6495$as_echo_n "checking target system type... " >&6; }
6496if ${ac_cv_target+:} false; then :
Brett Cannon4ff151a2015-09-18 15:09:42 -07006497 $as_echo_n "(cached) " >&6
6498else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006499 if test "x$target_alias" = x; then
6500 ac_cv_target=$ac_cv_host
Brett Cannon4ff151a2015-09-18 15:09:42 -07006501else
Gregory P. Smith794b2912016-09-08 00:07:40 -07006502 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6503 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6504fi
6505
6506fi
6507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6508$as_echo "$ac_cv_target" >&6; }
6509case $ac_cv_target in
6510*-*-*) ;;
6511*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6512esac
6513target=$ac_cv_target
6514ac_save_IFS=$IFS; IFS='-'
6515set x $ac_cv_target
6516shift
6517target_cpu=$1
6518target_vendor=$2
6519shift; shift
6520# Remember, the first character of IFS is used to create $*,
6521# except with old shells:
6522target_os=$*
6523IFS=$ac_save_IFS
6524case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6525
6526
6527# The aliases save the names the user supplied, while $host etc.
6528# will get canonicalized.
6529test -n "$target_alias" &&
6530 test "$program_prefix$program_suffix$program_transform_name" = \
6531 NONENONEs,x,x, &&
6532 program_prefix=${target_alias}-
6533# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6534set dummy $target_alias-llvm-profdata; ac_word=$2
6535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6536$as_echo_n "checking for $ac_word... " >&6; }
6537if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6538 $as_echo_n "(cached) " >&6
6539else
6540 case $LLVM_PROFDATA in
6541 [\\/]* | ?:[\\/]*)
6542 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6543 ;;
6544 *)
6545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6546for as_dir in ${llvm_path}
Brett Cannon4ff151a2015-09-18 15:09:42 -07006547do
6548 IFS=$as_save_IFS
6549 test -z "$as_dir" && as_dir=.
6550 for ac_exec_ext in '' $ac_executable_extensions; do
6551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith794b2912016-09-08 00:07:40 -07006552 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6554 break 2
6555 fi
6556done
6557 done
6558IFS=$as_save_IFS
6559
Gregory P. Smith794b2912016-09-08 00:07:40 -07006560 ;;
6561esac
Brett Cannon4ff151a2015-09-18 15:09:42 -07006562fi
Gregory P. Smith794b2912016-09-08 00:07:40 -07006563LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6564if test -n "$LLVM_PROFDATA"; then
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6566$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon4ff151a2015-09-18 15:09:42 -07006567else
6568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6569$as_echo "no" >&6; }
6570fi
6571
6572
Gregory P. Smith794b2912016-09-08 00:07:40 -07006573if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6574 if test "$build" = "$target"; then
6575 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6576 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6577set dummy llvm-profdata; ac_word=$2
6578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6579$as_echo_n "checking for $ac_word... " >&6; }
6580if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6581 $as_echo_n "(cached) " >&6
6582else
6583 case $ac_pt_LLVM_PROFDATA in
6584 [\\/]* | ?:[\\/]*)
6585 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6586 ;;
6587 *)
6588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6589for as_dir in ${llvm_path}
6590do
6591 IFS=$as_save_IFS
6592 test -z "$as_dir" && as_dir=.
6593 for ac_exec_ext in '' $ac_executable_extensions; do
6594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6595 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6597 break 2
6598 fi
6599done
6600 done
6601IFS=$as_save_IFS
6602
6603 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6604 ;;
6605esac
6606fi
6607ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6608if test -n "$ac_pt_LLVM_PROFDATA"; then
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6610$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6611else
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613$as_echo "no" >&6; }
6614fi
6615
6616 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6617 else
6618 LLVM_PROFDATA="''"
6619 fi
6620else
6621 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6622fi
6623
6624
6625if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6626then
6627 LLVM_PROF_FOUND="found"
6628else
6629 LLVM_PROF_FOUND="not-found"
6630fi
6631if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6632then
6633 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6634 if test -n "${found_llvm_profdata}"
6635 then
6636 # llvm-profdata isn't directly in $PATH in some cases.
6637 # https://apple.stackexchange.com/questions/197053/
6638 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6639 LLVM_PROF_FOUND=found
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6641$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6642 fi
6643fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006644LLVM_PROF_ERR=no
6645case $CC in
6646 *clang*)
6647 # Any changes made here should be reflected in the GCC+Darwin case below
6648 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6649 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006650 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006651 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6652 if test $LLVM_PROF_FOUND = not-found
6653 then
6654 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006655 if test "${REQUIRE_PGO}" = "yes"
6656 then
6657 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6658 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006659 fi
6660 ;;
6661 *gcc*)
6662 case $ac_sys_system in
6663 Darwin*)
6664 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6665 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith794b2912016-09-08 00:07:40 -07006666 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006667 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith794b2912016-09-08 00:07:40 -07006668 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon4ff151a2015-09-18 15:09:42 -07006669 then
6670 LLVM_PROF_ERR=yes
Gregory P. Smith794b2912016-09-08 00:07:40 -07006671 if test "${REQUIRE_PGO}" = "yes"
6672 then
6673 as_fn_error $? "llvm-profdata is required for a --with-optimizations build but could not be found." "$LINENO" 5
6674 fi
Brett Cannon4ff151a2015-09-18 15:09:42 -07006675 fi
6676 ;;
6677 *)
6678 PGO_PROF_GEN_FLAG="-fprofile-generate"
6679 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6680 LLVM_PROF_MERGER="true"
6681 LLVM_PROF_FILE=""
6682 ;;
6683 esac
6684 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006685 *icc*)
6686 PGO_PROF_GEN_FLAG="-prof-gen"
6687 PGO_PROF_USE_FLAG="-prof-use"
6688 LLVM_PROF_MERGER="true"
6689 LLVM_PROF_FILE=""
6690 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006691esac
6692
6693
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006694# On some compilers, pthreads are available without further options
6695# (e.g. MacOS X). On some of these systems, the compiler will not
6696# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6697# So we have to see first whether pthreads are available without
6698# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6700$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006701if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006702 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006705 ac_cv_pthread_is_default=no
6706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006708/* end confdefs.h. */
6709
Stefan Krahae66ca62012-11-22 22:36:57 +01006710#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006711#include <pthread.h>
6712
6713void* routine(void* p){return NULL;}
6714
6715int main(){
6716 pthread_t p;
6717 if(pthread_create(&p,NULL,routine,NULL)!=0)
6718 return 1;
6719 (void)pthread_detach(p);
6720 return 0;
6721}
6722
6723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725
6726 ac_cv_pthread_is_default=yes
6727 ac_cv_kthread=no
6728 ac_cv_pthread=no
6729
6730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006735fi
6736
6737
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006738fi
6739
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6741$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742
6743
6744if test $ac_cv_pthread_is_default = yes
6745then
6746 ac_cv_kpthread=no
6747else
6748# -Kpthread, if available, provides the right #defines
6749# and linker options to make pthread_create available
6750# Some compilers won't report that they do not support -Kpthread,
6751# so we need to run a program to see whether it really made the
6752# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6754$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006755if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006757else
6758 ac_save_cc="$CC"
6759CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006760if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006761 ac_cv_kpthread=no
6762else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006764/* end confdefs.h. */
6765
Stefan Krahae66ca62012-11-22 22:36:57 +01006766#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006767#include <pthread.h>
6768
6769void* routine(void* p){return NULL;}
6770
6771int main(){
6772 pthread_t p;
6773 if(pthread_create(&p,NULL,routine,NULL)!=0)
6774 return 1;
6775 (void)pthread_detach(p);
6776 return 0;
6777}
6778
6779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006780if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006781 ac_cv_kpthread=yes
6782else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006783 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6786 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006787fi
6788
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006789CC="$ac_save_cc"
6790fi
6791
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6793$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006794fi
6795
6796if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6797then
6798# -Kthread, if available, provides the right #defines
6799# and linker options to make pthread_create available
6800# Some compilers won't report that they do not support -Kthread,
6801# so we need to run a program to see whether it really made the
6802# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6804$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006805if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006806 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006807else
6808 ac_save_cc="$CC"
6809CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006811 ac_cv_kthread=no
6812else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006814/* end confdefs.h. */
6815
Stefan Krahae66ca62012-11-22 22:36:57 +01006816#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006817#include <pthread.h>
6818
6819void* routine(void* p){return NULL;}
6820
6821int main(){
6822 pthread_t p;
6823 if(pthread_create(&p,NULL,routine,NULL)!=0)
6824 return 1;
6825 (void)pthread_detach(p);
6826 return 0;
6827}
6828
6829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831 ac_cv_kthread=yes
6832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006835rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6836 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006837fi
6838
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006839CC="$ac_save_cc"
6840fi
6841
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6843$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006844fi
6845
6846if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6847then
6848# -pthread, if available, provides the right #defines
6849# and linker options to make pthread_create available
6850# Some compilers won't report that they do not support -pthread,
6851# so we need to run a program to see whether it really made the
6852# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6854$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006855if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006857else
6858 ac_save_cc="$CC"
6859CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006861 ac_cv_pthread=no
6862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864/* end confdefs.h. */
6865
Stefan Krahae66ca62012-11-22 22:36:57 +01006866#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867#include <pthread.h>
6868
6869void* routine(void* p){return NULL;}
6870
6871int main(){
6872 pthread_t p;
6873 if(pthread_create(&p,NULL,routine,NULL)!=0)
6874 return 1;
6875 (void)pthread_detach(p);
6876 return 0;
6877}
6878
6879_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006881 ac_cv_pthread=yes
6882else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006883 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006887fi
6888
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006889CC="$ac_save_cc"
6890fi
6891
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6893$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006894fi
6895
6896# If we have set a CC compiler flag for thread support then
6897# check if it works for CXX, too.
6898ac_cv_cxx_thread=no
6899if test ! -z "$CXX"
6900then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6902$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006903ac_save_cxx="$CXX"
6904
6905if test "$ac_cv_kpthread" = "yes"
6906then
6907 CXX="$CXX -Kpthread"
6908 ac_cv_cxx_thread=yes
6909elif test "$ac_cv_kthread" = "yes"
6910then
6911 CXX="$CXX -Kthread"
6912 ac_cv_cxx_thread=yes
6913elif test "$ac_cv_pthread" = "yes"
6914then
6915 CXX="$CXX -pthread"
6916 ac_cv_cxx_thread=yes
6917fi
6918
6919if test $ac_cv_cxx_thread = yes
6920then
6921 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6922 $CXX -c conftest.$ac_ext 2>&5
6923 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6924 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6925 then
6926 ac_cv_cxx_thread=yes
6927 else
6928 ac_cv_cxx_thread=no
6929 fi
6930 rm -fr conftest*
6931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6933$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006934fi
6935CXX="$ac_save_cxx"
6936
6937
6938# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6940$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006941if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006942 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006945/* end confdefs.h. */
6946#include <stdlib.h>
6947#include <stdarg.h>
6948#include <string.h>
6949#include <float.h>
6950
6951int
6952main ()
6953{
6954
6955 ;
6956 return 0;
6957}
6958_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006959if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006960 ac_cv_header_stdc=yes
6961else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006962 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006963fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6965
6966if test $ac_cv_header_stdc = yes; then
6967 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006969/* end confdefs.h. */
6970#include <string.h>
6971
6972_ACEOF
6973if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974 $EGREP "memchr" >/dev/null 2>&1; then :
6975
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006976else
6977 ac_cv_header_stdc=no
6978fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006979rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006980
6981fi
6982
6983if test $ac_cv_header_stdc = yes; then
6984 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006986/* end confdefs.h. */
6987#include <stdlib.h>
6988
6989_ACEOF
6990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991 $EGREP "free" >/dev/null 2>&1; then :
6992
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006993else
6994 ac_cv_header_stdc=no
6995fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006996rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006997
6998fi
6999
7000if test $ac_cv_header_stdc = yes; then
7001 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007002 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007003 :
7004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007006/* end confdefs.h. */
7007#include <ctype.h>
7008#include <stdlib.h>
7009#if ((' ' & 0x0FF) == 0x020)
7010# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7011# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7012#else
7013# define ISLOWER(c) \
7014 (('a' <= (c) && (c) <= 'i') \
7015 || ('j' <= (c) && (c) <= 'r') \
7016 || ('s' <= (c) && (c) <= 'z'))
7017# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7018#endif
7019
7020#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7021int
7022main ()
7023{
7024 int i;
7025 for (i = 0; i < 256; i++)
7026 if (XOR (islower (i), ISLOWER (i))
7027 || toupper (i) != TOUPPER (i))
7028 return 2;
7029 return 0;
7030}
7031_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007032if ac_fn_c_try_run "$LINENO"; then :
7033
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007035 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7038 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007039fi
7040
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007041fi
7042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7044$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007045if test $ac_cv_header_stdc = yes; then
7046
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007047$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007048
7049fi
7050
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007051for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007052fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02007053ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00007054shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007055unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00007056sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
7057sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007058sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00007059sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00007060sys/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 +00007061sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02007062bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007063do :
7064 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7065ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007066if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007067 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007068#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007069_ACEOF
7070
7071fi
7072
Guido van Rossum627b2d71993-12-24 10:39:16 +00007073done
7074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007075ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007076for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7079$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007080if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007081 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007084/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007085#include <sys/types.h>
7086#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088int
7089main ()
7090{
7091if ((DIR *) 0)
7092return 0;
7093 ;
7094 return 0;
7095}
7096_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104eval ac_res=\$$as_ac_Header
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7106$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007107if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007109#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007110_ACEOF
7111
7112ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007113fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007114
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007115done
7116# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7117if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7119$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007120if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007122else
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
Martin v. Löwiseba40652007-08-30 20:10:57 +00007127/* Override any GCC internal prototype to avoid an error.
7128 Use char because int might match the return type of a GCC
7129 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007130#ifdef __cplusplus
7131extern "C"
7132#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007133char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007134int
7135main ()
7136{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007137return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007138 ;
7139 return 0;
7140}
7141_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007142for ac_lib in '' dir; do
7143 if test -z "$ac_lib"; then
7144 ac_res="none required"
7145 else
7146 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007147 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007148 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007149 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007150 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152rm -f core conftest.err conftest.$ac_objext \
7153 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007154 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007155 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007157done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007158if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007159
Martin v. Löwiseba40652007-08-30 20:10:57 +00007160else
7161 ac_cv_search_opendir=no
7162fi
7163rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007164LIBS=$ac_func_search_save_LIBS
7165fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7167$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007168ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007172fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007173
Michael W. Hudson54241132001-12-07 15:38:26 +00007174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7176$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007177if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007178 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007179else
7180 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007182/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007183
Martin v. Löwiseba40652007-08-30 20:10:57 +00007184/* Override any GCC internal prototype to avoid an error.
7185 Use char because int might match the return type of a GCC
7186 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007187#ifdef __cplusplus
7188extern "C"
7189#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007190char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007191int
7192main ()
7193{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007195 ;
7196 return 0;
7197}
7198_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199for ac_lib in '' x; do
7200 if test -z "$ac_lib"; then
7201 ac_res="none required"
7202 else
7203 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007204 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007205 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007206 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007207 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007208fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209rm -f core conftest.err conftest.$ac_objext \
7210 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007211 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007215if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007216
Martin v. Löwiseba40652007-08-30 20:10:57 +00007217else
7218 ac_cv_search_opendir=no
7219fi
7220rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007221LIBS=$ac_func_search_save_LIBS
7222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7224$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007225ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007226if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007229fi
7230
7231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007232
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7234$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007235if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007236 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007237else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007239/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007240#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007241int
7242main ()
7243{
7244return makedev(0, 0);
7245 ;
7246 return 0;
7247}
7248_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007250 ac_cv_header_sys_types_h_makedev=yes
7251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254rm -f core conftest.err conftest.$ac_objext \
7255 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007256
7257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7259$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007260
7261if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262ac_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 +01007263if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007264
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007265$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007266
7267fi
7268
7269
7270
7271 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272 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 +01007273if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007274
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007275$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007276
7277fi
7278
7279
7280 fi
7281fi
7282
Michael W. Hudson54241132001-12-07 15:38:26 +00007283
Martin v. Löwis11017b12006-01-14 18:12:57 +00007284# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007285for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007286do :
7287 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 +00007288#ifdef HAVE_ASM_TYPES_H
7289#include <asm/types.h>
7290#endif
7291#ifdef HAVE_SYS_SOCKET_H
7292#include <sys/socket.h>
7293#endif
7294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007296if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007297 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007298#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007299_ACEOF
7300
7301fi
7302
7303done
7304
7305
Guido van Rossum627b2d71993-12-24 10:39:16 +00007306# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007307was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7309$as_echo_n "checking for clock_t in time.h... " >&6; }
7310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007311/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007312#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007313
7314_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007316 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007317 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007318else
Martin v. Löwis11437992002-04-12 09:54:03 +00007319
7320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007322
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007323
Guido van Rossum627b2d71993-12-24 10:39:16 +00007324fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007325rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7328$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007329
Neal Norwitz11690112002-07-30 01:08:28 +00007330# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7332$as_echo_n "checking for makedev... " >&6; }
7333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007334/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007335
7336#if defined(MAJOR_IN_MKDEV)
7337#include <sys/mkdev.h>
7338#elif defined(MAJOR_IN_SYSMACROS)
7339#include <sys/sysmacros.h>
7340#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007341#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007342#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007343int
7344main ()
7345{
7346 makedev(0, 0)
7347 ;
7348 return 0;
7349}
7350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007352 ac_cv_has_makedev=yes
7353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007354 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007355fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356rm -f core conftest.err conftest.$ac_objext \
7357 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007358if test "$ac_cv_has_makedev" = "no"; then
7359 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007361/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007362
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007363#define _OSF_SOURCE 1
7364#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007365
Neal Norwitz11690112002-07-30 01:08:28 +00007366int
7367main ()
7368{
7369 makedev(0, 0)
7370 ;
7371 return 0;
7372}
7373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007374if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007375 ac_cv_has_makedev=yes
7376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007377 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007379rm -f core conftest.err conftest.$ac_objext \
7380 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007381 if test "$ac_cv_has_makedev" = "yes"; then
7382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007384
7385 fi
7386fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7388$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007389if test "$ac_cv_has_makedev" = "yes"; then
7390
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007391$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007392
7393fi
7394
Martin v. Löwis399a6892002-10-04 10:22:02 +00007395# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7396# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7397# defined, but the compiler does not support pragma redefine_extname,
7398# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7399# structures (such as rlimit64) without declaring them. As a
7400# work-around, disable LFS on such configurations
7401
7402use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7404$as_echo_n "checking Solaris LFS bug... " >&6; }
7405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007406/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007407
7408#define _LARGEFILE_SOURCE 1
7409#define _FILE_OFFSET_BITS 64
7410#include <sys/resource.h>
7411
Martin v. Löwis399a6892002-10-04 10:22:02 +00007412int
7413main ()
7414{
7415struct rlimit foo;
7416 ;
7417 return 0;
7418}
7419_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007421 sol_lfs_bug=no
7422else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7427$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007428if test "$sol_lfs_bug" = "yes"; then
7429 use_lfs=no
7430fi
7431
7432if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007433# Two defines needed to enable largefile support on various platforms
7434# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007435case $ac_sys_system/$ac_sys_release in
7436AIX*)
7437
7438$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7439
7440 ;;
7441esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007442
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007443$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007444
7445
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007446$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007447
Martin v. Löwis399a6892002-10-04 10:22:02 +00007448fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007449
Guido van Rossum84e7b241996-08-19 21:59:00 +00007450# Add some code to confdefs.h so that the test for off_t works on SCO
7451cat >> confdefs.h <<\EOF
7452#if defined(SCO_DS)
7453#undef _OFF_T
7454#endif
7455EOF
7456
Guido van Rossumef2255b2000-03-10 22:30:29 +00007457# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007458ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007459if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007461else
Martin v. Löwis11437992002-04-12 09:54:03 +00007462
7463cat >>confdefs.h <<_ACEOF
7464#define mode_t int
7465_ACEOF
7466
7467fi
7468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007470if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007471
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007472else
Martin v. Löwis11437992002-04-12 09:54:03 +00007473
7474cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007475#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007476_ACEOF
7477
7478fi
7479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007480ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007481if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007482
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007483else
Martin v. Löwis11437992002-04-12 09:54:03 +00007484
7485cat >>confdefs.h <<_ACEOF
7486#define pid_t int
7487_ACEOF
7488
7489fi
7490
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007491
Martin v. Löwis11437992002-04-12 09:54:03 +00007492cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007493#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007494_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007495
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007496ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007497if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007498
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007499else
Martin v. Löwis11437992002-04-12 09:54:03 +00007500
7501cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007502#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007503_ACEOF
7504
7505fi
7506
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7508$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007509if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007510 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007513/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007514#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007515
7516_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007519 ac_cv_type_uid_t=yes
7520else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007521 ac_cv_type_uid_t=no
7522fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007523rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007525fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7527$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007528if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007530$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007531
7532
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534
7535fi
7536
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007537
7538# There are two separate checks for each of the exact-width integer types we
7539# need. First we check whether the type is available using the usual
7540# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7541# and <stdint.h> where available). We then also use the special type checks of
7542# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7543# directly, #define's uint32_t to be a suitable type.
7544
7545ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7546if test "x$ac_cv_type_uint32_t" = xyes; then :
7547
7548$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7549
7550fi
7551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7553case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007554 no|yes) ;; #(
7555 *)
7556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007557$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007558
7559
7560cat >>confdefs.h <<_ACEOF
7561#define uint32_t $ac_cv_c_uint32_t
7562_ACEOF
7563;;
7564 esac
7565
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007566
7567ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7568if test "x$ac_cv_type_uint64_t" = xyes; then :
7569
7570$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7571
7572fi
7573
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7575case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007576 no|yes) ;; #(
7577 *)
7578
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007579$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007580
7581
7582cat >>confdefs.h <<_ACEOF
7583#define uint64_t $ac_cv_c_uint64_t
7584_ACEOF
7585;;
7586 esac
7587
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007588
7589ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7590if test "x$ac_cv_type_int32_t" = xyes; then :
7591
7592$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7593
7594fi
7595
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007596ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7597case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007598 no|yes) ;; #(
7599 *)
7600
7601cat >>confdefs.h <<_ACEOF
7602#define int32_t $ac_cv_c_int32_t
7603_ACEOF
7604;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007605esac
7606
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007607
7608ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7609if test "x$ac_cv_type_int64_t" = xyes; then :
7610
7611$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7612
7613fi
7614
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007615ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7616case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007617 no|yes) ;; #(
7618 *)
7619
7620cat >>confdefs.h <<_ACEOF
7621#define int64_t $ac_cv_c_int64_t
7622_ACEOF
7623;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007624esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007625
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007627ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007628if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007629
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007631
7632fi
7633
Jack Jansendd19cf82001-12-06 22:36:17 +00007634
Michael W. Hudson54241132001-12-07 15:38:26 +00007635# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007636# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007637# The cast to long int works around a bug in the HP C Compiler
7638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7640# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7642$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007643if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007646 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 +00007647
Martin v. Löwis11437992002-04-12 09:54:03 +00007648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007649 if test "$ac_cv_type_int" = yes; then
7650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007652as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007653See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007654 else
7655 ac_cv_sizeof_int=0
7656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007657fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7661$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007662
7663
7664
Martin v. Löwis11437992002-04-12 09:54:03 +00007665cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007666#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007668
7669
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670# The cast to long int works around a bug in the HP C Compiler
7671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7673# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7675$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007676if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007679 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 +00007680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007682 if test "$ac_cv_type_long" = yes; then
7683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007685as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007686See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007687 else
7688 ac_cv_sizeof_long=0
7689 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7694$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007695
7696
7697
Martin v. Löwis11437992002-04-12 09:54:03 +00007698cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007699#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007700_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007701
7702
Martin v. Löwiseba40652007-08-30 20:10:57 +00007703# The cast to long int works around a bug in the HP C Compiler
7704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7706# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7708$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007709if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007711else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007712 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 +00007713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007715 if test "$ac_cv_type_void_p" = yes; then
7716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007718as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007719See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007720 else
7721 ac_cv_sizeof_void_p=0
7722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007723fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007724
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7727$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728
7729
7730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007732#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007733_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007734
7735
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736# The cast to long int works around a bug in the HP C Compiler
7737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7739# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7741$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007742if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007745 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 +00007746
Martin v. Löwis11437992002-04-12 09:54:03 +00007747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007748 if test "$ac_cv_type_short" = yes; then
7749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007751as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007752See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753 else
7754 ac_cv_sizeof_short=0
7755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007757
Martin v. Löwis11437992002-04-12 09:54:03 +00007758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7760$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761
7762
7763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007765#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007766_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007767
7768
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769# The cast to long int works around a bug in the HP C Compiler
7770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7772# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7774$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007775if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007778 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 +00007779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781 if test "$ac_cv_type_float" = yes; then
7782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007784as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007785See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786 else
7787 ac_cv_sizeof_float=0
7788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790
Martin v. Löwis11437992002-04-12 09:54:03 +00007791fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7793$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794
7795
7796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007798#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007799_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007800
7801
Martin v. Löwiseba40652007-08-30 20:10:57 +00007802# The cast to long int works around a bug in the HP C Compiler
7803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7805# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7807$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007808if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007811 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 +00007812
Martin v. Löwis11437992002-04-12 09:54:03 +00007813else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007814 if test "$ac_cv_type_double" = yes; then
7815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007817as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007818See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 else
7820 ac_cv_sizeof_double=0
7821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007822fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823
Martin v. Löwis11437992002-04-12 09:54:03 +00007824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7826$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007827
7828
7829
Martin v. Löwis11437992002-04-12 09:54:03 +00007830cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007831#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007832_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007833
7834
Martin v. Löwiseba40652007-08-30 20:10:57 +00007835# The cast to long int works around a bug in the HP C Compiler
7836# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7837# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7838# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7840$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007841if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844 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 +00007845
Martin v. Löwis11437992002-04-12 09:54:03 +00007846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007847 if test "$ac_cv_type_fpos_t" = yes; then
7848 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007850as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007851See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007852 else
7853 ac_cv_sizeof_fpos_t=0
7854 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856
Martin v. Löwis11437992002-04-12 09:54:03 +00007857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7859$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860
7861
7862
Martin v. Löwis11437992002-04-12 09:54:03 +00007863cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007864#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007865_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007866
Michael W. Hudson54241132001-12-07 15:38:26 +00007867
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868# The cast to long int works around a bug in the HP C Compiler
7869# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7870# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7871# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7873$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007874if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007875 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007876else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007877 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 +00007878
Martin v. Löwis18e16552006-02-15 17:27:45 +00007879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880 if test "$ac_cv_type_size_t" = yes; then
7881 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007883as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885 else
7886 ac_cv_sizeof_size_t=0
7887 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007888fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007889
Martin v. Löwis18e16552006-02-15 17:27:45 +00007890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7892$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893
7894
7895
Martin v. Löwis18e16552006-02-15 17:27:45 +00007896cat >>confdefs.h <<_ACEOF
7897#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7898_ACEOF
7899
7900
Christian Heimes951cc0f2008-01-31 23:08:23 +00007901# The cast to long int works around a bug in the HP C Compiler
7902# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7903# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7904# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7906$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007907if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007908 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007910 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 +00007911
Christian Heimes951cc0f2008-01-31 23:08:23 +00007912else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007913 if test "$ac_cv_type_pid_t" = yes; then
7914 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7915$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007916as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007917See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007918 else
7919 ac_cv_sizeof_pid_t=0
7920 fi
7921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007922
Christian Heimes951cc0f2008-01-31 23:08:23 +00007923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7925$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007926
7927
7928
7929cat >>confdefs.h <<_ACEOF
7930#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7931_ACEOF
7932
7933
Michael W. Hudson54241132001-12-07 15:38:26 +00007934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7936$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007937have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007939/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007940
Martin v. Löwis11437992002-04-12 09:54:03 +00007941int
7942main ()
7943{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007944long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007945 ;
7946 return 0;
7947}
7948_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007950
7951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007952$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007953
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007954 have_long_long=yes
7955
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7959$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007960if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961# The cast to long int works around a bug in the HP C Compiler
7962# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7963# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7964# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7966$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007967if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007968 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007969else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007970 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 +00007971
Martin v. Löwis11437992002-04-12 09:54:03 +00007972else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007973 if test "$ac_cv_type_long_long" = yes; then
7974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007976as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007977See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007978 else
7979 ac_cv_sizeof_long_long=0
7980 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007982
Martin v. Löwis11437992002-04-12 09:54:03 +00007983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7985$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986
7987
7988
Martin v. Löwis11437992002-04-12 09:54:03 +00007989cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007990#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007991_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007992
Michael W. Hudson54241132001-12-07 15:38:26 +00007993
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007994fi
7995
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7997$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007998have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008000/* end confdefs.h. */
8001
8002int
8003main ()
8004{
Matthias Klosec511b472010-05-08 11:01:39 +00008005long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008006 ;
8007 return 0;
8008}
8009_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008010if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008011
8012
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008013$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008014
8015 have_long_double=yes
8016
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008017fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8020$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008021if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008022# The cast to long int works around a bug in the HP C Compiler
8023# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8024# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8025# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8027$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008028if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008029 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031 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 +00008032
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008034 if test "$ac_cv_type_long_double" = yes; then
8035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008037as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008038See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008039 else
8040 ac_cv_sizeof_long_double=0
8041 fi
8042fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8046$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00008047
8048
8049
8050cat >>confdefs.h <<_ACEOF
8051#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8052_ACEOF
8053
8054
8055fi
8056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8058$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008059have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008061/* end confdefs.h. */
8062
8063int
8064main ()
8065{
8066_Bool x; x = (_Bool)0;
8067 ;
8068 return 0;
8069}
8070_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008072
8073
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008074$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008075
8076 have_c99_bool=yes
8077
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8081$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008082if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083# The cast to long int works around a bug in the HP C Compiler
8084# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8085# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8086# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8088$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008089if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008092 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 +00008093
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008095 if test "$ac_cv_type__Bool" = yes; then
8096 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008098as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008099See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008100 else
8101 ac_cv_sizeof__Bool=0
8102 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008103fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8107$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008108
8109
8110
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00008111cat >>confdefs.h <<_ACEOF
8112#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8113_ACEOF
8114
8115
8116fi
8117
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118ac_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 +00008119 #include <stdint.h>
8120 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00008121 #ifdef HAVE_INTTYPES_H
8122 #include <inttypes.h>
8123 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008124"
Matthias Klose3cef2a92012-03-14 23:39:33 +01008125if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00008126
8127cat >>confdefs.h <<_ACEOF
8128#define HAVE_UINTPTR_T 1
8129_ACEOF
8130
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131# The cast to long int works around a bug in the HP C Compiler
8132# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8133# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8134# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8136$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008137if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008138 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140 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 +00008141
Martin v. Löwis11437992002-04-12 09:54:03 +00008142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143 if test "$ac_cv_type_uintptr_t" = yes; then
8144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008146as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008147See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148 else
8149 ac_cv_sizeof_uintptr_t=0
8150 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152
Martin v. Löwis11437992002-04-12 09:54:03 +00008153fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8155$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156
8157
8158
Martin v. Löwis11437992002-04-12 09:54:03 +00008159cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008160#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008161_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008162
Michael W. Hudson54241132001-12-07 15:38:26 +00008163
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008164fi
8165
Martin v. Löwisebe26702006-10-02 14:55:51 +00008166
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008167# The cast to long int works around a bug in the HP C Compiler
8168# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8169# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8170# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8172$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008173if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008174 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008175else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008176 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008177#ifdef HAVE_SYS_TYPES_H
8178#include <sys/types.h>
8179#endif
8180
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008181"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008182
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008184 if test "$ac_cv_type_off_t" = yes; then
8185 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8186$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008187as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008188See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008189 else
8190 ac_cv_sizeof_off_t=0
8191 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008192fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008193
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008194fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8196$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008197
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008198
8199
Martin v. Löwis11437992002-04-12 09:54:03 +00008200cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008201#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008202_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008203
Michael W. Hudson54241132001-12-07 15:38:26 +00008204
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008205
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8207$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008208if test "$have_long_long" = yes
8209then
8210if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008211 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008212
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008213$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008214
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8216$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8219$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008220fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008221else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008224fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008225
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008226# The cast to long int works around a bug in the HP C Compiler
8227# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8228# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8229# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8231$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008232if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008233 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008236#ifdef HAVE_SYS_TYPES_H
8237#include <sys/types.h>
8238#endif
8239#ifdef HAVE_TIME_H
8240#include <time.h>
8241#endif
8242
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008243"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008244
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008246 if test "$ac_cv_type_time_t" = yes; then
8247 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008249as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008250See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008251 else
8252 ac_cv_sizeof_time_t=0
8253 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008254fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008255
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008256fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8258$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008260
8261
Martin v. Löwis11437992002-04-12 09:54:03 +00008262cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008263#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008264_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008265
Michael W. Hudson54241132001-12-07 15:38:26 +00008266
8267
Trent Mick635f6fb2000-08-23 21:33:05 +00008268# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008269ac_save_cc="$CC"
8270if test "$ac_cv_kpthread" = "yes"
8271then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008272elif test "$ac_cv_kthread" = "yes"
8273then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008274elif test "$ac_cv_pthread" = "yes"
8275then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008276fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8278$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008279have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008281/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008282
8283 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008284int
8285main ()
8286{
Guido van Rossum12580492000-09-24 16:47:19 +00008287pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008288 ;
8289 return 0;
8290}
Matthias Klosec511b472010-05-08 11:01:39 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008294 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8298$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008299if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8303# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8305$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008306if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008307 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008309 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008310#ifdef HAVE_PTHREAD_H
8311#include <pthread.h>
8312#endif
8313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008314"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008315
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008316else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008317 if test "$ac_cv_type_pthread_t" = yes; then
8318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8319$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008320as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008321See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008322 else
8323 ac_cv_sizeof_pthread_t=0
8324 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008325fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008326
Trent Mick635f6fb2000-08-23 21:33:05 +00008327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8329$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008330
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008331
8332
Martin v. Löwis11437992002-04-12 09:54:03 +00008333cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008334#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008335_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008336
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008337
Trent Mick635f6fb2000-08-23 21:33:05 +00008338fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008339CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8342$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008343# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008344if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345 enableval=$enable_toolbox_glue;
8346fi
Jack Jansene578a632001-08-15 01:27:14 +00008347
8348
8349if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008350then
Jack Jansene578a632001-08-15 01:27:14 +00008351 case $ac_sys_system/$ac_sys_release in
8352 Darwin/*)
8353 enable_toolbox_glue="yes";;
8354 *)
8355 enable_toolbox_glue="no";;
8356 esac
8357fi
8358case "$enable_toolbox_glue" in
8359yes)
Jack Jansene578a632001-08-15 01:27:14 +00008360 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008361 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008364
8365 ;;
8366*)
Jack Jansene578a632001-08-15 01:27:14 +00008367 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008368 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008369 ;;
8370esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8372$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008373
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008374
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008375
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008376case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008377 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008378 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8379 ;;
8380 Darwin/*)
8381 OTHER_LIBTOOL_OPT=""
8382 ;;
8383esac
8384
8385
Ronald Oussoren25967582009-09-06 10:00:26 +00008386
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008387case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008388 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008389 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8390 if test "${enable_universalsdk}"; then
8391 :
8392 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008393 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008394 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008395 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008396 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008397 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008398 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008399 if test ${gcc_version} '<' 4.0
8400 then
8401 LIBTOOL_CRUFT="-lcc_dynamic"
8402 else
8403 LIBTOOL_CRUFT=""
8404 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008405 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008406 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008409/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008410
Ronald Oussoren25967582009-09-06 10:00:26 +00008411 #include <unistd.h>
8412 int main(int argc, char*argv[])
8413 {
8414 if (sizeof(long) == 4) {
8415 return 0;
8416 } else {
8417 return 1;
8418 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008419 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008420
Ronald Oussoren25967582009-09-06 10:00:26 +00008421_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008422if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008423 ac_osx_32bit=yes
8424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008425 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008426fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008427rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8428 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008429fi
8430
8431
Ronald Oussoren25967582009-09-06 10:00:26 +00008432 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008433 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008434 i386)
8435 MACOSX_DEFAULT_ARCH="i386"
8436 ;;
8437 ppc)
8438 MACOSX_DEFAULT_ARCH="ppc"
8439 ;;
8440 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008441 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008442 ;;
8443 esac
8444 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008445 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008446 i386)
8447 MACOSX_DEFAULT_ARCH="x86_64"
8448 ;;
8449 ppc)
8450 MACOSX_DEFAULT_ARCH="ppc64"
8451 ;;
8452 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008453 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008454 ;;
8455 esac
8456
8457 #ARCH_RUN_32BIT="true"
8458 fi
8459
8460 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008461 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008462 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008463esac
8464
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8466$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008467if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008468then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008469 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008470 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008471 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008472
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008473$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008474
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8476$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008477 if test $enable_shared = "yes"
8478 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008479 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 +00008480 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008481else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8483$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008484fi
8485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8487$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008488case $ac_sys_system/$ac_sys_release in
8489 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008490
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008491$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008492
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8494$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008495 ;;
8496 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8498$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008499 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008500esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008501
Guido van Rossum0a516c91994-09-12 10:58:40 +00008502# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008503
Michael W. Hudson54241132001-12-07 15:38:26 +00008504
8505
8506
8507
Ronald Oussoren75912852010-04-08 08:13:31 +00008508
Guido van Rossum0a516c91994-09-12 10:58:40 +00008509# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008510# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8512$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008513if test -z "$SO"
8514then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008515 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008516 hp*|HP*)
8517 case `uname -m` in
8518 ia64) SO=.so;;
8519 *) SO=.sl;;
8520 esac
8521 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008522 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008523 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008524 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008525else
8526 # this might also be a termcap variable, see #610332
8527 echo
8528 echo '====================================================================='
8529 echo '+ +'
8530 echo '+ WARNING: You have set SO in your environment. +'
8531 echo '+ Do you really mean to change the extension for shared libraries? +'
8532 echo '+ Continuing in 10 seconds to let you to ponder. +'
8533 echo '+ +'
8534 echo '====================================================================='
8535 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008536fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8538$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008539
Ronald Oussoren79f90492009-01-02 10:44:46 +00008540
Neal Norwitz58e28882006-05-19 07:00:58 +00008541cat >>confdefs.h <<_ACEOF
8542#define SHLIB_EXT "$SO"
8543_ACEOF
8544
Guido van Rossum0a516c91994-09-12 10:58:40 +00008545# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008546# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008547# (Shared libraries in this instance are shared modules to be loaded into
8548# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8550$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008551if test -z "$LDSHARED"
8552then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008553 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008554 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008555 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008556 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008557 ;;
8558 BeOS*)
8559 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008560 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008561 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008562 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008563 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008565 if test "$GCC" = "yes" ; then
8566 LDSHARED='$(CC) -shared'
8567 LDCXXSHARED='$(CXX) -shared'
8568 else
8569 LDSHARED='$(CC) -G'
8570 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008571 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008572 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008573 if test "$GCC" = "yes" ; then
8574 LDSHARED='$(CC) -shared'
8575 LDCXXSHARED='$(CXX) -shared'
8576 else
8577 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008578 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008579 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008580 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008581 LDSHARED='$(CC) -bundle'
8582 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008583 if test "$enable_framework" ; then
8584 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008585 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8586 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008587 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008588 else
8589 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008590 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008591 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008592 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008593 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008594 LDSHARED='$(CC) -bundle'
8595 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008596 if test "$enable_framework" ; then
8597 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008598 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8599 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008600 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008601 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008602 # No framework, use the Python app as bundle-loader
8603 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008604 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008605 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008606 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008607 Darwin/*)
8608 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8609 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008610
Ned Deilyc40b9032014-06-25 13:48:46 -07008611 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8612 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8613 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8614 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8615 if test ${dep_target_major} -eq 10 && \
8616 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008617 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008618 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008619 LDSHARED='$(CC) -bundle'
8620 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008621 if test "$enable_framework" ; then
8622 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008623 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8624 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008625 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008626 else
8627 # No framework, use the Python app as bundle-loader
8628 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8629 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008630 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008631 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008632 else
8633 # building for OS X 10.3 and later
8634 if test "${enable_universalsdk}"; then
8635 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8636 fi
8637 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8638 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8639 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008640 fi
8641 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008642 Linux*|GNU*|QNX*)
8643 LDSHARED='$(CC) -shared'
8644 LDCXXSHARED='$(CXX) -shared';;
8645 BSD/OS*/4*)
8646 LDSHARED="gcc -shared"
8647 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008648 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008649 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008650 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008651 LDSHARED='$(CC) -shared'
8652 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008653 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008654 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008655 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008656 OpenBSD*)
8657 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8658 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008659 LDSHARED='$(CC) -shared $(CCSHARED)'
8660 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008661 else
8662 case `uname -r` in
8663 [01].* | 2.[0-7] | 2.[0-7].*)
8664 LDSHARED="ld -Bshareable ${LDFLAGS}"
8665 ;;
8666 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008667 LDSHARED='$(CC) -shared $(CCSHARED)'
8668 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008669 ;;
8670 esac
8671 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008672 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008673 LDSHARED='$(CC) -shared'
8674 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008675 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008676 if test "$GCC" = "yes" ; then
8677 LDSHARED='$(CC) -shared'
8678 LDCXXSHARED='$(CXX) -shared'
8679 else
8680 LDSHARED='$(CC) -G'
8681 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008682 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008683 SCO_SV*)
8684 LDSHARED='$(CC) -Wl,-G,-Bexport'
8685 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8686 CYGWIN*)
8687 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8688 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8689 atheos*)
8690 LDSHARED="gcc -shared"
8691 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008692 *) LDSHARED="ld";;
8693 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8696$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008697LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008698BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008699# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008700# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8702$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008703if test -z "$CCSHARED"
8704then
Guido van Rossum07397971997-04-29 21:49:50 +00008705 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008706 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008707 then CCSHARED="-fPIC";
8708 elif test `uname -p` = sparc;
8709 then CCSHARED="-xcode=pic32";
8710 else CCSHARED="-Kpic";
8711 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008712 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008713 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008714 else CCSHARED="+z";
8715 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008716 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008717 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008718 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008719 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008720 if test "$GCC" = "yes"
8721 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008722 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008723 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008724 SCO_SV*)
8725 if test "$GCC" = "yes"
8726 then CCSHARED="-fPIC"
8727 else CCSHARED="-Kpic -belf"
8728 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008729 IRIX*/6*) case $CC in
8730 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008731 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008732 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008733 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008734 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8737$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008738# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008739# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8741$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008742if test -z "$LINKFORSHARED"
8743then
Guido van Rossum07397971997-04-29 21:49:50 +00008744 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008745 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008746 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008747 LINKFORSHARED="-Wl,-E -Wl,+s";;
8748# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008749 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008750 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008751 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008752 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008753 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8754 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008755 # not used by the core itself but which needs to be in the core so
8756 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008757 # -prebind is no longer used, because it actually seems to give a
8758 # slowdown in stead of a speedup, maybe due to the large number of
8759 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008760
8761 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008762 if test "$enable_framework"
8763 then
Jack Jansenda49e192005-01-07 13:08:22 +00008764 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008765 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008766 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008767 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008768 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008769 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008770 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008771 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8772 then
8773 LINKFORSHARED="-Wl,--export-dynamic"
8774 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008775 SunOS/5*) case $CC in
8776 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008777 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008778 then
8779 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008780 fi;;
8781 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008782 CYGWIN*)
8783 if test $enable_shared = "no"
8784 then
8785 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8786 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008787 QNX*)
8788 # -Wl,-E causes the symbols to be added to the dynamic
8789 # symbol table so that they can be found when a module
8790 # is loaded. -N 2048K causes the stack size to be set
8791 # to 2048 kilobytes so that the stack doesn't overflow
8792 # when running test_compile.py.
8793 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008794 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8797$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008798
Michael W. Hudson54241132001-12-07 15:38:26 +00008799
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008800
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8802$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008803if test ! "$LIBRARY" = "$LDLIBRARY"
8804then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008805 case $ac_sys_system in
8806 CYGWIN*)
8807 # Cygwin needs CCSHARED when building extension DLLs
8808 # but not when building the interpreter DLL.
8809 CFLAGSFORSHARED='';;
8810 *)
8811 CFLAGSFORSHARED='$(CCSHARED)'
8812 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8815$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008816
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008817# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8818# library (with --enable-shared).
8819# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008820# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8821# if it is not required, since it creates a dependency of the shared library
8822# to LIBS. This, in turn, means that applications linking the shared libpython
8823# don't need to link LIBS explicitly. The default should be only changed
8824# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008825
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8827$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008828case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008829 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008830 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008831esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8833$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008834
8835
Guido van Rossum627b2d71993-12-24 10:39:16 +00008836# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8838$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008839if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008840 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008841else
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008843LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008846
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847/* Override any GCC internal prototype to avoid an error.
8848 Use char because int might match the return type of a GCC
8849 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008850#ifdef __cplusplus
8851extern "C"
8852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008853char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008854int
8855main ()
8856{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008857return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ;
8859 return 0;
8860}
8861_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008864else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008867rm -f core conftest.err conftest.$ac_objext \
8868 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008869LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8872$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008873if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008874 cat >>confdefs.h <<_ACEOF
8875#define HAVE_LIBDL 1
8876_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008878 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008879
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008880fi
8881 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8883$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008884if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008885 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008886else
Martin v. Löwis11437992002-04-12 09:54:03 +00008887 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008888LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008891
Martin v. Löwiseba40652007-08-30 20:10:57 +00008892/* Override any GCC internal prototype to avoid an error.
8893 Use char because int might match the return type of a GCC
8894 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008895#ifdef __cplusplus
8896extern "C"
8897#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008898char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008899int
8900main ()
8901{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008902return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ;
8904 return 0;
8905}
8906_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008909else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008911fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008912rm -f core conftest.err conftest.$ac_objext \
8913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008914LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8917$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008918if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 cat >>confdefs.h <<_ACEOF
8920#define HAVE_LIBDLD 1
8921_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008922
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008923 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008925fi
8926 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008927
Ronald Oussoren79f90492009-01-02 10:44:46 +00008928# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008929if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8931$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008932if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008934else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008935 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008938
Martin v. Löwiseba40652007-08-30 20:10:57 +00008939/* Override any GCC internal prototype to avoid an error.
8940 Use char because int might match the return type of a GCC
8941 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942#ifdef __cplusplus
8943extern "C"
8944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008945char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008946int
8947main ()
8948{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008950 ;
8951 return 0;
8952}
8953_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954for ac_lib in '' pthread rt posix4; do
8955 if test -z "$ac_lib"; then
8956 ac_res="none required"
8957 else
8958 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008960 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008961 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008963fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008964rm -f core conftest.err conftest.$ac_objext \
8965 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008966 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008970if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972else
8973 ac_cv_search_sem_init=no
8974fi
8975rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008976LIBS=$ac_func_search_save_LIBS
8977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8979$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008980ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008983
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008984fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008985 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008986 # posix4 on Solaris 2.6
8987 # pthread (first!) on Linux
8988fi
8989
Martin v. Löwis19d17342003-06-14 21:03:05 +00008990# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8992$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008993if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008994 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008995else
8996 ac_check_lib_save_LIBS=$LIBS
8997LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009000
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001/* Override any GCC internal prototype to avoid an error.
9002 Use char because int might match the return type of a GCC
9003 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009004#ifdef __cplusplus
9005extern "C"
9006#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009007char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009008int
9009main ()
9010{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009011return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009012 ;
9013 return 0;
9014}
9015_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009017 ac_cv_lib_intl_textdomain=yes
9018else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009019 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009021rm -f core conftest.err conftest.$ac_objext \
9022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009023LIBS=$ac_check_lib_save_LIBS
9024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9026$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009027if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009028
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009030
9031fi
9032
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009033
9034# checks for system dependent C++ extensions support
9035case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009036 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9037$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009039/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009040
Georg Brandl94800df2011-02-25 11:09:02 +00009041 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009042int
9043main ()
9044{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009045loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ;
9047 return 0;
9048}
Matthias Klosec511b472010-05-08 11:01:39 +00009049
Martin v. Löwis11437992002-04-12 09:54:03 +00009050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009052
Matthias Klosec511b472010-05-08 11:01:39 +00009053
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009054$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009055
Matthias Klosec511b472010-05-08 11:01:39 +00009056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009057$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009058
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009059else
Matthias Klosec511b472010-05-08 11:01:39 +00009060
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009063
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009064fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065rm -f core conftest.err conftest.$ac_objext \
9066 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009067 *) ;;
9068esac
9069
Guido van Rossum70c7f481998-03-26 18:44:10 +00009070# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009071# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9073$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009074if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009075 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009076else
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009078LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009081
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082/* Override any GCC internal prototype to avoid an error.
9083 Use char because int might match the return type of a GCC
9084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009085#ifdef __cplusplus
9086extern "C"
9087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009088char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009089int
9090main ()
9091{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009092return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 ;
9094 return 0;
9095}
9096_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009098 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009100 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009101fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102rm -f core conftest.err conftest.$ac_objext \
9103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009104LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009105fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9107$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009108if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009109 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009110fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009111 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9113$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009114if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009116else
Martin v. Löwis11437992002-04-12 09:54:03 +00009117 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009118LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009121
Martin v. Löwiseba40652007-08-30 20:10:57 +00009122/* Override any GCC internal prototype to avoid an error.
9123 Use char because int might match the return type of a GCC
9124 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009125#ifdef __cplusplus
9126extern "C"
9127#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009128char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009129int
9130main ()
9131{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009132return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ;
9134 return 0;
9135}
9136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009137if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009142rm -f core conftest.err conftest.$ac_objext \
9143 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009144LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9147$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009148if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009149 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009150fi
9151 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009152
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009153case "$ac_sys_system" in
9154BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9156$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009157if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009158 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009159else
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009161LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009164
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165/* Override any GCC internal prototype to avoid an error.
9166 Use char because int might match the return type of a GCC
9167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009168#ifdef __cplusplus
9169extern "C"
9170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009171char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009172int
9173main ()
9174{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009175return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ;
9177 return 0;
9178}
9179_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009181 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009183 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009184fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009185rm -f core conftest.err conftest.$ac_objext \
9186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009187LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9190$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009191if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009192 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009193fi
9194 # BeOS
9195;;
9196esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9199$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009202if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9205$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009206LIBS="$withval $LIBS"
9207
9208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009211fi
9212
Guido van Rossum7f43da71994-08-01 12:15:30 +00009213
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009214
9215
9216
9217
9218
9219
9220
9221if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9222 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009223 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9224set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9226$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009227if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009228 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009229else
9230 case $PKG_CONFIG in
9231 [\\/]* | ?:[\\/]*)
9232 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9233 ;;
9234 *)
9235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9236for as_dir in $PATH
9237do
9238 IFS=$as_save_IFS
9239 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009240 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009242 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009244 break 2
9245 fi
9246done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009247 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009248IFS=$as_save_IFS
9249
9250 ;;
9251esac
9252fi
9253PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9254if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9256$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009257else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9259$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009260fi
9261
9262
9263fi
9264if test -z "$ac_cv_path_PKG_CONFIG"; then
9265 ac_pt_PKG_CONFIG=$PKG_CONFIG
9266 # Extract the first word of "pkg-config", so it can be a program name with args.
9267set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9269$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009270if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009271 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009272else
9273 case $ac_pt_PKG_CONFIG in
9274 [\\/]* | ?:[\\/]*)
9275 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9276 ;;
9277 *)
9278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9279for as_dir in $PATH
9280do
9281 IFS=$as_save_IFS
9282 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009285 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009287 break 2
9288 fi
9289done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009290 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009291IFS=$as_save_IFS
9292
9293 ;;
9294esac
9295fi
9296ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9297if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9299$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9302$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009303fi
9304
9305 if test "x$ac_pt_PKG_CONFIG" = x; then
9306 PKG_CONFIG=""
9307 else
9308 case $cross_compiling:$ac_tool_warned in
9309yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9311$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009312ac_tool_warned=yes ;;
9313esac
9314 PKG_CONFIG=$ac_pt_PKG_CONFIG
9315 fi
9316else
9317 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9318fi
9319
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009320fi
9321if test -n "$PKG_CONFIG"; then
9322 _pkg_min_version=0.9.0
9323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9324$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9325 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9327$as_echo "yes" >&6; }
9328 else
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9330$as_echo "no" >&6; }
9331 PKG_CONFIG=""
9332 fi
9333fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009334
9335# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9337$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009338
9339# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009340if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009341 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009342else
9343 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009344fi
9345
9346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9348$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009349
9350# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9352$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009353
9354# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009355if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009356 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009357else
9358 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009359fi
9360
9361
9362if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009363 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9364else
9365 LIBFFI_INCLUDEDIR=""
9366fi
9367
9368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9370$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009371
Ned Deilya2a9f572013-10-25 00:30:10 -07009372# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9373
9374
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9376$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9377
9378# Check whether --with-tcltk-includes was given.
9379if test "${with_tcltk_includes+set}" = set; then :
9380 withval=$with_tcltk_includes;
9381else
9382 with_tcltk_includes="default"
9383fi
9384
9385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9386$as_echo "$with_tcltk_includes" >&6; }
9387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9388$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9389
9390# Check whether --with-tcltk-libs was given.
9391if test "${with_tcltk_libs+set}" = set; then :
9392 withval=$with_tcltk_libs;
9393else
9394 with_tcltk_libs="default"
9395fi
9396
9397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9398$as_echo "$with_tcltk_libs" >&6; }
9399if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9400then
9401 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9402 then
9403 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9404 fi
9405 TCLTK_INCLUDES=""
9406 TCLTK_LIBS=""
9407else
9408 TCLTK_INCLUDES="$with_tcltk_includes"
9409 TCLTK_LIBS="$with_tcltk_libs"
9410fi
9411
Benjamin Peterson867475c2009-04-29 20:36:25 +00009412# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9414$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009415
9416# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009418 withval=$with_dbmliborder;
9419if test x$with_dbmliborder = xyes
9420then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009421as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009422else
9423 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9424 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9425 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009426 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009427 fi
9428 done
9429fi
9430fi
9431
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9433$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009434
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009435# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009436
9437
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9439$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009440
Martin v. Löwiseba40652007-08-30 20:10:57 +00009441# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443 withval=$with_signal_module;
9444fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009445
9446
9447if test -z "$with_signal_module"
9448then with_signal_module="yes"
9449fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9451$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009452
9453if test "${with_signal_module}" = "yes"; then
9454 USE_SIGNAL_MODULE=""
9455 SIGNAL_OBJS=""
9456else
9457 USE_SIGNAL_MODULE="#"
9458 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9459fi
9460
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009461# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009462
Barry Warsawc0d24d82000-06-29 16:12:00 +00009463USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009464
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9466$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009467
Guido van Rossumec2f0731997-01-22 20:54:01 +00009468
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009470if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9473$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009474LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009475if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009476 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009477fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481fi
9482
Martin v. Löwis11437992002-04-12 09:54:03 +00009483
9484# Templates for things AC_DEFINEd more than once.
9485# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009486
9487
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
9489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9491$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
Martin v. Löwiseba40652007-08-30 20:10:57 +00009493# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 withval=$with_threads;
9496fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009497
9498
Barry Warsawc0d24d82000-06-29 16:12:00 +00009499# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503 withval=$with_thread; with_threads=$with_thread
9504fi
9505
Barry Warsawc0d24d82000-06-29 16:12:00 +00009506
9507if test -z "$with_threads"
9508then with_threads="yes"
9509fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9511$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009512
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009513
Barry Warsawc0d24d82000-06-29 16:12:00 +00009514if test "$with_threads" = "no"
9515then
9516 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009517elif test "$ac_cv_pthread_is_default" = yes
9518then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009519 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009520
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009521 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009523
9524 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009526elif test "$ac_cv_kpthread" = "yes"
9527then
9528 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009529 if test "$ac_cv_cxx_thread" = "yes"; then
9530 CXX="$CXX -Kpthread"
9531 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009533
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009534 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009535 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009536elif test "$ac_cv_kthread" = "yes"
9537then
9538 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009539 if test "$ac_cv_cxx_thread" = "yes"; then
9540 CXX="$CXX -Kthread"
9541 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009542 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009543
9544 posix_threads=yes
9545 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009546elif test "$ac_cv_pthread" = "yes"
9547then
9548 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009549 if test "$ac_cv_cxx_thread" = "yes"; then
9550 CXX="$CXX -pthread"
9551 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009553
9554 posix_threads=yes
9555 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009556else
9557 if test ! -z "$with_threads" -a -d "$with_threads"
9558 then LDFLAGS="$LDFLAGS -L$with_threads"
9559 fi
9560 if test ! -z "$withval" -a -d "$withval"
9561 then LDFLAGS="$LDFLAGS -L$withval"
9562 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009563
9564 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009565 # define _POSIX_THREADS in unistd.h. Some apparently don't
9566 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9568$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009570/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009571
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009572#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009573#ifdef _POSIX_THREADS
9574yes
9575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009576
9577_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009579 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009580 unistd_defines_pthreads=yes
9581else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009582 unistd_defines_pthreads=no
9583fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009584rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009585
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9587$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009588
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009589 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009590
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009592if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009594
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009596
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009598$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009599
9600 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009601 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009602else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604 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 +01009605if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009606 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009607
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009608 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009609
Martin v. Löwis11437992002-04-12 09:54:03 +00009610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009612
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009613 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009614else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009615
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9617$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009618
Martin v. Löwiseba40652007-08-30 20:10:57 +00009619# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009620if test "${with_pth+set}" = set; then :
9621 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9622$as_echo "$withval" >&6; }
9623 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
9625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009626$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009627
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009628 LIBS="-lpth $LIBS"
9629 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9632$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009633
9634 # Just looking for pthread_create in libpthread is not enough:
9635 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9636 # So we really have to include pthread.h, and then link.
9637 _libs=$LIBS
9638 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9640$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009642/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009643
9644#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009645#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009646
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009647void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009648int
9649main ()
9650{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009651
9652pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9660$as_echo "yes" >&6; }
9661 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009662
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009663 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009664 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009665else
Martin v. Löwis11437992002-04-12 09:54:03 +00009666
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009667 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009668 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009669if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009670 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009671
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009672 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009673 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009674else
Guido van Rossumad678af1998-10-02 14:42:15 +00009675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009676 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 +01009677if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009679
9680
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009681$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009682
9683 THREADOBJ="Python/thread.o"
9684else
9685
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009686 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 +01009687if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009689
9690
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009692
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009693 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009694else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009695
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9697$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009698if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009700else
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009702LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
Martin v. Löwiseba40652007-08-30 20:10:57 +00009706/* Override any GCC internal prototype to avoid an error.
9707 Use char because int might match the return type of a GCC
9708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009709#ifdef __cplusplus
9710extern "C"
9711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009712char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009713int
9714main ()
9715{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009717 ;
9718 return 0;
9719}
9720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009721if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009725fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009726rm -f core conftest.err conftest.$ac_objext \
9727 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009728LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009729fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9731$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009732if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009734
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009735 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009736 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009737 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009738else
Greg Steinadf63d62000-07-05 10:38:09 +00009739
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9741$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009742if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009744else
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009746LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009748/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009749
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750/* Override any GCC internal prototype to avoid an error.
9751 Use char because int might match the return type of a GCC
9752 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009753#ifdef __cplusplus
9754extern "C"
9755#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009756char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009757int
9758main ()
9759{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009760return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009761 ;
9762 return 0;
9763}
9764_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009767else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009768 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009769fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009770rm -f core conftest.err conftest.$ac_objext \
9771 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009772LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009773fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9775$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009776if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009778
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009779 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009780 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009781 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009782else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009783
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9785$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009786if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009787 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009788else
Martin v. Löwis11437992002-04-12 09:54:03 +00009789 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009790LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794/* Override any GCC internal prototype to avoid an error.
9795 Use char because int might match the return type of a GCC
9796 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009797#ifdef __cplusplus
9798extern "C"
9799#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009800char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009801int
9802main ()
9803{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009804return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 ;
9806 return 0;
9807}
9808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009809if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009812 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009814rm -f core conftest.err conftest.$ac_objext \
9815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009816LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009817fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9819$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009820if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009821 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009822
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009823 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009824 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009825 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009826else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9829$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009830if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009831 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009832else
Martin v. Löwis11437992002-04-12 09:54:03 +00009833 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009834LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009853if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009857fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9863$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009864if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009865 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009866
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009867 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009868 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009869 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009870else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009871
Martin v. Löwis130fb172001-07-19 11:00:41 +00009872 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009873fi
9874
Guido van Rossum627b2d71993-12-24 10:39:16 +00009875
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009876fi
9877
Guido van Rossum0be3e491997-05-22 20:33:33 +00009878fi
9879
Guido van Rossum49545951997-12-02 19:28:29 +00009880fi
9881
Guido van Rossumb93a8621998-05-07 13:27:32 +00009882fi
9883
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009884
Michael W. Hudson54241132001-12-07 15:38:26 +00009885fi
9886
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009887
9888fi
9889
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009891rm -f core conftest.err conftest.$ac_objext \
9892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893fi
9894
Martin v. Löwis11437992002-04-12 09:54:03 +00009895fi
9896
9897
9898fi
9899
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009900
Michael W. Hudson54241132001-12-07 15:38:26 +00009901
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9903$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009904if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009905 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009906else
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009908LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009911
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912/* Override any GCC internal prototype to avoid an error.
9913 Use char because int might match the return type of a GCC
9914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009915#ifdef __cplusplus
9916extern "C"
9917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009918char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009919int
9920main ()
9921{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ;
9924 return 0;
9925}
9926_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009927if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009929else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009930 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932rm -f core conftest.err conftest.$ac_objext \
9933 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009934LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9937$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009938if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009939 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009940
Martin v. Löwis130fb172001-07-19 11:00:41 +00009941 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009942 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009943 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009944fi
9945
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009946
Neal Norwitza978ab02002-11-02 16:58:05 +00009947 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9949$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009950if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009951 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009952else
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009954LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009957
Martin v. Löwiseba40652007-08-30 20:10:57 +00009958/* Override any GCC internal prototype to avoid an error.
9959 Use char because int might match the return type of a GCC
9960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009961#ifdef __cplusplus
9962extern "C"
9963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009964char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009965int
9966main ()
9967{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009968return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009969 ;
9970 return 0;
9971}
9972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009974 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009975else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009980LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009981fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9983$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009984if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009985 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009986
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009987 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009988 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009989 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009990fi
9991
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009992 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009993
Martin v. Löwis130fb172001-07-19 11:00:41 +00009994 if test "$USE_THREAD_MODULE" != "#"
9995 then
9996 # If the above checks didn't disable threads, (at least) OSF1
9997 # needs this '-threads' argument during linking.
9998 case $ac_sys_system in
9999 OSF1) LDLAST=-threads;;
10000 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000010001 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010002fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010004if test "$posix_threads" = "yes"; then
10005 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010007$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010008
10009 fi
10010
10011 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10012 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +020010013 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010014$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010015
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010016 ;;
10017 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010018$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010019
10020 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +020010021 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010022$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +000010023
10024 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010025 esac
10026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10028$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010029 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010030 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010031else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010032 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010033 ac_cv_pthread_system_supported=no
10034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010036/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +010010037
10038 #include <stdio.h>
10039 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010040 void *foo(void *parm) {
10041 return NULL;
10042 }
10043 main() {
10044 pthread_attr_t attr;
10045 pthread_t id;
10046 if (pthread_attr_init(&attr)) exit(-1);
10047 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10048 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10049 exit(0);
10050 }
10051_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010052if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010053 ac_cv_pthread_system_supported=yes
10054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10058 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010059fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010060
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061
Guido van Rossum627b2d71993-12-24 10:39:16 +000010062fi
10063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10065$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010066 if test "$ac_cv_pthread_system_supported" = "yes"; then
10067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010068$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010069
10070 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010071 for ac_func in pthread_sigmask
10072do :
10073 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010074if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010075 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010077_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010078 case $ac_sys_system in
10079 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010081$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010082
10083 ;;
10084 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010085fi
10086done
10087
Christian Heimes0d604cf2013-08-21 13:26:05 +020010088 for ac_func in pthread_atfork
10089do :
10090 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10091if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10092 cat >>confdefs.h <<_ACEOF
10093#define HAVE_PTHREAD_ATFORK 1
10094_ACEOF
10095
10096fi
10097done
10098
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010099fi
10100
10101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010102# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10105$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010106# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010107if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010109 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10111$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112 ipv6=no
10113 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010114 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10115$as_echo "yes" >&6; }
10116 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010117
10118 ipv6=yes
10119 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010121else
Martin v. Löwis11437992002-04-12 09:54:03 +000010122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010124/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010125 /* AF_INET6 available check */
10126#include <sys/types.h>
10127#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010128int
10129main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010131int domain = AF_INET6;
10132 ;
10133 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010134}
Martin v. Löwis11437992002-04-12 09:54:03 +000010135_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010136if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10139$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010140 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010141
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010142else
Matthias Klosec511b472010-05-08 11:01:39 +000010143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10145$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010146 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010147
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010148fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010150
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010151if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10153$as_echo_n "checking if RFC2553 API is available... " >&6; }
10154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010155/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010156
10157 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010158#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010159int
10160main ()
10161{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010162struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010163 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ;
10165 return 0;
10166}
Matthias Klosec511b472010-05-08 11:01:39 +000010167
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010169if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010170
10171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010172$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010173 ipv6=yes
10174
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010175else
Matthias Klosec511b472010-05-08 11:01:39 +000010176
10177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010178$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010179 ipv6=no
10180
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010183fi
10184
10185if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010186 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010187
10188fi
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190fi
10191
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010192
10193ipv6type=unknown
10194ipv6lib=none
10195ipv6trylibc=no
10196
10197if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10199$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010200 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10201 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010202 case $i in
10203 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010205/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010207#include <netinet/in.h>
10208#ifdef IPV6_INRIA_VERSION
10209yes
10210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010211_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010214 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010215fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010216rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010217
10218 ;;
10219 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010221/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010222
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010223#include <netinet/in.h>
10224#ifdef __KAME__
10225yes
10226#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010227_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010229 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010230 ipv6type=$i;
10231 ipv6lib=inet6
10232 ipv6libdir=/usr/local/v6/lib
10233 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010234fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010235rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010236
10237 ;;
10238 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010240/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010241
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010242#include <features.h>
10243#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10244yes
10245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010246_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010247if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010249 ipv6type=$i;
10250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010251fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010252rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010253
10254 ;;
10255 linux-inet6)
10256 if test -d /usr/inet6; then
10257 ipv6type=$i
10258 ipv6lib=inet6
10259 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010260 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010261 fi
10262 ;;
10263 solaris)
10264 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010265 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010266 ipv6type=$i
10267 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010268 fi
10269 fi
10270 ;;
10271 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010273/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010274
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010275#include <sys/param.h>
10276#ifdef _TOSHIBA_INET6
10277yes
10278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010281 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010282 ipv6type=$i;
10283 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010284 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010285fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010286rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010287
10288 ;;
10289 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010291/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010292
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010293#include </usr/local/v6/include/sys/v6config.h>
10294#ifdef __V6D__
10295yes
10296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010297_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010298if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010300 ipv6type=$i;
10301 ipv6lib=v6;
10302 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010303 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010304fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010305rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010306
10307 ;;
10308 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010310/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010311
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010312#include <sys/param.h>
10313#ifdef _ZETA_MINAMI_INET6
10314yes
10315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010316_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010317if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010318 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010319 ipv6type=$i;
10320 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010321 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010322fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010323rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010324
10325 ;;
10326 esac
10327 if test "$ipv6type" != "unknown"; then
10328 break
10329 fi
10330 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10332$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010333fi
10334
10335if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10336 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10337 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10338 echo "using lib$ipv6lib"
10339 else
10340 if test $ipv6trylibc = "yes"; then
10341 echo "using libc"
10342 else
10343 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10344 echo "You need to fetch lib$ipv6lib.a from appropriate"
10345 echo 'ipv6 kit and compile beforehand.'
10346 exit 1
10347 fi
10348 fi
10349fi
10350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10352$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010354/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010355
10356 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010357int
10358main ()
10359{
10360FSIORefNum fRef = 0
10361 ;
10362 return 0;
10363}
Mark Dickinson0712b562010-05-08 19:13:21 +000010364
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010365_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010366if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010367
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010369$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10372$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010373
Mark Dickinson0712b562010-05-08 19:13:21 +000010374else
10375
10376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
10378
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010379fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10381
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010382# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10384$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010385
Martin v. Löwiseba40652007-08-30 20:10:57 +000010386# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010387if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010388 withval=$with_doc_strings;
10389fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010390
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010391
10392if test -z "$with_doc_strings"
10393then with_doc_strings="yes"
10394fi
10395if test "$with_doc_strings" != "no"
10396then
10397
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010398$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010399
10400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10402$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010403
Neil Schemenauera35c6882001-02-27 04:45:05 +000010404# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10406$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010407
Martin v. Löwiseba40652007-08-30 20:10:57 +000010408# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010409if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010410 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010411if test "$withval" != no
10412then
10413
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010414$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10417$as_echo "yes" >&6; }
10418else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010420fi
10421else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10423$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010424fi
10425
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010426
10427# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10429$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010430
Martin v. Löwiseba40652007-08-30 20:10:57 +000010431# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010432if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433 withval=$with_pymalloc;
10434fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010435
Neil Schemenauera35c6882001-02-27 04:45:05 +000010436
Neil Schemenauer16c22972002-03-22 15:34:49 +000010437if test -z "$with_pymalloc"
10438then with_pymalloc="yes"
10439fi
10440if test "$with_pymalloc" != "no"
10441then
Martin v. Löwis11437992002-04-12 09:54:03 +000010442
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010444
10445fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10447$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010448
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010449# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10451$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010452
10453# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010454if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010455 withval=$with_valgrind;
10456else
10457 with_valgrind=no
10458fi
10459
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10461$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010462if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010463 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 +010010464if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010467
10468else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010469 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010470
10471fi
10472
10473
10474fi
10475
Barry Warsawef82cd72000-06-30 16:21:01 +000010476# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10478$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010479
Martin v. Löwiseba40652007-08-30 20:10:57 +000010480# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010481if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010482 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010483if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010484then
10485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010486$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10489$as_echo "yes" >&6; }
10490else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10491$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010492fi
10493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010496fi
10497
Barry Warsawef82cd72000-06-30 16:21:01 +000010498
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010499# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010500
Guido van Rossum98935bf2001-09-05 19:13:16 +000010501DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010502
Guido van Rossume97ee181999-12-20 21:27:22 +000010503# the dlopen() function means we might want to use dynload_shlib.o. some
10504# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010505for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010506do :
10507 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010508if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010509 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010510#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010512
Guido van Rossume97ee181999-12-20 21:27:22 +000010513fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010514done
Guido van Rossume97ee181999-12-20 21:27:22 +000010515
Michael W. Hudson54241132001-12-07 15:38:26 +000010516
Guido van Rossume97ee181999-12-20 21:27:22 +000010517# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10518# loading of modules.
10519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10521$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010522if test -z "$DYNLOADFILE"
10523then
10524 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010525 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10526 if test "$ac_cv_func_dlopen" = yes
10527 then DYNLOADFILE="dynload_shlib.o"
10528 else DYNLOADFILE="dynload_aix.o"
10529 fi
10530 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010531 BeOS*) DYNLOADFILE="dynload_beos.o";;
10532 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010533 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10534 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010535 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010536 *)
10537 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10538 # out any dynamic loading
10539 if test "$ac_cv_func_dlopen" = yes
10540 then DYNLOADFILE="dynload_shlib.o"
10541 else DYNLOADFILE="dynload_stub.o"
10542 fi
10543 ;;
10544 esac
10545fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10547$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010548if test "$DYNLOADFILE" != "dynload_stub.o"
10549then
Martin v. Löwis11437992002-04-12 09:54:03 +000010550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010552
10553fi
10554
Neil Schemenauer4e425612001-06-19 15:44:15 +000010555# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10556
Michael W. Hudson54241132001-12-07 15:38:26 +000010557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10559$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010560if test -z "$MACHDEP_OBJS"
10561then
Jack Jansene578a632001-08-15 01:27:14 +000010562 MACHDEP_OBJS=$extra_machdep_objs
10563else
10564 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010565fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10567$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010568
Guido van Rossum627b2d71993-12-24 10:39:16 +000010569# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010570for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10571 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010572 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10573 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010574 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010575 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010576 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010577 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010578 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10579 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010580 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010581 setlocale setregid setreuid setresuid setresgid \
10582 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010583 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010584 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010585 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010586do :
10587 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10588ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010589if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010592_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010593
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010594fi
10595done
10596
Michael W. Hudson54241132001-12-07 15:38:26 +000010597
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010598# For some functions, having a definition is not sufficient, since
10599# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10601$as_echo_n "checking for chroot... " >&6; }
10602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010603/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010604#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010605int
10606main ()
10607{
10608void *x=chroot
10609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010614
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010615$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010616
Matthias Klosec511b472010-05-08 11:01:39 +000010617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10621$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010622
10623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10626$as_echo_n "checking for link... " >&6; }
10627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010628/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010629#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010630int
10631main ()
10632{
10633void *x=link
10634 ;
10635 return 0;
10636}
10637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010640$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010641
Matthias Klosec511b472010-05-08 11:01:39 +000010642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010643$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10646$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010647
10648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10651$as_echo_n "checking for symlink... " >&6; }
10652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010653/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010654#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010655int
10656main ()
10657{
10658void *x=symlink
10659 ;
10660 return 0;
10661}
10662_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010665$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010666
Matthias Klosec511b472010-05-08 11:01:39 +000010667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010668$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010672
10673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10676$as_echo_n "checking for fchdir... " >&6; }
10677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010678/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010679#include <unistd.h>
10680int
10681main ()
10682{
10683void *x=fchdir
10684 ;
10685 return 0;
10686}
10687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010689
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010690$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010691
Matthias Klosec511b472010-05-08 11:01:39 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010693$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010694else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010697
10698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10701$as_echo_n "checking for fsync... " >&6; }
10702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010703/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010704#include <unistd.h>
10705int
10706main ()
10707{
10708void *x=fsync
10709 ;
10710 return 0;
10711}
10712_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010713if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010715$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010716
Matthias Klosec511b472010-05-08 11:01:39 +000010717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010718$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10721$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010722
10723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10726$as_echo_n "checking for fdatasync... " >&6; }
10727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010728/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010729#include <unistd.h>
10730int
10731main ()
10732{
10733void *x=fdatasync
10734 ;
10735 return 0;
10736}
10737_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010738if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010739
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010740$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010741
Matthias Klosec511b472010-05-08 11:01:39 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010743$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010744else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10746$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010747
10748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10751$as_echo_n "checking for epoll... " >&6; }
10752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010753/* end confdefs.h. */
10754#include <sys/epoll.h>
10755int
10756main ()
10757{
10758void *x=epoll_create
10759 ;
10760 return 0;
10761}
10762_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010763if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010765$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010766
Matthias Klosec511b472010-05-08 11:01:39 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010772
10773fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10776$as_echo_n "checking for kqueue... " >&6; }
10777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010778/* end confdefs.h. */
10779
10780#include <sys/types.h>
10781#include <sys/event.h>
10782
10783int
10784main ()
10785{
10786int x=kqueue()
10787 ;
10788 return 0;
10789}
10790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010791if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010793$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010794
Matthias Klosec511b472010-05-08 11:01:39 +000010795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010796$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10799$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010800
10801fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010803# On some systems (eg. FreeBSD 5), we would find a definition of the
10804# functions ctermid_r, setgroups in the library, but no prototype
10805# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10806# address to avoid compiler warnings and potential miscompilations
10807# because of the missing prototypes.
10808
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10810$as_echo_n "checking for ctermid_r... " >&6; }
10811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010812/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010813
Martin v. Löwisd5843682002-11-21 20:41:28 +000010814#include <stdio.h>
10815
Martin v. Löwisd5843682002-11-21 20:41:28 +000010816int
10817main ()
10818{
10819void* p = ctermid_r
10820 ;
10821 return 0;
10822}
10823_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010826$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010827
Matthias Klosec511b472010-05-08 11:01:39 +000010828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010829$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010833
10834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10836
Antoine Pitroub170f172010-09-10 18:47:36 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10838$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010839if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010840 $as_echo_n "(cached) " >&6
10841else
10842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010843/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010844#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010845int
10846main ()
10847{
10848void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010849
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010850 ;
10851 return 0;
10852}
10853_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010854if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010855 ac_cv_flock_decl=yes
10856else
10857 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010858
10859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010861
Antoine Pitroub170f172010-09-10 18:47:36 +000010862fi
10863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10864$as_echo "$ac_cv_flock_decl" >&6; }
10865if test "x${ac_cv_flock_decl}" = xyes; then
10866 for ac_func in flock
10867do :
10868 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010869if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010870 cat >>confdefs.h <<_ACEOF
10871#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010872_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010873
Antoine Pitrou85729812010-09-07 14:55:24 +000010874else
Antoine Pitroub170f172010-09-10 18:47:36 +000010875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010876$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010877if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010878 $as_echo_n "(cached) " >&6
10879else
10880 ac_check_lib_save_LIBS=$LIBS
10881LIBS="-lbsd $LIBS"
10882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10883/* end confdefs.h. */
10884
10885/* Override any GCC internal prototype to avoid an error.
10886 Use char because int might match the return type of a GCC
10887 builtin and then its argument prototype would still apply. */
10888#ifdef __cplusplus
10889extern "C"
10890#endif
10891char flock ();
10892int
10893main ()
10894{
10895return flock ();
10896 ;
10897 return 0;
10898}
10899_ACEOF
10900if ac_fn_c_try_link "$LINENO"; then :
10901 ac_cv_lib_bsd_flock=yes
10902else
10903 ac_cv_lib_bsd_flock=no
10904fi
10905rm -f core conftest.err conftest.$ac_objext \
10906 conftest$ac_exeext conftest.$ac_ext
10907LIBS=$ac_check_lib_save_LIBS
10908fi
10909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10910$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010911if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010912 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010913
10914
10915$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10916
10917
10918fi
10919
10920
10921fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010922done
10923
Antoine Pitrou85729812010-09-07 14:55:24 +000010924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10927$as_echo_n "checking for getpagesize... " >&6; }
10928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010929/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010930
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010931#include <unistd.h>
10932
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010933int
10934main ()
10935{
10936void* p = getpagesize
10937 ;
10938 return 0;
10939}
10940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010942
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010944
Matthias Klosec511b472010-05-08 11:01:39 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010947else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10949$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010950
10951fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010953
Charles-François Natali93a11752011-11-27 13:01:35 +010010954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10955$as_echo_n "checking for broken unsetenv... " >&6; }
10956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10957/* end confdefs.h. */
10958
10959#include <stdlib.h>
10960
10961int
10962main ()
10963{
10964int res = unsetenv("DUMMY")
10965 ;
10966 return 0;
10967}
10968_ACEOF
10969if ac_fn_c_try_compile "$LINENO"; then :
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972else
10973
10974$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10975
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10977$as_echo "yes" >&6; }
10978
10979fi
10980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10981
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010982for ac_prog in true
10983do
10984 # Extract the first word of "$ac_prog", so it can be a program name with args.
10985set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10987$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010988if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010989 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010990else
10991 if test -n "$TRUE"; then
10992 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10993else
10994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10995for as_dir in $PATH
10996do
10997 IFS=$as_save_IFS
10998 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010011000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011001 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011002 $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 +000011003 break 2
11004 fi
11005done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011006 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011008
11009fi
11010fi
11011TRUE=$ac_cv_prog_TRUE
11012if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11014$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11017$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011018fi
11019
Martin v. Löwiseba40652007-08-30 20:10:57 +000011020
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011021 test -n "$TRUE" && break
11022done
11023test -n "$TRUE" || TRUE="/bin/true"
11024
11025
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11027$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011028if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011029 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011030else
11031 ac_check_lib_save_LIBS=$LIBS
11032LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011034/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011035
Martin v. Löwiseba40652007-08-30 20:10:57 +000011036/* Override any GCC internal prototype to avoid an error.
11037 Use char because int might match the return type of a GCC
11038 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011039#ifdef __cplusplus
11040extern "C"
11041#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011042char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011043int
11044main ()
11045{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011046return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011047 ;
11048 return 0;
11049}
11050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011052 ac_cv_lib_c_inet_aton=yes
11053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011054 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056rm -f core conftest.err conftest.$ac_objext \
11057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011058LIBS=$ac_check_lib_save_LIBS
11059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11061$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011062if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011063 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11066$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011067if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011069else
11070 ac_check_lib_save_LIBS=$LIBS
11071LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011073/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011074
Martin v. Löwiseba40652007-08-30 20:10:57 +000011075/* Override any GCC internal prototype to avoid an error.
11076 Use char because int might match the return type of a GCC
11077 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011078#ifdef __cplusplus
11079extern "C"
11080#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011081char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011082int
11083main ()
11084{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011085return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011086 ;
11087 return 0;
11088}
11089_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011090if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011091 ac_cv_lib_resolv_inet_aton=yes
11092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011093 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011094fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011095rm -f core conftest.err conftest.$ac_objext \
11096 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011097LIBS=$ac_check_lib_save_LIBS
11098fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11100$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011101if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011102 cat >>confdefs.h <<_ACEOF
11103#define HAVE_LIBRESOLV 1
11104_ACEOF
11105
11106 LIBS="-lresolv $LIBS"
11107
11108fi
11109
11110
11111fi
11112
11113
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011114# On Tru64, chflags seems to be present, but calling it will
11115# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11117$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011118if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011122 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011123else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011125/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011126
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011127#include <sys/stat.h>
11128#include <unistd.h>
11129int main(int argc, char*argv[])
11130{
11131 if(chflags(argv[0], 0) != 0)
11132 return 1;
11133 return 0;
11134}
Ned Deily43e10542011-06-27 23:41:53 -070011135
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011136_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011137if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011138 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011140 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011141fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11143 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011144fi
11145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011146
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11149$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011150if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011152if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011153 ac_cv_have_chflags="yes"
11154else
11155 ac_cv_have_chflags="no"
11156fi
11157
11158fi
11159if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011161$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011162
11163fi
11164
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11166$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011167if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011168 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011171 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011174/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011175
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011176#include <sys/stat.h>
11177#include <unistd.h>
11178int main(int argc, char*argv[])
11179{
11180 if(lchflags(argv[0], 0) != 0)
11181 return 1;
11182 return 0;
11183}
Ned Deily43e10542011-06-27 23:41:53 -070011184
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011185_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011186if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011187 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011189 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011190fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11192 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011193fi
11194
11195
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011196fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11198$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011199if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011200 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011201if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011202 ac_cv_have_lchflags="yes"
11203else
11204 ac_cv_have_lchflags="no"
11205fi
11206
11207fi
11208if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011211
11212fi
11213
Ronald Oussorenf8752642006-07-06 10:13:35 +000011214case $ac_sys_system/$ac_sys_release in
11215Darwin/*)
11216 _CUR_CFLAGS="${CFLAGS}"
11217 _CUR_LDFLAGS="${LDFLAGS}"
11218 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11219 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11220 ;;
11221esac
11222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11224$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011225if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011226 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011227else
11228 ac_check_lib_save_LIBS=$LIBS
11229LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011231/* end confdefs.h. */
11232
Martin v. Löwiseba40652007-08-30 20:10:57 +000011233/* Override any GCC internal prototype to avoid an error.
11234 Use char because int might match the return type of a GCC
11235 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011236#ifdef __cplusplus
11237extern "C"
11238#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011239char inflateCopy ();
11240int
11241main ()
11242{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011244 ;
11245 return 0;
11246}
11247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011248if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011249 ac_cv_lib_z_inflateCopy=yes
11250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011251 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011252fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011253rm -f core conftest.err conftest.$ac_objext \
11254 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011255LIBS=$ac_check_lib_save_LIBS
11256fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11258$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011259if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011260
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011261$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011262
11263fi
11264
11265
Ronald Oussorenf8752642006-07-06 10:13:35 +000011266case $ac_sys_system/$ac_sys_release in
11267Darwin/*)
11268 CFLAGS="${_CUR_CFLAGS}"
11269 LDFLAGS="${_CUR_LDFLAGS}"
11270 ;;
11271esac
11272
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11274$as_echo_n "checking for hstrerror... " >&6; }
11275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011276/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011277
Martin v. Löwise9416172003-05-03 10:12:45 +000011278#include <netdb.h>
11279
Martin v. Löwise9416172003-05-03 10:12:45 +000011280int
11281main ()
11282{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011283void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011284 ;
11285 return 0;
11286}
11287_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011288if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011290$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011291
Matthias Klosec511b472010-05-08 11:01:39 +000011292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011293$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011294else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011297
11298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299rm -f core conftest.err conftest.$ac_objext \
11300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011301
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11303$as_echo_n "checking for inet_aton... " >&6; }
11304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011305/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011306
Martin v. Löwis86d66262006-02-17 08:40:11 +000011307#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011308#include <sys/socket.h>
11309#include <netinet/in.h>
11310#include <arpa/inet.h>
11311
Martin v. Löwise9416172003-05-03 10:12:45 +000011312int
11313main ()
11314{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011315void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011316 ;
11317 return 0;
11318}
11319_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011323
Matthias Klosec511b472010-05-08 11:01:39 +000011324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011325$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011326else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11328$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011329
11330fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331rm -f core conftest.err conftest.$ac_objext \
11332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11335$as_echo_n "checking for inet_pton... " >&6; }
11336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011337/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011338
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011339#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011340#include <sys/socket.h>
11341#include <netinet/in.h>
11342#include <arpa/inet.h>
11343
Martin v. Löwise9416172003-05-03 10:12:45 +000011344int
11345main ()
11346{
11347void* p = inet_pton
11348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011353
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011354$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011355
Matthias Klosec511b472010-05-08 11:01:39 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011357$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011361
11362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011364
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011365# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11367$as_echo_n "checking for setgroups... " >&6; }
11368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011370
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011371#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011372#ifdef HAVE_GRP_H
11373#include <grp.h>
11374#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011375
Martin v. Löwisd5843682002-11-21 20:41:28 +000011376int
11377main ()
11378{
11379void* p = setgroups
11380 ;
11381 return 0;
11382}
11383_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011385
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011387
Matthias Klosec511b472010-05-08 11:01:39 +000011388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011389$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011390else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11392$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011393
11394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011397# check for openpty and forkpty
11398
11399for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400do :
11401 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011402if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011403 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011405_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11409$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011410if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011411 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011412else
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011414LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011416/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011417
Martin v. Löwiseba40652007-08-30 20:10:57 +000011418/* Override any GCC internal prototype to avoid an error.
11419 Use char because int might match the return type of a GCC
11420 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011421#ifdef __cplusplus
11422extern "C"
11423#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011424char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011425int
11426main ()
11427{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011428return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 ;
11430 return 0;
11431}
11432_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011433if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011434 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011435else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011436 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011437fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011438rm -f core conftest.err conftest.$ac_objext \
11439 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011440LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011441fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11443$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011444if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011445 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011446 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11449$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011450if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011451 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011452else
11453 ac_check_lib_save_LIBS=$LIBS
11454LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011456/* end confdefs.h. */
11457
Martin v. Löwiseba40652007-08-30 20:10:57 +000011458/* Override any GCC internal prototype to avoid an error.
11459 Use char because int might match the return type of a GCC
11460 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011461#ifdef __cplusplus
11462extern "C"
11463#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011464char openpty ();
11465int
11466main ()
11467{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011469 ;
11470 return 0;
11471}
11472_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011473if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011474 ac_cv_lib_bsd_openpty=yes
11475else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011476 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011477fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011478rm -f core conftest.err conftest.$ac_objext \
11479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011480LIBS=$ac_check_lib_save_LIBS
11481fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11483$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011484if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011485 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011486 LIBS="$LIBS -lbsd"
11487fi
11488
11489
11490fi
11491
Fred Drake8cef4cf2000-06-28 16:40:38 +000011492
11493fi
11494done
11495
11496for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011497do :
11498 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011499if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011501#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011502_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011503
Fred Drake8cef4cf2000-06-28 16:40:38 +000011504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11506$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011507if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011508 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011509else
Martin v. Löwis11437992002-04-12 09:54:03 +000011510 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011511LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011514
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515/* Override any GCC internal prototype to avoid an error.
11516 Use char because int might match the return type of a GCC
11517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011518#ifdef __cplusplus
11519extern "C"
11520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011521char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011522int
11523main ()
11524{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011526 ;
11527 return 0;
11528}
11529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011530if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011531 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011533 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011534fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011535rm -f core conftest.err conftest.$ac_objext \
11536 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011537LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011538fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11540$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011541if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011542 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011543 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11546$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011547if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011549else
11550 ac_check_lib_save_LIBS=$LIBS
11551LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011553/* end confdefs.h. */
11554
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555/* Override any GCC internal prototype to avoid an error.
11556 Use char because int might match the return type of a GCC
11557 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011558#ifdef __cplusplus
11559extern "C"
11560#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011561char forkpty ();
11562int
11563main ()
11564{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011566 ;
11567 return 0;
11568}
11569_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011570if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011571 ac_cv_lib_bsd_forkpty=yes
11572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011573 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011574fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575rm -f core conftest.err conftest.$ac_objext \
11576 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011577LIBS=$ac_check_lib_save_LIBS
11578fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11580$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011581if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011582 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011583 LIBS="$LIBS -lbsd"
11584fi
11585
11586
11587fi
11588
Fred Drake8cef4cf2000-06-28 16:40:38 +000011589
11590fi
11591done
11592
Jack Jansendd19cf82001-12-06 22:36:17 +000011593
Brett Cannonaa5778d2008-03-18 04:09:00 +000011594# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011595for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011596do :
11597 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011598if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011599 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011601_ACEOF
11602
11603fi
11604done
11605
11606
Michael W. Hudson54241132001-12-07 15:38:26 +000011607# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011608for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011609do :
11610 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11611ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011612if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011614#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011615_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011616
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011617fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011618done
11619
Michael W. Hudson54241132001-12-07 15:38:26 +000011620
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011621ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011622if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011623 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011624
Martin v. Löwis1142de32002-03-29 16:28:31 +000011625else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011627 *" dup2.$ac_objext "* ) ;;
11628 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011629 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011630esac
11631
Martin v. Löwis1142de32002-03-29 16:28:31 +000011632fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011633
11634ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011635if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011636 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11637
11638else
11639 case " $LIBOBJS " in
11640 *" getcwd.$ac_objext "* ) ;;
11641 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11642 ;;
11643esac
11644
11645fi
11646
11647ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011648if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011649 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11650
11651else
11652 case " $LIBOBJS " in
11653 *" strdup.$ac_objext "* ) ;;
11654 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11655 ;;
11656esac
11657
11658fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011659
11660
11661for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011662do :
11663 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011664if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011665 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011666#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011669/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011670#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011671int
11672main ()
11673{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011674getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011679if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011681$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011682
Guido van Rossum627b2d71993-12-24 10:39:16 +000011683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011685
Guido van Rossum627b2d71993-12-24 10:39:16 +000011686fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011687done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011688
Jack Jansen150753c2003-03-29 22:07:47 +000011689for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011690do :
11691 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011692if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011693 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011697/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011698#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011699int
11700main ()
11701{
11702setpgrp(0,0);
11703 ;
11704 return 0;
11705}
11706_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011707if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011709$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011710
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011711fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011713
11714fi
11715done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011716
Thomas Wouters3a584202000-08-05 23:28:51 +000011717for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011718do :
11719 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011720if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011721 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011722#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011725/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011726#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011727int
11728main ()
11729{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011730gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 ;
11732 return 0;
11733}
11734_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011735if ac_fn_c_try_compile "$LINENO"; then :
11736
Guido van Rossum627b2d71993-12-24 10:39:16 +000011737else
Skip Montanaro6dead952003-09-25 14:50:04 +000011738
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011739$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011740
Martin v. Löwis11437992002-04-12 09:54:03 +000011741
Guido van Rossum627b2d71993-12-24 10:39:16 +000011742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011744
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011745fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011746done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011747
Michael W. Hudson54241132001-12-07 15:38:26 +000011748
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11750$as_echo_n "checking for major... " >&6; }
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011752/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011753
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011754#if defined(MAJOR_IN_MKDEV)
11755#include <sys/mkdev.h>
11756#elif defined(MAJOR_IN_SYSMACROS)
11757#include <sys/sysmacros.h>
11758#else
11759#include <sys/types.h>
11760#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011761
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011762int
11763main ()
11764{
11765
11766 makedev(major(0),minor(0));
11767
11768 ;
11769 return 0;
11770}
11771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011772if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011773
11774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011775$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11778$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011779
11780else
Skip Montanaro6dead952003-09-25 14:50:04 +000011781
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11783$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011784
11785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786rm -f core conftest.err conftest.$ac_objext \
11787 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011788
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011789# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011790# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11792$as_echo_n "checking for getaddrinfo... " >&6; }
11793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011794/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011795
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011796#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011797#include <sys/socket.h>
11798#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011799#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011800
Martin v. Löwis11437992002-04-12 09:54:03 +000011801int
11802main ()
11803{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011804getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 ;
11806 return 0;
11807}
11808_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011810 have_getaddrinfo=yes
11811else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011812 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011813fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011814rm -f core conftest.err conftest.$ac_objext \
11815 conftest$ac_exeext conftest.$ac_ext
11816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11817$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011818if test $have_getaddrinfo = yes
11819then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11821$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011822 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011824else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011826
11827if test "${enable_ipv6+set}" = set; then
11828 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11829else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011830 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011831fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011834/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011835
Stefan Krah0afe4e42012-11-22 23:56:51 +010011836#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011837#include <sys/types.h>
11838#include <netdb.h>
11839#include <string.h>
11840#include <sys/socket.h>
11841#include <netinet/in.h>
11842
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011843int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011844{
11845 int passive, gaierr, inet4 = 0, inet6 = 0;
11846 struct addrinfo hints, *ai, *aitop;
11847 char straddr[INET6_ADDRSTRLEN], strport[16];
11848
11849 for (passive = 0; passive <= 1; passive++) {
11850 memset(&hints, 0, sizeof(hints));
11851 hints.ai_family = AF_UNSPEC;
11852 hints.ai_flags = passive ? AI_PASSIVE : 0;
11853 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011854 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011855 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11856 (void)gai_strerror(gaierr);
11857 goto bad;
11858 }
11859 for (ai = aitop; ai; ai = ai->ai_next) {
11860 if (ai->ai_addr == NULL ||
11861 ai->ai_addrlen == 0 ||
11862 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11863 straddr, sizeof(straddr), strport, sizeof(strport),
11864 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11865 goto bad;
11866 }
11867 switch (ai->ai_family) {
11868 case AF_INET:
11869 if (strcmp(strport, "54321") != 0) {
11870 goto bad;
11871 }
11872 if (passive) {
11873 if (strcmp(straddr, "0.0.0.0") != 0) {
11874 goto bad;
11875 }
11876 } else {
11877 if (strcmp(straddr, "127.0.0.1") != 0) {
11878 goto bad;
11879 }
11880 }
11881 inet4++;
11882 break;
11883 case AF_INET6:
11884 if (strcmp(strport, "54321") != 0) {
11885 goto bad;
11886 }
11887 if (passive) {
11888 if (strcmp(straddr, "::") != 0) {
11889 goto bad;
11890 }
11891 } else {
11892 if (strcmp(straddr, "::1") != 0) {
11893 goto bad;
11894 }
11895 }
11896 inet6++;
11897 break;
11898 case AF_UNSPEC:
11899 goto bad;
11900 break;
11901 default:
11902 /* another family support? */
11903 break;
11904 }
11905 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011906 freeaddrinfo(aitop);
11907 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011908 }
11909
11910 if (!(inet4 == 0 || inet4 == 2))
11911 goto bad;
11912 if (!(inet6 == 0 || inet6 == 2))
11913 goto bad;
11914
11915 if (aitop)
11916 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011917 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011918
11919 bad:
11920 if (aitop)
11921 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011922 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011923}
11924
Martin v. Löwis11437992002-04-12 09:54:03 +000011925_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011926if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011927 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011928else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011929 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011934
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011935fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011936
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011938
Benjamin Peterson75fed812010-11-01 01:47:19 +000011939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11940$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11941
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011942if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011943then
11944 if test $ipv6 = yes
11945 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011946 echo 'Fatal: You must get working getaddrinfo() function.'
11947 echo ' or you can specify "--disable-ipv6"'.
11948 exit 1
11949 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011950else
Martin v. Löwis11437992002-04-12 09:54:03 +000011951
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011952$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011953
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011954fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011955
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011956for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011957do :
11958 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011959if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011960 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011962_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011963
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011964fi
11965done
11966
Michael W. Hudson54241132001-12-07 15:38:26 +000011967
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011968# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11970$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011971if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011976#include <sys/types.h>
11977#include <sys/time.h>
11978#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
Martin v. Löwis11437992002-04-12 09:54:03 +000011980int
11981main ()
11982{
11983if ((struct tm *) 0)
11984return 0;
11985 ;
11986 return 0;
11987}
11988_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011992 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11997$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011998if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011999
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012000$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001
12002fi
12003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12005$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012006if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012010/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012011#include <sys/types.h>
12012#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012013
Martin v. Löwis11437992002-04-12 09:54:03 +000012014int
12015main ()
12016{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012017struct tm tm;
12018 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012019 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 ;
12021 return 0;
12022}
12023_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012025 ac_cv_struct_tm=time.h
12026else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012027 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12032$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012033if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012035$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036
12037fi
12038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012039ac_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 +000012040#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012041
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012042"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012043if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
12045cat >>confdefs.h <<_ACEOF
12046#define HAVE_STRUCT_TM_TM_ZONE 1
12047_ACEOF
12048
12049
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012050fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012051
Martin v. Löwis11437992002-04-12 09:54:03 +000012052if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12053
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012054$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012055
12056else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012057 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12058"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012059if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000012061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012062 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000012063fi
12064
Martin v. Löwiseba40652007-08-30 20:10:57 +000012065cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012066#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000012067_ACEOF
12068
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12070$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012071if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000012073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012075/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012076#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077#if !HAVE_DECL_TZNAME
12078extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081int
12082main ()
12083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012089if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012090 ac_cv_var_tzname=yes
12091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012094rm -f core conftest.err conftest.$ac_objext \
12095 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12098$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012099 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012103 fi
12104fi
12105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106ac_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 +010012107if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012108
12109cat >>confdefs.h <<_ACEOF
12110#define HAVE_STRUCT_STAT_ST_RDEV 1
12111_ACEOF
12112
12113
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012114fi
12115
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012116ac_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 +010012117if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119cat >>confdefs.h <<_ACEOF
12120#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12121_ACEOF
12122
12123
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012124fi
12125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126ac_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 +010012127if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012128
12129cat >>confdefs.h <<_ACEOF
12130#define HAVE_STRUCT_STAT_ST_FLAGS 1
12131_ACEOF
12132
12133
12134fi
12135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012136ac_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 +010012137if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012138
12139cat >>confdefs.h <<_ACEOF
12140#define HAVE_STRUCT_STAT_ST_GEN 1
12141_ACEOF
12142
12143
12144fi
12145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146ac_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 +010012147if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012148
12149cat >>confdefs.h <<_ACEOF
12150#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12151_ACEOF
12152
12153
12154fi
12155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156ac_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 +010012157if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012158
Martin v. Löwis11437992002-04-12 09:54:03 +000012159cat >>confdefs.h <<_ACEOF
12160#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12161_ACEOF
12162
12163
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012164fi
12165
Michael W. Hudson54241132001-12-07 15:38:26 +000012166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12168$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012169if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171else
Matthias Klosec511b472010-05-08 11:01:39 +000012172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012174/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012175#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012176int
12177main ()
12178{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012179return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 ;
12181 return 0;
12182}
12183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012184if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012185 ac_cv_header_time_altzone=yes
12186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012187 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012190
Martin v. Löwiseba40652007-08-30 20:10:57 +000012191fi
12192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12194$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012197$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198
12199fi
12200
Guido van Rossumda88dad1995-01-26 00:46:29 +000012201was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12203$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012205/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012206
12207#include <sys/types.h>
12208#include <sys/select.h>
12209#include <sys/time.h>
12210
Martin v. Löwis11437992002-04-12 09:54:03 +000012211int
12212main ()
12213{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012214;
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 ;
12216 return 0;
12217}
12218_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012220
12221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012223
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012224 was_it_defined=yes
12225
Martin v. Löwiseba40652007-08-30 20:10:57 +000012226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12229$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12232$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012233if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012235else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012237/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012238#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012239int
12240main ()
12241{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012242struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
12245}
12246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012247if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012248 ac_cv_struct_addrinfo=yes
12249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012250 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12253fi
12254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12256$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012257if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012259$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012260
12261fi
12262
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12264$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012265if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012267else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012270
12271# include <sys/types.h>
12272# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012276struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 ;
12278 return 0;
12279}
12280_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012281if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012282 ac_cv_struct_sockaddr_storage=yes
12283else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12287fi
12288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12290$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012291if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012294
12295fi
12296
Guido van Rossum627b2d71993-12-24 10:39:16 +000012297# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12300$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012301if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012302 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012306$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012307int
12308main ()
12309{
12310static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012311test_array [0] = 0;
12312return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012313
12314 ;
12315 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012316}
Martin v. Löwis11437992002-04-12 09:54:03 +000012317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012318if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012319 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012321 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012324fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12326$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012327if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012328 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012329
12330fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012331
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12333$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012334if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012335 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012339
Martin v. Löwis11437992002-04-12 09:54:03 +000012340int
12341main ()
12342{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012343
Martin v. Löwis11437992002-04-12 09:54:03 +000012344#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012345 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012347 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012348 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349 char const *const *pcpcc;
12350 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012351 /* NEC SVR4.0.2 mips cc rejects this. */
12352 struct point {int x, y;};
12353 static struct point const zero = {0,0};
12354 /* AIX XL C 1.02.0.0 rejects this.
12355 It does not let you subtract one const X* pointer from another in
12356 an arm of an if-expression whose if-part is not a constant
12357 expression */
12358 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361 ++pcpcc;
12362 ppc = (char**) pcpcc;
12363 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012364 { /* SCO 3.2v4 cc rejects this sort of thing. */
12365 char tx;
12366 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012368
Martin v. Löwis11437992002-04-12 09:54:03 +000012369 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012370 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 }
12372 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12373 int x[] = {25, 17};
12374 const int *foo = &x[0];
12375 ++foo;
12376 }
12377 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12378 typedef const int *iptr;
12379 iptr p = 0;
12380 ++p;
12381 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012382 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012383 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012384 struct s { int j; const int *ap[3]; } bx;
12385 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 }
12387 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12388 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012391 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012392#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012393
Martin v. Löwis11437992002-04-12 09:54:03 +000012394 ;
12395 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012396}
Martin v. Löwis11437992002-04-12 09:54:03 +000012397_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399 ac_cv_c_const=yes
12400else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012401 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12406$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012407if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012408
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012409$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012410
12411fi
12412
Michael W. Hudson54241132001-12-07 15:38:26 +000012413
Guido van Rossumda88dad1995-01-26 00:46:29 +000012414works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12416$as_echo_n "checking for working volatile... " >&6; }
12417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012418/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012419
Martin v. Löwis11437992002-04-12 09:54:03 +000012420int
12421main ()
12422{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012429 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012430else
Skip Montanaro6dead952003-09-25 14:50:04 +000012431
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012432$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012433
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012434
Guido van Rossum627b2d71993-12-24 10:39:16 +000012435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12438$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012439
Guido van Rossumda88dad1995-01-26 00:46:29 +000012440works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12442$as_echo_n "checking for working signed char... " >&6; }
12443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012444/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446int
12447main ()
12448{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012455 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012456else
Skip Montanaro6dead952003-09-25 14:50:04 +000012457
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012458$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012459
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012460
Guido van Rossum7f43da71994-08-01 12:15:30 +000012461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12464$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012465
Guido van Rossumda88dad1995-01-26 00:46:29 +000012466have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12468$as_echo_n "checking for prototypes... " >&6; }
12469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012471int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012472int
12473main ()
12474{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012475return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012480if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Matthias Klosec511b472010-05-08 11:01:39 +000012484 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12488$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489
Guido van Rossumda88dad1995-01-26 00:46:29 +000012490works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12492$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012495
12496#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012497int foo(int x, ...) {
12498 va_list va;
12499 va_start(va, x);
12500 va_arg(va, int);
12501 va_arg(va, char *);
12502 va_arg(va, double);
12503 return 0;
12504}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012505
Martin v. Löwis11437992002-04-12 09:54:03 +000012506int
12507main ()
12508{
Guido van Rossum90eea071996-08-30 20:58:57 +000012509return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 ;
12511 return 0;
12512}
12513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012515
12516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012517$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012519 works=yes
12520
Guido van Rossum627b2d71993-12-24 10:39:16 +000012521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12524$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012525
Martin v. Löwisd6320502004-08-12 13:45:08 +000012526# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12528$as_echo_n "checking for socketpair... " >&6; }
12529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012530/* end confdefs.h. */
12531
12532#include <sys/types.h>
12533#include <sys/socket.h>
12534
12535int
12536main ()
12537{
12538void *x=socketpair
12539 ;
12540 return 0;
12541}
12542_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012544
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012545$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012546
Matthias Klosec511b472010-05-08 11:01:39 +000012547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012548$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12551$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012552
12553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012555
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012556# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12558$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012560/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012561#include <sys/types.h>
12562#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012563int
12564main ()
12565{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012566struct sockaddr x;
12567x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012568 ;
12569 return 0;
12570}
12571_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572if ac_fn_c_try_compile "$LINENO"; then :
12573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12574$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012577
12578else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012581
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012584
Guido van Rossumda88dad1995-01-26 00:46:29 +000012585va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12587$as_echo_n "checking whether va_list is an array... " >&6; }
12588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012590
12591#ifdef HAVE_STDARG_PROTOTYPES
12592#include <stdarg.h>
12593#else
12594#include <varargs.h>
12595#endif
12596
Martin v. Löwis11437992002-04-12 09:54:03 +000012597int
12598main ()
12599{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012600va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012601 ;
12602 return 0;
12603}
12604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012605if ac_fn_c_try_compile "$LINENO"; then :
12606
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607else
Skip Montanaro6dead952003-09-25 14:50:04 +000012608
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Guido van Rossumda88dad1995-01-26 00:46:29 +000012612 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012613
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12617$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012618
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012619# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012620
12621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012623if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012625 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012626
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12628$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012629 OLD_CFLAGS=$CFLAGS
12630 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012632/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012633
12634# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012635
Martin v. Löwis11437992002-04-12 09:54:03 +000012636int
12637main ()
12638{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012639
12640 char *name;
12641 struct hostent *he, *res;
12642 char buffer[2048];
12643 int buflen = 2048;
12644 int h_errnop;
12645
12646 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012647
12648 ;
12649 return 0;
12650}
12651_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012652if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012655
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012658
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12660$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012662else
Skip Montanaro6dead952003-09-25 14:50:04 +000012663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12665$as_echo "no" >&6; }
12666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12667$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012671# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673int
12674main ()
12675{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012676
12677 char *name;
12678 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012679 char buffer[2048];
12680 int buflen = 2048;
12681 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012682
Matthias Klosec511b472010-05-08 11:01:39 +000012683 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
12685 ;
12686 return 0;
12687}
12688_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012691 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012692
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Matthias Klosec511b472010-05-08 11:01:39 +000012694$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012695
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12697$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012699else
Skip Montanaro6dead952003-09-25 14:50:04 +000012700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12702$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12704$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12706/* end confdefs.h. */
12707
12708# include <netdb.h>
12709
12710int
12711main ()
12712{
12713
12714 char *name;
12715 struct hostent *he;
12716 struct hostent_data data;
12717
12718 (void) gethostbyname_r(name, he, &data);
12719
12720 ;
12721 return 0;
12722}
12723_ACEOF
12724if ac_fn_c_try_compile "$LINENO"; then :
12725
12726 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12727
12728
12729$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12730
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12732$as_echo "yes" >&6; }
12733
12734else
12735
12736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12737$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012738
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012747 CFLAGS=$OLD_CFLAGS
12748
12749else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012751 for ac_func in gethostbyname
12752do :
12753 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012754if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012756#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012757_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012759fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012760done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012761
Michael W. Hudson54241132001-12-07 15:38:26 +000012762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012763fi
12764
Michael W. Hudson54241132001-12-07 15:38:26 +000012765
12766
12767
12768
12769
12770
Guido van Rossum627b2d71993-12-24 10:39:16 +000012771# checks for system services
12772# (none yet)
12773
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012774# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012776if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012778else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12780$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012781if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012783else
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012785LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789/* Override any GCC internal prototype to avoid an error.
12790 Use char because int might match the return type of a GCC
12791 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012792#ifdef __cplusplus
12793extern "C"
12794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012795char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012796int
12797main ()
12798{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012799return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ;
12801 return 0;
12802}
12803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012809rm -f core conftest.err conftest.$ac_objext \
12810 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012811LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12814$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012815if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 cat >>confdefs.h <<_ACEOF
12817#define HAVE_LIBIEEE 1
12818_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012819
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012820 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012821
Guido van Rossum627b2d71993-12-24 10:39:16 +000012822fi
12823
Michael W. Hudson54241132001-12-07 15:38:26 +000012824
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012825fi
12826
Michael W. Hudson54241132001-12-07 15:38:26 +000012827
Guido van Rossum7f253911997-05-09 02:42:48 +000012828# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12830$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012831
Martin v. Löwiseba40652007-08-30 20:10:57 +000012832# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012833if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012834 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012835if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012836then
12837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012838$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12841$as_echo "yes" >&6; }
12842else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012844fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12847$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012848fi
12849
Guido van Rossum7f253911997-05-09 02:42:48 +000012850
Guido van Rossum7f43da71994-08-01 12:15:30 +000012851# check for --with-libm=...
12852
Guido van Rossum563e7081996-09-10 18:20:48 +000012853case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012854Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012855BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012856*) LIBM=-lm
12857esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12859$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012860
Martin v. Löwiseba40652007-08-30 20:10:57 +000012861# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012862if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012863 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012864if test "$withval" = no
12865then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12867$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012868elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012869then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12871$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012872else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012873fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012874else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12876$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012877fi
12878
Guido van Rossum7f43da71994-08-01 12:15:30 +000012879
12880# check for --with-libc=...
12881
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12883$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012884
Martin v. Löwiseba40652007-08-30 20:10:57 +000012885# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012886if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012888if test "$withval" = no
12889then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12891$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012892elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012893then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12895$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012896else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012897fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12900$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901fi
12902
Guido van Rossum7f43da71994-08-01 12:15:30 +000012903
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012904# **************************************************
12905# * Check for various properties of floating point *
12906# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12909$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012910if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012912else
12913
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012914if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012915 ac_cv_little_endian_double=no
12916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012918/* end confdefs.h. */
12919
12920#include <string.h>
12921int main() {
12922 double x = 9006104071832581.0;
12923 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12924 return 0;
12925 else
12926 return 1;
12927}
12928
12929_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012930if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012931 ac_cv_little_endian_double=yes
12932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012933 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012934fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012937fi
12938
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012939fi
12940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12942$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012943if test "$ac_cv_little_endian_double" = yes
12944then
12945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012947
12948fi
12949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12951$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012952if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012953 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012954else
12955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012957 ac_cv_big_endian_double=no
12958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012960/* end confdefs.h. */
12961
12962#include <string.h>
12963int main() {
12964 double x = 9006104071832581.0;
12965 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12966 return 0;
12967 else
12968 return 1;
12969}
12970
12971_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012973 ac_cv_big_endian_double=yes
12974else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12978 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012979fi
12980
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012981fi
12982
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12984$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012985if test "$ac_cv_big_endian_double" = yes
12986then
12987
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012989
12990fi
12991
12992# Some ARM platforms use a mixed-endian representation for doubles.
12993# While Python doesn't currently have full support for these platforms
12994# (see e.g., issue 1762561), we can at least make sure that float <-> string
12995# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12997$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012998if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013000else
13001
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013002if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013003 ac_cv_mixed_endian_double=no
13004else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013006/* end confdefs.h. */
13007
13008#include <string.h>
13009int main() {
13010 double x = 9006104071832581.0;
13011 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13012 return 0;
13013 else
13014 return 1;
13015}
13016
13017_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013019 ac_cv_mixed_endian_double=yes
13020else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013021 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13024 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013025fi
13026
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013027fi
13028
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13030$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013031if test "$ac_cv_mixed_endian_double" = yes
13032then
13033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013034$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013035
13036fi
13037
13038# The short float repr introduced in Python 3.1 requires the
13039# correctly-rounded string <-> double conversion functions from
13040# Python/dtoa.c, which in turn require that the FPU uses 53-bit
13041# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000013042# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013043# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000013044
13045# This inline assembler syntax may also work for suncc and icc,
13046# so we try it on all platforms.
13047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13049$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013051/* end confdefs.h. */
13052
13053int
13054main ()
13055{
13056
Mark Dickinsona548dee2009-11-15 13:12:43 +000013057 unsigned short cw;
13058 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13059 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013060
13061 ;
13062 return 0;
13063}
13064_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020013065if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013066 have_gcc_asm_for_x87=yes
13067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013069fi
Stefan Krah99e36b92015-07-03 15:30:54 +020013070rm -f core conftest.err conftest.$ac_objext \
13071 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13073$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000013074if test "$have_gcc_asm_for_x87" = yes
13075then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013077$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013078
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013079fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013080
Mark Dickinson04b27232009-01-04 12:29:36 +000013081# Detect whether system arithmetic is subject to x87-style double
13082# rounding issues. The result of this test has little meaning on non
13083# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13084# mode is round-to-nearest and double rounding issues are present, and
13085# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13087$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000013088# $BASECFLAGS may affect the result
13089ac_save_cc="$CC"
13090CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013092 ac_cv_x87_double_rounding=no
13093else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013095/* end confdefs.h. */
13096
13097#include <stdlib.h>
13098#include <math.h>
13099int main() {
13100 volatile double x, y, z;
13101 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13102 x = 0.99999999999999989; /* 1-2**-53 */
13103 y = 1./x;
13104 if (y != 1.)
13105 exit(0);
13106 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13107 x = 1e16;
13108 y = 2.99999;
13109 z = x + y;
13110 if (z != 1e16+4.)
13111 exit(0);
13112 /* both tests show evidence of double rounding */
13113 exit(1);
13114}
13115
13116_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013117if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000013118 ac_cv_x87_double_rounding=no
13119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000013121fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13123 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000013124fi
13125
Mark Dickinson99abd142009-10-24 13:44:16 +000013126CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13128$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013129if test "$ac_cv_x87_double_rounding" = yes
13130then
13131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013132$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013133
13134fi
13135
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013136# ************************************
13137# * Check for mathematical functions *
13138# ************************************
13139
13140LIBS_SAVE=$LIBS
13141LIBS="$LIBS $LIBM"
13142
Mark Dickinson265d7382008-04-21 22:32:24 +000013143# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13144# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13146$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013147if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013148 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013149else
13150
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013151if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013152 ac_cv_tanh_preserves_zero_sign=no
13153else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013155/* end confdefs.h. */
13156
13157#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013158#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013159int main() {
13160 /* return 0 if either negative zeros don't exist
13161 on this platform or if negative zeros exist
13162 and tanh(-0.) == -0. */
13163 if (atan2(0., -1.) == atan2(-0., -1.) ||
13164 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13165 else exit(1);
13166}
13167
13168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013170 ac_cv_tanh_preserves_zero_sign=yes
13171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013173fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013176fi
13177
Mark Dickinson265d7382008-04-21 22:32:24 +000013178fi
13179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13181$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013182if test "$ac_cv_tanh_preserves_zero_sign" = yes
13183then
13184
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013186
13187fi
13188
Mark Dickinson65898e02009-09-05 10:27:00 +000013189for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013190do :
13191 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13192ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013193if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013194 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013195#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013196_ACEOF
13197
13198fi
13199done
13200
Mark Dickinson65898e02009-09-05 10:27:00 +000013201for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013202do :
13203 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13204ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013205if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013206 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013207#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013208_ACEOF
13209
13210fi
13211done
13212
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13214"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013215if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013216 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013219fi
13220
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013221cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013223_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013224ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13225"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013226if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013229 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013230fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013231
13232cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013234_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13236"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013237if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013238 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013241fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013242
13243cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013244#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013245_ACEOF
13246
13247
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013248LIBS=$LIBS_SAVE
13249
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013250# For multiprocessing module, check that sem_open
13251# actually works. For FreeBSD versions <= 7.2,
13252# the kernel module that provides POSIX semaphores
13253# isn't loaded by default, so an attempt to call
13254# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13256$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013257if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013258 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013259else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013260 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013261 ac_cv_posix_semaphores_enabled=yes
13262else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013264/* end confdefs.h. */
13265
13266#include <unistd.h>
13267#include <fcntl.h>
13268#include <stdio.h>
13269#include <semaphore.h>
13270#include <sys/stat.h>
13271
13272int main(void) {
13273 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13274 if (a == SEM_FAILED) {
13275 perror("sem_open");
13276 return 1;
13277 }
13278 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013279 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013280 return 0;
13281}
13282
13283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013284if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013285 ac_cv_posix_semaphores_enabled=yes
13286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013288fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13290 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013291fi
13292
13293
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013294fi
13295
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13297$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013298if test $ac_cv_posix_semaphores_enabled = no
13299then
13300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013302
13303fi
13304
13305# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13307$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013308if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013312 ac_cv_broken_sem_getvalue=yes
13313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013315/* end confdefs.h. */
13316
13317#include <unistd.h>
13318#include <fcntl.h>
13319#include <stdio.h>
13320#include <semaphore.h>
13321#include <sys/stat.h>
13322
13323int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013324 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013325 int count;
13326 int res;
13327 if(a==SEM_FAILED){
13328 perror("sem_open");
13329 return 1;
13330
13331 }
13332 res = sem_getvalue(a, &count);
13333 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013334 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013335 return res==-1 ? 1 : 0;
13336}
13337
13338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013340 ac_cv_broken_sem_getvalue=no
13341else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013343fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13345 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013346fi
13347
13348
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013349fi
13350
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13352$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013353if test $ac_cv_broken_sem_getvalue = yes
13354then
13355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013357
13358fi
13359
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013360# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13362$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013363# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013364if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013365 enableval=$enable_big_digits; case $enable_big_digits in
13366yes)
13367 enable_big_digits=30 ;;
13368no)
13369 enable_big_digits=15 ;;
1337015|30)
13371 ;;
13372*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013373 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 +000013374esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13376$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013377
13378cat >>confdefs.h <<_ACEOF
13379#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13380_ACEOF
13381
13382
13383else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13385$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013386fi
13387
13388
Guido van Rossumef2255b2000-03-10 22:30:29 +000013389# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013390ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013391if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
13393
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013394$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013396 wchar_h="yes"
13397
Guido van Rossumef2255b2000-03-10 22:30:29 +000013398else
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013400
13401fi
13402
Michael W. Hudson54241132001-12-07 15:38:26 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013405# determine wchar_t size
13406if test "$wchar_h" = yes
13407then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13411# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13413$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013414if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013416else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13418"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013421 if test "$ac_cv_type_wchar_t" = yes; then
13422 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13423$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013424as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013425See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426 else
13427 ac_cv_sizeof_wchar_t=0
13428 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013429fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430
Martin v. Löwis11437992002-04-12 09:54:03 +000013431fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13433$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013434
13435
13436
Martin v. Löwis11437992002-04-12 09:54:03 +000013437cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013438#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013439_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013440
Michael W. Hudson54241132001-12-07 15:38:26 +000013441
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013442fi
13443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13445$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013446have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013448/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013449
13450#include <tcl.h>
13451#if TCL_UTF_MAX != 6
13452# error "NOT UCS4_TCL"
13453#endif
13454int
13455main ()
13456{
13457
13458 ;
13459 return 0;
13460}
13461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013463
13464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013466
13467 have_ucs4_tcl=yes
13468
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13472$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013473
Skip Montanaro6dead952003-09-25 14:50:04 +000013474# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013475if test "$wchar_h" = yes
13476then
13477 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13479$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013480 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013481 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013482else
13483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013484 if test "$cross_compiling" = yes; 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013488/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013489
13490 #include <wchar.h>
13491 int main()
13492 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013493 /* Success: exit code 0 */
13494 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013495 }
13496
13497_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013498if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013499 ac_cv_wchar_t_signed=yes
13500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013501 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013502fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013503rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13504 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013505fi
13506
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013507fi
13508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13510$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511fi
13512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13514$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013515# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013516if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013517 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013518else
13519 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520fi
13521
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013522
13523if test $enable_unicode = yes
13524then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013525 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013526 case "$have_ucs4_tcl" in
13527 yes) enable_unicode="ucs4"
13528 ;;
13529 *) enable_unicode="ucs2"
13530 ;;
13531 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013532fi
13533
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013534
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013535case "$enable_unicode" in
13536ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013537 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013538
13539 ;;
13540ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013542
13543 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013544no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013545*) 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 +000013546esac
13547
Michael W. Hudson54241132001-12-07 15:38:26 +000013548
Martin v. Löwis11437992002-04-12 09:54:03 +000013549
13550
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013551if test "$enable_unicode" = "no"
13552then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013553 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13555$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013556else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013557 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013559$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013560
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013561
13562 # wchar_t is only usable if it maps to an unsigned type
13563 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013564 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013565 then
13566 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013567
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013568$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013570 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013571
13572 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13573 then
13574 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013575 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013576
13577 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13578 then
13579 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013580 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013581
13582 else
13583 PY_UNICODE_TYPE="no type found"
13584 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13586$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013587fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013588
13589# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13591$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013592if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013593 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013595 ac_cv_c_bigendian=unknown
13596 # See if we're dealing with a universal compiler.
13597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13598/* end confdefs.h. */
13599#ifndef __APPLE_CC__
13600 not a universal capable compiler
13601 #endif
13602 typedef int dummy;
13603
Skip Montanaro6dead952003-09-25 14:50:04 +000013604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013605if ac_fn_c_try_compile "$LINENO"; then :
13606
13607 # Check for potential -arch flags. It is not universal unless
13608 # there are at least two -arch flags with different values.
13609 ac_arch=
13610 ac_prev=
13611 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13612 if test -n "$ac_prev"; then
13613 case $ac_word in
13614 i?86 | x86_64 | ppc | ppc64)
13615 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13616 ac_arch=$ac_word
13617 else
13618 ac_cv_c_bigendian=universal
13619 break
13620 fi
13621 ;;
13622 esac
13623 ac_prev=
13624 elif test "x$ac_word" = "x-arch"; then
13625 ac_prev=arch
13626 fi
13627 done
13628fi
13629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13630 if test $ac_cv_c_bigendian = unknown; then
13631 # See if sys/param.h defines the BYTE_ORDER macro.
13632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013633/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013634#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013635 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013636
Martin v. Löwis11437992002-04-12 09:54:03 +000013637int
13638main ()
13639{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013640#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13641 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13642 && LITTLE_ENDIAN)
13643 bogus endian macros
13644 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013645
13646 ;
13647 return 0;
13648}
13649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013651 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013653/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013654#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013655 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013656
Martin v. Löwis11437992002-04-12 09:54:03 +000013657int
13658main ()
13659{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013660#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661 not big endian
13662 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
13664 ;
13665 return 0;
13666}
13667_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013668if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013669 ac_cv_c_bigendian=yes
13670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013674fi
13675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676 fi
13677 if test $ac_cv_c_bigendian = unknown; then
13678 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013680/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681#include <limits.h>
13682
Martin v. Löwis11437992002-04-12 09:54:03 +000013683int
13684main ()
13685{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013686#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13687 bogus endian macros
13688 #endif
13689
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 ;
13691 return 0;
13692}
13693_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694if ac_fn_c_try_compile "$LINENO"; then :
13695 # It does; now see whether it defined to _BIG_ENDIAN or not.
13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697/* end confdefs.h. */
13698#include <limits.h>
13699
13700int
13701main ()
13702{
13703#ifndef _BIG_ENDIAN
13704 not big endian
13705 #endif
13706
13707 ;
13708 return 0;
13709}
13710_ACEOF
13711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013713else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013714 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13717fi
13718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13719 fi
13720 if test $ac_cv_c_bigendian = unknown; then
13721 # Compile a test program.
13722 if test "$cross_compiling" = yes; then :
13723 # Try to guess by grepping values from an object file.
13724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13725/* end confdefs.h. */
13726short int ascii_mm[] =
13727 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13728 short int ascii_ii[] =
13729 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13730 int use_ascii (int i) {
13731 return ascii_mm[i] + ascii_ii[i];
13732 }
13733 short int ebcdic_ii[] =
13734 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13735 short int ebcdic_mm[] =
13736 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13737 int use_ebcdic (int i) {
13738 return ebcdic_mm[i] + ebcdic_ii[i];
13739 }
13740 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013742int
13743main ()
13744{
13745return use_ascii (foo) == use_ebcdic (foo);
13746 ;
13747 return 0;
13748}
13749_ACEOF
13750if ac_fn_c_try_compile "$LINENO"; then :
13751 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13752 ac_cv_c_bigendian=yes
13753 fi
13754 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13755 if test "$ac_cv_c_bigendian" = unknown; then
13756 ac_cv_c_bigendian=no
13757 else
13758 # finding both strings is unlikely to happen, but who knows?
13759 ac_cv_c_bigendian=unknown
13760 fi
13761 fi
13762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013766/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013768int
13769main ()
13770{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013771
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013772 /* Are we little or big endian? From Harbison&Steele. */
13773 union
13774 {
13775 long int l;
13776 char c[sizeof (long int)];
13777 } u;
13778 u.l = 1;
13779 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780
13781 ;
13782 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013783}
Martin v. Löwis11437992002-04-12 09:54:03 +000013784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013785if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013786 ac_cv_c_bigendian=no
13787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013788 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013795fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13797$as_echo "$ac_cv_c_bigendian" >&6; }
13798 case $ac_cv_c_bigendian in #(
13799 yes)
13800 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13801;; #(
13802 no)
13803 ;; #(
13804 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808 ;; #(
13809 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013810 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013811 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013812 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013813
Michael W. Hudson54241132001-12-07 15:38:26 +000013814
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013815# Check whether right shifting a negative integer extends the sign bit
13816# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13818$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013819if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013821else
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013824 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013827/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013828
13829int main()
13830{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013831 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013832}
13833
Martin v. Löwis11437992002-04-12 09:54:03 +000013834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013836 ac_cv_rshift_extends_sign=yes
13837else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013838 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013839fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013842fi
13843
Martin v. Löwiseba40652007-08-30 20:10:57 +000013844fi
13845
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13847$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013848if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013849then
Martin v. Löwis11437992002-04-12 09:54:03 +000013850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013851$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013852
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013853fi
13854
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013855# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13857$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013858if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013860else
Martin v. Löwis11437992002-04-12 09:54:03 +000013861
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013863/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013864#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013865int
13866main ()
13867{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013868
13869 FILE *f = fopen("/dev/null", "r");
13870 flockfile(f);
13871 getc_unlocked(f);
13872 funlockfile(f);
13873
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 ;
13875 return 0;
13876}
13877_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013878if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013879 ac_cv_have_getc_unlocked=yes
13880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013881 ac_cv_have_getc_unlocked=no
13882fi
13883rm -f core conftest.err conftest.$ac_objext \
13884 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013885fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13888$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013889if test "$ac_cv_have_getc_unlocked" = yes
13890then
Martin v. Löwis11437992002-04-12 09:54:03 +000013891
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013893
13894fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013895
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013896# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013897# save the value of LIBS so we don't actually link Python with readline
13898LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013899
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013900# On some systems we need to link readline to a termcap compatible
13901# library. NOTE: Keep the precedence of listed libraries synchronised
13902# with setup.py.
13903py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13905$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013906for py_libtermcap in "" ncursesw ncurses curses termcap; do
13907 if test -z "$py_libtermcap"; then
13908 READLINE_LIBS="-lreadline"
13909 else
13910 READLINE_LIBS="-lreadline -l$py_libtermcap"
13911 fi
13912 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013914/* end confdefs.h. */
13915
Martin v. Löwiseba40652007-08-30 20:10:57 +000013916/* Override any GCC internal prototype to avoid an error.
13917 Use char because int might match the return type of a GCC
13918 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013919#ifdef __cplusplus
13920extern "C"
13921#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013922char readline ();
13923int
13924main ()
13925{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013927 ;
13928 return 0;
13929}
13930_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013931if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013932 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013933fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934rm -f core conftest.err conftest.$ac_objext \
13935 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013936 if test $py_cv_lib_readline = yes; then
13937 break
13938 fi
13939done
13940# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13941#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013942if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13944$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13947$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013950
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013951fi
13952
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013953# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13955$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013956if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013957 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013958else
13959 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013960LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013962/* end confdefs.h. */
13963
Martin v. Löwiseba40652007-08-30 20:10:57 +000013964/* Override any GCC internal prototype to avoid an error.
13965 Use char because int might match the return type of a GCC
13966 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013967#ifdef __cplusplus
13968extern "C"
13969#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013970char rl_callback_handler_install ();
13971int
13972main ()
13973{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013975 ;
13976 return 0;
13977}
13978_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013979if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013980 ac_cv_lib_readline_rl_callback_handler_install=yes
13981else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013982 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013984rm -f core conftest.err conftest.$ac_objext \
13985 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013986LIBS=$ac_check_lib_save_LIBS
13987fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13989$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013990if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013992$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013993
13994fi
13995
13996
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013997# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013999/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014000#include <readline/readline.h>
14001_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014002if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014003 have_readline=yes
14004else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014005 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014006
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014007fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014008rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014009if test $have_readline = yes
14010then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014012/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014013#include <readline/readline.h>
14014
14015_ACEOF
14016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014017 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014018
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014019$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014020
14021fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014022rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014025/* end confdefs.h. */
14026#include <readline/readline.h>
14027
14028_ACEOF
14029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014032$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000014033
14034fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014035rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014036
14037fi
14038
Martin v. Löwis0daad592001-09-30 21:09:59 +000014039# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14041$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014042if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014044else
Martin v. Löwis11437992002-04-12 09:54:03 +000014045 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014046LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014049
Martin v. Löwiseba40652007-08-30 20:10:57 +000014050/* Override any GCC internal prototype to avoid an error.
14051 Use char because int might match the return type of a GCC
14052 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014053#ifdef __cplusplus
14054extern "C"
14055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014056char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014057int
14058main ()
14059{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014060return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ;
14062 return 0;
14063}
14064_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014068 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014069fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070rm -f core conftest.err conftest.$ac_objext \
14071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014072LIBS=$ac_check_lib_save_LIBS
14073fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14075$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014076if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014079
Martin v. Löwis0daad592001-09-30 21:09:59 +000014080fi
14081
Michael W. Hudson54241132001-12-07 15:38:26 +000014082
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014083# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14085$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014086if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014088else
14089 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014090LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014092/* end confdefs.h. */
14093
14094/* Override any GCC internal prototype to avoid an error.
14095 Use char because int might match the return type of a GCC
14096 builtin and then its argument prototype would still apply. */
14097#ifdef __cplusplus
14098extern "C"
14099#endif
14100char rl_completion_display_matches_hook ();
14101int
14102main ()
14103{
14104return rl_completion_display_matches_hook ();
14105 ;
14106 return 0;
14107}
14108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014110 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014114rm -f core conftest.err conftest.$ac_objext \
14115 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014116LIBS=$ac_check_lib_save_LIBS
14117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14119$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014120if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014122$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000014123
14124fi
14125
14126
Martin Pantera70c3232016-04-03 02:54:58 +000014127# also in 4.0, but not in editline
14128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14129$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14130if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14131 $as_echo_n "(cached) " >&6
14132else
14133 ac_check_lib_save_LIBS=$LIBS
14134LIBS="-lreadline $READLINE_LIBS $LIBS"
14135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14136/* end confdefs.h. */
14137
14138/* Override any GCC internal prototype to avoid an error.
14139 Use char because int might match the return type of a GCC
14140 builtin and then its argument prototype would still apply. */
14141#ifdef __cplusplus
14142extern "C"
14143#endif
14144char rl_resize_terminal ();
14145int
14146main ()
14147{
14148return rl_resize_terminal ();
14149 ;
14150 return 0;
14151}
14152_ACEOF
14153if ac_fn_c_try_link "$LINENO"; then :
14154 ac_cv_lib_readline_rl_resize_terminal=yes
14155else
14156 ac_cv_lib_readline_rl_resize_terminal=no
14157fi
14158rm -f core conftest.err conftest.$ac_objext \
14159 conftest$ac_exeext conftest.$ac_ext
14160LIBS=$ac_check_lib_save_LIBS
14161fi
14162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14163$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14164if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14165
14166$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14167
14168fi
14169
14170
Martin v. Löwis0daad592001-09-30 21:09:59 +000014171# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14173$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014174if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014175 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014176else
Martin v. Löwis11437992002-04-12 09:54:03 +000014177 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014178LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014181
Martin v. Löwiseba40652007-08-30 20:10:57 +000014182/* Override any GCC internal prototype to avoid an error.
14183 Use char because int might match the return type of a GCC
14184 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014185#ifdef __cplusplus
14186extern "C"
14187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014188char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014189int
14190main ()
14191{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014192return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014193 ;
14194 return 0;
14195}
14196_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014197if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014198 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014202rm -f core conftest.err conftest.$ac_objext \
14203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014204LIBS=$ac_check_lib_save_LIBS
14205fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14207$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014208if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014209
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014210$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014211
Guido van Rossum353ae582001-07-10 16:45:32 +000014212fi
14213
Jack Jansendd19cf82001-12-06 22:36:17 +000014214
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014215# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014217/* end confdefs.h. */
14218#include <readline/readline.h>
14219_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014221 have_readline=yes
14222else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014223 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014224
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014225fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014226rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014227if test $have_readline = yes
14228then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014230/* end confdefs.h. */
14231#include <readline/readline.h>
14232
14233_ACEOF
14234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014236
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014238
14239fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014240rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014241
14242fi
14243
Martin v. Löwis82bca632006-02-10 20:49:30 +000014244# End of readline checks: restore LIBS
14245LIBS=$LIBS_no_readline
14246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14248$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014249if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014250 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014251else
Martin v. Löwis11437992002-04-12 09:54:03 +000014252
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014253if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014254 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014255else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014257/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014258
14259int main()
14260{
14261 int val1 = nice(1);
14262 if (val1 != -1 && val1 == nice(2))
14263 exit(0);
14264 exit(1);
14265}
14266
Martin v. Löwis11437992002-04-12 09:54:03 +000014267_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014268if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014269 ac_cv_broken_nice=yes
14270else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014271 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014272fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14274 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014275fi
14276
Martin v. Löwiseba40652007-08-30 20:10:57 +000014277fi
14278
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14280$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014281if test "$ac_cv_broken_nice" = yes
14282then
Martin v. Löwis11437992002-04-12 09:54:03 +000014283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014284$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014285
14286fi
14287
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14289$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014290if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014293 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014294 ac_cv_broken_poll=no
14295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014297/* end confdefs.h. */
14298
14299#include <poll.h>
14300
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014301int main()
14302{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014303 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014304 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014305
14306 close (42);
14307
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014308 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014309 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014310 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014311 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014312 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014313 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014314 return 1;
14315}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014316
14317_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014318if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014319 ac_cv_broken_poll=yes
14320else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14324 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014326
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014327fi
14328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14330$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014331if test "$ac_cv_broken_poll" = yes
14332then
14333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014334$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014335
14336fi
14337
Brett Cannon43802422005-02-10 20:48:03 +000014338# 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 +000014339# (which is not required by ISO C or UNIX spec) and/or if we support
14340# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014341ac_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 +000014342#include <$ac_cv_struct_tm>
14343
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014344"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014345if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014346
14347cat >>confdefs.h <<_ACEOF
14348#define HAVE_STRUCT_TM_TM_ZONE 1
14349_ACEOF
14350
14351
14352fi
14353
14354if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14355
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014356$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014357
14358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14360"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014361if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014363else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014364 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365fi
14366
Martin v. Löwiseba40652007-08-30 20:10:57 +000014367cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014368#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014369_ACEOF
14370
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14372$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014373if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014374 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014377/* end confdefs.h. */
14378#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014379#if !HAVE_DECL_TZNAME
14380extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014381#endif
14382
14383int
14384main ()
14385{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014386return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014387 ;
14388 return 0;
14389}
14390_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014392 ac_cv_var_tzname=yes
14393else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014394 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014395fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396rm -f core conftest.err conftest.$ac_objext \
14397 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014398fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14400$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014401 if test $ac_cv_var_tzname = yes; then
14402
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014403$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014404
14405 fi
14406fi
14407
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014408
Martin v. Löwis1d459062005-03-14 21:23:33 +000014409# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14411$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014412if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014413 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014414else
14415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014416if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014417 ac_cv_working_tzset=no
14418else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014420/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014421
14422#include <stdlib.h>
14423#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014424#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014425
14426#if HAVE_TZNAME
14427extern char *tzname[];
14428#endif
14429
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014430int main()
14431{
Brett Cannon18367812003-09-19 00:59:16 +000014432 /* Note that we need to ensure that not only does tzset(3)
14433 do 'something' with localtime, but it works as documented
14434 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014435 This includes making sure that tzname is set properly if
14436 tm->tm_zone does not exist since it is the alternative way
14437 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014438
14439 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014440 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014441 */
14442
Martin v. Löwis1d459062005-03-14 21:23:33 +000014443 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014444 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14445
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014446 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014447 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014448 if (localtime(&groundhogday)->tm_hour != 0)
14449 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014450#if HAVE_TZNAME
14451 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14452 if (strcmp(tzname[0], "UTC") ||
14453 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14454 exit(1);
14455#endif
Brett Cannon18367812003-09-19 00:59:16 +000014456
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014457 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014458 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014459 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014460 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014461#if HAVE_TZNAME
14462 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14463 exit(1);
14464#endif
Brett Cannon18367812003-09-19 00:59:16 +000014465
14466 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14467 tzset();
14468 if (localtime(&groundhogday)->tm_hour != 11)
14469 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014470#if HAVE_TZNAME
14471 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14472 exit(1);
14473#endif
14474
14475#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014476 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14477 exit(1);
14478 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14479 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014480#endif
Brett Cannon18367812003-09-19 00:59:16 +000014481
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014482 exit(0);
14483}
14484
14485_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014486if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014487 ac_cv_working_tzset=yes
14488else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014490fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014493fi
14494
Martin v. Löwiseba40652007-08-30 20:10:57 +000014495fi
14496
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14498$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014499if test "$ac_cv_working_tzset" = yes
14500then
14501
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014503
14504fi
14505
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014506# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14508$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014509if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014511else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014513/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014514#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014515int
14516main ()
14517{
14518
14519struct stat st;
14520st.st_mtim.tv_nsec = 1;
14521
14522 ;
14523 return 0;
14524}
14525_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014527 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14532fi
14533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14535$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014536if test "$ac_cv_stat_tv_nsec" = yes
14537then
14538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014539$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014540
14541fi
14542
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014543# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14545$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014546if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014550/* end confdefs.h. */
14551#include <sys/stat.h>
14552int
14553main ()
14554{
14555
14556struct stat st;
14557st.st_mtimespec.tv_nsec = 1;
14558
14559 ;
14560 return 0;
14561}
14562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014564 ac_cv_stat_tv_nsec2=yes
14565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014566 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14569fi
14570
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14572$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014573if test "$ac_cv_stat_tv_nsec2" = yes
14574then
14575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014576$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014577
14578fi
14579
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014580# first curses configure check
14581ac_save_cppflags="$CPPFLAGS"
14582CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14583
14584for ac_header in curses.h ncurses.h
14585do :
14586 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14587ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14588if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14589 cat >>confdefs.h <<_ACEOF
14590#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14591_ACEOF
14592
14593fi
14594
14595done
14596
14597
14598# On Solaris, term.h requires curses.h
14599for ac_header in term.h
14600do :
14601 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14602#ifdef HAVE_CURSES_H
14603#include <curses.h>
14604#endif
14605
14606"
14607if test "x$ac_cv_header_term_h" = xyes; then :
14608 cat >>confdefs.h <<_ACEOF
14609#define HAVE_TERM_H 1
14610_ACEOF
14611
14612fi
14613
14614done
14615
14616
Jack Jansen666b1e72001-10-31 12:11:48 +000014617# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14619$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014620if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014621 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014624/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014625#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014626int
14627main ()
14628{
Jack Jansen666b1e72001-10-31 12:11:48 +000014629
14630 int rtn;
14631 rtn = mvwdelch(0,0,0);
14632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633 ;
14634 return 0;
14635}
14636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014637if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014638 ac_cv_mvwdelch_is_expression=yes
14639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014640 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14643fi
14644
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14646$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014647
14648if test "$ac_cv_mvwdelch_is_expression" = yes
14649then
Martin v. Löwis11437992002-04-12 09:54:03 +000014650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014651$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014652
14653fi
14654
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14656$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014657if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014658 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014661/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014662#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014663int
14664main ()
14665{
Jack Jansen666b1e72001-10-31 12:11:48 +000014666
14667 WINDOW *w;
14668 w->_flags = 0;
14669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670 ;
14671 return 0;
14672}
14673_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014674if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014675 ac_cv_window_has_flags=yes
14676else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014677 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14680fi
14681
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14683$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014684
Jack Jansen666b1e72001-10-31 12:11:48 +000014685
14686if test "$ac_cv_window_has_flags" = yes
14687then
Martin v. Löwis11437992002-04-12 09:54:03 +000014688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014689$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014690
14691fi
14692
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14694$as_echo_n "checking for is_term_resized... " >&6; }
14695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014696/* end confdefs.h. */
14697#include <curses.h>
14698int
14699main ()
14700{
14701void *x=is_term_resized
14702 ;
14703 return 0;
14704}
14705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014707
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014708$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014709
Matthias Klosec511b472010-05-08 11:01:39 +000014710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014711$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014712else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14714$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014715
14716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14718
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14720$as_echo_n "checking for resize_term... " >&6; }
14721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014722/* end confdefs.h. */
14723#include <curses.h>
14724int
14725main ()
14726{
14727void *x=resize_term
14728 ;
14729 return 0;
14730}
14731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014732if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014734$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014735
Matthias Klosec511b472010-05-08 11:01:39 +000014736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014737$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14740$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014741
14742fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14744
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14746$as_echo_n "checking for resizeterm... " >&6; }
14747cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014748/* end confdefs.h. */
14749#include <curses.h>
14750int
14751main ()
14752{
14753void *x=resizeterm
14754 ;
14755 return 0;
14756}
14757_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014758if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014759
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014760$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014761
Matthias Klosec511b472010-05-08 11:01:39 +000014762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014763$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14766$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014767
14768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014770# last curses configure check
14771CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14774$as_echo "$as_me: checking for device files" >&6;}
14775
14776if test "x$cross_compiling" = xyes; then
14777 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14779$as_echo_n "checking for /dev/ptmx... " >&6; }
14780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14781$as_echo "not set" >&6; }
14782 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14783 fi
14784 if test "${ac_cv_file__dev_ptc+set}" != set; then
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14786$as_echo_n "checking for /dev/ptc... " >&6; }
14787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14788$as_echo "not set" >&6; }
14789 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14790 fi
14791fi
14792
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14794$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014795if ${ac_cv_file__dev_ptmx+:} false; then :
14796 $as_echo_n "(cached) " >&6
14797else
14798 test "$cross_compiling" = yes &&
14799 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14800if test -r "/dev/ptmx"; then
14801 ac_cv_file__dev_ptmx=yes
14802else
14803 ac_cv_file__dev_ptmx=no
14804fi
14805fi
14806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14807$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14808if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014809
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014810fi
14811
14812if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014814$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014815
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014816fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14818$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014819if ${ac_cv_file__dev_ptc+:} false; then :
14820 $as_echo_n "(cached) " >&6
14821else
14822 test "$cross_compiling" = yes &&
14823 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14824if test -r "/dev/ptc"; then
14825 ac_cv_file__dev_ptc=yes
14826else
14827 ac_cv_file__dev_ptc=no
14828fi
14829fi
14830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14831$as_echo "$ac_cv_file__dev_ptc" >&6; }
14832if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014833
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014834fi
14835
14836if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014837
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014838$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014839
Neal Norwitz865400f2003-03-21 01:42:58 +000014840fi
14841
Mark Dickinson82864d12009-11-15 16:18:58 +000014842if test "$have_long_long" = yes
14843then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14845$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014846 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014847 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014848else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014849 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014850 ac_cv_have_long_long_format="cross -- assuming no"
14851 if test x$GCC = xyes; then
14852 save_CFLAGS=$CFLAGS
14853 CFLAGS="$CFLAGS -Werror -Wformat"
14854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855/* end confdefs.h. */
14856
14857 #include <stdio.h>
14858 #include <stddef.h>
14859
14860int
14861main ()
14862{
14863
14864 char *buffer;
14865 sprintf(buffer, "%lld", (long long)123);
14866 sprintf(buffer, "%lld", (long long)-123);
14867 sprintf(buffer, "%llu", (unsigned long long)123);
14868
14869 ;
14870 return 0;
14871}
14872_ACEOF
14873if ac_fn_c_try_compile "$LINENO"; then :
14874 ac_cv_have_long_long_format=yes
14875
14876fi
14877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14878 CFLAGS=$save_CFLAGS
14879 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014882/* end confdefs.h. */
14883
14884 #include <stdio.h>
14885 #include <stddef.h>
14886 #include <string.h>
14887
14888 #ifdef HAVE_SYS_TYPES_H
14889 #include <sys/types.h>
14890 #endif
14891
14892 int main()
14893 {
14894 char buffer[256];
14895
14896 if (sprintf(buffer, "%lld", (long long)123) < 0)
14897 return 1;
14898 if (strcmp(buffer, "123"))
14899 return 1;
14900
14901 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14902 return 1;
14903 if (strcmp(buffer, "-123"))
14904 return 1;
14905
14906 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14907 return 1;
14908 if (strcmp(buffer, "123"))
14909 return 1;
14910
14911 return 0;
14912 }
14913
14914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014915if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014916 ac_cv_have_long_long_format=yes
14917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014918 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014922fi
14923
14924
Mark Dickinson82864d12009-11-15 16:18:58 +000014925fi
14926
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14928$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014929fi
14930
Mark Dickinson5ce84742009-12-31 20:48:04 +000014931if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014932then
14933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014934$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014935
14936fi
14937
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014938if test $ac_sys_system = Darwin
14939then
14940 LIBS="$LIBS -framework CoreFoundation"
14941fi
14942
Mark Dickinson82864d12009-11-15 16:18:58 +000014943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14945$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014946if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014949 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014950 ac_cv_have_size_t_format="cross -- assuming yes"
14951
Brett Cannon09d12362006-05-11 05:11:33 +000014952else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014954/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014955
Brett Cannon09d12362006-05-11 05:11:33 +000014956#include <stdio.h>
14957#include <stddef.h>
14958#include <string.h>
14959
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014960#ifdef HAVE_SYS_TYPES_H
14961#include <sys/types.h>
14962#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014963
14964#ifdef HAVE_SSIZE_T
14965typedef ssize_t Py_ssize_t;
14966#elif SIZEOF_VOID_P == SIZEOF_LONG
14967typedef long Py_ssize_t;
14968#else
14969typedef int Py_ssize_t;
14970#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014971
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014972int main()
14973{
14974 char buffer[256];
14975
Brett Cannon09d12362006-05-11 05:11:33 +000014976 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14977 return 1;
14978
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014979 if (strcmp(buffer, "123"))
14980 return 1;
14981
14982 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14983 return 1;
14984
14985 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014986 return 1;
14987
14988 return 0;
14989}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014990
Brett Cannon09d12362006-05-11 05:11:33 +000014991_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014992if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014993 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014995 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014996fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14998 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014999fi
15000
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015001fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15003$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000015004if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015005
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015006$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000015007
15008fi
15009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015010ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015011#ifdef HAVE_SYS_TYPES_H
15012#include <sys/types.h>
15013#endif
15014#ifdef HAVE_SYS_SOCKET_H
15015#include <sys/socket.h>
15016#endif
15017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015018"
Matthias Klose3cef2a92012-03-14 23:39:33 +010015019if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015020
Martin v. Löwis11437992002-04-12 09:54:03 +000015021else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015022
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015023$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015024
15025fi
15026
Michael W. Hudson54241132001-12-07 15:38:26 +000015027
Benjamin Peterson7497e912010-10-16 00:53:39 +000015028case $ac_sys_system in
15029AIX*)
15030
15031$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15032 ;;
15033esac
15034
15035
Michael W. Hudson54241132001-12-07 15:38:26 +000015036
15037
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015038for h in `(cd $srcdir;echo Python/thread_*.h)`
15039do
15040 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15041done
15042
Michael W. Hudson54241132001-12-07 15:38:26 +000015043
Neal Norwitzd24499d2005-12-18 21:36:39 +000015044SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15046$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015047for dir in $SRCDIRS; do
15048 if test ! -d $dir; then
15049 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015050 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015051done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050015052
15053# BEGIN_COMPUTED_GOTO
15054# Check for --with-computed-gotos
15055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15056$as_echo_n "checking for --with-computed-gotos... " >&6; }
15057
15058# Check whether --with-computed-gotos was given.
15059if test "${with_computed_gotos+set}" = set; then :
15060 withval=$with_computed_gotos;
15061if test "$withval" = yes
15062then
15063
15064$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
15065
15066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15067$as_echo "yes" >&6; }
15068fi
15069if test "$withval" = no
15070then
15071
15072$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15073
15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15075$as_echo "no" >&6; }
15076fi
15077
15078else
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15080$as_echo "no value specified" >&6; }
15081fi
15082
15083
15084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15085$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15086if ${ac_cv_computed_gotos+:} false; then :
15087 $as_echo_n "(cached) " >&6
15088else
15089 if test "$cross_compiling" = yes; then :
15090 if test "${with_computed_gotos+set}" = set; then
15091 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15092 else
15093 ac_cv_computed_gotos=no
15094 fi
15095else
15096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097/* end confdefs.h. */
15098
15099int main(int argc, char **argv)
15100{
15101 static void *targets[1] = { &&LABEL1 };
15102 goto LABEL2;
15103LABEL1:
15104 return 0;
15105LABEL2:
15106 goto *targets[0];
15107 return 1;
15108}
15109
15110_ACEOF
15111if ac_fn_c_try_run "$LINENO"; then :
15112 ac_cv_computed_gotos=yes
15113else
15114 ac_cv_computed_gotos=no
15115fi
15116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15117 conftest.$ac_objext conftest.beam conftest.$ac_ext
15118fi
15119
15120fi
15121
15122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15123$as_echo "$ac_cv_computed_gotos" >&6; }
15124case "$ac_cv_computed_gotos" in yes*)
15125
15126$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15127
15128esac
15129# END_COMPUTED_GOTO
15130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15132$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015133
Ned Deily3f1d0b32014-11-20 02:11:03 -080015134# ensurepip option
15135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15136$as_echo_n "checking for ensurepip... " >&6; }
15137
15138# Check whether --with-ensurepip was given.
15139if test "${with_ensurepip+set}" = set; then :
15140 withval=$with_ensurepip;
15141else
15142 with_ensurepip=no
15143fi
15144
15145case $with_ensurepip in #(
15146 yes|upgrade) :
15147 ENSUREPIP=upgrade ;; #(
15148 install) :
15149 ENSUREPIP=install ;; #(
15150 no) :
15151 ENSUREPIP=no ;; #(
15152 *) :
15153 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15154esac
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15156$as_echo "$ENSUREPIP" >&6; }
15157
15158
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015160ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015161
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015162ac_config_files="$ac_config_files Modules/ld_so_aix"
15163
Martin v. Löwis11437992002-04-12 09:54:03 +000015164cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015165# This file is a shell script that caches the results of configure
15166# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015167# scripts and configure runs, see configure's option --config-cache.
15168# It is not useful on other systems. If it contains results you don't
15169# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015170#
Martin v. Löwis11437992002-04-12 09:54:03 +000015171# config.status only pays attention to the cache file if you give it
15172# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015173#
Skip Montanaro6dead952003-09-25 14:50:04 +000015174# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015175# loading this file, other *unset* `ac_cv_foo' will be assigned the
15176# following values.
15177
15178_ACEOF
15179
Guido van Rossumf78abae1997-01-21 22:02:36 +000015180# The following way of writing the cache mishandles newlines in values,
15181# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015183# Ultrix sh set writes to stderr and can't be redirected directly,
15184# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015185(
15186 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15187 eval ac_val=\$$ac_var
15188 case $ac_val in #(
15189 *${as_nl}*)
15190 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015191 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15192$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193 esac
15194 case $ac_var in #(
15195 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015196 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15197 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198 esac ;;
15199 esac
15200 done
15201
Martin v. Löwis11437992002-04-12 09:54:03 +000015202 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15204 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015205 # `set' does not quote correctly, so add quotes: double-quote
15206 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015208 "s/'/'\\\\''/g;
15209 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 *)
15212 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 esac |
15216 sort
15217) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015218 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15223 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15225 :end' >>confcache
15226if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15227 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015228 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015229 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15230$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015231 if test ! -f "$cache_file" || test -h "$cache_file"; then
15232 cat confcache >"$cache_file"
15233 else
15234 case $cache_file in #(
15235 */* | ?:*)
15236 mv -f confcache "$cache_file"$$ &&
15237 mv -f "$cache_file"$$ "$cache_file" ;; #(
15238 *)
15239 mv -f confcache "$cache_file" ;;
15240 esac
15241 fi
15242 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015243 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015244 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15245$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015246 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015247fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015248rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015249
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015250test "x$prefix" = xNONE && prefix=$ac_default_prefix
15251# Let make expand exec_prefix.
15252test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015253
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015254DEFS=-DHAVE_CONFIG_H
15255
Skip Montanaro6dead952003-09-25 14:50:04 +000015256ac_libobjs=
15257ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015258U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015259for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15260 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015261 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015262 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15264 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015265 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15266 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015267done
15268LIBOBJS=$ac_libobjs
15269
15270LTLIBOBJS=$ac_ltlibobjs
15271
15272
Martin v. Löwis11437992002-04-12 09:54:03 +000015273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015274
Matthias Klose3cef2a92012-03-14 23:39:33 +010015275: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015276ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015277ac_clean_files_save=$ac_clean_files
15278ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015279{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15280$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15281as_write_fail=0
15282cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015283#! $SHELL
15284# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015285# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015286# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015287# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015288
Martin v. Löwis11437992002-04-12 09:54:03 +000015289debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015290ac_cs_recheck=false
15291ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015292
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015293SHELL=\${CONFIG_SHELL-$SHELL}
15294export SHELL
15295_ASEOF
15296cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15297## -------------------- ##
15298## M4sh Initialization. ##
15299## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015300
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301# Be more Bourne compatible
15302DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015303if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 emulate sh
15305 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015307 # is contrary to our usage. Disable this feature.
15308 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015309 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015311 case `(set -o) 2>/dev/null` in #(
15312 *posix*) :
15313 set -o posix ;; #(
15314 *) :
15315 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015316esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015317fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015318
Skip Montanaro6dead952003-09-25 14:50:04 +000015319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015320as_nl='
15321'
15322export as_nl
15323# Printing a long string crashes Solaris 7 /usr/bin/printf.
15324as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15325as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15326as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15327# Prefer a ksh shell builtin over an external printf program on Solaris,
15328# but without wasting forks for bash or zsh.
15329if test -z "$BASH_VERSION$ZSH_VERSION" \
15330 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15331 as_echo='print -r --'
15332 as_echo_n='print -rn --'
15333elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15334 as_echo='printf %s\n'
15335 as_echo_n='printf %s'
15336else
15337 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15338 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15339 as_echo_n='/usr/ucb/echo -n'
15340 else
15341 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15342 as_echo_n_body='eval
15343 arg=$1;
15344 case $arg in #(
15345 *"$as_nl"*)
15346 expr "X$arg" : "X\\(.*\\)$as_nl";
15347 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15348 esac;
15349 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15350 '
15351 export as_echo_n_body
15352 as_echo_n='sh -c $as_echo_n_body as_echo'
15353 fi
15354 export as_echo_body
15355 as_echo='sh -c $as_echo_body as_echo'
15356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
15358# The user is always right.
15359if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015360 PATH_SEPARATOR=:
15361 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15362 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15363 PATH_SEPARATOR=';'
15364 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015365fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015366
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367
15368# IFS
15369# We need space, tab and new line, in precisely that order. Quoting is
15370# there to prevent editors from complaining about space-tab.
15371# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15372# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373IFS=" "" $as_nl"
15374
15375# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015376as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015377case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378 *[\\/]* ) as_myself=$0 ;;
15379 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015380for as_dir in $PATH
15381do
15382 IFS=$as_save_IFS
15383 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015384 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15385 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388 ;;
15389esac
15390# We did not find ourselves, most probably we were run as `sh COMMAND'
15391# in which case we are not to be found in the path.
15392if test "x$as_myself" = x; then
15393 as_myself=$0
15394fi
15395if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015396 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15397 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015398fi
15399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400# Unset variables that we do not need and which cause bugs (e.g. in
15401# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15402# suppresses any "Segmentation fault" message there. '((' could
15403# trigger a bug in pdksh 5.2.14.
15404for as_var in BASH_ENV ENV MAIL MAILPATH
15405do eval test x\${$as_var+set} = xset \
15406 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407done
15408PS1='$ '
15409PS2='> '
15410PS4='+ '
15411
15412# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015413LC_ALL=C
15414export LC_ALL
15415LANGUAGE=C
15416export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015417
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015418# CDPATH.
15419(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15420
15421
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015422# as_fn_error STATUS ERROR [LINENO LOG_FD]
15423# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015424# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15425# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015426# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015427as_fn_error ()
15428{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015429 as_status=$1; test $as_status -eq 0 && as_status=1
15430 if test "$4"; then
15431 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15432 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015433 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015434 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015435 as_fn_exit $as_status
15436} # as_fn_error
15437
15438
15439# as_fn_set_status STATUS
15440# -----------------------
15441# Set $? to STATUS, without forking.
15442as_fn_set_status ()
15443{
15444 return $1
15445} # as_fn_set_status
15446
15447# as_fn_exit STATUS
15448# -----------------
15449# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15450as_fn_exit ()
15451{
15452 set +e
15453 as_fn_set_status $1
15454 exit $1
15455} # as_fn_exit
15456
15457# as_fn_unset VAR
15458# ---------------
15459# Portably unset VAR.
15460as_fn_unset ()
15461{
15462 { eval $1=; unset $1;}
15463}
15464as_unset=as_fn_unset
15465# as_fn_append VAR VALUE
15466# ----------------------
15467# Append the text in VALUE to the end of the definition contained in VAR. Take
15468# advantage of any shell optimizations that allow amortized linear growth over
15469# repeated appends, instead of the typical quadratic growth present in naive
15470# implementations.
15471if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15472 eval 'as_fn_append ()
15473 {
15474 eval $1+=\$2
15475 }'
15476else
15477 as_fn_append ()
15478 {
15479 eval $1=\$$1\$2
15480 }
15481fi # as_fn_append
15482
15483# as_fn_arith ARG...
15484# ------------------
15485# Perform arithmetic evaluation on the ARGs, and store the result in the
15486# global $as_val. Take advantage of shells that can avoid forks. The arguments
15487# must be portable across $(()) and expr.
15488if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15489 eval 'as_fn_arith ()
15490 {
15491 as_val=$(( $* ))
15492 }'
15493else
15494 as_fn_arith ()
15495 {
15496 as_val=`expr "$@" || test $? -eq 1`
15497 }
15498fi # as_fn_arith
15499
15500
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501if expr a : '\(a\)' >/dev/null 2>&1 &&
15502 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15503 as_expr=expr
15504else
15505 as_expr=false
15506fi
15507
15508if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15509 as_basename=basename
15510else
15511 as_basename=false
15512fi
15513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015514if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15515 as_dirname=dirname
15516else
15517 as_dirname=false
15518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519
Martin v. Löwiseba40652007-08-30 20:10:57 +000015520as_me=`$as_basename -- "$0" ||
15521$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15522 X"$0" : 'X\(//\)$' \| \
15523 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015524$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525 sed '/^.*\/\([^/][^/]*\)\/*$/{
15526 s//\1/
15527 q
15528 }
15529 /^X\/\(\/\/\)$/{
15530 s//\1/
15531 q
15532 }
15533 /^X\/\(\/\).*/{
15534 s//\1/
15535 q
15536 }
15537 s/.*/./; q'`
15538
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015539# Avoid depending upon Character Ranges.
15540as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15541as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15542as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15543as_cr_digits='0123456789'
15544as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015545
15546ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015547case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015548-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015549 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015550 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015551 xy) ECHO_C='\c';;
15552 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15553 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554 esac;;
15555*)
15556 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015557esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015558
Martin v. Löwis11437992002-04-12 09:54:03 +000015559rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560if test -d conf$$.dir; then
15561 rm -f conf$$.dir/conf$$.file
15562else
15563 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015564 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015566if (echo >conf$$.file) 2>/dev/null; then
15567 if ln -s conf$$.file conf$$ 2>/dev/null; then
15568 as_ln_s='ln -s'
15569 # ... but there are two gotchas:
15570 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15571 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015572 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015574 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015575 elif ln conf$$.file conf$$ 2>/dev/null; then
15576 as_ln_s=ln
15577 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015578 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015579 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015580else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015581 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015583rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15584rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015586
15587# as_fn_mkdir_p
15588# -------------
15589# Create "$as_dir" as a directory, including parents if necessary.
15590as_fn_mkdir_p ()
15591{
15592
15593 case $as_dir in #(
15594 -*) as_dir=./$as_dir;;
15595 esac
15596 test -d "$as_dir" || eval $as_mkdir_p || {
15597 as_dirs=
15598 while :; do
15599 case $as_dir in #(
15600 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15601 *) as_qdir=$as_dir;;
15602 esac
15603 as_dirs="'$as_qdir' $as_dirs"
15604 as_dir=`$as_dirname -- "$as_dir" ||
15605$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15606 X"$as_dir" : 'X\(//\)[^/]' \| \
15607 X"$as_dir" : 'X\(//\)$' \| \
15608 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15609$as_echo X"$as_dir" |
15610 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15611 s//\1/
15612 q
15613 }
15614 /^X\(\/\/\)[^/].*/{
15615 s//\1/
15616 q
15617 }
15618 /^X\(\/\/\)$/{
15619 s//\1/
15620 q
15621 }
15622 /^X\(\/\).*/{
15623 s//\1/
15624 q
15625 }
15626 s/.*/./; q'`
15627 test -d "$as_dir" && break
15628 done
15629 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015630 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015631
15632
15633} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015634if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015635 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015636else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015637 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015638 as_mkdir_p=false
15639fi
15640
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015641
15642# as_fn_executable_p FILE
15643# -----------------------
15644# Test if FILE is an executable regular file.
15645as_fn_executable_p ()
15646{
15647 test -f "$1" && test -x "$1"
15648} # as_fn_executable_p
15649as_test_x='test -x'
15650as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
15652# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015653as_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 +000015654
15655# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015656as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015657
15658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015660## ----------------------------------- ##
15661## Main body of $CONFIG_STATUS script. ##
15662## ----------------------------------- ##
15663_ASEOF
15664test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15667# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015668# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669# values after options handling.
15670ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015671This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015672generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015673
15674 CONFIG_FILES = $CONFIG_FILES
15675 CONFIG_HEADERS = $CONFIG_HEADERS
15676 CONFIG_LINKS = $CONFIG_LINKS
15677 CONFIG_COMMANDS = $CONFIG_COMMANDS
15678 $ $0 $@
15679
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680on `(hostname || uname -n) 2>/dev/null | sed 1q`
15681"
15682
Martin v. Löwis11437992002-04-12 09:54:03 +000015683_ACEOF
15684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015685case $ac_config_files in *"
15686"*) set x $ac_config_files; shift; ac_config_files=$*;;
15687esac
15688
15689case $ac_config_headers in *"
15690"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15691esac
15692
15693
15694cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015695# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015696config_files="$ac_config_files"
15697config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015698
Martin v. Löwiseba40652007-08-30 20:10:57 +000015699_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015702ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015703\`$as_me' instantiates files and other configuration actions
15704from templates according to the current configuration. Unless the files
15705and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015707Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
15709 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015711 --config print configuration, then exit
15712 -q, --quiet, --silent
15713 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 -d, --debug don't remove temporary files
15715 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015716 --file=FILE[:TEMPLATE]
15717 instantiate the configuration file FILE
15718 --header=FILE[:TEMPLATE]
15719 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
15721Configuration files:
15722$config_files
15723
15724Configuration headers:
15725$config_headers
15726
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015727Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015728
Martin v. Löwiseba40652007-08-30 20:10:57 +000015729_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015730cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15731ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015732ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015733python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015734configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015735 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015737Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015738This config.status script is free software; the Free Software Foundation
15739gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015740
15741ac_pwd='$ac_pwd'
15742srcdir='$srcdir'
15743INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015744MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015745test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015746_ACEOF
15747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015748cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15749# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015750ac_need_defaults=:
15751while test $# != 0
15752do
15753 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015754 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15756 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015757 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015759 --*=)
15760 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15761 ac_optarg=
15762 ac_shift=:
15763 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015765 ac_option=$1
15766 ac_optarg=$2
15767 ac_shift=shift
15768 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 esac
15770
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015772 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015773 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15774 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015775 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015776 $as_echo "$ac_cs_version"; exit ;;
15777 --config | --confi | --conf | --con | --co | --c )
15778 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 debug=: ;;
15781 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015782 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015783 case $ac_optarg in
15784 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015785 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015786 esac
15787 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015788 ac_need_defaults=false;;
15789 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015790 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015791 case $ac_optarg in
15792 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15793 esac
15794 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015795 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015796 --he | --h)
15797 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015798 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015799Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015800 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015801 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015802 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15803 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15804 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015805
15806 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015807 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015808Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015809
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015810 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015811 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015812
15813 esac
15814 shift
15815done
15816
Skip Montanaro6dead952003-09-25 14:50:04 +000015817ac_configure_extra_args=
15818
15819if $ac_cs_silent; then
15820 exec 6>/dev/null
15821 ac_configure_extra_args="$ac_configure_extra_args --silent"
15822fi
15823
15824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015825cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015826if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015827 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015828 shift
15829 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15830 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015831 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015832 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015833fi
15834
Martin v. Löwis11437992002-04-12 09:54:03 +000015835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015837exec 5>>config.log
15838{
15839 echo
15840 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15841## Running $as_me. ##
15842_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015843 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015847cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015850cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015851
15852# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015853for ac_config_target in $ac_config_targets
15854do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015855 case $ac_config_target in
15856 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15857 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15858 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15859 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015860 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15861 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015862 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15863 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015864 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015865 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015866
Matthias Klose3cef2a92012-03-14 23:39:33 +010015867 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 esac
15869done
15870
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871
Martin v. Löwis11437992002-04-12 09:54:03 +000015872# If the user did not use the arguments to specify the items to instantiate,
15873# then the envvar interface is used. Set only those that are not.
15874# We use the long form for the default assignment because of an extremely
15875# bizarre bug on SunOS 4.1.3.
15876if $ac_need_defaults; then
15877 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15878 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15879fi
15880
Skip Montanaro6dead952003-09-25 14:50:04 +000015881# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015882# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015883# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884# Hook for its removal unless debugging.
15885# Note that there is a small window in which the directory will not be cleaned:
15886# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015887$debug ||
15888{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015889 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015890 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015891 : "${ac_tmp:=$tmp}"
15892 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015893' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015894 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015895}
Martin v. Löwis11437992002-04-12 09:54:03 +000015896# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015897
Martin v. Löwis11437992002-04-12 09:54:03 +000015898{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015899 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015900 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015901} ||
15902{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015903 tmp=./conf$$-$RANDOM
15904 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015905} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015906ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015908# Set up the scripts for CONFIG_FILES section.
15909# No need to generate them if there are no CONFIG_FILES.
15910# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015913
15914ac_cr=`echo X | tr X '\015'`
15915# On cygwin, bash can eat \r inside `` if the user requested igncr.
15916# But we know of no other shell where ac_cr would be empty at this
15917# point, so we can use a bashism as a fallback.
15918if test "x$ac_cr" = x; then
15919 eval ac_cr=\$\'\\r\'
15920fi
15921ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15922if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015923 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015924else
15925 ac_cs_awk_cr=$ac_cr
15926fi
15927
Matthias Klose3cef2a92012-03-14 23:39:33 +010015928echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015929_ACEOF
15930
Martin v. Löwiseba40652007-08-30 20:10:57 +000015931
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015932{
15933 echo "cat >conf$$subs.awk <<_ACEOF" &&
15934 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15935 echo "_ACEOF"
15936} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015937 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15938ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015939ac_delim='%!_!# '
15940for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015941 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015942 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015943
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015944 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15945 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015946 break
15947 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015948 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015949 else
15950 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015952done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015953rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015955cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015956cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015957_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015958sed -n '
15959h
15960s/^/S["/; s/!.*/"]=/
15961p
15962g
15963s/^[^!]*!//
15964:repl
15965t repl
15966s/'"$ac_delim"'$//
15967t delim
15968:nl
15969h
15970s/\(.\{148\}\)..*/\1/
15971t more1
15972s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15973p
15974n
15975b repl
15976:more1
15977s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15978p
15979g
15980s/.\{148\}//
15981t nl
15982:delim
15983h
15984s/\(.\{148\}\)..*/\1/
15985t more2
15986s/["\\]/\\&/g; s/^/"/; s/$/"/
15987p
15988b
15989:more2
15990s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15991p
15992g
15993s/.\{148\}//
15994t delim
15995' <conf$$subs.awk | sed '
15996/^[^""]/{
15997 N
15998 s/\n//
15999}
16000' >>$CONFIG_STATUS || ac_write_fail=1
16001rm -f conf$$subs.awk
16002cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16003_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010016004cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016005 for (key in S) S_is_set[key] = 1
16006 FS = ""
16007
16008}
16009{
16010 line = $ 0
16011 nfields = split(line, field, "@")
16012 substed = 0
16013 len = length(field[1])
16014 for (i = 2; i < nfields; i++) {
16015 key = field[i]
16016 keylen = length(key)
16017 if (S_is_set[key]) {
16018 value = S[key]
16019 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16020 len += length(value) + length(field[++i])
16021 substed = 1
16022 } else
16023 len += 1 + keylen
16024 }
16025
16026 print line
16027}
16028
16029_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016031cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16032if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16033 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16034else
16035 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010016036fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016037 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016038_ACEOF
16039
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016040# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16041# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000016042# trailing colons and then remove the whole line if VPATH becomes empty
16043# (actually we leave an empty line to preserve line numbers).
16044if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016045 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16046h
16047s///
16048s/^/:/
16049s/[ ]*$/:/
16050s/:\$(srcdir):/:/g
16051s/:\${srcdir}:/:/g
16052s/:@srcdir@:/:/g
16053s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016054s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016055x
16056s/\(=[ ]*\).*/\1/
16057G
16058s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000016059s/^[^=]*=[ ]*$//
16060}'
16061fi
16062
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016063cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016064fi # test -n "$CONFIG_FILES"
16065
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016066# Set up the scripts for CONFIG_HEADERS section.
16067# No need to generate them if there are no CONFIG_HEADERS.
16068# This happens for instance with `./config.status Makefile'.
16069if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010016070cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016071BEGIN {
16072_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016073
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016074# Transform confdefs.h into an awk script `defines.awk', embedded as
16075# here-document in config.status, that substitutes the proper values into
16076# config.h.in to produce config.h.
16077
16078# Create a delimiter string that does not exist in confdefs.h, to ease
16079# handling of long lines.
16080ac_delim='%!_!# '
16081for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010016082 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16083 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016084 break
16085 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016086 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016087 else
16088 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16089 fi
16090done
16091
16092# For the awk script, D is an array of macro values keyed by name,
16093# likewise P contains macro parameters if any. Preserve backslash
16094# newline sequences.
16095
16096ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16097sed -n '
16098s/.\{148\}/&'"$ac_delim"'/g
16099t rset
16100:rset
16101s/^[ ]*#[ ]*define[ ][ ]*/ /
16102t def
16103d
16104:def
16105s/\\$//
16106t bsnl
16107s/["\\]/\\&/g
16108s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16109D["\1"]=" \3"/p
16110s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16111d
16112:bsnl
16113s/["\\]/\\&/g
16114s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16115D["\1"]=" \3\\\\\\n"\\/p
16116t cont
16117s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16118t cont
16119d
16120:cont
16121n
16122s/.\{148\}/&'"$ac_delim"'/g
16123t clear
16124:clear
16125s/\\$//
16126t bsnlc
16127s/["\\]/\\&/g; s/^/"/; s/$/"/p
16128d
16129:bsnlc
16130s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16131b cont
16132' <confdefs.h | sed '
16133s/'"$ac_delim"'/"\\\
16134"/g' >>$CONFIG_STATUS || ac_write_fail=1
16135
16136cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16137 for (key in D) D_is_set[key] = 1
16138 FS = ""
16139}
16140/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16141 line = \$ 0
16142 split(line, arg, " ")
16143 if (arg[1] == "#") {
16144 defundef = arg[2]
16145 mac1 = arg[3]
16146 } else {
16147 defundef = substr(arg[1], 2)
16148 mac1 = arg[2]
16149 }
16150 split(mac1, mac2, "(") #)
16151 macro = mac2[1]
16152 prefix = substr(line, 1, index(line, defundef) - 1)
16153 if (D_is_set[macro]) {
16154 # Preserve the white space surrounding the "#".
16155 print prefix "define", macro P[macro] D[macro]
16156 next
16157 } else {
16158 # Replace #undef with comments. This is necessary, for example,
16159 # in the case of _POSIX_SOURCE, which is predefined and required
16160 # on some systems where configure will not decide to define it.
16161 if (defundef == "undef") {
16162 print "/*", prefix defundef, macro, "*/"
16163 next
16164 }
16165 }
16166}
16167{ print }
16168_ACAWK
16169_ACEOF
16170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016171 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016172fi # test -n "$CONFIG_HEADERS"
16173
16174
16175eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16176shift
16177for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178do
16179 case $ac_tag in
16180 :[FHLC]) ac_mode=$ac_tag; continue;;
16181 esac
16182 case $ac_mode$ac_tag in
16183 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016184 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016185 :[FH]-) ac_tag=-:-;;
16186 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16187 esac
16188 ac_save_IFS=$IFS
16189 IFS=:
16190 set x $ac_tag
16191 IFS=$ac_save_IFS
16192 shift
16193 ac_file=$1
16194 shift
16195
16196 case $ac_mode in
16197 :L) ac_source=$1;;
16198 :[FH])
16199 ac_file_inputs=
16200 for ac_f
16201 do
16202 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016203 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204 *) # Look for the file first in the build tree, then in the source tree
16205 # (if the path is not absolute). The absolute path cannot be DOS-style,
16206 # because $ac_f cannot contain `:'.
16207 test -f "$ac_f" ||
16208 case $ac_f in
16209 [\\/$]*) false;;
16210 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16211 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016212 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016213 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016214 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16215 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016216 done
16217
16218 # Let's still pretend it is `configure' which instantiates (i.e., don't
16219 # use $as_me), people would be surprised to read:
16220 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016221 configure_input='Generated from '`
16222 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16223 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016224 if test x"$ac_file" != x-; then
16225 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016226 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16227$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016229 # Neutralize special characters interpreted by sed in replacement strings.
16230 case $configure_input in #(
16231 *\&* | *\|* | *\\* )
16232 ac_sed_conf_input=`$as_echo "$configure_input" |
16233 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16234 *) ac_sed_conf_input=$configure_input;;
16235 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016236
16237 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016238 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16239 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016240 esac
16241 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016242 esac
16243
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016245$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016246 X"$ac_file" : 'X\(//\)[^/]' \| \
16247 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016249$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16251 s//\1/
16252 q
16253 }
16254 /^X\(\/\/\)[^/].*/{
16255 s//\1/
16256 q
16257 }
16258 /^X\(\/\/\)$/{
16259 s//\1/
16260 q
16261 }
16262 /^X\(\/\).*/{
16263 s//\1/
16264 q
16265 }
16266 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016267 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_builddir=.
16269
Martin v. Löwiseba40652007-08-30 20:10:57 +000016270case "$ac_dir" in
16271.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16272*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016273 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016274 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016275 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016276 case $ac_top_builddir_sub in
16277 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16278 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16279 esac ;;
16280esac
16281ac_abs_top_builddir=$ac_pwd
16282ac_abs_builddir=$ac_pwd$ac_dir_suffix
16283# for backward compatibility:
16284ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016285
16286case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016287 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016288 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016289 ac_top_srcdir=$ac_top_builddir_sub
16290 ac_abs_top_srcdir=$ac_pwd ;;
16291 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016292 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016293 ac_top_srcdir=$srcdir
16294 ac_abs_top_srcdir=$srcdir ;;
16295 *) # Relative name.
16296 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16297 ac_top_srcdir=$ac_top_build_prefix$srcdir
16298 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016299esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016300ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016301
Martin v. Löwis11437992002-04-12 09:54:03 +000016302
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303 case $ac_mode in
16304 :F)
16305 #
16306 # CONFIG_FILE
16307 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016308
16309 case $INSTALL in
16310 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016311 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016312 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016313 ac_MKDIR_P=$MKDIR_P
16314 case $MKDIR_P in
16315 [\\/$]* | ?:[\\/]* ) ;;
16316 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16317 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016318_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016319
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321# If the template does not know about datarootdir, expand it.
16322# FIXME: This hack should be removed a few years after 2.60.
16323ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016324ac_sed_dataroot='
16325/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016326 p
16327 q
16328}
16329/@datadir@/p
16330/@docdir@/p
16331/@infodir@/p
16332/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016333/@mandir@/p'
16334case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016335*datarootdir*) ac_datarootdir_seen=yes;;
16336*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16338$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016339_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016340cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341 ac_datarootdir_hack='
16342 s&@datadir@&$datadir&g
16343 s&@docdir@&$docdir&g
16344 s&@infodir@&$infodir&g
16345 s&@localedir@&$localedir&g
16346 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016347 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016348esac
16349_ACEOF
16350
16351# Neutralize VPATH when `$srcdir' = `.'.
16352# Shell code in configure.ac might set extrasub.
16353# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016354cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16355ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016356$extrasub
16357_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016359:t
16360/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016361s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016362s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016363s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016364s&@srcdir@&$ac_srcdir&;t t
16365s&@abs_srcdir@&$ac_abs_srcdir&;t t
16366s&@top_srcdir@&$ac_top_srcdir&;t t
16367s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16368s&@builddir@&$ac_builddir&;t t
16369s&@abs_builddir@&$ac_abs_builddir&;t t
16370s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16371s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016372s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016374"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016375eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16376 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016377
Martin v. Löwiseba40652007-08-30 20:10:57 +000016378test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016379 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16380 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16381 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016383which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016384$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016385which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016386
Matthias Klose3cef2a92012-03-14 23:39:33 +010016387 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016389 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16390 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016391 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016392 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016393 ;;
16394 :H)
16395 #
16396 # CONFIG_HEADER
16397 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016399 {
16400 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016401 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16402 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016403 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016404 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016405 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16406$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016408 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016409 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016410 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016411 fi
16412 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016413 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016414 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016415 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016417 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016418
Martin v. Löwiseba40652007-08-30 20:10:57 +000016419
16420 esac
16421
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016422
16423 case $ac_file$ac_mode in
16424 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16425
16426 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427done # for ac_tag
16428
Guido van Rossum627b2d71993-12-24 10:39:16 +000016429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016430as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016431_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016432ac_clean_files=$ac_clean_files_save
16433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016434test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016435 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016436
Martin v. Löwis11437992002-04-12 09:54:03 +000016437
16438# configure is writing to config.log, and then calls config.status.
16439# config.status does its own redirection, appending to config.log.
16440# Unfortunately, on DOS this fails, as config.log is still kept open
16441# by configure, so config.status won't be able to write to it; its
16442# output is simply discarded. So we exec the FD to /dev/null,
16443# effectively closing config.log, so it can be properly (re)opened and
16444# appended to by config.status. When coming back to configure, we
16445# need to make the FD available again.
16446if test "$no_create" != yes; then
16447 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016448 ac_config_status_args=
16449 test "$silent" = yes &&
16450 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016452 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016453 exec 5>>config.log
16454 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16455 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016456 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016457fi
16458if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16460$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016461fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016462
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016463
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016464echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016465if test ! -f Modules/Setup
16466then
16467 cp $srcdir/Modules/Setup.dist Modules/Setup
16468fi
16469
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016470echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016471if test ! -f Modules/Setup.local
16472then
16473 echo "# Edit this file for local setup changes" >Modules/Setup.local
16474fi
16475
16476echo "creating Makefile"
16477$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16478 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016479 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016480
16481case $ac_sys_system in
16482BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016483 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016484
16485 Support for BeOS is deprecated as of Python 2.6.
16486 See PEP 11 for the gory details.
16487 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016488$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016489
16490 Support for BeOS is deprecated as of Python 2.6.
16491 See PEP 11 for the gory details.
16492 " >&2;}
16493 ;;
16494*) ;;
16495esac
16496
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016497mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016498
16499if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16500 echo "" >&6
16501 echo "" >&6
16502 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
16503 echo "please run ./configure --with-optimizations" >&6
16504 echo "" >&6
16505 echo "" >&6
16506fi