summaryrefslogtreecommitdiffstats
path: root/plugin/disks/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /plugin/disks/CMakeLists.txt
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugin/disks/CMakeLists.txt')
-rw-r--r--plugin/disks/CMakeLists.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugin/disks/CMakeLists.txt b/plugin/disks/CMakeLists.txt
new file mode 100644
index 00000000..4e40842c
--- /dev/null
+++ b/plugin/disks/CMakeLists.txt
@@ -0,0 +1,24 @@
+INCLUDE (CheckIncludeFiles)
+
+CHECK_SYMBOL_EXISTS (getmntent "mntent.h" HAVE_GETMNTENT)
+CHECK_SYMBOL_EXISTS (getmntent "sys/mnttab.h" HAVE_GETMNTENT_IN_SYS_MNTAB)
+CHECK_SYMBOL_EXISTS (setmntent "mntent.h" HAVE_SETMNTENT)
+CHECK_SYMBOL_EXISTS (getmntinfo "sys/types.h;sys/mount.h" HAVE_GETMNTINFO)
+CHECK_SYMBOL_EXISTS (getmntinfo64 "sys/types.h;sys/mount.h" HAVE_GETMNTINFO64)
+
+IF (HAVE_GETMNTINFO)
+CHECK_CXX_SOURCE_COMPILES("
+#include <sys/types.h>
+#include <sys/statvfs.h>
+int main()
+{
+ struct statvfs *s;
+ return getmntinfo(&s, ST_WAIT);
+}
+ " HAVE_GETMNTINFO_TAKES_statvfs)
+ENDIF()
+IF (HAVE_GETMNTENT OR HAVE_GETMNTENT_IN_SYS_MNTAB OR
+ HAVE_GETMNTINFO OR HAVE_GETMNTINFO64)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
+ MYSQL_ADD_PLUGIN(DISKS information_schema_disks.cc MODULE_ONLY RECOMPILE_FOR_EMBEDDED)
+ENDIF()