diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-20 12:21:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-06-20 12:21:38 +0100 |
commit | 9a357fb2821fd418a02a7b9429c26875ee257556 (patch) | |
tree | f2a157727d553c7e9d76ec9195d7734d64b3fe14 /CMakeLists.txt | |
parent | 6e9bcfeda6ec1fa63643629a72a0c707c53c26e0 (diff) | |
download | rspamd-9a357fb2821fd418a02a7b9429c26875ee257556.tar.gz rspamd-9a357fb2821fd418a02a7b9429c26875ee257556.zip |
Fix portability on Solaris.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 81ff69b0c..6441322da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,7 +269,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") ENDIF(NOT BUILD_CPU_MODE) IF("${CMAKE_C_COMPILER_ID}" MATCHES SunPro) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xa -xregs=no%frameptr -xstrconst") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Xa -xregs=no%frameptr -xstrconst -xc99") set(SUN_BUILD32 "-xtarget=generic") set(SUN_BUILD64 "-xtagret=generic64") IF(ENABLE_OPTIMIZATION MATCHES "ON") @@ -326,6 +326,7 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") LIST(APPEND CMAKE_REQUIRED_LIBRARIES dl) LIST(APPEND CMAKE_REQUIRED_LIBRARIES resolv) LIST(APPEND CMAKE_REQUIRED_LIBRARIES nsl) + LIST(APPEND CMAKE_REQUIRED_LIBRARIES socket) LIST(APPEND CMAKE_REQUIRED_LIBRARIES umem) SET(CMAKE_VERBOSE_MAKEFILE ON) SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE) @@ -626,6 +627,11 @@ FIND_PATH(LIBEVENT_INCLUDE event.h PATHS /opt/include /usr/local/include DOC "Path where the libevent header files can be found") +FIND_PATH(LIBEVENT_EVHTTP evhttp.h PATHS /opt/include + /usr/include + /usr/local/include + DOC "Path where the libevhttp header files can be found") + GET_FILENAME_COMPONENT(LIBEVENT_PATH "${LIBEVENT_LIBRARY}" PATH) INCLUDE_DIRECTORIES("${LIBEVENT_INCLUDE}") LINK_DIRECTORIES("${LIBEVENT_PATH}") @@ -759,7 +765,9 @@ CHECK_C_COMPILER_FLAG(-Wunused-variable SUPPORT_WUNUSED_VAR) CHECK_C_COMPILER_FLAG(-Wno-pointer-sign SUPPORT_WPOINTER_SIGN) CHECK_C_COMPILER_FLAG(-Wstrict-prototypes SUPPORT_WSTRICT_PROTOTYPES) CHECK_C_COMPILER_FLAG(-pedantic SUPPORT_PEDANTIC_FLAG) -CHECK_C_COMPILER_FLAG("-std=c99" SUPPORT_STD_FLAG) +IF(NOT "${CMAKE_C_COMPILER_ID}" MATCHES SunPro) + CHECK_C_COMPILER_FLAG("-std=c99" SUPPORT_STD_FLAG) +ENDIF(NOT "${CMAKE_C_COMPILER_ID}" MATCHES SunPro) IF(SUPPORT_W) SET(CMAKE_C_WARN_FLAGS "${CMAKE_C_WARN_FLAGS} -W") ENDIF(SUPPORT_W) |