swrap: call libc_write() directly for internal fds
[socket_wrapper.git] / ConfigureChecks.cmake
index 4d5adc4219fb5155027737206e45dec59c341813..bfb8c177fd66f84340c28821f96ceb0f897c30bc 100644 (file)
@@ -7,8 +7,8 @@ include(CheckStructHasMember)
 include(CheckPrototypeDefinition)
 include(TestBigEndian)
 
-set(PACKAGE ${PROJECT_NAME})
-set(VERSION ${PROJECT_VERSION})
+set(SOCKET_WRAPPER_PACKAGE ${PROJECT_NAME})
+set(SOCKET_WRAPPER_VERSION ${PROJECT_VERSION})
 
 set(BINARYDIR ${CMAKE_BINARY_DIR})
 set(SOURCEDIR ${CMAKE_SOURCE_DIR})
@@ -43,6 +43,7 @@ int main(void){ return 0; }
 endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW AND NOT OS2)
 
 # HEADERS
+check_include_file(netinet/tcp_fsm.h HAVE_NETINET_TCP_FSM_H)
 check_include_file(sys/filio.h HAVE_SYS_FILIO_H)
 check_include_file(sys/signalfd.h HAVE_SYS_SIGNALFD_H)
 check_include_file(sys/eventfd.h HAVE_SYS_EVENTFD_H)
@@ -215,6 +216,32 @@ int main(void) {
     return 0;
 }" HAVE_DESTRUCTOR_ATTRIBUTE)
 
+check_c_source_compiles("
+#pragma init (test_constructor)
+void test_constructor(void);
+
+void test_constructor(void)
+{
+    return;
+}
+
+int main(void) {
+    return 0;
+}" HAVE_PRAGMA_INIT)
+
+check_c_source_compiles("
+#pragma fini (test_destructor)
+void test_destructor(void);
+
+void test_destructor(void)
+{
+    return;
+}
+
+int main(void) {
+    return 0;
+}" HAVE_PRAGMA_FINI)
+
 check_c_source_compiles("
 #define FALL_THROUGH __attribute__((fallthrough))