[PATCH 1/1] Add a --{enable,disable}-backends option

Jan Heylen heyleke at gmail.com
Fri Apr 3 08:03:37 UTC 2015


Add a --{enable,disable}-backends configuration option to elfutils. This
allows to selectively disable the compilation of the libebl backends
shared libraries. This is usefull when some application require linking
against the elfutils libelf, but don't require the backends to be available
at runtime on target, e.g. in a cross compilation setting.

Signed-off-by: Jan Heylen <heyleke at gmail.com>
---
 Makefile.am  |    9 +++++++--
 configure.ac |    5 +++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d044a7c..7245fe3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,8 +23,13 @@ ACLOCAL_AMFLAGS = -I m4
 pkginclude_HEADERS = version.h
 
 # Add doc back when we have some real content.
-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
-	  backends src po tests
+SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm
+
+if ENABLE_BACKENDS
+SUBDIRS += backends
+endif
+
+SUBDIRS += src po tests
 
 EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
 	     COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/configure.ac b/configure.ac
index c4b818d..70445a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -189,6 +189,11 @@ AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
 	       [tests_use_rpath=$enableval], [tests_use_rpath=no])
 AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes)
 
+AC_ARG_ENABLE([backends],
+AS_HELP_STRING([--enable-backends], [enable ebl backends]),
+               enable_backends=$enableval, enable_backends=yes)
+AM_CONDITIONAL(ENABLE_BACKENDS, test "$enable_backends" = yes)
+
 LIBEBL_SUBDIR="$PACKAGE"
 AC_ARG_ENABLE([libebl-subdir],
 AS_HELP_STRING([--enable-libebl-subdir=DIR],
-- 
1.7.1



More information about the elfutils-devel mailing list