comparison src/auto/configure @ 2329:ad2889f48843 vim73

Added support for Python 3. (Roland Puntaier)
author Bram Moolenaar <bram@vim.org>
date Sat, 17 Jul 2010 21:19:38 +0200
parents 966a5609669e
children 3840b7508835
comparison
equal deleted inserted replaced
2328:15379284e55a 2329:ad2889f48843
637 TCL_CFLAGS 637 TCL_CFLAGS
638 TCL_PRO 638 TCL_PRO
639 TCL_OBJ 639 TCL_OBJ
640 TCL_SRC 640 TCL_SRC
641 vi_cv_path_tcl 641 vi_cv_path_tcl
642 PYTHON3_OBJ
643 PYTHON3_SRC
644 PYTHON3_CFLAGS
645 PYTHON3_LIBS
646 PYTHON3_CONFDIR
647 vi_cv_path_python3
642 PYTHON_OBJ 648 PYTHON_OBJ
643 PYTHON_SRC 649 PYTHON_SRC
644 PYTHON_CFLAGS 650 PYTHON_CFLAGS
645 PYTHON_GETPATH_CFLAGS 651 PYTHON_GETPATH_CFLAGS
646 PYTHON_LIBS 652 PYTHON_LIBS
753 enable_mzschemeinterp 759 enable_mzschemeinterp
754 with_plthome 760 with_plthome
755 enable_perlinterp 761 enable_perlinterp
756 enable_pythoninterp 762 enable_pythoninterp
757 with_python_config_dir 763 with_python_config_dir
764 enable_python3interp
765 with_python3_config_dir
758 enable_tclinterp 766 enable_tclinterp
759 with_tclsh 767 with_tclsh
760 enable_rubyinterp 768 enable_rubyinterp
761 with_ruby_command 769 with_ruby_command
762 enable_cscope 770 enable_cscope
1415 --disable-xsmp-interact Disable XSMP interaction 1423 --disable-xsmp-interact Disable XSMP interaction
1416 --enable-luainterp Include Lua interpreter. 1424 --enable-luainterp Include Lua interpreter.
1417 --enable-mzschemeinterp Include MzScheme interpreter. 1425 --enable-mzschemeinterp Include MzScheme interpreter.
1418 --enable-perlinterp Include Perl interpreter. 1426 --enable-perlinterp Include Perl interpreter.
1419 --enable-pythoninterp Include Python interpreter. 1427 --enable-pythoninterp Include Python interpreter.
1428 --enable-python3interp Include Python3 interpreter.
1420 --enable-tclinterp Include Tcl interpreter. 1429 --enable-tclinterp Include Tcl interpreter.
1421 --enable-rubyinterp Include Ruby interpreter. 1430 --enable-rubyinterp Include Ruby interpreter.
1422 --enable-cscope Include cscope interface. 1431 --enable-cscope Include cscope interface.
1423 --enable-workshop Include Sun Visual Workshop support. 1432 --enable-workshop Include Sun Visual Workshop support.
1424 --disable-netbeans Disable NetBeans integration support. 1433 --disable-netbeans Disable NetBeans integration support.
1456 --with-features=TYPE tiny, small, normal, big or huge (default: normal) 1465 --with-features=TYPE tiny, small, normal, big or huge (default: normal)
1457 --with-compiledby=NAME name to show in :version message 1466 --with-compiledby=NAME name to show in :version message
1458 --with-lua-prefix=PFX Prefix where Lua is installed. 1467 --with-lua-prefix=PFX Prefix where Lua is installed.
1459 --with-plthome=PLTHOME Use PLTHOME. 1468 --with-plthome=PLTHOME Use PLTHOME.
1460 --with-python-config-dir=PATH Python's config directory 1469 --with-python-config-dir=PATH Python's config directory
1470 --with-python3-config-dir=PATH Python's config directory
1461 --with-tclsh=PATH which tclsh to use (default: tclsh8.0) 1471 --with-tclsh=PATH which tclsh to use (default: tclsh8.0)
1462 --with-ruby-command=RUBY name of the Ruby command (default: ruby) 1472 --with-ruby-command=RUBY name of the Ruby command (default: ruby)
1463 --with-x use the X Window System 1473 --with-x use the X Window System
1464 --with-gnome-includes=DIR Specify location of GNOME headers 1474 --with-gnome-includes=DIR Specify location of GNOME headers
1465 --with-gnome-libs=DIR Specify location of GNOME libs 1475 --with-gnome-libs=DIR Specify location of GNOME libs
5359 5369
5360 5370
5361 5371
5362 5372
5363 5373
5374
5375
5376
5377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-python3interp argument" >&5
5378 $as_echo_n "checking --enable-python3interp argument... " >&6; }
5379 # Check whether --enable-python3interp was given.
5380 if test "${enable_python3interp+set}" = set; then :
5381 enableval=$enable_python3interp;
5382 else
5383 enable_python3interp="no"
5384 fi
5385
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_python3interp" >&5
5387 $as_echo "$enable_python3interp" >&6; }
5388 if test "$enable_python3interp" = "yes"; then
5389 # Extract the first word of "python3", so it can be a program name with args.
5390 set dummy python3; ac_word=$2
5391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5392 $as_echo_n "checking for $ac_word... " >&6; }
5393 if test "${ac_cv_path_vi_cv_path_python3+set}" = set; then :
5394 $as_echo_n "(cached) " >&6
5395 else
5396 case $vi_cv_path_python3 in
5397 [\\/]* | ?:[\\/]*)
5398 ac_cv_path_vi_cv_path_python3="$vi_cv_path_python3" # Let the user override the test with a path.
5399 ;;
5400 *)
5401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5402 for as_dir in $PATH
5403 do
5404 IFS=$as_save_IFS
5405 test -z "$as_dir" && as_dir=.
5406 for ac_exec_ext in '' $ac_executable_extensions; do
5407 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5408 ac_cv_path_vi_cv_path_python3="$as_dir/$ac_word$ac_exec_ext"
5409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5410 break 2
5411 fi
5412 done
5413 done
5414 IFS=$as_save_IFS
5415
5416 ;;
5417 esac
5418 fi
5419 vi_cv_path_python3=$ac_cv_path_vi_cv_path_python3
5420 if test -n "$vi_cv_path_python3"; then
5421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3" >&5
5422 $as_echo "$vi_cv_path_python3" >&6; }
5423 else
5424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5425 $as_echo "no" >&6; }
5426 fi
5427
5428
5429 if test "X$vi_cv_path_python3" != "X"; then
5430
5431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python version" >&5
5432 $as_echo_n "checking Python version... " >&6; }
5433 if test "${vi_cv_var_python3_version+set}" = set; then :
5434 $as_echo_n "(cached) " >&6
5435 else
5436 vi_cv_var_python3_version=`
5437 ${vi_cv_path_python3} -c 'import sys; print(sys.version[1:3])'`
5438
5439 fi
5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_var_python3_version" >&5
5441 $as_echo "$vi_cv_var_python3_version" >&6; }
5442
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's install prefix" >&5
5444 $as_echo_n "checking Python's install prefix... " >&6; }
5445 if test "${vi_cv_path_python3_pfx+set}" = set; then :
5446 $as_echo_n "(cached) " >&6
5447 else
5448 vi_cv_path_python3_pfx=`
5449 ${vi_cv_path_python3} -c \
5450 "import sys; print(sys.prefix)"`
5451 fi
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_pfx" >&5
5453 $as_echo "$vi_cv_path_python3_pfx" >&6; }
5454
5455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's execution prefix" >&5
5456 $as_echo_n "checking Python's execution prefix... " >&6; }
5457 if test "${vi_cv_path_python3_epfx+set}" = set; then :
5458 $as_echo_n "(cached) " >&6
5459 else
5460 vi_cv_path_python3_epfx=`
5461 ${vi_cv_path_python3} -c \
5462 "import sys; print(sys.exec_prefix)"`
5463 fi
5464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_epfx" >&5
5465 $as_echo "$vi_cv_path_python3_epfx" >&6; }
5466
5467
5468 if test "${vi_cv_path_python3path+set}" = set; then :
5469 $as_echo_n "(cached) " >&6
5470 else
5471 vi_cv_path_python3path=`
5472 unset PYTHONPATH;
5473 ${vi_cv_path_python3} -c \
5474 "import sys, string; print(':'.join(sys.path))"`
5475 fi
5476
5477
5478
5479
5480 # Check whether --with-python3-config-dir was given.
5481 if test "${with_python3_config_dir+set}" = set; then :
5482 withval=$with_python3_config_dir; vi_cv_path_python3_conf="${withval}"
5483 fi
5484
5485
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python's configuration directory" >&5
5487 $as_echo_n "checking Python's configuration directory... " >&6; }
5488 if test "${vi_cv_path_python3_conf+set}" = set; then :
5489 $as_echo_n "(cached) " >&6
5490 else
5491
5492 vi_cv_path_python3_conf=
5493 for path in "${vi_cv_path_python3_pfx}" "${vi_cv_path_python3_epfx}"; do
5494 for subdir in lib share; do
5495 d="${path}/${subdir}/python3${vi_cv_var_python3_version}/config"
5496 if test -d "$d" && test -f "$d/config.c"; then
5497 vi_cv_path_python3_conf="$d"
5498 fi
5499 done
5500 done
5501
5502 fi
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $vi_cv_path_python3_conf" >&5
5504 $as_echo "$vi_cv_path_python3_conf" >&6; }
5505
5506 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}"
5507
5508 if test "X$PYTHON3_CONFDIR" = "X"; then
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: can't find it!" >&5
5510 $as_echo "can't find it!" >&6; }
5511 else
5512
5513 if test "${vi_cv_path_python3_plibs+set}" = set; then :
5514 $as_echo_n "(cached) " >&6
5515 else
5516
5517 pwd=`pwd`
5518 tmp_mkf="$pwd/config-PyMake$$"
5519 cat -- "${PYTHON3_CONFDIR}/Makefile" - <<'eof' >"${tmp_mkf}"
5520 __:
5521 @echo "python3_MODLIBS='$(MODLIBS)'"
5522 @echo "python3_LIBS='$(LIBS)'"
5523 @echo "python3_SYSLIBS='$(SYSLIBS)'"
5524 @echo "python3_LINKFORSHARED='$(LINKFORSHARED)'"
5525 eof
5526 eval "`cd ${PYTHON3_CONFDIR} && make -f "${tmp_mkf}" __ | sed '/ directory /d'`"
5527 rm -f -- "${tmp_mkf}"
5528 vi_cv_path_python3_plibs="-L${PYTHON3_CONFDIR} -lpython3${vi_cv_var_python3_version}"
5529 vi_cv_path_python3_plibs="${vi_cv_path_python3_plibs} ${python3_MODLIBS} ${python3_LIBS} ${python3_SYSLIBS} ${python3_LINKFORSHARED}"
5530 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-ltermcap//`
5531 vi_cv_path_python3_plibs=`echo $vi_cv_path_python3_plibs | sed s/-lffi//`
5532
5533 fi
5534
5535
5536 PYTHON3_LIBS="${vi_cv_path_python3_plibs}"
5537 if test "${vi_cv_path_python3_pfx}" = "${vi_cv_path_python3_epfx}"; then
5538 PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python3${vi_cv_var_python3_version}"
5539 else
5540 PYTHON3_CFLAGS="-I${vi_cv_path_python3_pfx}/include/python3${vi_cv_var_python3_version} -I${vi_cv_path_python3_epfx}/include/python3${vi_cv_var_python3_version}"
5541 fi
5542 PYTHON3_SRC="if_python3.c"
5543 if test "x$MACOSX" = "xyes"; then
5544 PYTHON3_OBJ="objects/if_python3.o"
5545 else
5546 PYTHON3_OBJ="objects/if_python3.o objects/py3_config.o"
5547 fi
5548
5549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -pthread should be used" >&5
5550 $as_echo_n "checking if -pthread should be used... " >&6; }
5551 threadsafe_flag=
5552 thread_lib=
5553 if test "`(uname) 2>/dev/null`" != Darwin; then
5554 test "$GCC" = yes && threadsafe_flag="-pthread"
5555 if test "`(uname) 2>/dev/null`" = FreeBSD; then
5556 threadsafe_flag="-D_THREAD_SAFE"
5557 thread_lib="-pthread"
5558 fi
5559 fi
5560 libs_save_old=$LIBS
5561 if test -n "$threadsafe_flag"; then
5562 cflags_save=$CFLAGS
5563 CFLAGS="$CFLAGS $threadsafe_flag"
5564 LIBS="$LIBS $thread_lib"
5565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5566 /* end confdefs.h. */
5567
5568 int
5569 main ()
5570 {
5571
5572 ;
5573 return 0;
5574 }
5575 _ACEOF
5576 if ac_fn_c_try_link "$LINENO"; then :
5577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5578 $as_echo "yes" >&6; }; PYTHON3_CFLAGS="$PYTHON3_CFLAGS $threadsafe_flag"
5579 else
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5581 $as_echo "no" >&6; }; LIBS=$libs_save_old
5582
5583 fi
5584 rm -f core conftest.err conftest.$ac_objext \
5585 conftest$ac_exeext conftest.$ac_ext
5586 CFLAGS=$cflags_save
5587 else
5588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5589 $as_echo "no" >&6; }
5590 fi
5591
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compile and link flags for Python are sane" >&5
5593 $as_echo_n "checking if compile and link flags for Python are sane... " >&6; }
5594 cflags_save=$CFLAGS
5595 libs_save=$LIBS
5596 CFLAGS="$CFLAGS $PYTHON3_CFLAGS"
5597 LIBS="$LIBS $PYTHON3_LIBS"
5598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5599 /* end confdefs.h. */
5600
5601 int
5602 main ()
5603 {
5604
5605 ;
5606 return 0;
5607 }
5608 _ACEOF
5609 if ac_fn_c_try_link "$LINENO"; then :
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5611 $as_echo "yes" >&6; }; python3_ok=yes
5612 else
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: PYTHON3 DISABLED" >&5
5614 $as_echo "no: PYTHON3 DISABLED" >&6; }; python3_ok=no
5615 fi
5616 rm -f core conftest.err conftest.$ac_objext \
5617 conftest$ac_exeext conftest.$ac_ext
5618 CFLAGS=$cflags_save
5619 LIBS=$libs_save
5620 if test "$python3_ok" = yes; then
5621 $as_echo "#define FEAT_PYTHON3 1" >>confdefs.h
5622
5623 else
5624 LIBS=$libs_save_old
5625 PYTHON3_SRC=
5626 PYTHON3_OBJ=
5627 PYTHON3_LIBS=
5628 PYTHON3_CFLAGS=
5629 fi
5630 fi
5631 fi
5632 fi
5633
5634
5635
5636
5637
5638
5639
5640 if test "$python_ok" = yes && test "$python3_ok" = yes; then
5641 $as_echo "#define DYNAMIC_PYTHON 1" >>confdefs.h
5642
5643 $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h
5644
5645 PYTHON_SRC="if_python.c"
5646 PYTHON_OBJ="objects/if_python.o"
5647 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"libpython${vi_cv_var_python_version}.so\\\""
5648 PYTHON_LIBS=
5649 PYTHON3_SRC="if_python3.c"
5650 PYTHON3_OBJ="objects/if_python3.o"
5651 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"libpython3${vi_cv_var_python3_version}.so\\\""
5652 PYTHON3_LIBS=
5653 fi
5364 5654
5365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5 5655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5
5366 $as_echo_n "checking --enable-tclinterp argument... " >&6; } 5656 $as_echo_n "checking --enable-tclinterp argument... " >&6; }
5367 # Check whether --enable-tclinterp was given. 5657 # Check whether --enable-tclinterp was given.
5368 if test "${enable_tclinterp+set}" = set; then : 5658 if test "${enable_tclinterp+set}" = set; then :