1 diff -urN a/configure b/configure 2 --- a/configure 2012-04-10 00:07:36.000000000 +0100 3 +++ b/configure 2012-07-04 23:52:44.000000000 +0100 4 @@ -597,7 +597,12 @@ 5 6 ac_subst_vars='LTLIBOBJS 7 SRCDIRS 8 +MODULE_GETPATH 9 +PYTHON_OBJS_FROZENMAIN 10 +PYMOD_BUILDOPT 11 THREADHEADERS 12 +READLINE_LIBS 13 +REPARSE_DATA_BUFFER_IN_WINNT 14 UNICODE_OBJS 15 LIBC 16 LIBM 17 @@ -611,6 +616,7 @@ 18 MACHDEP_OBJS 19 DYNLOADFILE 20 DLINCLDIR 21 +BUILDIN_WIN32_MODULE 22 THREADOBJ 23 LDLAST 24 USE_THREAD_MODULE 25 @@ -641,6 +647,7 @@ 26 HGVERSION 27 SVNVERSION 28 ARFLAGS 29 +ac_ct_AR 30 AR 31 RANLIB 32 GNULD 33 @@ -669,8 +676,13 @@ 34 CONFIGURE_MACOSX_DEPLOYMENT_TARGET 35 EXTRAMACHDEPPATH 36 EXTRAPLATDIR 37 +INITSYS 38 +MSYSVPATH 39 +DELIM 40 SGI_ABI 41 MACHDEP 42 +HOST_OS 43 +HOST_CPU 44 FRAMEWORKINSTALLAPPSPREFIX 45 FRAMEWORKUNIXTOOLSPREFIX 46 FRAMEWORKALTINSTALLLAST 47 @@ -688,6 +700,18 @@ 48 CONFIG_ARGS 49 SOVERSION 50 VERSION 51 +SYSPYTHON 52 +LN_S 53 +CROSS_OFF 54 +CROSS_ON 55 +host_os 56 +host_vendor 57 +host_cpu 58 +host 59 +build_os 60 +build_vendor 61 +build_cpu 62 +build 63 target_alias 64 host_alias 65 build_alias 66 @@ -764,6 +788,7 @@ 67 ac_precious_vars='build_alias 68 host_alias 69 target_alias 70 +MSYSVPATH 71 CC 72 CFLAGS 73 LDFLAGS 74 @@ -1368,6 +1393,10 @@ 75 _ACEOF 76 77 cat <<\_ACEOF 78 + 79 +System types: 80 + --build=BUILD configure for building on BUILD [guessed] 81 + --host=HOST cross-compile to build programs to run on HOST [BUILD] 82 _ACEOF 83 fi 84 85 @@ -1435,6 +1464,7 @@ 86 --with-libc=STRING C library 87 88 Some influential environment variables: 89 + MSYSVPATH For MSYS 90 CC C compiler command 91 CFLAGS C compiler flags 92 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 93 @@ -2692,6 +2722,106 @@ 94 95 ac_config_headers="$ac_config_headers pyconfig.h" 96 97 +ac_aux_dir= 98 +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 99 + if test -f "$ac_dir/install-sh"; then 100 + ac_aux_dir=$ac_dir 101 + ac_install_sh="$ac_aux_dir/install-sh -c" 102 + break 103 + elif test -f "$ac_dir/install.sh"; then 104 + ac_aux_dir=$ac_dir 105 + ac_install_sh="$ac_aux_dir/install.sh -c" 106 + break 107 + elif test -f "$ac_dir/shtool"; then 108 + ac_aux_dir=$ac_dir 109 + ac_install_sh="$ac_aux_dir/shtool install -c" 110 + break 111 + fi 112 +done 113 +if test -z "$ac_aux_dir"; then 114 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 115 +fi 116 + 117 +# These three variables are undocumented and unsupported, 118 +# and are intended to be withdrawn in a future Autoconf release. 119 +# They can cause serious problems if a builder's source tree is in a directory 120 +# whose full name contains unusual characters. 121 +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 122 +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 123 +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 124 + 125 + 126 +# Make sure we can run config.sub. 127 +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 128 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 129 + 130 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 131 +$as_echo_n "checking build system type... " >&6; } 132 +if test "${ac_cv_build+set}" = set; then : 133 + $as_echo_n "(cached) " >&6 134 +else 135 + ac_build_alias=$build_alias 136 +test "x$ac_build_alias" = x && 137 + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 138 +test "x$ac_build_alias" = x && 139 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 140 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 141 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 142 + 143 +fi 144 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 145 +$as_echo "$ac_cv_build" >&6; } 146 +case $ac_cv_build in 147 +*-*-*) ;; 148 +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 149 +esac 150 +build=$ac_cv_build 151 +ac_save_IFS=$IFS; IFS='-' 152 +set x $ac_cv_build 153 +shift 154 +build_cpu=$1 155 +build_vendor=$2 156 +shift; shift 157 +# Remember, the first character of IFS is used to create $*, 158 +# except with old shells: 159 +build_os=$* 160 +IFS=$ac_save_IFS 161 +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 162 + 163 + 164 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 165 +$as_echo_n "checking host system type... " >&6; } 166 +if test "${ac_cv_host+set}" = set; then : 167 + $as_echo_n "(cached) " >&6 168 +else 169 + if test "x$host_alias" = x; then 170 + ac_cv_host=$ac_cv_build 171 +else 172 + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 173 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 174 +fi 175 + 176 +fi 177 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 178 +$as_echo "$ac_cv_host" >&6; } 179 +case $ac_cv_host in 180 +*-*-*) ;; 181 +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 182 +esac 183 +host=$ac_cv_host 184 +ac_save_IFS=$IFS; IFS='-' 185 +set x $ac_cv_host 186 +shift 187 +host_cpu=$1 188 +host_vendor=$2 189 +shift; shift 190 +# Remember, the first character of IFS is used to create $*, 191 +# except with old shells: 192 +host_os=$* 193 +IFS=$ac_save_IFS 194 +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 195 + 196 + 197 198 199 if test "$prefix" != "/"; then 200 @@ -2707,8 +2837,95 @@ 201 rm confdefs.h 202 mv confdefs.h.new confdefs.h 203 204 +if test "x$cross_compiling" = xyes; then 205 + CROSS_ON='' 206 + CROSS_OFF='#' 207 +else 208 + CROSS_ON='#' 209 + CROSS_OFF='' 210 +fi 211 + 212 + 213 + 214 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 215 +$as_echo_n "checking whether ln -s works... " >&6; } 216 +LN_S=$as_ln_s 217 +if test "$LN_S" = "ln -s"; then 218 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 219 +$as_echo "yes" >&6; } 220 +else 221 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 222 +$as_echo "no, using $LN_S" >&6; } 223 +fi 224 + 225 +if test "x$cross_compiling" = xyes; then 226 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compilation is incomplete" >&5 227 +$as_echo "$as_me: WARNING: cross-compilation is incomplete" >&2;} 228 + 229 + # Extract the first word of "python", so it can be a program name with args. 230 +set dummy python; ac_word=$2 231 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 232 +$as_echo_n "checking for $ac_word... " >&6; } 233 +if test "${ac_cv_path_SYSPYTHON+set}" = set; then : 234 + $as_echo_n "(cached) " >&6 235 +else 236 + case $SYSPYTHON in 237 + [\\/]* | ?:[\\/]*) 238 + ac_cv_path_SYSPYTHON="$SYSPYTHON" # Let the user override the test with a path. 239 + ;; 240 + *) 241 + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 242 +as_dummy="$PATH:/usr/local/bin 243 + " 244 +for as_dir in $as_dummy 245 +do 246 + IFS=$as_save_IFS 247 + test -z "$as_dir" && as_dir=. 248 + for ac_exec_ext in '' $ac_executable_extensions; do 249 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 250 + ac_cv_path_SYSPYTHON="$as_dir/$ac_word$ac_exec_ext" 251 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 252 + break 2 253 + fi 254 +done 255 + done 256 +IFS=$as_save_IFS 257 + 258 + test -z "$ac_cv_path_SYSPYTHON" && ac_cv_path_SYSPYTHON="none" 259 + ;; 260 +esac 261 +fi 262 +SYSPYTHON=$ac_cv_path_SYSPYTHON 263 +if test -n "$SYSPYTHON"; then 264 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSPYTHON" >&5 265 +$as_echo "$SYSPYTHON" >&6; } 266 +else 267 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 268 +$as_echo "no" >&6; } 269 +fi 270 + 271 + 272 + if test "x$SYSPYTHON" = xnone; then 273 + as_fn_error $? "python program is required in cross-compilation environment" "$LINENO" 5 274 + fi 275 + SYSPYOSNAME=`${SYSPYTHON} -c "import os; print os.name"` 276 + case $SYSPYOSNAME in 277 + posix) 278 + rm -f syspython 279 + ${LN_S} ${SYSPYTHON} syspython 280 + SYSPYTHON=./syspython 281 + esac 282 +fi 283 284 + 285 +case $host in 286 + *-*-mingw*) 287 + VERSION=2.7 288 + ;; 289 + *) 290 VERSION=2.7 291 + ;; 292 +esac 293 294 295 SOVERSION=1.0 296 @@ -2873,6 +3090,9 @@ 297 fi 298 enable_framework= 299 ;; 300 + *-*-darwin*) 301 + ac_sys_system=Darwin 302 + ;; 303 *) 304 PYTHONFRAMEWORKPREFIX="${enableval}" 305 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR 306 @@ -2977,10 +3197,38 @@ 307 ## 308 # Set name for machine-dependent library files 309 310 +HOST_CPU=$host_cpu 311 + 312 +HOST_OS=$host_os 313 + 314 + 315 + 316 +if test "x$cross_compiling" = xyes; then 317 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 318 + May be value of MACHDEP isn't correct if cross-compiling. 319 + You may tweak configure script for you host system: $host" >&5 320 +$as_echo "$as_me: WARNING: 321 + May be value of MACHDEP isn't correct if cross-compiling. 322 + You may tweak configure script for you host system: $host" >&2;} 323 +fi 324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5 325 $as_echo_n "checking MACHDEP... " >&6; } 326 if test -z "$MACHDEP" 327 then 328 + case $host in 329 + *-*-mingw*) 330 + ac_sys_system=ignore 331 + MACHDEP=win 332 + ;; 333 + *-*-darwin*) 334 + ac_sys_system=Darwin 335 + ac_sys_version=11 336 + MACHDEP=darwin 337 + ;; 338 + esac 339 +fi 340 +if test -z "$MACHDEP" 341 +then 342 ac_sys_system=`uname -s` 343 if test "$ac_sys_system" = "AIX" \ 344 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then 345 @@ -2994,12 +3242,18 @@ 346 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'` 347 MACHDEP="$ac_md_system$ac_md_release" 348 349 + case $host in 350 + *-*-cygwin*) MACHDEP="cygwin";; 351 + *-*-darwin*) MACHDEP="darwin";; 352 + *-*-atheos*) MACHDEP="atheos";; 353 + esac 354 + 355 case $MACHDEP in 356 linux*) MACHDEP="linux2";; 357 cygwin*) MACHDEP="cygwin";; 358 darwin*) MACHDEP="darwin";; 359 atheos*) MACHDEP="atheos";; 360 - irix646) MACHDEP="irix6";; 361 + irix646) MACHDEP="irix6";; 362 '') MACHDEP="unknown";; 363 esac 364 fi 365 @@ -3129,6 +3383,40 @@ 366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5 367 $as_echo "$MACHDEP" >&6; } 368 369 +# Windows uses ; to separate paths, everything else uses : 370 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DELIM" >&5 371 +$as_echo_n "checking DELIM... " >&6; } 372 +DELIM=: 373 +if test "$MACHDEP" = "win" 374 +then 375 + DELIM=\; 376 +fi 377 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DELIM" >&5 378 +$as_echo "$DELIM" >&6; } 379 + 380 + 381 +# MSYS make uses a 'virtual' VPATH, but getpath.c uses 382 +# GetModuleFileNameW (replacing \ with /). This allows the user to 383 +# define the 'actual 'real' value. Note, it should contain / not \, 384 +# which is what is returned by "pwd -W". 385 + 386 +if test -z "$MSYSVPATH"; then 387 + MSYSVPATH=$srcdir 388 +fi 389 + 390 + 391 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for init system calls" >&5 392 +$as_echo_n "checking for init system calls... " >&6; } 393 + 394 +case $host in 395 + # FIXME: May configure lack detection for os2 host system ? 396 + #?#*-*-os2*) INITSYS=os2;; 397 + *-*-mingw*) INITSYS=nt;; 398 + *) INITSYS=posix;; 399 +esac 400 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INITSYS" >&5 401 +$as_echo "$INITSYS" >&6; } 402 + 403 # And add extra plat-mac for darwin 404 405 406 @@ -3158,12 +3446,6 @@ 407 CONFIGURE_MACOSX_DEPLOYMENT_TARGET= 408 EXPORT_MACOSX_DEPLOYMENT_TARGET='#' 409 410 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking machine type as reported by uname -m" >&5 411 -$as_echo_n "checking machine type as reported by uname -m... " >&6; } 412 -ac_sys_machine=`uname -m` 413 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_sys_machine" >&5 414 -$as_echo "$ac_sys_machine" >&6; } 415 - 416 # checks for alternative programs 417 418 # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just 419 @@ -4676,6 +4958,17 @@ 420 421 422 # Check for unsupported systems 423 +case $host in 424 + *-*-beos*) 425 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 426 + Support for BeOS is deprecated as of Python 2.6. 427 + See PEP 11 for the gory details. 428 + " >&5 429 +$as_echo "$as_me: WARNING: 430 + Support for BeOS is deprecated as of Python 2.6. 431 + See PEP 11 for the gory details. 432 + " >&2;};; 433 +esac 434 case $ac_sys_system/$ac_sys_release in 435 atheos*|Linux*/1*) 436 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. 437 @@ -4844,6 +5137,10 @@ 438 *) 439 enable_shared="no";; 440 esac 441 + case $host in 442 + *-*-mingw*) 443 + enable_shared="yes";; 444 + esac 445 fi 446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 447 $as_echo "$enable_shared" >&6; } 448 @@ -4852,37 +5149,34 @@ 449 $as_echo_n "checking for --enable-profiling... " >&6; } 450 # Check whether --enable-profiling was given. 451 if test "${enable_profiling+set}" = set; then : 452 - enableval=$enable_profiling; ac_save_cc="$CC" 453 - CC="$CC -pg" 454 - if test "$cross_compiling" = yes; then : 455 - ac_enable_profiling="no" 456 -else 457 + enableval=$enable_profiling; 458 +fi 459 + 460 +if test "x$enable_profiling" = xyes; then 461 + py_save_CFLAGS="$CFLAGS" 462 + CFLAGS="$CFLAGS -pg" 463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 464 /* end confdefs.h. */ 465 -int main() { return 0; } 466 + 467 _ACEOF 468 -if ac_fn_c_try_run "$LINENO"; then : 469 - ac_enable_profiling="yes" 470 +if ac_fn_c_try_compile "$LINENO"; then : 471 + 472 else 473 - ac_enable_profiling="no" 474 + enable_profiling=no 475 fi 476 -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 477 - conftest.$ac_objext conftest.beam conftest.$ac_ext 478 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 479 + CFLAGS="$py_save_CFLAGS" 480 +else 481 + enable_profiling=no 482 fi 483 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 484 +$as_echo "$enable_profiling" >&6; } 485 486 - CC="$ac_save_cc" 487 +if test "x$enable_profiling" = xyes; then 488 + BASECFLAGS="-pg $BASECFLAGS" 489 + LDFLAGS="-pg $LDFLAGS" 490 fi 491 492 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_profiling" >&5 493 -$as_echo "$ac_enable_profiling" >&6; } 494 - 495 -case "$ac_enable_profiling" in 496 - "yes") 497 - BASECFLAGS="-pg $BASECFLAGS" 498 - LDFLAGS="-pg $LDFLAGS" 499 - ;; 500 -esac 501 - 502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5 503 $as_echo_n "checking LDLIBRARY... " >&6; } 504 505 @@ -4964,6 +5258,12 @@ 506 ;; 507 508 esac 509 + case $host in 510 + *-*-mingw*) 511 + LDLIBRARY='libpython$(VERSION).dll.a' 512 + DLLLIBRARY='libpython$(VERSION).dll' 513 + ;; 514 + esac 515 else # shared is disabled 516 case $ac_sys_system in 517 CYGWIN*) 518 @@ -4971,6 +5271,10 @@ 519 LDLIBRARY='libpython$(VERSION).dll.a' 520 ;; 521 esac 522 + case $host in 523 + *-*-mingw*) 524 + LDLIBRARY='libpython$(VERSION).a';; 525 + esac 526 fi 527 528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 529 @@ -5068,11 +5372,11 @@ 530 RANLIB="$ac_cv_prog_RANLIB" 531 fi 532 533 - 534 -for ac_prog in ar aal 535 -do 536 - # Extract the first word of "$ac_prog", so it can be a program name with args. 537 -set dummy $ac_prog; ac_word=$2 538 +if test -n "$ac_tool_prefix"; then 539 + for ac_prog in ar aal 540 + do 541 + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 542 +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 544 $as_echo_n "checking for $ac_word... " >&6; } 545 if test "${ac_cv_prog_AR+set}" = set; then : 546 @@ -5088,7 +5392,7 @@ 547 test -z "$as_dir" && as_dir=. 548 for ac_exec_ext in '' $ac_executable_extensions; do 549 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 550 - ac_cv_prog_AR="$ac_prog" 551 + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" 552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 553 break 2 554 fi 555 @@ -5108,9 +5412,65 @@ 556 fi 557 558 559 - test -n "$AR" && break 560 + test -n "$AR" && break 561 + done 562 +fi 563 +if test -z "$AR"; then 564 + ac_ct_AR=$AR 565 + for ac_prog in ar aal 566 +do 567 + # Extract the first word of "$ac_prog", so it can be a program name with args. 568 +set dummy $ac_prog; ac_word=$2 569 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 570 +$as_echo_n "checking for $ac_word... " >&6; } 571 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : 572 + $as_echo_n "(cached) " >&6 573 +else 574 + if test -n "$ac_ct_AR"; then 575 + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 576 +else 577 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 578 +for as_dir in $PATH 579 +do 580 + IFS=$as_save_IFS 581 + test -z "$as_dir" && as_dir=. 582 + for ac_exec_ext in '' $ac_executable_extensions; do 583 + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 584 + ac_cv_prog_ac_ct_AR="$ac_prog" 585 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 586 + break 2 587 + fi 588 +done 589 + done 590 +IFS=$as_save_IFS 591 + 592 +fi 593 +fi 594 +ac_ct_AR=$ac_cv_prog_ac_ct_AR 595 +if test -n "$ac_ct_AR"; then 596 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 597 +$as_echo "$ac_ct_AR" >&6; } 598 +else 599 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 600 +$as_echo "no" >&6; } 601 +fi 602 + 603 + 604 + test -n "$ac_ct_AR" && break 605 done 606 -test -n "$AR" || AR="ar" 607 + 608 + if test "x$ac_ct_AR" = x; then 609 + AR="ar" 610 + else 611 + case $cross_compiling:$ac_tool_warned in 612 +yes:) 613 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 614 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 615 +ac_tool_warned=yes ;; 616 +esac 617 + AR=$ac_ct_AR 618 + fi 619 +fi 620 621 622 # tweak ARFLAGS only if the user didn't set it on the command line 623 @@ -5226,35 +5586,6 @@ 624 INSTALL="${srcdir}/install-sh -c" 625 fi 626 esac 627 -ac_aux_dir= 628 -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 629 - if test -f "$ac_dir/install-sh"; then 630 - ac_aux_dir=$ac_dir 631 - ac_install_sh="$ac_aux_dir/install-sh -c" 632 - break 633 - elif test -f "$ac_dir/install.sh"; then 634 - ac_aux_dir=$ac_dir 635 - ac_install_sh="$ac_aux_dir/install.sh -c" 636 - break 637 - elif test -f "$ac_dir/shtool"; then 638 - ac_aux_dir=$ac_dir 639 - ac_install_sh="$ac_aux_dir/shtool install -c" 640 - break 641 - fi 642 -done 643 -if test -z "$ac_aux_dir"; then 644 - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 645 -fi 646 - 647 -# These three variables are undocumented and unsupported, 648 -# and are intended to be withdrawn in a future Autoconf release. 649 -# They can cause serious problems if a builder's source tree is in a directory 650 -# whose full name contains unusual characters. 651 -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 652 -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 653 -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 654 - 655 - 656 # Find a good install program. We prefer a C program (faster), 657 # so one script is as good as another. But avoid the broken or 658 # incompatible versions: 659 @@ -5383,6 +5714,27 @@ 660 $as_echo "no" >&6; } 661 fi 662 663 +# FIXME: We define BUILDEXEEXT and LDLIBRARY above but: 664 +# For debug versions MSVC build prepend suffix by '_d'. 665 +# If we support this convention we may modify distutils(TODO). 666 +# To support different build directories is good "--with-pydebug" 667 +# to be earlier in the script(why i wrote this?). 668 +if test "x$Py_DEBUG" = xtrue; then 669 + case $host in 670 + # Since Makefile.pre.in may isn't suitable for now we will not 671 + # change LDLIBRARY. 672 + *-*-mingw*) 673 + BUILDEXEEXT=_d$BUILDEXEEXT 674 + if test x$enable_shared = xyes; then 675 + #LDLIBRARY='libpython$(VERSION)_d.dll.a' 676 + DLLLIBRARY='libpython$(VERSION)_d.dll' 677 + else # shared is disabled 678 + #LDLIBRARY='libpython$(VERSION)_d.dll.a';; 679 + : 680 + fi 681 + ;; 682 + esac 683 +fi 684 685 # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be 686 # merged with this chunk of code? 687 @@ -5399,6 +5751,8 @@ 688 689 # tweak OPT based on compiler and platform, only if the user didn't set 690 # it on the command line 691 +# NOTE: If user set OPT at this point script ignore all previously set 692 +# options (not important - BeOS is depricated for python 2.6+). 693 694 if test "${OPT-unset}" = "unset" 695 then 696 @@ -5493,10 +5847,14 @@ 697 # if using gcc on alpha, use -mieee to get (near) full IEEE 754 698 # support. Without this, treatment of subnormals doesn't follow 699 # the standard. 700 - case $ac_sys_machine in 701 + case $host in 702 alpha*) 703 BASECFLAGS="$BASECFLAGS -mieee" 704 ;; 705 + *-*-mingw*) 706 + #MSVC in-compatable storage layout for bitfields in structures (Roumen has -mms-bitfields) 707 + BASECFLAGS="$BASECFLAGS" 708 + ;; 709 esac 710 711 case $ac_sys_system in 712 @@ -5527,7 +5885,7 @@ 713 # Calculate the right deployment target for this build. 714 # 715 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'` 716 - if test ${cur_target} '>' 10.2; then 717 + if test ${cur_target} > 10.2; then 718 cur_target=10.3 719 if test ${enable_universalsdk}; then 720 if test "${UNIVERSAL_ARCHS}" = "all"; then 721 @@ -5547,7 +5905,7 @@ 722 cur_target='10.5' 723 fi 724 else 725 - if test `/usr/bin/arch` = "i386"; then 726 + if test "$($OSX_ARCH_PROG)" = "i386"; then 727 # On Intel macs default to a deployment 728 # target of 10.4, that's the first OSX 729 # release with Intel support. 730 @@ -5632,7 +5990,9 @@ 731 esac 732 733 if test "$Py_DEBUG" = 'true'; then 734 - : 735 + case $host in 736 + *-*-mingw*) OPT="-D_DEBUG $OPT";; 737 + esac 738 else 739 OPT="-DNDEBUG $OPT" 740 fi 741 @@ -5961,6 +6321,41 @@ 742 $as_echo "$ac_cv_pthread" >&6; } 743 fi 744 745 +if test "x$ac_cv_kpthread" = xno && \ 746 + test "x$ac_cv_kthread" = xno && \ 747 + test "x$ac_cv_pthread" = xno && \ 748 + test "x$ac_cv_pthread_is_default" = xno 749 +then 750 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NT threads" >&5 751 +$as_echo_n "checking for NT threads... " >&6; } 752 + if test "${ac_cv_ntthread+set}" = set; then : 753 + $as_echo_n "(cached) " >&6 754 +else 755 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 756 +/* end confdefs.h. */ 757 + 758 + 759 +int 760 +main () 761 +{ 762 +_beginthread(0, 0, 0); 763 + ; 764 + return 0; 765 +} 766 +_ACEOF 767 +if ac_fn_c_try_link "$LINENO"; then : 768 + ac_cv_ntthread=yes 769 +else 770 + ac_cv_ntthread=no 771 +fi 772 +rm -f core conftest.err conftest.$ac_objext \ 773 + conftest$ac_exeext conftest.$ac_ext 774 +fi 775 + 776 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ntthread" >&5 777 +$as_echo "$ac_cv_ntthread" >&6; } 778 +fi 779 + 780 # If we have set a CC compiler flag for thread support then 781 # check if it works for CXX, too. 782 ac_cv_cxx_thread=no 783 @@ -5982,6 +6377,9 @@ 784 then 785 CXX="$CXX -pthread" 786 ac_cv_cxx_thread=yes 787 +elif test "x$ac_cv_ntthread" = xyes 788 +then 789 + ac_cv_cxx_thread=always 790 fi 791 792 if test $ac_cv_cxx_thread = yes 793 @@ -6127,7 +6525,7 @@ 794 sys/termio.h sys/time.h \ 795 sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \ 796 sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ 797 -bluetooth/bluetooth.h linux/tipc.h spawn.h util.h 798 +bluetooth/bluetooth.h linux/tipc.h spawn.h util.h winsock2.h 799 do : 800 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 801 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 802 @@ -7321,29 +7719,6 @@ 803 elif test "$ac_cv_pthread" = "yes" 804 then CC="$CC -pthread" 805 fi 806 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5 807 -$as_echo_n "checking for pthread_t... " >&6; } 808 -have_pthread_t=no 809 -cat confdefs.h - <<_ACEOF >conftest.$ac_ext 810 -/* end confdefs.h. */ 811 - 812 - #include <pthread.h> 813 -int 814 -main () 815 -{ 816 -pthread_t x; x = *(pthread_t*)0; 817 - ; 818 - return 0; 819 -} 820 - 821 -_ACEOF 822 -if ac_fn_c_try_compile "$LINENO"; then : 823 - have_pthread_t=yes 824 -fi 825 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 826 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5 827 -$as_echo "$have_pthread_t" >&6; } 828 -if test "$have_pthread_t" = yes ; then 829 # The cast to long int works around a bug in the HP C Compiler 830 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 831 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 832 @@ -7382,7 +7757,6 @@ 833 _ACEOF 834 835 836 -fi 837 CC="$ac_save_cc" 838 839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5 840 @@ -7429,6 +7803,15 @@ 841 ;; 842 esac 843 844 +if test "x$cross_compiling" = xyes; then 845 + function arch 846 + { 847 + echo i386 848 + } 849 + OSX_ARCH_PROG=arch 850 +else 851 + OSX_ARCH_PROG=/usr/bin/arch 852 +fi 853 854 ARCH_RUN_32BIT="" 855 856 @@ -7438,7 +7821,7 @@ 857 if test "${enable_universalsdk}"; then 858 : 859 else 860 - LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`" 861 + LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only $($OSX_ARCH_PROG)" 862 fi 863 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' 864 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; 865 @@ -7478,7 +7861,7 @@ 866 867 868 if test "${ac_osx_32bit}" = "yes"; then 869 - case `/usr/bin/arch` in 870 + case $($OSX_ARCH_PROG) in 871 i386) 872 MACOSX_DEFAULT_ARCH="i386" 873 ;; 874 @@ -7490,7 +7873,7 @@ 875 ;; 876 esac 877 else 878 - case `/usr/bin/arch` in 879 + case $($OSX_ARCH_PROG) in 880 i386) 881 MACOSX_DEFAULT_ARCH="x86_64" 882 ;; 883 @@ -7533,8 +7916,8 @@ 884 885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5 886 $as_echo_n "checking for dyld... " >&6; } 887 -case $ac_sys_system/$ac_sys_release in 888 - Darwin/*) 889 +case $host in 890 + *darwin*) 891 892 $as_echo "#define WITH_DYLD 1" >>confdefs.h 893 894 @@ -7570,6 +7953,16 @@ 895 CYGWIN*) SO=.dll;; 896 *) SO=.so;; 897 esac 898 + case $host in 899 + *-*-mingw*) 900 + #NOTE: see _PyImport_DynLoadFiletab in dynload_win.c 901 + if test "x$Py_DEBUG" = xtrue; then 902 + SO=_d.pyd 903 + else 904 + SO=.pyd 905 + fi 906 + ;; 907 + esac 908 else 909 # this might also be a termcap variable, see #610332 910 echo 911 @@ -7656,7 +8049,7 @@ 912 # Use -undefined dynamic_lookup whenever possible (10.3 and later). 913 # This allows an extension to be used in any Python 914 915 - if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2 916 + if test ${MACOSX_DEPLOYMENT_TARGET} > 10.2 917 then 918 if test "${enable_universalsdk}"; then 919 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" 920 @@ -7732,6 +8125,12 @@ 921 LDCXXSHARED="g++ -shared";; 922 *) LDSHARED="ld";; 923 esac 924 + case $host in 925 + *-*-mingw*) 926 + LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base' 927 + LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base' 928 + ;; 929 + esac 930 fi 931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5 932 $as_echo "$LDSHARED" >&6; } 933 @@ -7833,6 +8232,12 @@ 934 # when running test_compile.py. 935 LINKFORSHARED='-Wl,-E -N 2048K';; 936 esac 937 + case $host in 938 + *-*-mingw*) 939 + if test x$enable_shared = xyes; then 940 + LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)' 941 + fi;; 942 + esac 943 fi 944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5 945 $as_echo "$LINKFORSHARED" >&6; } 946 @@ -7851,6 +8256,12 @@ 947 *) 948 CFLAGSFORSHARED='$(CCSHARED)' 949 esac 950 + case $host in 951 + *-*-mingw*) 952 + # TODO mingw may needs CCSHARED when building extension DLLs 953 + # but not when building the interpreter DLL. 954 + CFLAGSFORSHARED='';; 955 + esac 956 fi 957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5 958 $as_echo "$CFLAGSFORSHARED" >&6; } 959 @@ -8029,6 +8440,10 @@ 960 fi 961 962 # check if we need libintl for locale functions 963 +case $host in 964 + *-*-mingw*) 965 + ;; 966 + *) 967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5 968 $as_echo_n "checking for textdomain in -lintl... " >&6; } 969 if test "${ac_cv_lib_intl_textdomain+set}" = set; then : 970 @@ -8071,6 +8486,8 @@ 971 972 fi 973 974 + ;; 975 +esac 976 977 # checks for system dependent C++ extensions support 978 case "$ac_sys_system" in 979 @@ -8532,6 +8949,15 @@ 980 981 posix_threads=yes 982 THREADOBJ="Python/thread.o" 983 +elif test "x$ac_cv_ntthread" = xyes 984 +then 985 + $as_echo "#define WITH_THREAD 1" >>confdefs.h 986 + 987 + posix_threads=no 988 + THREADOBJ="Python/thread.o" 989 + 990 +$as_echo "#define NT_THREADS 1" >>confdefs.h 991 + 992 else 993 if test ! -z "$with_threads" -a -d "$with_threads" 994 then LDFLAGS="$LDFLAGS -L$with_threads" 995 @@ -9063,6 +9489,18 @@ 996 fi 997 998 999 + 1000 +BUILDIN_WIN32_MODULE='#' 1001 +case $host in 1002 + *-*-mingw*) 1003 + # On win32 host(mingw build MSYS environment) site.py fail to load 1004 + # if _functools is not build-in by reason of dependency: 1005 + # setup->site->locale->functools&operator 1006 + BUILDIN_WIN32_MODULE= 1007 + ;; 1008 +esac 1009 + 1010 + 1011 # Check for enable-ipv6 1012 1013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 1014 @@ -9517,6 +9955,14 @@ 1015 fi 1016 ;; 1017 esac 1018 + case $host in 1019 + *-*-mingw*) 1020 + # FIXME: it is good to use portable "$OBJEXT" instead "o" but 1021 + # python build isn't yet ready to use it (see Makefile.pre.in) 1022 + #DYNLOADFILE="dynload_win.$OBJEXT" 1023 + DYNLOADFILE="dynload_win.o" 1024 + ;; 1025 + esac 1026 fi 1027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 1028 $as_echo "$DYNLOADFILE" >&6; } 1029 @@ -9532,14 +9978,24 @@ 1030 1031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 1032 $as_echo_n "checking MACHDEP_OBJS... " >&6; } 1033 +case $host in 1034 + *-*-mingw*) 1035 + extra_machdep_objs="PC/dl_nt.o Modules/getpath.o PC/import_nt.o" 1036 + ;; 1037 +esac 1038 if test -z "$MACHDEP_OBJS" 1039 then 1040 MACHDEP_OBJS=$extra_machdep_objs 1041 else 1042 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" 1043 fi 1044 -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5 1045 -$as_echo "MACHDEP_OBJS" >&6; } 1046 +if test -z "$MACHDEP_OBJS"; then 1047 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 1048 +$as_echo "none" >&6; } 1049 +else 1050 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 1051 +$as_echo "$MACHDEP_OBJS" >&6; } 1052 +fi 1053 1054 # checks for library functions 1055 for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \ 1056 @@ -9569,6 +10025,7 @@ 1057 done 1058 1059 1060 + 1061 # For some functions, having a definition is not sufficient, since 1062 # we want to take their address. 1063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 1064 @@ -10901,11 +11358,20 @@ 1065 fi 1066 1067 fi 1068 +case $host in 1069 + *-*-mingw*) 1070 + #FIXME: mingw "w32api" define getaddinfo if WINVER >= 0x501, i.e. XP or greater. 1071 + #TODO: mingw require additional check. 1072 + #NOTE: above check is not correct for windows platforms. 1073 + # ac_cv_buggy_getaddrinfo=no 1074 + : 1075 + ;; 1076 +esac 1077 1078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 1079 $as_echo "$ac_cv_buggy_getaddrinfo" >&6; } 1080 1081 -if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes 1082 +if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes 1083 then 1084 if test $ipv6 = yes 1085 then 1086 @@ -11211,7 +11677,12 @@ 1087 else 1088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1089 /* end confdefs.h. */ 1090 -#include <netdb.h> 1091 + 1092 +#ifdef HAVE_WINSOCK2_H 1093 +# include <ws2tcpip.h> 1094 +#else 1095 +# include <netdb.h> 1096 +#endif 1097 int 1098 main () 1099 { 1100 @@ -11244,8 +11715,15 @@ 1101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1102 /* end confdefs.h. */ 1103 1104 -# include <sys/types.h> 1105 -# include <sys/socket.h> 1106 +#ifdef HAVE_SYS_TYPES_H 1107 +#include <sys/types.h> 1108 +#endif 1109 +#ifdef HAVE_SYS_SOCKET_H 1110 +#include <sys/socket.h> 1111 +#endif 1112 +#ifdef HAVE_WINSOCK2_H 1113 +#include <winsock2.h> 1114 +#endif 1115 int 1116 main () 1117 { 1118 @@ -11829,6 +12307,9 @@ 1119 BeOS) ;; 1120 *) LIBM=-lm 1121 esac 1122 +case $host in 1123 + *-*-mingw*) LIBM=;; 1124 +esac 1125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 1126 $as_echo_n "checking for --with-libm=STRING... " >&6; } 1127 1128 @@ -11878,6 +12359,13 @@ 1129 # ************************************************** 1130 # * Check for various properties of floating point * 1131 # ************************************************** 1132 +case $host in 1133 + *-*-mingw*) 1134 + ac_cv_little_endian_double=yes 1135 + ac_cv_big_endian_double=no 1136 + ac_cv_mixed_endian_double=no 1137 + ;; 1138 +esac 1139 1140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5 1141 $as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; } 1142 @@ -12018,6 +12506,8 @@ 1143 1144 # This inline assembler syntax may also work for suncc and icc, 1145 # so we try it on all platforms. 1146 +# Note MSVC build use Python/dtoa.c, but I could not find any reason 1147 +# to use this file for GCC(mingw*) builds, so mingw* will use gcc asm :) 1148 1149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 1150 $as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } 1151 @@ -12097,6 +12587,11 @@ 1152 fi 1153 1154 CC="$ac_save_cc" 1155 +if test "x$cross_compiling" = xyes; then 1156 + case $host in 1157 + *-*-mingw*) ac_cv_x87_double_rounding=yes;; 1158 + esac 1159 +fi 1160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 1161 $as_echo "$ac_cv_x87_double_rounding" >&6; } 1162 if test "$ac_cv_x87_double_rounding" = yes 1163 @@ -12117,6 +12612,12 @@ 1164 # -0. on some architectures. 1165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5 1166 $as_echo_n "checking whether tanh preserves the sign of zero... " >&6; } 1167 +case $host in 1168 + *-*-mingw*) 1169 + # Some MSVC runtimes don't preserve zero sign. 1170 + # On mingw host we will use always replacement function. 1171 + ac_cv_tanh_preserves_zero_sign=no;; 1172 +esac 1173 if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then : 1174 $as_echo_n "(cached) " >&6 1175 else 1176 @@ -12225,6 +12726,13 @@ 1177 # the kernel module that provides POSIX semaphores 1178 # isn't loaded by default, so an attempt to call 1179 # sem_open results in a 'Signal 12' error. 1180 +if test $ac_cv_func_sem_open = yes; then 1181 +case $host in 1182 + *-*-mingw*) 1183 + # GCC 4.4+ (mingw) support posix threads(!) 1184 + # bug we won't use them on windows platform. 1185 + ac_cv_posix_semaphores_enabled=no;; 1186 +esac 1187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 1188 $as_echo_n "checking whether POSIX semaphores are enabled... " >&6; } 1189 if test "${ac_cv_posix_semaphores_enabled+set}" = set; then : 1190 @@ -12268,6 +12776,9 @@ 1191 1192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 1193 $as_echo "$ac_cv_posix_semaphores_enabled" >&6; } 1194 +else 1195 + ac_cv_posix_semaphores_enabled=no 1196 +fi 1197 if test $ac_cv_posix_semaphores_enabled = no 1198 then 1199 1200 @@ -12276,8 +12787,19 @@ 1201 fi 1202 1203 # Multiprocessing check for broken sem_getvalue 1204 +if test $ac_cv_func_sem_getvalue = yes; then 1205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 1206 $as_echo_n "checking for broken sem_getvalue... " >&6; } 1207 +case $host in 1208 + *-*-mingw*) 1209 + # GCC(mingw) 4.4+ require and use posix threads(pthreads-w32) 1210 + # Also system may contain installed pthreads-w32. 1211 + # NOTE the test case below don't work for pthreads-w32: 1212 + # - SEM_FAILED is not defined; 1213 + # - sem_open is stub; 1214 + # - sem_getvalue work(!). 1215 + ac_cv_broken_sem_getvalue=no;; 1216 +esac 1217 if test "${ac_cv_broken_sem_getvalue+set}" = set; then : 1218 $as_echo_n "(cached) " >&6 1219 else 1220 @@ -12329,6 +12851,7 @@ 1221 $as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h 1222 1223 fi 1224 +fi 1225 1226 # determine what size digit to use for Python's longs 1227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 1228 @@ -12450,6 +12973,9 @@ 1229 # check whether wchar_t is signed or not 1230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 1231 $as_echo_n "checking whether wchar_t is signed... " >&6; } 1232 + case $host in 1233 + *-*-mingw*) ac_cv_wchar_t_signed=no;; 1234 + esac 1235 if test "${ac_cv_wchar_t_signed+set}" = set; then : 1236 $as_echo_n "(cached) " >&6 1237 else 1238 @@ -12784,6 +13310,46 @@ 1239 esac 1240 1241 1242 +# REPARSE_DATA_BUFFER is in winnt.h on mingw32 and (unusably) ddk/ntifs.h on mingw64. 1243 +case $host in 1244 + *-*-mingw*) 1245 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct REPARSE_DATA_BUFFER is in winnt.h" >&5 1246 +$as_echo_n "checking if struct REPARSE_DATA_BUFFER is in winnt.h... " >&6; } 1247 +if test "${ac_cv_struct_reparse_data_buffer_in_winnt_h+set}" = set; then : 1248 + $as_echo_n "(cached) " >&6 1249 +else 1250 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1251 +/* end confdefs.h. */ 1252 +#include <windows.h> 1253 + #include <winnt.h> 1254 +int 1255 +main () 1256 +{ 1257 +REPARSE_DATA_BUFFER rdb 1258 + ; 1259 + return 0; 1260 +} 1261 +_ACEOF 1262 +if ac_fn_c_try_compile "$LINENO"; then : 1263 + ac_cv_struct_reparse_data_buffer_in_winnt_h=yes 1264 +else 1265 + ac_cv_struct_reparse_data_buffer_in_winnt_h=no 1266 + 1267 +fi 1268 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 1269 + 1270 +fi 1271 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_reparse_data_buffer_in_winnt_h" >&5 1272 +$as_echo "$ac_cv_struct_reparse_data_buffer_in_winnt_h" >&6; } 1273 +if test "x${ac_cv_struct_reparse_data_buffer_in_winnt_h}" = xyes; then 1274 + 1275 +$as_echo "#define REPARSE_DATA_BUFFER_IN_WINNT /**/" >>confdefs.h 1276 + 1277 + 1278 +fi 1279 + ;; 1280 +esac 1281 + 1282 # Check whether right shifting a negative integer extends the sign bit 1283 # or fills with zeros (like the Cray J90, according to Tim Peters). 1284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5 1285 @@ -12875,7 +13441,7 @@ 1286 py_cv_lib_readline=no 1287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5 1288 $as_echo_n "checking how to link readline libs... " >&6; } 1289 -for py_libtermcap in "" ncursesw ncurses curses termcap; do 1290 +for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do 1291 if test -z "$py_libtermcap"; then 1292 READLINE_LIBS="-lreadline" 1293 else 1294 @@ -12908,9 +13474,9 @@ 1295 if test $py_cv_lib_readline = yes; then 1296 break 1297 fi 1298 + READLINE_LIBS= 1299 done 1300 -# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts 1301 -#AC_SUBST([READLINE_LIBS]) 1302 + 1303 if test $py_cv_lib_readline = no; then 1304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 1305 $as_echo "none" >&6; } 1306 @@ -13659,38 +14225,89 @@ 1307 fi 1308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 1309 1310 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 1311 +$as_echo "$as_me: checking for device files" >&6;} 1312 +case $host in 1313 + *-*-mingw*) 1314 + ac_cv_file__dev_ptmx=ignore #NOTE: under MSYS environment device exist 1315 + ac_cv_file__dev_ptc=no 1316 + ;; 1317 +esac 1318 + 1319 +if test "x$cross_compiling" = xyes; then 1320 + if test "${ac_cv_file__dev_ptmx+set}" != set; then 1321 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 1322 +$as_echo_n "checking for /dev/ptmx... " >&6; } 1323 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 1324 +$as_echo "not set" >&6; } 1325 + as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 1326 + fi 1327 + if test "${ac_cv_file__dev_ptc+set}" != set; then 1328 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 1329 +$as_echo_n "checking for /dev/ptc... " >&6; } 1330 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 1331 +$as_echo "not set" >&6; } 1332 + as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 1333 + fi 1334 +fi 1335 + 1336 +# FIXME: autoconf macro AC_CHECK_FILES is better but require additional 1337 +# changes in posixmodule.c : 's/HAVE_DEV_/HAVE__DEV_/g' 1338 +# To keep patch minimal I left defines as before. 1339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 1340 $as_echo_n "checking for /dev/ptmx... " >&6; } 1341 +if test "${ac_cv_file__dev_ptmx+set}" = set; then : 1342 + $as_echo_n "(cached) " >&6 1343 +else 1344 + test "$cross_compiling" = yes && 1345 + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 1346 +if test -r "/dev/ptmx"; then 1347 + ac_cv_file__dev_ptmx=yes 1348 +else 1349 + ac_cv_file__dev_ptmx=no 1350 +fi 1351 +fi 1352 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 1353 +$as_echo "$ac_cv_file__dev_ptmx" >&6; } 1354 +if test "x$ac_cv_file__dev_ptmx" = x""yes; then : 1355 1356 -if test -r /dev/ptmx 1357 -then 1358 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 1359 -$as_echo "yes" >&6; } 1360 +fi 1361 + 1362 +if test "x$ac_cv_file__dev_ptmx" = xyes; then 1363 1364 $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h 1365 1366 -else 1367 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1368 -$as_echo "no" >&6; } 1369 fi 1370 - 1371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 1372 $as_echo_n "checking for /dev/ptc... " >&6; } 1373 +if test "${ac_cv_file__dev_ptc+set}" = set; then : 1374 + $as_echo_n "(cached) " >&6 1375 +else 1376 + test "$cross_compiling" = yes && 1377 + as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 1378 +if test -r "/dev/ptc"; then 1379 + ac_cv_file__dev_ptc=yes 1380 +else 1381 + ac_cv_file__dev_ptc=no 1382 +fi 1383 +fi 1384 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 1385 +$as_echo "$ac_cv_file__dev_ptc" >&6; } 1386 +if test "x$ac_cv_file__dev_ptc" = x""yes; then : 1387 1388 -if test -r /dev/ptc 1389 -then 1390 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 1391 -$as_echo "yes" >&6; } 1392 +fi 1393 + 1394 +if test "x$ac_cv_file__dev_ptc" = xyes; then 1395 1396 $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h 1397 1398 -else 1399 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 1400 -$as_echo "no" >&6; } 1401 fi 1402 1403 if test "$have_long_long" = yes 1404 then 1405 + case $host in 1406 + *-*-mingw*) ac_cv_have_long_long_format=yes;; 1407 + esac 1408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5 1409 $as_echo_n "checking for %lld and %llu printf() format support... " >&6; } 1410 if test "${ac_cv_have_long_long_format+set}" = set; then : 1411 @@ -13762,6 +14379,9 @@ 1412 fi 1413 1414 1415 +case $host in 1416 + *-*-mingw*) ac_cv_have_size_t_format=no;; 1417 +esac 1418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5 1419 $as_echo_n "checking for %zd printf() format support... " >&6; } 1420 if test "${ac_cv_have_size_t_format+set}" = set; then : 1421 @@ -13861,8 +14481,38 @@ 1422 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" 1423 done 1424 1425 +# FIXME: in cross-compilation env. (mingw on linux) how to select correct compiler ? 1426 +# The current py-code will created modules with .so suffix and environment 1427 +# variable setting SO=$(SO) don't help 1428 +# see output of: python setup.py build --help-compiler 1429 + 1430 +case $host in 1431 + *-*-mingw*) PYMOD_BUILDOPT="--compiler mingw32";; 1432 +esac 1433 + 1434 +# Python interpreter main program for frozen scripts 1435 + 1436 +PYTHON_OBJS_FROZENMAIN="Python/frozenmain.o" 1437 +# MODULE_GETPATH - default sys.path calculations 1438 + 1439 +MODULE_GETPATH=Modules/getpath.o 1440 +case $host in 1441 + *-*-mingw*) 1442 + CPPFLAGS="-I\$(srcdir)/Python -I\$(srcdir)/PC $CPPFLAGS" 1443 + 1444 + # FIXME: why windows builds don't use PC/frozen_dllmain.o ? 1445 + PYTHON_OBJS_FROZENMAIN="" 1446 + # default sys.path calculations for windows platforms 1447 + # MODULE_GETPATH=PC/getpathp.o 1448 + MODULE_GETPATH=Modules/getpath.o 1449 + ;; 1450 +esac 1451 + 1452 1453 SRCDIRS="Parser Grammar Objects Python Modules Mac" 1454 +case $host in 1455 + *-*-mingw*) SRCDIRS="$SRCDIRS PC";; 1456 +esac 1457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 1458 $as_echo_n "checking for build directories... " >&6; } 1459 for dir in $SRCDIRS; do 1460 @@ -13874,7 +14524,13 @@ 1461 $as_echo "done" >&6; } 1462 1463 # generate output files 1464 -ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc" 1465 + 1466 + 1467 +ac_config_commands="$ac_config_commands Makefile" 1468 + 1469 +ac_config_files="$ac_config_files setup_info" 1470 + 1471 +ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh" 1472 1473 ac_config_files="$ac_config_files Modules/ld_so_aix" 1474 1475 @@ -13978,6 +14634,21 @@ 1476 1477 1478 1479 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating Modules/Setup" >&5 1480 +$as_echo "$as_me: creating Modules/Setup" >&6;} 1481 + 1482 +if test ! -f Modules/Setup 1483 +then 1484 + cp $srcdir/Modules/Setup.dist Modules/Setup 1485 +fi 1486 + 1487 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating Modules/Setup.local" >&5 1488 +$as_echo "$as_me: creating Modules/Setup.local" >&6;} 1489 +if test ! -f Modules/Setup.local 1490 +then 1491 + echo "# Edit this file for local setup changes" >Modules/Setup.local 1492 +fi 1493 + 1494 : ${CONFIG_STATUS=./config.status} 1495 ac_write_fail=0 1496 ac_clean_files_save=$ac_clean_files 1497 @@ -14412,6 +15083,7 @@ 1498 # Files that config.status was made for. 1499 config_files="$ac_config_files" 1500 config_headers="$ac_config_headers" 1501 +config_commands="$ac_config_commands" 1502 1503 _ACEOF 1504 1505 @@ -14441,6 +15113,9 @@ 1506 Configuration headers: 1507 $config_headers 1508 1509 +Configuration commands: 1510 +$config_commands 1511 + 1512 Report bugs to <http://bugs.python.org/>." 1513 1514 _ACEOF 1515 @@ -14575,9 +15250,12 @@ 1516 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;; 1517 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; 1518 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; 1519 + "Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS Makefile" ;; 1520 + "setup_info") CONFIG_FILES="$CONFIG_FILES setup_info" ;; 1521 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; 1522 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; 1523 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; 1524 + "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;; 1525 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;; 1526 1527 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 1528 @@ -14592,6 +15270,7 @@ 1529 if $ac_need_defaults; then 1530 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 1531 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 1532 + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands 1533 fi 1534 1535 # Have a temporary directory for convenience. Make it in the build tree 1536 @@ -14886,7 +15565,7 @@ 1537 fi # test -n "$CONFIG_HEADERS" 1538 1539 1540 -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 1541 +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" 1542 shift 1543 for ac_tag 1544 do 1545 @@ -15123,11 +15802,19 @@ 1546 fi 1547 ;; 1548 1549 - 1550 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 1551 +$as_echo "$as_me: executing $ac_file commands" >&6;} 1552 + ;; 1553 esac 1554 1555 1556 case $ac_file$ac_mode in 1557 + "Makefile":C) $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 1558 + -s Modules Modules/Setup.config \ 1559 + Modules/Setup.local Modules/Setup 1560 + 1561 + 1562 +mv config.c Modules ;; 1563 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;; 1564 1565 esac 1566 @@ -15167,38 +15854,3 @@ 1567 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 1568 fi 1569 1570 - 1571 -echo "creating Modules/Setup" 1572 -if test ! -f Modules/Setup 1573 -then 1574 - cp $srcdir/Modules/Setup.dist Modules/Setup 1575 -fi 1576 - 1577 -echo "creating Modules/Setup.local" 1578 -if test ! -f Modules/Setup.local 1579 -then 1580 - echo "# Edit this file for local setup changes" >Modules/Setup.local 1581 -fi 1582 - 1583 -echo "creating Makefile" 1584 -$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 1585 - -s Modules Modules/Setup.config \ 1586 - Modules/Setup.local Modules/Setup 1587 - 1588 -case $ac_sys_system in 1589 -BeOS) 1590 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 1591 - 1592 - Support for BeOS is deprecated as of Python 2.6. 1593 - See PEP 11 for the gory details. 1594 - " >&5 1595 -$as_echo "$as_me: WARNING: 1596 - 1597 - Support for BeOS is deprecated as of Python 2.6. 1598 - See PEP 11 for the gory details. 1599 - " >&2;} 1600 - ;; 1601 -*) ;; 1602 -esac 1603 - 1604 -mv config.c Modules 1605 diff -urN a/pyconfig.h.in b/pyconfig.h.in 1606 --- a/pyconfig.h.in 2012-07-04 23:46:02.751554822 +0100 1607 +++ b/pyconfig.h.in 2012-07-04 23:46:13.306624284 +0100 1608 @@ -969,6 +969,9 @@ 1609 /* Define if you want to have a Unicode type. */ 1610 #undef Py_USING_UNICODE 1611 1612 +/* REPARSE_DATA_BUFFER in winnt.h */ 1613 +#undef REPARSE_DATA_BUFFER_IN_WINNT 1614 + 1615 /* assume C89 semantics that RETSIGTYPE is always void */ 1616 #undef RETSIGTYPE 1617 1618