Commit Graph

10 Commits

Author SHA1 Message Date
Carlo Cabrera
be40ba68a8
build(cmake): fix static libintl test on macOS
If `libintl` is a static library on macOS, we also need to explicitly
link with `libiconv` and the `CoreFoundation` framework. Otherwise, our
`HAVE_WORKING_LIBINTL` test erroneously fails.

Closes #19127
Closes #19138
2022-06-29 02:19:42 +08:00
erw7
4d0dfb8f75 build/MSVC: fix gettext multibyte issue #11774
Problem:  On Windows with the MSVC build, gettext-translation
          "Questa è già la" displays as "Questa <e8> gi<e0> la".
Solution: Fix iconv detection iconv when building gettext.
          So HAVE_ICONV is correctly defined when building nvim.

* fix gettext mb chars on MSVC
* fix libintl detection failure on MSVC

fixes #11749
2020-01-28 00:56:26 -08:00
Daniel Hahler
0d82aaf586
build: FindLibIntl: fix warning about CMP0075 (#10427)
* build: FindLibIntl: fix warning about CMP0075

The common pattern elsewhere to set this only during the check, and here
it was not unset, resulting in a warning later (on Alpine 3.10):

    -- Found Iconv
    -- Looking for pthread.h
    CMake Warning (dev) at /usr/share/cmake/Modules/CheckIncludeFile.cmake:80 (message):
      Policy CMP0075 is not set: Include file check macros honor
      CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
      details.  Use the cmake_policy command to set the policy and suppress this
      warning.

      CMAKE_REQUIRED_LIBRARIES is set to:

        /usr/lib/libintl.so

      For compatibility with CMake 3.11 and below this check is ignoring it.
    Call Stack (most recent call first):
      /usr/share/cmake/Modules/FindThreads.cmake:105 (CHECK_INCLUDE_FILE)
      CMakeLists.txt:482 (find_package)
    This warning is for project developers.  Use -Wno-dev to suppress it.

    -- Looking for pthread.h - found

* build: remove lists / REMOVE_ITEM around check_c_source_compiles
2019-07-05 12:19:13 +02:00
Daniel Hahler
740fb337dd
build: fix warning with passively available libintl (#10380)
Since 0364f51 it would display a warning.
2019-07-01 03:32:52 +02:00
Justin M. Keyes
420379330e cmake/FindLibIntl.cmake: handle passive case explicitly
If check_c_source_compiles() succeeded (HAVE_WORKING_LIBINTL is set)
then the result of find_xxx() doesn't matter. This happens on systems
(linux+glibc) where libintl is available passively.

This allows `find_package(LibIntl REQUIRED)` to work and will still
correctly fail (REQUIRED) on systems lacking libintl.
2018-06-06 00:58:57 +02:00
b-r-o-c-k
be67d926c5 build/msvc: Add libintl to bundled dependencies (#8163) 2018-03-24 17:58:32 +01:00
James McCoy
235fda5f86 Stub ngettext when libintl isn't available
This should have been included in #6547 as part of vim-patch:7.4.2152.

Closes #7352
2017-10-03 14:54:50 -04:00
John Szakmeister
369045cf05 Fix #1484: search gettext subdir for header
On some systems, such as NetBSD, the gettext header is tucked under the
gettext directory in the system include area.  Let's add a path suffix
to ensure we correctly discover the header on such systems.
2014-11-17 19:31:48 -05:00
Rui Abreu Ferreira
feffc65270 Add cmake platform checks
- Defined CMake checks for all headers in config.h.in
- Removed headers checks that are not used anymore:
  sgtty.h sys/statfs.h libintl.h poll.h
- Added UNIX check
- Add some fatal checks
  + Check for setenv() and fail if it does not exist
    since our os layer just assumes it does
  + lstat is required by os_unix.c
  + sys/wait.h is required in UNIX
- Removed entries for functions that are not being used: getcwd,
  getrlimit, getwd, nanosleep, sigaltstack, getwd, sigstack, fseeko
- Replaced nearly all defines in config.h.in for functions with
  compile time checks
- Add check for symbol FD_CLOEXEC
- Add check for langinfo CODESET
- HAVE_ICONV_H and HAVE_ICONV hold the expected checks but Neovim uses
  USE_ICONV define to actually decide whether to enable it
- Removed checks that are no longer needed
  + USEMEMMOVE
  + _FILE_OFFSET_BITS
  + HAVE_ST_BLKSIZE
  + dlfcn.h
2014-07-15 10:43:21 +02:00
Alexis Hildebrandt
05b9e11584 CMakeLists: Improve handling of libintl
by refactoring it into a separate CMake module
2014-02-27 19:11:48 +00:00