Mercurial > vim
comparison src/configure.ac @ 29224:ca46658481cf v8.2.5131
patch 8.2.5131: timeout implementation is not optimal
Commit: https://github.com/vim/vim/commit/e530395c2cd261d598094dc9ea785e90a753c5f1
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 19 17:05:47 2022 +0100
patch 8.2.5131: timeout implementation is not optimal
Problem: Timeout implementation is not optimal.
Solution: Further improvements for timeouts. Add a test for searchpair()
timeout. (partly by Paul Ollis)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Jun 2022 18:15:03 +0200 |
parents | 9781c150eddd |
children | 204944c81b19 |
comparison
equal
deleted
inserted
replaced
29223:18ff9d5a73ed | 29224:ca46658481cf |
---|---|
78 dnl Check for the flag that fails if stuff are missing. | 78 dnl Check for the flag that fails if stuff are missing. |
79 | 79 |
80 AC_MSG_CHECKING(--enable-fail-if-missing argument) | 80 AC_MSG_CHECKING(--enable-fail-if-missing argument) |
81 AC_ARG_ENABLE(fail_if_missing, | 81 AC_ARG_ENABLE(fail_if_missing, |
82 [ --enable-fail-if-missing Fail if dependencies on additional features | 82 [ --enable-fail-if-missing Fail if dependencies on additional features |
83 specified on the command line are missing.], | 83 specified on the command line are missing.], |
84 [fail_if_missing="yes"], | 84 [fail_if_missing="yes"], |
85 [fail_if_missing="no"]) | 85 [fail_if_missing="no"]) |
86 AC_MSG_RESULT($fail_if_missing) | 86 AC_MSG_RESULT($fail_if_missing) |
87 | 87 |
88 dnl Keep original value to check later. | 88 dnl Keep original value to check later. |
235 | 235 |
236 AC_MSG_CHECKING(--with-developer-dir argument) | 236 AC_MSG_CHECKING(--with-developer-dir argument) |
237 AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools], | 237 AC_ARG_WITH(developer-dir, [ --with-developer-dir=PATH use PATH as location for Xcode developer tools], |
238 DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR), | 238 DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR), |
239 AC_MSG_RESULT(not present)) | 239 AC_MSG_RESULT(not present)) |
240 | 240 |
241 if test "x$DEVELOPER_DIR" = "x"; then | 241 if test "x$DEVELOPER_DIR" = "x"; then |
242 AC_PATH_PROG(XCODE_SELECT, xcode-select) | 242 AC_PATH_PROG(XCODE_SELECT, xcode-select) |
243 if test "x$XCODE_SELECT" != "x"; then | 243 if test "x$XCODE_SELECT" != "x"; then |
244 AC_MSG_CHECKING(for developer dir using xcode-select) | 244 AC_MSG_CHECKING(for developer dir using xcode-select) |
245 DEVELOPER_DIR=`$XCODE_SELECT -print-path` | 245 DEVELOPER_DIR=`$XCODE_SELECT -print-path` |
285 | 285 |
286 if test "$enable_darwin" = "yes"; then | 286 if test "$enable_darwin" = "yes"; then |
287 MACOS_X_DARWIN=yes | 287 MACOS_X_DARWIN=yes |
288 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; | 288 OS_EXTRA_SRC="os_macosx.m os_mac_conv.c"; |
289 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" | 289 OS_EXTRA_OBJ="objects/os_macosx.o objects/os_mac_conv.o" |
290 dnl os_macosx.m implements timer_create() and friends | |
291 AC_DEFINE(HAVE_TIMER_CREATE) | |
290 dnl TODO: use -arch i386 on Intel machines | 292 dnl TODO: use -arch i386 on Intel machines |
291 dnl Removed -no-cpp-precomp, only for very old compilers. | 293 dnl Removed -no-cpp-precomp, only for very old compilers. |
292 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN" | 294 CPPFLAGS="$CPPFLAGS -DMACOS_X_DARWIN" |
293 | 295 |
294 dnl Assume we don't want X11 unless it was specifically asked for | 296 dnl Assume we don't want X11 unless it was specifically asked for |
1497 [ | 1499 [ |
1498 vi_cv_var_python3_abiflags= | 1500 vi_cv_var_python3_abiflags= |
1499 if ${vi_cv_path_python3} -c \ | 1501 if ${vi_cv_path_python3} -c \ |
1500 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)" | 1502 "import sys; sys.exit(${vi_cv_var_python3_version} < 3.2)" |
1501 then | 1503 then |
1502 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \ | 1504 vi_cv_var_python3_abiflags=`${vi_cv_path_python3} -c \ |
1503 "import sys; print(sys.abiflags)"` | 1505 "import sys; print(sys.abiflags)"` |
1504 fi ]) | 1506 fi ]) |
1505 | 1507 |
1506 dnl -- find where python3 thinks it was installed | 1508 dnl -- find where python3 thinks it was installed |
1507 AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python3_pfx, | 1509 AC_CACHE_CHECK(Python's install prefix,vi_cv_path_python3_pfx, |
1508 [ vi_cv_path_python3_pfx=` | 1510 [ vi_cv_path_python3_pfx=` |
1509 ${vi_cv_path_python3} -c \ | 1511 ${vi_cv_path_python3} -c \ |
1510 "import sys; print(sys.prefix)"` ]) | 1512 "import sys; print(sys.prefix)"` ]) |
1511 | 1513 |
1512 dnl -- and where it thinks it runs | 1514 dnl -- and where it thinks it runs |
1513 AC_CACHE_CHECK(Python's execution prefix,vi_cv_path_python3_epfx, | 1515 AC_CACHE_CHECK(Python's execution prefix,vi_cv_path_python3_epfx, |
1514 [ vi_cv_path_python3_epfx=` | 1516 [ vi_cv_path_python3_epfx=` |
1515 ${vi_cv_path_python3} -c \ | 1517 ${vi_cv_path_python3} -c \ |
1516 "import sys; print(sys.exec_prefix)"` ]) | 1518 "import sys; print(sys.exec_prefix)"` ]) |
1517 | 1519 |
1518 dnl -- python3's internal library path | 1520 dnl -- python3's internal library path |
1519 | 1521 |
1520 AC_CACHE_VAL(vi_cv_path_python3path, | 1522 AC_CACHE_VAL(vi_cv_path_python3path, |
1521 [ vi_cv_path_python3path=` | 1523 [ vi_cv_path_python3path=` |
1522 unset PYTHONPATH; | 1524 unset PYTHONPATH; |
1523 ${vi_cv_path_python3} -c \ | 1525 ${vi_cv_path_python3} -c \ |
1524 "import sys, string; print(':'.join(sys.path))"` ]) | 1526 "import sys, string; print(':'.join(sys.path))"` ]) |
1525 | 1527 |
1526 dnl -- where the Python implementation library archives are | 1528 dnl -- where the Python implementation library archives are |
1527 | 1529 |
1528 AC_ARG_WITH(python3-config-dir, | 1530 AC_ARG_WITH(python3-config-dir, |
1529 [ --with-python3-config-dir=PATH Python's config directory (deprecated)], | 1531 [ --with-python3-config-dir=PATH Python's config directory (deprecated)], |
1530 [ vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1 ] ) | 1532 [ vi_cv_path_python3_conf="${withval}"; have_python3_config_dir=1 ] ) |
1531 | 1533 |
1532 AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf, | 1534 AC_CACHE_CHECK(Python's configuration directory,vi_cv_path_python3_conf, |
1533 [ | 1535 [ |
1534 vi_cv_path_python3_conf= | 1536 vi_cv_path_python3_conf= |
1535 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" | 1537 config_dir="config-${vi_cv_var_python3_version}${vi_cv_var_python3_abiflags}" |
1536 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null` | 1538 d=`${vi_cv_path_python3} -c "import sysconfig; print(sysconfig.get_config_var('LIBPL'))" 2> /dev/null` |
1548 fi | 1550 fi |
1549 done | 1551 done |
1550 done | 1552 done |
1551 fi | 1553 fi |
1552 ]) | 1554 ]) |
1553 | 1555 |
1554 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}" | 1556 PYTHON3_CONFDIR="${vi_cv_path_python3_conf}" |
1555 | 1557 |
1556 if test "X$PYTHON3_CONFDIR" = "X"; then | 1558 if test "X$PYTHON3_CONFDIR" = "X"; then |
1557 AC_MSG_RESULT([can't find it!]) | 1559 AC_MSG_RESULT([can't find it!]) |
1558 else | 1560 else |
1559 | 1561 |
1560 dnl -- we need to examine Python's config/Makefile too | 1562 dnl -- we need to examine Python's config/Makefile too |
1561 dnl see what the interpreter is built from | 1563 dnl see what the interpreter is built from |
1562 AC_CACHE_VAL(vi_cv_path_python3_plibs, | 1564 AC_CACHE_VAL(vi_cv_path_python3_plibs, |
1563 [ | 1565 [ |
1564 pwd=`pwd` | 1566 pwd=`pwd` |
1599 dnl Define PYTHON3_HOME if --with-python-config-dir was used | 1601 dnl Define PYTHON3_HOME if --with-python-config-dir was used |
1600 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'" | 1602 PYTHON3_CFLAGS="${PYTHON3_CFLAGS} -DPYTHON3_HOME='L\"${vi_cv_path_python3_pfx}\"'" |
1601 fi | 1603 fi |
1602 PYTHON3_SRC="if_python3.c" | 1604 PYTHON3_SRC="if_python3.c" |
1603 PYTHON3_OBJ="objects/if_python3.o" | 1605 PYTHON3_OBJ="objects/if_python3.o" |
1604 | 1606 |
1605 dnl On FreeBSD linking with "-pthread" is required to use threads. | 1607 dnl On FreeBSD linking with "-pthread" is required to use threads. |
1606 dnl _THREAD_SAFE must be used for compiling then. | 1608 dnl _THREAD_SAFE must be used for compiling then. |
1607 dnl The "-pthread" is added to $LIBS, so that the following check for | 1609 dnl The "-pthread" is added to $LIBS, so that the following check for |
1608 dnl sigaltstack() will look in libc_r (it's there in libc!). | 1610 dnl sigaltstack() will look in libc_r (it's there in libc!). |
1609 dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC | 1611 dnl Otherwise, when using GCC, try adding -pthread to $CFLAGS. GCC |
1634 ) | 1636 ) |
1635 CFLAGS=$cflags_save | 1637 CFLAGS=$cflags_save |
1636 else | 1638 else |
1637 AC_MSG_RESULT(no) | 1639 AC_MSG_RESULT(no) |
1638 fi | 1640 fi |
1639 | 1641 |
1640 dnl check that compiling a simple program still works with the flags | 1642 dnl check that compiling a simple program still works with the flags |
1641 dnl added for Python. | 1643 dnl added for Python. |
1642 AC_MSG_CHECKING([if compile and link flags for Python 3 are sane]) | 1644 AC_MSG_CHECKING([if compile and link flags for Python 3 are sane]) |
1643 cflags_save=$CFLAGS | 1645 cflags_save=$CFLAGS |
1644 libs_save=$LIBS | 1646 libs_save=$LIBS |
1673 AC_SUBST(PYTHON3_CFLAGS_EXTRA) | 1675 AC_SUBST(PYTHON3_CFLAGS_EXTRA) |
1674 AC_SUBST(PYTHON3_SRC) | 1676 AC_SUBST(PYTHON3_SRC) |
1675 AC_SUBST(PYTHON3_OBJ) | 1677 AC_SUBST(PYTHON3_OBJ) |
1676 | 1678 |
1677 dnl if python2.x and python3.x are enabled one can only link in code | 1679 dnl if python2.x and python3.x are enabled one can only link in code |
1678 dnl with dlopen(), dlsym(), dlclose() | 1680 dnl with dlopen(), dlsym(), dlclose() |
1679 if test "$python_ok" = yes && test "$python3_ok" = yes; then | 1681 if test "$python_ok" = yes && test "$python3_ok" = yes; then |
1680 AC_DEFINE(DYNAMIC_PYTHON) | 1682 AC_DEFINE(DYNAMIC_PYTHON) |
1681 AC_DEFINE(DYNAMIC_PYTHON3) | 1683 AC_DEFINE(DYNAMIC_PYTHON3) |
1682 AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python) | 1684 AC_MSG_CHECKING(whether we can do without RTLD_GLOBAL for Python) |
1683 cflags_save=$CFLAGS | 1685 cflags_save=$CFLAGS |
3111 CPPFLAGS="$CPPFLAGS $X_CFLAGS" | 3113 CPPFLAGS="$CPPFLAGS $X_CFLAGS" |
3112 if test "$zOSUnix" = "yes"; then | 3114 if test "$zOSUnix" = "yes"; then |
3113 AC_CHECK_HEADERS(Xm/Xm.h) | 3115 AC_CHECK_HEADERS(Xm/Xm.h) |
3114 else | 3116 else |
3115 AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h Xm/UnhighlightT.h Xm/Notebook.h) | 3117 AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h Xm/UnhighlightT.h Xm/Notebook.h) |
3116 fi | 3118 fi |
3117 | 3119 |
3118 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then | 3120 if test "x$ac_cv_header_Xm_XpmP_h" = "xyes"; then |
3119 dnl Solaris uses XpmAttributes_21, very annoying. | 3121 dnl Solaris uses XpmAttributes_21, very annoying. |
3120 AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) | 3122 AC_MSG_CHECKING([for XpmAttributes_21 in Xm/XpmP.h]) |
3121 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;])], | 3123 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <Xm/XpmP.h>], [XpmAttributes_21 attr;])], |
3807 save_LIBS="$LIBS" | 3809 save_LIBS="$LIBS" |
3808 LIBS="$LIBS -lrt" | 3810 LIBS="$LIBS -lrt" |
3809 AC_LINK_IFELSE([AC_LANG_PROGRAM([ | 3811 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3810 #include<signal.h> | 3812 #include<signal.h> |
3811 #include<time.h> | 3813 #include<time.h> |
3812 static void set_flag(union sigval) {} | 3814 static void set_flag(union sigval sv) {} |
3813 ], [ | 3815 ], [ |
3814 struct timespec ts; | 3816 struct timespec ts; |
3815 struct sigevent action = {0}; | 3817 struct sigevent action = {0}; |
3816 timer_t timer_id; | 3818 timer_t timer_id; |
3817 | 3819 |
3822 AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE), | 3824 AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE), |
3823 LIBS="$save_LIBS" | 3825 LIBS="$save_LIBS" |
3824 AC_LINK_IFELSE([AC_LANG_PROGRAM([ | 3826 AC_LINK_IFELSE([AC_LANG_PROGRAM([ |
3825 #include<signal.h> | 3827 #include<signal.h> |
3826 #include<time.h> | 3828 #include<time.h> |
3827 static void set_flag(union sigval) {} | 3829 static void set_flag(union sigval sv) {} |
3828 ], [ | 3830 ], [ |
3829 struct timespec ts; | 3831 struct timespec ts; |
3830 struct sigevent action = {0}; | 3832 struct sigevent action = {0}; |
3831 timer_t timer_id; | 3833 timer_t timer_id; |
3832 | 3834 |
3883 ]) | 3885 ]) |
3884 if test $ac_cv_struct_st_mtim_nsec != no; then | 3886 if test $ac_cv_struct_st_mtim_nsec != no; then |
3885 AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec], | 3887 AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec], |
3886 [Define if struct stat contains a nanoseconds field]) | 3888 [Define if struct stat contains a nanoseconds field]) |
3887 fi | 3889 fi |
3888 | 3890 |
3889 dnl Link with iconv for charset translation, if not found without library. | 3891 dnl Link with iconv for charset translation, if not found without library. |
3890 dnl check for iconv() requires including iconv.h | 3892 dnl check for iconv() requires including iconv.h |
3891 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it | 3893 dnl Add "-liconv" when possible; Solaris has iconv but use GNU iconv when it |
3892 dnl has been installed. | 3894 dnl has been installed. |
3893 AC_MSG_CHECKING(for iconv_open()) | 3895 AC_MSG_CHECKING(for iconv_open()) |