mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-12 21:18:53 +00:00
Make wcwidth configurable (#4816)
* Make wcwidth configurable This adds the cmake option "INTERNAL_WCWIDTH" (to be set to "ON" or "OFF") and the configure option --[en,dis]able-internal-wcwidth. Both default to enabling our fallback, but can be set to use the system's wcwidth again. Sequel to #4554. See #4571, #4539, #4609. On my system, this would fix #4306.
This commit is contained in:
parent
669eafb55f
commit
ad5bbeb3c2
2 changed files with 22 additions and 0 deletions
|
@ -90,6 +90,13 @@ SET_SOURCE_FILES_PROPERTIES(src/fish_version.cpp
|
||||||
PROPERTIES OBJECT_DEPENDS
|
PROPERTIES OBJECT_DEPENDS
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${FBVF})
|
${CMAKE_CURRENT_BINARY_DIR}/${FBVF})
|
||||||
|
|
||||||
|
OPTION(INTERNAL_WCWIDTH "use fallback wcwidth" ON)
|
||||||
|
IF(INTERNAL_WCWIDTH)
|
||||||
|
add_definitions(-DHAVE_BROKEN_WCWIDTH=1)
|
||||||
|
ELSE()
|
||||||
|
add_definitions(-DHAVE_BROKEN_WCWIDTH=0)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Set up PCRE2
|
# Set up PCRE2
|
||||||
INCLUDE(cmake/PCRE2.cmake)
|
INCLUDE(cmake/PCRE2.cmake)
|
||||||
|
|
||||||
|
|
15
configure.ac
15
configure.ac
|
@ -25,6 +25,7 @@ AC_SUBST(HAVE_DOXYGEN)
|
||||||
AC_SUBST(LDFLAGS_FISH)
|
AC_SUBST(LDFLAGS_FISH)
|
||||||
AC_SUBST(WCHAR_T_BITS)
|
AC_SUBST(WCHAR_T_BITS)
|
||||||
AC_SUBST(EXTRA_PCRE2)
|
AC_SUBST(EXTRA_PCRE2)
|
||||||
|
AC_SUBST(HAVE_BROKEN_WCWIDTH)
|
||||||
|
|
||||||
#
|
#
|
||||||
# If needed, run autoconf to regenerate the configure file
|
# If needed, run autoconf to regenerate the configure file
|
||||||
|
@ -599,6 +600,20 @@ AC_ARG_WITH(
|
||||||
[included_pcre2=auto]
|
[included_pcre2=auto]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
HAVE_BROKEN_WCWIDTH=
|
||||||
|
AC_ARG_ENABLE(
|
||||||
|
[wcwidth],
|
||||||
|
AS_HELP_STRING(
|
||||||
|
[--disable-internal-wcwidth],
|
||||||
|
[use system wcwidth instead of the bundled version]
|
||||||
|
))
|
||||||
|
|
||||||
|
if test "x$enable_wcwidth" != "xno"; then
|
||||||
|
AC_DEFINE([HAVE_BROKEN_WCWIDTH], [1], [banana])
|
||||||
|
else
|
||||||
|
AC_DEFINE([HAVE_BROKEN_WCWIDTH], [0], [banana])
|
||||||
|
fi
|
||||||
|
|
||||||
if test "x$included_pcre2" != "xyes"; then
|
if test "x$included_pcre2" != "xyes"; then
|
||||||
|
|
||||||
# test for pcre2-config
|
# test for pcre2-config
|
||||||
|
|
Loading…
Reference in a new issue