summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcb200571..27d0dd5a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,6 +118,19 @@ if (CMAKE_USE_PTHREADS_INIT)
set(HAVE_PTHREAD 1)
endif()
+include(CheckTypeSize)
+set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
+check_type_size("sig_t" SIG_T LANGUAGE "CXX")
+check_type_size("sighandler_t" SIGHANDLER_T LANGUAGE "CXX")
+set(CMAKE_EXTRA_INCLUDE_FILES)
+if (NOT HAVE_SIGHANDLER_T)
+ if (HAVE_SIG_T)
+ add_definitions(-Dsighandler_t=sig_t)
+ else()
+ message(FATAL_ERROR "Platform defines neither sig_t nor sighandler_t")
+ endif()
+endif()
+
# Configure some variables like package, version and architecture.
set(PACKAGE ${PROJECT_NAME})
set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>")