Lakka-LibreELEC/packages/devel/elfutils/patches/elfutils-001-make-executables-optional.patch

47 lines
1.3 KiB
Diff

From be854357189b6a3bd7e846b4e7914877f0deaf9f Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
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 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
@@ -88,6 +88,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)
+
m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99])
AC_PROG_CXX
AC_PROG_RANLIB
--
2.7.4