summaryrefslogtreecommitdiffstats
path: root/src/configure.ac
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-08-20 19:01:41 +0200
committerChristian Brabandt <cb@256bit.org>2023-08-20 19:01:41 +0200
commita055b441f556e4814a1838db687ac50f48617154 (patch)
tree58202df20b143c1c9f8d2a955ce1f8040991eb43 /src/configure.ac
parent4924ad099f6b40505ebbd1a4a4056e9915d70141 (diff)
patch 9.0.1765: Error when cross-compiling Vimv9.0.1765
Problem: Error when cross-compiling Vim Solution: use AC_CHECK_SIZEOF to find sizeof(wchar_t) This fixes an error when cross compiling. closes: #12828 Bug: https://bugs.gentoo.org/889430 Signed-off-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/configure.ac')
-rw-r--r--src/configure.ac21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/configure.ac b/src/configure.ac
index d56001f9b5..a3c5f8da8c 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -2416,25 +2416,8 @@ else
LDFLAGS="$ac_save_LDFLAGS"
- AC_MSG_CHECKING(size of wchar_t is 2 bytes)
- AC_CACHE_VAL(ac_cv_small_wchar_t,
- [AC_RUN_IFELSE([AC_LANG_SOURCE([
-#include <X11/Xlib.h>
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#endif
- int main()
- {
- if (sizeof(wchar_t) <= 2)
- exit(1);
- exit(0);
- }])],
- ac_cv_small_wchar_t="no",
- ac_cv_small_wchar_t="yes",
- AC_MSG_ERROR(failed to compile test program))])
- AC_MSG_RESULT($ac_cv_small_wchar_t)
- if test "x$ac_cv_small_wchar_t" = "xyes" ; then
+ AC_CHECK_SIZEOF([wchar_t])
+ if test "$ac_cv_sizeof_wchar_t" -le 2; then
AC_DEFINE(SMALL_WCHAR_T)
fi