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