From be854357189b6a3bd7e846b4e7914877f0deaf9f Mon Sep 17 00:00:00 2001 From: MilhouseVH Date: Sat, 25 Jan 2020 21:28:52 +0000 Subject: [PATCH] make executables optional --- Makefile.am | 6 +++++- configure.ac | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index bd8926b..1733937 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,7 +27,11 @@ pkginclude_HEADERS = version.h SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \ - libasm debuginfod src po doc tests + libasm debuginfod po doc tests + +if BUILD_PROGRAMS + SUBDIRS += src +endif EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ COPYING COPYING-GPLV2 COPYING-LGPLV3 diff --git a/configure.ac b/configure.ac index 5a2dc37..a1e856a 100644 --- a/configure.ac +++ b/configure.ac @@ -87,6 +87,11 @@ AS_IF([test "$use_locks" = yes], AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.]) +AC_ARG_ENABLE([programs], +AS_HELP_STRING([--enable-programs], [Build and install programs when enabled (default: disabled)]), + [build_programs=$enableval], [build_programs=no]) +AM_CONDITIONAL(BUILD_PROGRAMS, test "$build_programs" = yes) + AC_PROG_CC AC_PROG_RANLIB AC_PROG_YACC -- 2.7.4