libabigail/tools/Makefile.am
David Seifert 1198798985 Find fts-standalone on musl
When using the musl C library fts is optional.  So we need to detect
its presence by looking at the fts-standalone pkgconfig module.

This patch does that.

This comes from Gentoo bug https://bugs.gentoo.org/831571

	* configure.ac: Invoke AC_CANONICAL_HOST to compute the host_cpu,
	host_vendor, host_os parts of the 'host" variable.  Then if the
	host_os ends up with "musl" then, check for the fts-standalone
	pkgconfig module and record the fts library into
	FTS_{LIBS,CFLAGS}.
	* src/Makefile.am: Link to $FTS_LIBS and use $FTS_CFLAGS for
	compilation.
	* tools/Makefile.am: Likewise.
	* tools/abisym.cc: Include libgen.h
	* tools/kmidiff.cc: Remove useless fts.h header file.

Signed-off-by: David Seifert <soap@gentoo.org>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2022-02-07 16:26:30 +01:00

52 lines
1.3 KiB
Makefile

## SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
h=$(abs_srcdir)
bin_PROGRAMS = abidiff abilint abidw abicompat abipkgdiff kmidiff
if ENABLE_FEDABIPKGDIFF
dist_bin_SCRIPTS = fedabipkgdiff
else
noinst_SCRIPTS = fedabipkgdiff
endif
noinst_PROGRAMS = abisym abinilint
abidiff_SOURCES = abidiff.cc
abidiffdir = $(bindir)
abidiff_LDADD = ../src/libabigail.la
abilint_SOURCES = abilint.cc
abilintdir = $(bindir)
abilint_LDADD = ../src/libabigail.la
abidw_SOURCES = abidw.cc
abidwdir = $(bindir)
abidw_LDADD = ../src/libabigail.la
abisym_SOURCES = abisym.cc
abisymdir = $(bindir)
abisym_LDADD = ../src/libabigail.la
abinilint_SOURCES = binilint.cc
abinilintdir = $(bindir)
abinilint_LDADD = $(abs_top_builddir)/src/libabigail.la
abicompat_SOURCES = abicompat.cc
abicompatdir = $(bindir)
abicompat_LDADD = $(abs_top_builddir)/src/libabigail.la
abipkgdiff_SOURCES = abipkgdiff.cc
abipkgdiffdir = $(bindir)
abipkgdiff_CPPFLAGS = $(FTS_CFLAGS)
abipkgdiff_LDADD = $(abs_top_builddir)/src/libabigail.la $(FTS_LIBS)
abipkgdiff_LDFLAGS = -pthread
kmidiff_SOURCES = kmidiff.cc
kmidiffdir = $(bindir)
kmidiff_LDADD = $(abs_top_builddir)/src/libabigail.la
kmidiff_LDFLAGS = -pthread
AM_CXXFLAGS = \
$(VISIBILITY_FLAGS) -I$(abs_top_srcdir)/include \
-I$(abs_top_srcdir)/tools -fPIC