mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
Fix libintl.h issue on FreeBSD
This commit is contained in:
@@ -32,6 +32,13 @@ INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
FIND_PATH(LIBINTL_INCLUDE
|
||||
NAMES libintl.h
|
||||
PATH /usr/local/include /usr/pkg/include /usr/include
|
||||
)
|
||||
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
|
||||
|
||||
CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)
|
||||
|
||||
IF(HAVE_LIBINTL_H)
|
||||
@@ -41,8 +48,8 @@ IF(HAVE_LIBINTL_H)
|
||||
ELSE(LIBC_HAS_DGETTEXT)
|
||||
FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl libintl
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
IF(LIBINTL_LIBRARY)
|
||||
CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
|
||||
@@ -54,6 +54,12 @@ IF(ICONV_INCLUDE_PATH)
|
||||
ENDIF(ICONV_INCLUDE_PATH)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
IF(ICONV_LIBRARY)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH})
|
||||
ENDIF(ICONV_LIBRARY)
|
||||
|
||||
SET(CMAKE_REQUIRED_FLAGS -Werror)
|
||||
check_c_source_compiles("
|
||||
#include <iconv.h>
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
CHECK_INCLUDE_FILES("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||
CHECK_INCLUDE_FILES("libintl.h" HAVE_LIBINTL_H)
|
||||
#CHECK_INCLUDE_FILES("libintl.h" HAVE_LIBINTL_H)
|
||||
CHECK_INCLUDE_FILES("limits.h" HAVE_LIMITS_H)
|
||||
CHECK_INCLUDE_FILES("locale.h" HAVE_LOCALE_H)
|
||||
CHECK_INCLUDE_FILES("netdb.h" HAVE_NETDB_H)
|
||||
|
||||
@@ -32,6 +32,13 @@ INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
FIND_PATH(LIBINTL_INCLUDE
|
||||
NAMES libintl.h
|
||||
PATH /usr/local/include /usr/pkg/include /usr/include
|
||||
)
|
||||
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${LIBINTL_INCLUDE})
|
||||
|
||||
CHECK_INCLUDE_FILES(libintl.h HAVE_LIBINTL_H)
|
||||
|
||||
IF(HAVE_LIBINTL_H)
|
||||
@@ -41,8 +48,8 @@ IF(HAVE_LIBINTL_H)
|
||||
ELSE(LIBC_HAS_DGETTEXT)
|
||||
FIND_LIBRARY(LIBINTL_LIBRARY NAMES intl libintl
|
||||
PATHS
|
||||
/usr/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
)
|
||||
IF(LIBINTL_LIBRARY)
|
||||
CHECK_LIBRARY_EXISTS(${LIBINTL_LIBRARY} "dgettext" "" LIBINTL_HAS_DGETTEXT)
|
||||
|
||||
@@ -54,6 +54,12 @@ IF(ICONV_INCLUDE_PATH)
|
||||
ENDIF(ICONV_INCLUDE_PATH)
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
IF(ICONV_LIBRARY)
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARY})
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_PATH})
|
||||
ENDIF(ICONV_LIBRARY)
|
||||
|
||||
SET(CMAKE_REQUIRED_FLAGS -Werror)
|
||||
check_c_source_compiles("
|
||||
#include <iconv.h>
|
||||
|
||||
@@ -21,7 +21,7 @@ INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
|
||||
CHECK_INCLUDE_FILES("arpa/inet.h" HAVE_ARPA_INET_H)
|
||||
CHECK_INCLUDE_FILES("libintl.h" HAVE_LIBINTL_H)
|
||||
#CHECK_INCLUDE_FILES("libintl.h" HAVE_LIBINTL_H)
|
||||
CHECK_INCLUDE_FILES("limits.h" HAVE_LIMITS_H)
|
||||
CHECK_INCLUDE_FILES("locale.h" HAVE_LOCALE_H)
|
||||
CHECK_INCLUDE_FILES("netdb.h" HAVE_NETDB_H)
|
||||
|
||||
Reference in New Issue
Block a user