0001-Add-a-enable-disable-progs-configure-option.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. From dfea82b761b2ea4708fbf9370a5467ae4be525ca Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Mon, 29 May 2017 23:03:48 +0300
  4. Subject: [PATCH] Add a --{enable,disable}-progs configure option
  5. Add a --{enable,disable}-progs configuration option to elfutils. This
  6. allows to selectively disable the compilation of the elfutils programs
  7. (in which case only the libraries are built and installed). This is
  8. useful because the programs are often not needed, and also because
  9. building the programs against uClibc causes several issues (lack of
  10. obstack_printf() in uClibc for example).
  11. Based on the former patch by Thomas Petazzoni.
  12. [Vincent: tweak patch for 0.166]
  13. [Bernd: rebased patch for 0.177]
  14. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  15. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  16. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  17. ---
  18. Makefile.am | 6 +++++-
  19. configure.ac | 6 ++++++
  20. 2 files changed, 11 insertions(+), 1 deletion(-)
  21. diff --git a/Makefile.am b/Makefile.am
  22. index 2ff444e7bf1d..70443abb4fb6 100644
  23. --- a/Makefile.am
  24. +++ b/Makefile.am
  25. @@ -26,8 +26,12 @@ AM_MAKEFLAGS = --no-print-directory
  26. pkginclude_HEADERS = version.h
  27. +if ENABLE_PROGS
  28. +PROGS_SUBDIR = src
  29. +endif
  30. +
  31. SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \
  32. - libasm debuginfod src po doc tests
  33. + libasm debuginfod $(PROGS_SUBDIR) po doc tests
  34. EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
  35. COPYING COPYING-GPLV2 COPYING-LGPLV3
  36. diff --git a/configure.ac b/configure.ac
  37. index c2c1d90b2133..7b4c38381cca 100644
  38. --- a/configure.ac
  39. +++ b/configure.ac
  40. @@ -390,6 +390,12 @@
  41. [tests_use_rpath=$enableval], [tests_use_rpath=no])
  42. AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes)
  43. +AC_ARG_ENABLE([progs],
  44. + AS_HELP_STRING([--enable-progs], [enable progs]),
  45. + enable_progs=$enableval,
  46. + enable_progs=yes)
  47. +AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes)
  48. +
  49. dnl zlib is mandatory.
  50. save_LIBS="$LIBS"
  51. LIBS=
  52. --
  53. 2.11.0