1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

configure.ac: use standardized LIBS and CFLAGS

Convert lvmlockd to use configure _LIBS and _CFLAGS for
discovered libraries.

TODO: ATM we ignore discovered libdlm and use libdlm_lt instead.
Also libseagate_ilm is hard to find unicorn for testing.
This commit is contained in:
Zdenek Kabelac 2023-02-16 23:28:08 +01:00
parent d106ac04ab
commit c23d09bbce
3 changed files with 22 additions and 14 deletions

View File

@ -913,9 +913,8 @@ AC_MSG_RESULT([$BUILD_LOCKDSANLOCK])
dnl -- Look for sanlock libraries
AS_IF([test "$BUILD_LOCKDSANLOCK" = "yes"], [
PKG_CHECK_MODULES(LOCKD_SANLOCK, libsanlock_client >= 3.3.0, [HAVE_LOCKD_SANLOCK="yes"], $bailout)
PKG_CHECK_MODULES(LIBSANLOCKCLIENT, libsanlock_client >= 3.3.0, [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
BUILD_LVMLOCKD=yes
])
################################################################################
@ -929,9 +928,8 @@ AC_MSG_RESULT([$BUILD_LOCKDDLM])
dnl -- Look for dlm libraries
AS_IF([test "$BUILD_LOCKDDLM" = "yes"], [
PKG_CHECK_MODULES(LOCKD_DLM, libdlm, [HAVE_LOCKD_DLM="yes"], $bailout)
PKG_CHECK_MODULES(LIBDLM, libdlm, [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDDLM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm option.])
BUILD_LVMLOCKD=yes
])
################################################################################
@ -945,9 +943,8 @@ AC_MSG_RESULT([$BUILD_LOCKDDLM_CONTROL])
dnl -- Look for libdlmcontrol libraries
AS_IF([test "$BUILD_LOCKDDLM_CONTROL" = "yes"], [
PKG_CHECK_MODULES(LOCKD_DLM_CONTROL, libdlmcontrol >= 3.2, [HAVE_LOCKD_DLM_CONTROL=yes], $bailout)
PKG_CHECK_MODULES(LIBDLMCONTROL, [libdlmcontrol >= 3.2], [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDDLM_CONTROL_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd dlm control option.])
BUILD_LVMLOCKD=yes
])
################################################################################
@ -961,10 +958,10 @@ AC_MSG_RESULT([$BUILD_LOCKDIDM])
dnl -- Look for Seagate IDM libraries
AS_IF([test "$BUILD_LOCKDIDM" = "yes"], [
PKG_CHECK_MODULES(LOCKD_IDM, libseagate_ilm >= 0.1.0, [HAVE_LOCKD_IDM=yes], $bailout)
PKG_CHECK_EXISTS(blkid >= 2.24, [HAVE_LOCKD_IDM="yes"], $bailout)
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
BUILD_LVMLOCKD=yes
PKG_CHECK_EXISTS(blkid >= 2.24, [
PKG_CHECK_MODULES(LIBSEAGATEILM, [libseagate_ilm >= 0.1.0], [BUILD_LVMLOCKD="yes"], $bailout)
AC_DEFINE([LOCKDIDM_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd IDM option.])
], $bailout)
])
################################################################################

View File

@ -19,18 +19,21 @@ SOURCES = lvmlockd-core.c
ifeq ("@BUILD_LOCKDSANLOCK@", "yes")
SOURCES += lvmlockd-sanlock.c
LOCK_LIBS += -lsanlock_client
CFLAGS += $(LIBSANLOCKCLIENT_CFLAGS)
LOCK_LIBS += $(LIBSANLOCKCLIENT_LIBS)
endif
ifeq ("@BUILD_LOCKDDLM@", "yes")
SOURCES += lvmlockd-dlm.c
LOCK_LIBS += -ldlm_lt
LOCK_LIBS += -ldlmcontrol
CFLAGS += $(LIBDLM) $(LIBDLMCONTROL_CFLAGS)
# LOCK_LIBS += $(LIBDLM_LIBS) $(LIBDLMCONTROL_LIBS)
LOCK_LIBS += -ldlm_lt $(LIBDLMCONTROL_LIBS)
endif
ifeq ("@BUILD_LOCKDIDM@", "yes")
SOURCES += lvmlockd-idm.c
LOCK_LIBS += -lseagate_ilm -lblkid
# LOCK_LIBS += $(LIBSEAGATEILM_LIBS) $(BLKID_LIBS)
LOCK_LIBS += -lseagate_ilm $(BLKID_LIBS)
endif
SOURCES2 = lvmlockctl.c

View File

@ -82,6 +82,14 @@ CPG_CFLAGS = @CPG_CFLAGS@
CPG_LIBS = @CPG_LIBS@
EDITLINE_CFLAGS = @EDITLINE_CFLAGS@
EDITLINE_LIBS = @EDITLINE_LIBS@
LIBDLM_CFLAGS = @LIBDLM_CFLAGS@
LIBDLM_LIBS = @LIBDLM_LIBS@
LIBDLMCONTROL_CFLAGS = @LIBDLMCONTROL_CFLAGS@
LIBDLMCONTROL_LIBS = @LIBDLMCONTROL_LIBS@
LIBSANLOCKCLIENT_CFLAGS = @LIBSANLOCKCLIENT_CFLAGS@
LIBSANLOCKCLIENT_LIBS = @LIBSANLOCKCLIENT_LIBS@
LIBSEAGATEILM_CFLAGS = @LIBSEAGATEILM_CFLAGS@
LIBSEAGATEILM_LIBS = @LIBSEAGATEILM_LIBS@
LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@
LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@
PTHREAD_LIBS = @PTHREAD_LIBS@