|
@@ -1,5 +1,6 @@
|
1
|
1
|
cmake_minimum_required(VERSION 2.4)
|
2
|
2
|
project(postsrsd C)
|
|
3
|
+include(CheckIncludeFile)
|
3
|
4
|
|
4
|
5
|
option(GENERATE_SRS_SECRET "Generate a random SRS secret if none exists during install" ON)
|
5
|
6
|
option(USE_APPARMOR "Enable AppArmor profile" OFF)
|
|
@@ -15,6 +16,23 @@ find_program(BASE64 base64 DOC "path to base64 executable")
|
15
|
16
|
find_program(INSSERV insserv DOC "path to insserv executable")
|
16
|
17
|
find_program(CHKCONFIG chkconfig DOC "path to chkconfig executable")
|
17
|
18
|
|
|
19
|
+check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
|
|
20
|
+if(HAVE_SYS_WAIT_H)
|
|
21
|
+ add_definitions(-DHAVE_SYS_WAIT_H)
|
|
22
|
+endif()
|
|
23
|
+check_include_file(wait.h HAVE_WAIT_H)
|
|
24
|
+if(HAVE_WAIT_H)
|
|
25
|
+ add_definitions(-DHAVE_WAIT_H)
|
|
26
|
+endif()
|
|
27
|
+check_include_file(sys/time.h HAVE_SYS_TIME_H)
|
|
28
|
+if(HAVE_SYS_TIME_H)
|
|
29
|
+ add_definitions(-DHAVE_SYS_TIME_H)
|
|
30
|
+endif()
|
|
31
|
+check_include_file(time.h HAVE_TIME_H)
|
|
32
|
+if(HAVE_TIME_H)
|
|
33
|
+ add_definitions(-DHAVE_TIME_H)
|
|
34
|
+endif()
|
|
35
|
+
|
18
|
36
|
if(NOT DEFINED INIT_FLAVOR)
|
19
|
37
|
if(IS_DIRECTORY "${SYSCONF_DIR}/init" AND EXISTS "/lib/init/upstart-job")
|
20
|
38
|
message(STATUS "Detected init flavor: upstart")
|