Skip to content

Commit

Permalink
Build: configure: add --enable-deprecated-libs option
Browse files Browse the repository at this point in the history
Currently, this just controls whether to build and install libpe_rules.
As more libraries are deprecated, this will control them, too.
  • Loading branch information
kgaillot committed Dec 16, 2024
1 parent 9843641 commit a3c22bb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
17 changes: 12 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,24 @@ AC_ARG_ENABLE([hardening],
yes_no_try "$enable_hardening" "try"
enable_hardening=$?

dnl --enable-* options: features
dnl --enable-* options: features within Pacemaker

dnl @COMPAT This should be --with-systemd
AC_ARG_ENABLE([systemd],
[AS_HELP_STRING([--enable-systemd],
[enable support for managing resources via systemd @<:@try@:>@])]
)
yes_no_try "$enable_systemd" "try"
enable_systemd=$?

dnl --enable-* options: features inherent to Pacemaker
AC_ARG_ENABLE([deprecated-libs],
[AS_HELP_STRING([--enable-deprecated-libs],
[Build and install deprecated C libraries @<:@yes@:>@])]
)
yes_no_try "$enable_deprecated_libs" "yes"
enable_deprecated_libs=$?
AM_CONDITIONAL([BUILD_DEPRECATED_LIBS],
[test $enable_deprecated_libs -ne $DISABLED])

# AM_GNU_GETTEXT calls AM_NLS which defines the nls option, but it defaults
# to enabled. We override the definition of AM_NLS to flip the default and mark
Expand All @@ -255,7 +263,7 @@ AC_DEFUN([AM_NLS],
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.18])

dnl --with-* options: external software support, and custom locations
dnl --with-* options: external software support, and custom values

dnl This argument is defined via an M4 macro so default can be a variable
AC_DEFUN([VERSION_ARG],
Expand Down Expand Up @@ -295,8 +303,7 @@ AC_ARG_WITH([bug-url],
AS_IF([test x"${BUG_URL}" = x""],
[BUG_URL="https://bugs.clusterlabs.org/enter_bug.cgi?product=Pacemaker"])

dnl --with-* options: features

dnl @COMPAT This should be --enable-cibsecrets option
AC_ARG_WITH([cibsecrets],
[AS_HELP_STRING([--with-cibsecrets],
[support separate file for CIB secrets @<:@no@:>@])]
Expand Down
5 changes: 4 additions & 1 deletion lib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ LIBS = cib \
pkgconfig_DATA = $(LIBS:%=pacemaker-%.pc) \
libpacemaker.pc \
pacemaker.pc \
pacemaker-pe_rules.pc \
pacemaker-pe_status.pc

if BUILD_DEPRECATED_LIBS
pkgconfig_DATA += pacemaker-pe_rules.pc
endif

EXTRA_DIST = $(pkgconfig_DATA:%=%.in)

SUBDIRS = common \
Expand Down
7 changes: 4 additions & 3 deletions lib/pengine/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@ include $(top_srcdir)/mk/common.mk
SUBDIRS = . tests

## libraries
lib_LTLIBRARIES = libpe_rules.la \
libpe_status.la
lib_LTLIBRARIES = libpe_status.la
check_LTLIBRARIES = libpe_status_test.la

noinst_HEADERS = pe_status_private.h

if BUILD_DEPRECATED_LIBS
lib_LTLIBRARIES += libpe_rules.la
libpe_rules_la_LDFLAGS = -version-info 51:0:0

libpe_rules_la_CFLAGS = $(CFLAGS_HARDENED_LIB)
libpe_rules_la_LDFLAGS += $(LDFLAGS_HARDENED_LIB)
libpe_rules_la_LIBADD = $(top_builddir)/lib/common/libcrmcommon.la
libpe_rules_la_SOURCES = rules_compat.c
endif

libpe_status_la_LDFLAGS = -version-info 56:0:0

Expand Down

0 comments on commit a3c22bb

Please sign in to comment.