Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(158692)

Side by Side Diff: configure.ac

Issue 17086: backport cross-build patches to the 2.7 branch
Patch Set: Created 6 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « configure ('k') | Lib/distutils/sysconfig.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dnl *********************************************** 1 dnl ***********************************************
2 dnl * Please run autoreconf to test your changes! * 2 dnl * Please run autoreconf to test your changes! *
3 dnl *********************************************** 3 dnl ***********************************************
4 4
5 # Set VERSION so we only need to edit in one place (i.e., here) 5 # Set VERSION so we only need to edit in one place (i.e., here)
6 m4_define(PYTHON_VERSION, 2.7) 6 m4_define(PYTHON_VERSION, 2.7)
7 7
8 AC_PREREQ(2.65) 8 AC_PREREQ(2.65)
9 9
10 AC_REVISION($Revision$) 10 AC_REVISION($Revision$)
11 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) 11 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
12 AC_CONFIG_SRCDIR([Include/object.h]) 12 AC_CONFIG_SRCDIR([Include/object.h])
13 AC_CONFIG_HEADER(pyconfig.h) 13 AC_CONFIG_HEADER(pyconfig.h)
14
15 AC_CANONICAL_HOST
16 AC_SUBST(build)
17 AC_SUBST(host)
18
19 if test "$cross_compiling" = yes; then
20 AC_MSG_CHECKING([for python interpreter for cross build])
21 if test -z "$PYTHON_FOR_BUILD"; then
22 for interp in python$PACKAGE_VERSION python2 python; do
23 which $interp >/dev/null 2>&1 || continue
24 if $interp -c 'import sys;sys.exit(not (sys.version_info@<:@:2@:>@ > = (2,7) and sys.version_info@<:@0@:>@ < 3))'; then
25 break
26 fi
27 interp=
28 done
29 if test x$interp = x; then
30 AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
31 fi
32 AC_MSG_RESULT($interp)
33 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLAT FORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP ) '$interp
34 fi
35 elif test "$cross_compiling" = maybe; then
36 AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
37 else
38 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
39 fi
40 AC_SUBST(PYTHON_FOR_BUILD)
14 41
15 dnl Ensure that if prefix is specified, it does not end in a slash. If 42 dnl Ensure that if prefix is specified, it does not end in a slash. If
16 dnl it does, we get path names containing '//' which is both ugly and 43 dnl it does, we get path names containing '//' which is both ugly and
17 dnl can cause trouble. 44 dnl can cause trouble.
18 45
19 dnl Last slash shouldn't be stripped if prefix=/ 46 dnl Last slash shouldn't be stripped if prefix=/
20 if test "$prefix" != "/"; then 47 if test "$prefix" != "/"; then
21 prefix=`echo "$prefix" | sed -e 's/\/$//g'` 48 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
22 fi 49 fi
23 50
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 299
273 ##AC_ARG_WITH(dyld, 300 ##AC_ARG_WITH(dyld,
274 ## AS_HELP_STRING([--with-dyld], 301 ## AS_HELP_STRING([--with-dyld],
275 ## [Use (OpenStep|Rhapsody) dynamic linker])) 302 ## [Use (OpenStep|Rhapsody) dynamic linker]))
276 ## 303 ##
277 # Set name for machine-dependent library files 304 # Set name for machine-dependent library files
278 AC_SUBST(MACHDEP) 305 AC_SUBST(MACHDEP)
279 AC_MSG_CHECKING(MACHDEP) 306 AC_MSG_CHECKING(MACHDEP)
280 if test -z "$MACHDEP" 307 if test -z "$MACHDEP"
281 then 308 then
309 # avoid using uname for cross builds
310 if test "$cross_compiling" = yes; then
311 # ac_sys_system and ac_sys_release are only used for setting
312 # `define_xopen_source' in the case statement below. For the
313 # current supported cross builds, this macro is not adjusted.
314 case "$host" in
315 *-*-linux*)
316 ac_sys_system=Linux
317 ;;
318 *-*-cygwin*)
319 ac_sys_system=Cygwin
320 ;;
321 *)
322 # for now, limit cross builds to known configurations
323 MACHDEP="unknown"
324 AC_MSG_ERROR([cross build not supported for $host])
325 esac
326 ac_sys_release=
327 else
282 ac_sys_system=`uname -s` 328 ac_sys_system=`uname -s`
283 if test "$ac_sys_system" = "AIX" \ 329 if test "$ac_sys_system" = "AIX" \
284 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then 330 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
285 ac_sys_release=`uname -v` 331 ac_sys_release=`uname -v`
286 else 332 else
287 ac_sys_release=`uname -r` 333 ac_sys_release=`uname -r`
288 fi 334 fi
289 » ac_md_system=`echo $ac_sys_system | 335 fi
290 » » » tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'` 336 ac_md_system=`echo $ac_sys_system |
291 » ac_md_release=`echo $ac_sys_release | 337 » » » tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
292 » » » tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'` 338 ac_md_release=`echo $ac_sys_release |
293 » MACHDEP="$ac_md_system$ac_md_release" 339 » » » tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
340 MACHDEP="$ac_md_system$ac_md_release"
294 341
295 » case $MACHDEP in 342 case $MACHDEP in
296 linux*) MACHDEP="linux2";; 343 linux*) MACHDEP="linux2";;
297 cygwin*) MACHDEP="cygwin";; 344 cygwin*) MACHDEP="cygwin";;
298 darwin*) MACHDEP="darwin";; 345 darwin*) MACHDEP="darwin";;
299 atheos*) MACHDEP="atheos";; 346 atheos*) MACHDEP="atheos";;
300 irix646) MACHDEP="irix6";; 347 irix646) MACHDEP="irix6";;
301 '') MACHDEP="unknown";; 348 '') MACHDEP="unknown";;
349 esac
350 fi
351
352 AC_SUBST(_PYTHON_HOST_PLATFORM)
353 if test "$cross_compiling" = yes; then
354 case "$host" in
355 *-*-linux*)
356 case "$host_cpu" in
357 arm*)
358 _host_cpu=arm
359 ;;
360 *)
361 _host_cpu=$host_cpu
362 esac
363 ;;
364 *-*-cygwin*)
365 _host_cpu=
366 ;;
367 *)
368 # for now, limit cross builds to known configurations
369 MACHDEP="unknown"
370 AC_MSG_ERROR([cross build not supported for $host])
302 esac 371 esac
372 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
303 fi 373 fi
304 374
305 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they 375 # Some systems cannot stand _XOPEN_SOURCE being defined at all; they
306 # disable features if it is defined, without any means to access these 376 # disable features if it is defined, without any means to access these
307 # features as extensions. For these systems, we skip the definition of 377 # features as extensions. For these systems, we skip the definition of
308 # _XOPEN_SOURCE. Before adding a system to the list to gain access to 378 # _XOPEN_SOURCE. Before adding a system to the list to gain access to
309 # some feature, make sure there is no alternative way to access this 379 # some feature, make sure there is no alternative way to access this
310 # feature. Also, when using wildcards, make sure you have verified the 380 # feature. Also, when using wildcards, make sure you have verified the
311 # need for not defining _XOPEN_SOURCE on all systems matching the 381 # need for not defining _XOPEN_SOURCE on all systems matching the
312 # wildcard, and that the wildcard does not include future systems 382 # wildcard, and that the wildcard does not include future systems
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 fi 508 fi
439 AC_MSG_RESULT($EXTRAPLATDIR) 509 AC_MSG_RESULT($EXTRAPLATDIR)
440 510
441 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, 511 # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
442 # it may influence the way we can build extensions, so distutils 512 # it may influence the way we can build extensions, so distutils
443 # needs to check it 513 # needs to check it
444 AC_SUBST(CONFIGURE_MACOSX_DEPLOYMENT_TARGET) 514 AC_SUBST(CONFIGURE_MACOSX_DEPLOYMENT_TARGET)
445 AC_SUBST(EXPORT_MACOSX_DEPLOYMENT_TARGET) 515 AC_SUBST(EXPORT_MACOSX_DEPLOYMENT_TARGET)
446 CONFIGURE_MACOSX_DEPLOYMENT_TARGET= 516 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
447 EXPORT_MACOSX_DEPLOYMENT_TARGET='#' 517 EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
448
449 AC_MSG_CHECKING(machine type as reported by uname -m)
450 ac_sys_machine=`uname -m`
451 AC_MSG_RESULT($ac_sys_machine)
452 518
453 # checks for alternative programs 519 # checks for alternative programs
454 520
455 # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just 521 # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
456 # for debug/optimization stuff. BASECFLAGS is for flags that are required 522 # for debug/optimization stuff. BASECFLAGS is for flags that are required
457 # just to get things to compile and link. Users are free to override OPT 523 # just to get things to compile and link. Users are free to override OPT
458 # when running configure or make. The build should not break if they do. 524 # when running configure or make. The build should not break if they do.
459 # BASECFLAGS should generally not be messed with, however. 525 # BASECFLAGS should generally not be messed with, however.
460 526
461 # XXX shouldn't some/most/all of this code be merged with the stuff later 527 # XXX shouldn't some/most/all of this code be merged with the stuff later
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 esac], [ 637 esac], [
572 with_cxx_main=no 638 with_cxx_main=no
573 MAINCC='$(CC)' 639 MAINCC='$(CC)'
574 ]) 640 ])
575 AC_MSG_RESULT($with_cxx_main) 641 AC_MSG_RESULT($with_cxx_main)
576 642
577 preset_cxx="$CXX" 643 preset_cxx="$CXX"
578 if test -z "$CXX" 644 if test -z "$CXX"
579 then 645 then
580 case "$CC" in 646 case "$CC" in
581 gcc) AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;; 647 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
582 cc) AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;; 648 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
583 esac 649 esac
584 if test "$CXX" = "notfound" 650 if test "$CXX" = "notfound"
585 then 651 then
586 CXX="" 652 CXX=""
587 fi 653 fi
588 fi 654 fi
589 if test -z "$CXX" 655 if test -z "$CXX"
590 then 656 then
591 » AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound) 657 » AC_CHECK_TOOLS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
592 if test "$CXX" = "notfound" 658 if test "$CXX" = "notfound"
593 then 659 then
594 CXX="" 660 CXX=""
595 fi 661 fi
596 fi 662 fi
597 if test "$preset_cxx" != "$CXX" 663 if test "$preset_cxx" != "$CXX"
598 then 664 then
599 AC_MSG_WARN([ 665 AC_MSG_WARN([
600 666
601 By default, distutils will build C++ extension modules with "$CXX". 667 By default, distutils will build C++ extension modules with "$CXX".
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 CYGWIN* | atheos*) 823 CYGWIN* | atheos*)
758 enable_shared="yes";; 824 enable_shared="yes";;
759 *) 825 *)
760 enable_shared="no";; 826 enable_shared="no";;
761 esac 827 esac
762 fi 828 fi
763 AC_MSG_RESULT($enable_shared) 829 AC_MSG_RESULT($enable_shared)
764 830
765 AC_MSG_CHECKING(for --enable-profiling) 831 AC_MSG_CHECKING(for --enable-profiling)
766 AC_ARG_ENABLE(profiling, 832 AC_ARG_ENABLE(profiling,
767 AS_HELP_STRING([--enable-profiling], [enable C-level code profilin g]), 833 AS_HELP_STRING([--enable-profiling], [enable C-level code profilin g]))
768 [ac_save_cc="$CC" 834 if test "x$enable_profiling" = xyes; then
769 CC="$CC -pg" 835 ac_save_cc="$CC"
770 AC_RUN_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], 836 CC="$(CC) -pg"
771 [ac_enable_profiling="yes"], 837 AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
772 [ac_enable_profiling="no"], 838 [],
773 [ac_enable_profiling="no"]) 839 [enable_profiling=no])
774 CC="$ac_save_cc"]) 840 CC="$ac_save_cc"
775 AC_MSG_RESULT($ac_enable_profiling) 841 else
842 enable_profiling=no
843 fi
844 AC_MSG_RESULT($enable_profiling)
776 845
777 case "$ac_enable_profiling" in 846 if test "x$enable_profiling" = xyes; then
778 "yes") 847 BASECFLAGS="-pg $BASECFLAGS"
779 » BASECFLAGS="-pg $BASECFLAGS" 848 LDFLAGS="-pg $LDFLAGS"
780 » LDFLAGS="-pg $LDFLAGS" 849 fi
781 ;;
782 esac
783 850
784 AC_MSG_CHECKING(LDLIBRARY) 851 AC_MSG_CHECKING(LDLIBRARY)
785 852
786 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic 853 # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
787 # library that we build, but we do not want to link against it (we 854 # library that we build, but we do not want to link against it (we
788 # will find it with a -framework option). For this reason there is an 855 # will find it with a -framework option). For this reason there is an
789 # extra variable BLDLIBRARY against which Python and the extension 856 # extra variable BLDLIBRARY against which Python and the extension
790 # modules are linked, BLDLIBRARY. This is normally the same as 857 # modules are linked, BLDLIBRARY. This is normally the same as
791 # LDLIBRARY, but empty for MacOSX framework builds. 858 # LDLIBRARY, but empty for MacOSX framework builds.
792 if test "$enable_framework" 859 if test "$enable_framework"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 ;; 926 ;;
860 927
861 esac 928 esac
862 else # shared is disabled 929 else # shared is disabled
863 case $ac_sys_system in 930 case $ac_sys_system in
864 CYGWIN*) 931 CYGWIN*)
865 BLDLIBRARY='$(LIBRARY)' 932 BLDLIBRARY='$(LIBRARY)'
866 LDLIBRARY='libpython$(VERSION).dll.a' 933 LDLIBRARY='libpython$(VERSION).dll.a'
867 ;; 934 ;;
868 esac 935 esac
936 fi
937
938 if test "$cross_compiling" = yes; then
939 RUNSHARED=
869 fi 940 fi
870 941
871 AC_MSG_RESULT($LDLIBRARY) 942 AC_MSG_RESULT($LDLIBRARY)
872 943
873 AC_PROG_RANLIB 944 AC_PROG_RANLIB
874 AC_SUBST(AR) 945 AC_SUBST(AR)
875 AC_CHECK_PROGS(AR, ar aal, ar) 946 AC_CHECK_TOOLS(AR, ar aal, ar)
876 947
877 # tweak ARFLAGS only if the user didn't set it on the command line 948 # tweak ARFLAGS only if the user didn't set it on the command line
878 AC_SUBST(ARFLAGS) 949 AC_SUBST(ARFLAGS)
879 if test -z "$ARFLAGS" 950 if test -z "$ARFLAGS"
880 then 951 then
881 ARFLAGS="rc" 952 ARFLAGS="rc"
882 fi 953 fi
883 954
884 AC_SUBST(SVNVERSION) 955 AC_SUBST(SVNVERSION)
885 AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found) 956 AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 CC="$ac_save_cc" 1110 CC="$ac_save_cc"
1040 AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) 1111 AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
1041 if test $ac_cv_no_strict_aliasing_ok = yes 1112 if test $ac_cv_no_strict_aliasing_ok = yes
1042 then 1113 then
1043 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" 1114 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
1044 fi 1115 fi
1045 1116
1046 # if using gcc on alpha, use -mieee to get (near) full IEEE 754 1117 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
1047 # support. Without this, treatment of subnormals doesn't follow 1118 # support. Without this, treatment of subnormals doesn't follow
1048 # the standard. 1119 # the standard.
1049 case $ac_sys_machine in 1120 case $host in
1050 alpha*) 1121 alpha*)
1051 BASECFLAGS="$BASECFLAGS -mieee" 1122 BASECFLAGS="$BASECFLAGS -mieee"
1052 ;; 1123 ;;
1053 esac 1124 esac
1054 1125
1055 case $ac_sys_system in 1126 case $ac_sys_system in
1056 SCO_SV*) 1127 SCO_SV*)
1057 BASECFLAGS="$BASECFLAGS -m486 -DSCO5" 1128 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
1058 ;; 1129 ;;
1059 # is there any other compiler on Darwin besides gcc? 1130 # is there any other compiler on Darwin besides gcc?
(...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 return 0; 3280 return 0;
3210 3281
3211 bad: 3282 bad:
3212 if (aitop) 3283 if (aitop)
3213 freeaddrinfo(aitop); 3284 freeaddrinfo(aitop);
3214 return 1; 3285 return 1;
3215 } 3286 }
3216 ]]])], 3287 ]]])],
3217 [ac_cv_buggy_getaddrinfo=no], 3288 [ac_cv_buggy_getaddrinfo=no],
3218 [ac_cv_buggy_getaddrinfo=yes], 3289 [ac_cv_buggy_getaddrinfo=yes],
3219 [ac_cv_buggy_getaddrinfo=yes])) 3290 [
3291 if test "${enable_ipv6+set}" = set; then
3292 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
3293 else
3294 ac_cv_buggy_getaddrinfo=yes
3295 fi]))
3220 fi 3296 fi
3221 3297
3222 AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) 3298 AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
3223 3299
3224 if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes 3300 if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
3225 then 3301 then
3226 if test $ipv6 = yes 3302 if test $ipv6 = yes
3227 then 3303 then
3228 echo 'Fatal: You must get working getaddrinfo() function.' 3304 echo 'Fatal: You must get working getaddrinfo() function.'
3229 echo ' or you can specify "--disable-ipv6"'. 3305 echo ' or you can specify "--disable-ipv6"'.
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
4239 [AC_MSG_RESULT(no)] 4315 [AC_MSG_RESULT(no)]
4240 ) 4316 )
4241 4317
4242 AC_MSG_CHECKING(for resizeterm) 4318 AC_MSG_CHECKING(for resizeterm)
4243 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=resizeterm ]])], 4319 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <curses.h>]], [[void *x=resizeterm ]])],
4244 [AC_DEFINE(HAVE_CURSES_RESIZETERM, 1, Define if you have the 'resizeterm' func tion.) 4320 [AC_DEFINE(HAVE_CURSES_RESIZETERM, 1, Define if you have the 'resizeterm' func tion.)
4245 AC_MSG_RESULT(yes)], 4321 AC_MSG_RESULT(yes)],
4246 [AC_MSG_RESULT(no)] 4322 [AC_MSG_RESULT(no)]
4247 ) 4323 )
4248 4324
4249 AC_MSG_CHECKING(for /dev/ptmx) 4325 AC_MSG_NOTICE([checking for device files])
4250 4326
4251 if test -r /dev/ptmx 4327 dnl NOTE: Inform user how to proceed with files when cross compiling.
4252 then 4328 if test "x$cross_compiling" = xyes; then
4253 AC_MSG_RESULT(yes) 4329 if test "${ac_cv_file__dev_ptmx+set}" != set; then
4254 AC_DEFINE(HAVE_DEV_PTMX, 1, 4330 AC_MSG_CHECKING([for /dev/ptmx])
4255 [Define if we have /dev/ptmx.]) 4331 AC_MSG_RESULT([not set])
4256 else 4332 AC_MSG_ERROR([set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file wh en cross compiling])
4257 AC_MSG_RESULT(no) 4333 fi
4334 if test "${ac_cv_file__dev_ptc+set}" != set; then
4335 AC_MSG_CHECKING([for /dev/ptc])
4336 AC_MSG_RESULT([not set])
4337 AC_MSG_ERROR([set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file whe n cross compiling])
4338 fi
4258 fi 4339 fi
4259 4340
4260 AC_MSG_CHECKING(for /dev/ptc) 4341 AC_CHECK_FILE(/dev/ptmx, [], [])
4261 4342 if test "x$ac_cv_file__dev_ptmx" = xyes; then
4262 if test -r /dev/ptc 4343 AC_DEFINE(HAVE_DEV_PTMX, 1,
4263 then 4344 [Define to 1 if you have the /dev/ptmx device file.])
4264 AC_MSG_RESULT(yes) 4345 fi
4346 AC_CHECK_FILE(/dev/ptc, [], [])
4347 if test "x$ac_cv_file__dev_ptc" = xyes; then
4265 AC_DEFINE(HAVE_DEV_PTC, 1, 4348 AC_DEFINE(HAVE_DEV_PTC, 1,
4266 [Define if we have /dev/ptc.]) 4349 [Define to 1 if you have the /dev/ptc device file.])
4267 else
4268 AC_MSG_RESULT(no)
4269 fi 4350 fi
4270 4351
4271 if test "$have_long_long" = yes 4352 if test "$have_long_long" = yes
4272 then 4353 then
4273 AC_MSG_CHECKING(for %lld and %llu printf() format support) 4354 AC_MSG_CHECKING(for %lld and %llu printf() format support)
4274 AC_CACHE_VAL(ac_cv_have_long_long_format, 4355 AC_CACHE_VAL(ac_cv_have_long_long_format,
4275 AC_RUN_IFELSE([AC_LANG_SOURCE([[[ 4356 AC_RUN_IFELSE([AC_LANG_SOURCE([[[
4276 #include <stdio.h> 4357 #include <stdio.h>
4277 #include <stddef.h> 4358 #include <stddef.h>
4278 #include <string.h> 4359 #include <string.h>
(...skipping 19 matching lines...) Expand all
4298 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0) 4379 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
4299 return 1; 4380 return 1;
4300 if (strcmp(buffer, "123")) 4381 if (strcmp(buffer, "123"))
4301 return 1; 4382 return 1;
4302 4383
4303 return 0; 4384 return 0;
4304 } 4385 }
4305 ]]])], 4386 ]]])],
4306 [ac_cv_have_long_long_format=yes], 4387 [ac_cv_have_long_long_format=yes],
4307 [ac_cv_have_long_long_format=no], 4388 [ac_cv_have_long_long_format=no],
4308 [ac_cv_have_long_long_format=no]) 4389 [ac_cv_have_long_long_format="cross -- assuming no"
4390 if test x$GCC = xyes; then
4391 save_CFLAGS=$CFLAGS
4392 CFLAGS="$CFLAGS -Werror -Wformat"
4393 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4394 #include <stdio.h>
4395 #include <stddef.h>
4396 ]], [[
4397 char *buffer;
4398 sprintf(buffer, "%lld", (long long)123);
4399 sprintf(buffer, "%lld", (long long)-123);
4400 sprintf(buffer, "%llu", (unsigned long long)123);
4401 ]])],
4402 ac_cv_have_long_long_format=yes
4403 )
4404 CFLAGS=$save_CFLAGS
4405 fi])
4309 ) 4406 )
4310 AC_MSG_RESULT($ac_cv_have_long_long_format) 4407 AC_MSG_RESULT($ac_cv_have_long_long_format)
4311 fi 4408 fi
4312 4409
4313 if test "$ac_cv_have_long_long_format" = yes 4410 if test "$ac_cv_have_long_long_format" = yes
4314 then 4411 then
4315 AC_DEFINE(PY_FORMAT_LONG_LONG, "ll", 4412 AC_DEFINE(PY_FORMAT_LONG_LONG, "ll",
4316 [Define to printf format modifier for long long type]) 4413 [Define to printf format modifier for long long type])
4317 fi 4414 fi
4318 4415
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
4429 AC_MSG_WARN([ 4526 AC_MSG_WARN([
4430 4527
4431 Support for BeOS is deprecated as of Python 2.6. 4528 Support for BeOS is deprecated as of Python 2.6.
4432 See PEP 11 for the gory details. 4529 See PEP 11 for the gory details.
4433 ]) 4530 ])
4434 ;; 4531 ;;
4435 *) ;; 4532 *) ;;
4436 esac 4533 esac
4437 4534
4438 mv config.c Modules 4535 mv config.c Modules
OLDNEW
« no previous file with comments | « configure ('k') | Lib/distutils/sysconfig.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+