From 6ce703dfc6e5cf6f6e44eccc45d2f4c37e48cf6c Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 11 Jul 2024 13:00:01 +0200 Subject: [PATCH] Add liba2i to the build system Signed-off-by: Alejandro Colomar --- configure.ac | 4 ++++ lib/Makefile.am | 2 +- libsubid/Makefile.am | 1 + src/Makefile.am | 4 +++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index bc89a44f3..e1cd652db 100644 --- a/configure.ac +++ b/configure.ac @@ -399,6 +399,10 @@ if test "$enable_logind" = "yes"; then fi AM_CONDITIONAL(ENABLE_LOGIND, test "x$enable_logind" != "xno") +AC_SUBST(LIBA2I) +AC_CHECK_LIB(a2i, str2si, [LIBA2I=-la2i], + [AC_MSG_ERROR([str2si() not found])]) + AC_SUBST(LIBCRYPT) AC_CHECK_LIB(crypt, crypt, [LIBCRYPT=-lcrypt], [AC_MSG_ERROR([crypt() not found])]) diff --git a/lib/Makefile.am b/lib/Makefile.am index a281bdf45..c3a690dab 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -19,7 +19,7 @@ libshadow_la_CPPFLAGS += -DVENDORDIR=\"$(VENDORDIR)\" endif libshadow_la_CPPFLAGS += -I$(top_srcdir) -libshadow_la_CFLAGS = $(LIBBSD_CFLAGS) $(LIBCRYPT_PAM) $(LIBSYSTEMD) +libshadow_la_CFLAGS = $(LIBBSD_CFLAGS) $(LIBA2I) $(LIBCRYPT_PAM) $(LIBSYSTEMD) libshadow_la_LIBADD = $(LIBADD_DLOPEN) libshadow_la_SOURCES = \ diff --git a/libsubid/Makefile.am b/libsubid/Makefile.am index b6488e779..1e4139b70 100644 --- a/libsubid/Makefile.am +++ b/libsubid/Makefile.am @@ -5,6 +5,7 @@ libsubid_la_LDFLAGS = -version-info @LIBSUBID_ABI_MAJOR@ -export-symbols-regex ' pkginclude_HEADERS = subid.h MISCLIBS = \ + $(LIBA2I) \ $(LIBAUDIT) \ $(LIBSELINUX) \ $(LIBSEMANAGE) \ diff --git a/src/Makefile.am b/src/Makefile.am index d4e6f3ab7..0c535dc32 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,7 +83,9 @@ if WITH_TCB shadowsgidubins = passwd endif -LDADD = $(INTLLIBS) \ +LDADD = \ + $(LIBA2I) \ + $(INTLLIBS) \ $(top_builddir)/lib/libshadow.la \ $(LIBTCB)