From af202a821b0d7489a2b6a8076d0040374ef269dd Mon Sep 17 00:00:00 2001 From: Caleb Xu Date: Thu, 19 Aug 2021 04:19:44 -0400 Subject: [PATCH] compat: don't build when strlcpy is present (#47) --- Makefile.am | 6 +++++- compat/Makefile.am | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 12ff99b..5bf555b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = include compat +SUBDIRS = include ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I$(top_srcdir)/include @@ -10,7 +10,11 @@ bin_PROGRAMS=bgpq4 dist_man8_MANS=bgpq4.8 bgpq4_LDADD = $(PLATFORM_LDADD) $(PROG_LDADD) + +if !HAVE_STRLCPY +SUBDIRS += compat bgpq4_LDADD += $(top_builddir)/compat/libcompat.la +endif bgpq4_SOURCES=main.c extern.h printer.c expander.c \ sx_maxsockbuf.c \ diff --git a/compat/Makefile.am b/compat/Makefile.am index bf044cd..51f0579 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -2,9 +2,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/include noinst_LTLIBRARIES = libcompat.la -libcompat_la_SOURCES = libcompat_la_LIBADD = $(PLATFORM_LDADD) -if !HAVE_STRLCPY -libcompat_la_SOURCES += strlcpy.c -endif +libcompat_la_SOURCES = strlcpy.c