summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-01-25 14:47:48 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-01-25 14:48:04 +0100
commitae6020a85802abf28ee49b2a6a9c2f1e1859f369 (patch)
treed043671dc78d39048555c6665886da75ff00a77b
parent076300348f094f3c588bd4bdfe09f654a44e9f89 (diff)
downloadtdeadmin-ae6020a85802abf28ee49b2a6a9c2f1e1859f369.tar.gz
tdeadmin-ae6020a85802abf28ee49b2a6a9c2f1e1859f369.zip
KDat: Add CMake test if the mtget contains mt_gstat.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 4b43800596822ad53b9c4e0ae5d4fe0130d73ad3)
-rw-r--r--kdat/CMakeLists.txt5
-rw-r--r--kdat/ConfigureChecks.cmake19
2 files changed, 24 insertions, 0 deletions
diff --git a/kdat/CMakeLists.txt b/kdat/CMakeLists.txt
index 4adf4fb..69491a4 100644
--- a/kdat/CMakeLists.txt
+++ b/kdat/CMakeLists.txt
@@ -1,5 +1,10 @@
# This file is genereted by trinity-automake-cmake-convert script by Fat-Zer
+##### configure checks
+
+include( ConfigureChecks.cmake )
+
+
add_subdirectory( pics )
include_directories(
diff --git a/kdat/ConfigureChecks.cmake b/kdat/ConfigureChecks.cmake
new file mode 100644
index 0000000..89facde
--- /dev/null
+++ b/kdat/ConfigureChecks.cmake
@@ -0,0 +1,19 @@
+#################################################
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 3
+#
+#################################################
+
+check_cxx_source_compiles("
+ #include <sys/mtio.h>
+ int main() {
+ struct mtget tapeStatus;
+ return GMT_EOF ( tapeStatus.mt_gstat );
+ }"
+ HAVE_MTGET_GSTAT
+)
+if( NOT HAVE_MTGET_GSTAT )
+ tde_message_fatal( "It is required to build kdat, but mtget does not contain mt_gstat." )
+endif( )