1 From edadcf67980764c104c25c7c1a0ba91257b89698 Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Thu, 8 Dec 2016 23:33:30 +0100
4 Subject: [PATCH 1/2] Detect bfd.h to enable/disable sepdebugcrcfix building
6 tools/sepdebugcrcfix includes <bfd.h>, but this header from binutils
7 is not checked in the configure script. Due to this, sepdebugcrcfix is
8 attempted to be built even when <bfd.h> is not available. This commit
9 addresses that by adding the appropriate configure check.
11 This fixes the following build error:
13 tools/sepdebugcrcfix.c:31:17: fatal error: bfd.h: No such file or directory
14 compilation terminated.
15 make[3]: *** [tools/sepdebugcrcfix.o] Error 1
17 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
21 2 files changed, 5 insertions(+)
23 diff --git a/Makefile.am b/Makefile.am
24 index 863138c..d8a68f0 100644
27 @@ -168,9 +168,11 @@ elfdeps_SOURCES = tools/elfdeps.c
28 elfdeps_LDADD = rpmio/librpmio.la
29 elfdeps_LDADD += @WITH_LIBELF_LIB@ @WITH_POPT_LIB@
32 rpmlibexec_PROGRAMS += sepdebugcrcfix
33 sepdebugcrcfix_SOURCES = tools/sepdebugcrcfix.c
34 sepdebugcrcfix_LDADD = @WITH_LIBELF_LIB@
39 diff --git a/configure.ac b/configure.ac
40 index c5ae701..b99ecb8 100644
43 @@ -242,6 +242,9 @@ AC_CHECK_HEADERS([dwarf.h], [
45 AM_CONDITIONAL(LIBDWARF,[test "$WITH_LIBDWARF" = yes])
47 +AC_CHECK_HEADERS([bfd.h])
48 +AM_CONDITIONAL(HAS_BFD_H, [test "${ac_cv_header_bfd_h}" = "yes"])
51 # Check for beecrypt library if requested.
52 AC_ARG_WITH(beecrypt, [ --with-beecrypt build with beecrypt support ],,[with_beecrypt=no])