0001-disable-progs.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. Add a --{enable,disable}-progs configure option
  2. Add a --{enable,disable}-progs configuration option to elfutils. This
  3. allows to selectively disable the compilation of the elfutils programs
  4. (in which case only the libraries are built and installed). This is
  5. useful because the programs are often not needed, and also because
  6. building the programs against uClibc causes several issues (lack of
  7. obstack_printf() in uClibc for example).
  8. Based on the former patch by Thomas Petazzoni.
  9. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  10. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
  11. diff -rup a/configure.ac b/configure.ac
  12. --- a/configure.ac 2014-11-07 14:54:32.859360779 +0000
  13. +++ b/configure.ac 2014-11-07 14:47:44.847376394 +0000
  14. @@ -253,6 +253,12 @@ AC_SUBST([LIBEBL_SUBDIR])
  15. AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR")
  16. AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.])
  17. +AC_ARG_ENABLE([progs],
  18. + AS_HELP_STRING([--enable-progs], [enable progs]),
  19. + enable_progs=$enableval,
  20. + enable_progs=yes)
  21. +AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes)
  22. +
  23. dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am
  24. dnl conditional and config.h USE_ZLIB/USE_BZLIB #define.
  25. save_LIBS="$LIBS"
  26. diff -rup a/Makefile.am b/Makefile.am
  27. --- a/Makefile.am 2014-08-27 10:25:17.000000000 +0100
  28. +++ b/Makefile.am 2014-11-07 14:51:38.081368550 +0000
  29. @@ -22,9 +22,13 @@ ACLOCAL_AMFLAGS = -I m4
  30. pkginclude_HEADERS = version.h
  31. +if ENABLE_PROGS
  32. +PROGS_SUBDIR = src
  33. +endif
  34. +
  35. # Add doc back when we have some real content.
  36. SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
  37. - backends src po tests
  38. + backends $(PROGS_SUBDIR) po tests
  39. EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
  40. COPYING COPYING-GPLV2 COPYING-LGPLV3