diff --git a/CMakeLists.txt b/CMakeLists.txt index 9e12909..447c3f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,14 @@ if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600 -D__STRICT_ALIGNMENT") endif() +if(CMAKE_SYSTEM_NAME MATCHES "SunOS") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -std=gnu99 -fno-strict-aliasing") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__EXTENSIONS__") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=600") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DBSD_COMP") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -m64") +endif() + add_definitions(-DLIBRESSL_INTERNAL) add_definitions(-DOPENSSL_NO_HW_PADLOCK) @@ -202,6 +210,9 @@ endif() if(CMAKE_SYSTEM_NAME MATCHES "HP-UX") set(OPENSSL_LIBS ${OPENSSL_LIBS} pthread) endif() +if(CMAKE_SYSTEM_NAME MATCHES "SunOS") + set(OPENSSL_LIBS ${OPENSSL_LIBS} nsl socket) +endif() if(NOT (CMAKE_SYSTEM_NAME MATCHES "(Darwin|MINGW|CYGWIN)" OR MSVC)) set(BUILD_SHARED true) @@ -210,8 +221,8 @@ endif() check_type_size(time_t SIZEOF_TIME_T) if(SIZEOF_TIME_T STREQUAL "4") set(SMALL_TIME_T true) - message(WARNING " ** Warning, this system is unable to represent times past 2038") - message(WARNING " ** It will behave incorrectly when handling valid RFC5280 dates") + message(WARNING " ** Warning, this system is unable to represent times past 2038\n" + " ** It will behave incorrectly when handling valid RFC5280 dates") endif() add_definitions(-DSIZEOF_TIME_T=${SIZEOF_TIME_T})