aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/configure.cmake38
1 files changed, 16 insertions, 22 deletions
diff --git a/cmake/configure.cmake b/cmake/configure.cmake
index 1c74bc5c..ec4c4e52 100644
--- a/cmake/configure.cmake
+++ b/cmake/configure.cmake
@@ -149,15 +149,8 @@ DefineHFileIfAvailable(stdint.h HAVE_STDINT_H)
DefineHFileIfAvailable(inttypes.h HAVE_INTTYPES_H)
DefineHFileIfAvailable(stdlib.h HAVE_STDLIB_H)
DefineHFileIfAvailable(unistd.h HAVE_UNISTD_H)
-if (CMAKE_HOST_UNIX)
- DefineFunctionIfAvailable(gettext HAVE_GETTEXT)
- DefineFunctionIfAvailable(dcgettext HAVE_DCGETTEXT)
- FIND_PACKAGE(Gettext REQUIRED)
- # FIND_PACKAGE(XGettext REQUIRED)
- # FIND_PACKAGE(Iconv REQUIRED)
- FIND_PATH(INTL_INCLUDE_DIR libintl.h PATHS /usr/include /usr/local/include)
- FIND_LIBRARY(INTL_LIBRARIES intl c PATHS /usr/lib/ /usr/local/lib)
-endif()
+FIND_PATH(INTL_INCLUDE_DIR libintl.h PATHS /usr/include /usr/local/include)
+FIND_LIBRARY(INTL_LIBRARIES intl c PATHS /usr/lib/ /usr/local/lib)
DefineSymbolIfAvailable("CODESET" "langinfo.h" HAVE_LANGINFO_CODESET)
DefineSymbolIfAvailable("LC_MESSAGES" "locale.h" HAVE_LC_MESSAGES)
DefineTypeIfAvailable("_Bool" HAVE__BOOL)
@@ -203,6 +196,7 @@ DefineStructHasMemberIfAvailable("struct tm" tm_zone time.h HAVE_STRUCT_TM_TM_ZO
DefineHFileIfAvailable(sys/time.h HAVE_SYS_TIME_H)
DefineFunctionIfAvailable(alarm HAVE_ALARM)
+DefineFunctionIfAvailable(tzname HAVE_DECL_TZNAME)
DefineFunctionIfAvailable(mktime HAVE_MKTIME)
DefineFunctionIfAvailable(getaddrinfo HAVE_GETADDRINFO)
DefineFunctionIfAvailable(atexit HAVE_ATEXIT)
@@ -214,11 +208,12 @@ DefineFunctionIfAvailable(getgrent HAVE_GETGRENT)
DefineFunctionIfAvailable(getgroups HAVE_GETGROUPS)
add_definitions(-D GETGROUPS_T=gid_t)
DefineTypeIfAvailable("pid_t" PID_T)
+DefineTypeIfAvailable("intmax_t" HAVE_INTMAX_T)
DefineFunctionIfAvailable(grantpt HAVE_GRANTPT)
DefineFunctionIfAvailable(isascii HAVE_ISASCII)
DefineFunctionIfAvailable(iswctype HAVE_ISWCTYPE)
DefineFunctionIfAvailable(iswlower HAVE_ISWLOWER)
-DefineFunctionIfAvailable(iswupper HAVE_ISUPPER)
+DefineFunctionIfAvailable(iswupper HAVE_ISWUPPER)
DefineFunctionIfAvailable(mbrlen HAVE_MBRLEN)
DefineFunctionIfAvailable(memcmp HAVE_MEMCMP)
DefineFunctionIfAvailable(memcpy HAVE_MEMCPY)
@@ -260,20 +255,19 @@ else()
set(BISON_awkgram_OUTPUTS ${CMAKE_SOURCE_DIR}/awkgram.c)
endif()
-if (CMAKE_HOST_UNIX)
- #http://www.cmake.org/cmake/help/v2.8.10/cmake.html#module:FindGettext
- find_package(Gettext REQUIRED)
- if (GETTEXT_FOUND STREQUAL "TRUE")
- include_directories(${GETTEXT_INCLUDE_DIR})
- else ()
- message( FATAL_ERROR "Gettext not found" )
- endif()
-
- find_package(LATEX)
- include(GNUInstallDirs)
- include(GetPrerequisites)
+find_package(Gettext REQUIRED)
+if (GETTEXT_FOUND STREQUAL "TRUE")
+ include_directories(${GETTEXT_INCLUDE_DIR})
+ DefineFunctionIfAvailable(gettext HAVE_GETTEXT)
+ DefineFunctionIfAvailable(dcgettext HAVE_DCGETTEXT)
+else ()
+ message( FATAL_ERROR "Gettext not found" )
endif()
+find_package(LATEX)
+include(GNUInstallDirs)
+include(GetPrerequisites)
+
# For some unknown reason the defines for the extensions
# are written into config.h only if they are implemented
# here and not in extension/CMakeLists.txt.