summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-16 19:44:40 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-27 22:51:37 +0100
commitd8084116b54d3d3f1d655a4e051a58ebdfb82570 (patch)
tree50c75ab45a16b210aac546e3ce838dc7ed5535f6 /cmake
parentb12f14965db9586e70109fe4cbf5dbd18bf2158d (diff)
downloadmariadb-git-d8084116b54d3d3f1d655a4e051a58ebdfb82570.tar.gz
MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
special cases: * change systemd detection to use CHECK_LIBRARY_EXISTS at least once, to have it detected by build_depends.cmake * similarly, use find_library for pam * unixODBC is weird, libodbc.so is in the unixODBC package, not in the unixODBC-devel, where normally all .so files belong. Packaging bug? As a workaround, use find_file(sql.h) instead of find_path(sql.h) to make sure that /usr/include/sql.h (not /usr/include) is cached by cmake, and later build_depends.cmake will select unixODBC-devel, as a package owning /usr/include/sql.h file.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/systemd.cmake14
1 files changed, 3 insertions, 11 deletions
diff --git a/cmake/systemd.cmake b/cmake/systemd.cmake
index 692d4df9f26..478930c9f3d 100644
--- a/cmake/systemd.cmake
+++ b/cmake/systemd.cmake
@@ -39,22 +39,14 @@ MACRO(CHECK_SYSTEMD)
SET(LIBSYSTEMD systemd)
ENDIF()
SET(CMAKE_REQUIRED_LIBRARIES ${LIBSYSTEMD})
- CHECK_C_SOURCE_COMPILES(
- "
- #include <systemd/sd-daemon.h>
- int main()
- {
- sd_listen_fds(0);
- }"
- HAVE_SYSTEMD)
+ CHECK_LIBRARY_EXISTS(systemd sd_listen_fds "" HAVE_SYSTEMD_SD_LISTEN_FDS)
CHECK_INCLUDE_FILES(systemd/sd-daemon.h HAVE_SYSTEMD_SD_DAEMON_H)
- CHECK_FUNCTION_EXISTS(sd_listen_fds HAVE_SYSTEMD_SD_LISTEN_FDS)
CHECK_FUNCTION_EXISTS(sd_notify HAVE_SYSTEMD_SD_NOTIFY)
CHECK_FUNCTION_EXISTS(sd_notifyf HAVE_SYSTEMD_SD_NOTIFYF)
SET(CMAKE_REQUIRED_LIBRARIES)
- IF(HAVE_SYSTEMD AND HAVE_SYSTEMD_SD_DAEMON_H AND HAVE_SYSTEMD_SD_LISTEN_FDS
+ IF(HAVE_SYSTEMD_SD_DAEMON_H AND HAVE_SYSTEMD_SD_LISTEN_FDS
AND HAVE_SYSTEMD_SD_NOTIFY AND HAVE_SYSTEMD_SD_NOTIFYF)
- ADD_DEFINITIONS(-DHAVE_SYSTEMD)
+ SET(HAVE_SYSTEMD TRUE)
SET(SYSTEMD_SCRIPTS mariadb-service-convert galera_new_cluster galera_recovery)
SET(SYSTEMD_DEB_FILES "usr/bin/mariadb-service-convert
usr/bin/galera_new_cluster