diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-24 20:48:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-24 20:48:00 +0100 |
commit | 509695c1c3f5c94bf4b1de5dd0fc11202804f638 (patch) | |
tree | 4f5aa1c4f20d6e2fd2bf6fe7d1f3459a2553f0a4 /src/configure.ac | |
parent | c963ec31a0c293d629e40cb082d4bfb1651def49 (diff) |
patch 9.0.0065: cross-compiling doesn't work because of timer_create checkv9.0.0065
Problem: Cross-compiling doesn't work because of timer_create check.
Solution: Use AC_CACHE_CHECK(). (Richard Purdie, closes #10777)
Diffstat (limited to 'src/configure.ac')
-rw-r--r-- | src/configure.ac | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/configure.ac b/src/configure.ac index 58d5d8e185..c3935742f2 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -3807,7 +3807,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM( dnl Check for timer_create. It probably requires the 'rt' library. dnl Run the program to find out if timer_create(CLOCK_MONOTONIC) actually dnl works, on Solaris timer_create() exists but fails at runtime. -AC_MSG_CHECKING([for timer_create]) +AC_CACHE_CHECK([for timer_create], [vim_cv_timer_create], save_LIBS="$LIBS" LIBS="$LIBS -lrt" AC_RUN_IFELSE([AC_LANG_PROGRAM([ @@ -3824,7 +3824,7 @@ static void set_flag(union sigval sv) {} if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0) exit(1); // cannot create a monotonic timer ])], - AC_MSG_RESULT(yes; with -lrt); AC_DEFINE(HAVE_TIMER_CREATE), + AC_MSG_NOTICE(timer_create with -lrt); vim_cv_timer_create=yes, LIBS="$save_LIBS" AC_RUN_IFELSE([AC_LANG_PROGRAM([ #include<signal.h> @@ -3840,8 +3840,16 @@ static void set_flag(union sigval sv) {} if (timer_create(CLOCK_MONOTONIC, &action, &timer_id) < 0) exit(1); // cannot create a monotonic timer ])], - AC_MSG_RESULT(yes); AC_DEFINE(HAVE_TIMER_CREATE), - AC_MSG_RESULT(no))) + vim_cv_timer_create=yes, + vim_cv_timer_create=no), + AC_MSG_ERROR(cross-compiling: please set 'vim_cv_timer_create') + ) +) + +if test "x$vim_cv_timer_create" = "xyes" ; then + AC_DEFINE(HAVE_TIMER_CREATE) +fi + AC_CACHE_CHECK([whether stat() ignores a trailing slash], [vim_cv_stat_ignores_slash], [ |