1*4882a593SmuzhiyunFrom 73e4da5ca780196d23db8029dcd28f87a0402711 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 3*4882a593SmuzhiyunDate: Mon, 29 May 2017 23:03:48 +0300 4*4882a593SmuzhiyunSubject: [PATCH] Add a --{enable,disable}-progs configure option 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunAdd a --{enable,disable}-progs configuration option to elfutils. This 7*4882a593Smuzhiyunallows to selectively disable the compilation of the elfutils programs 8*4882a593Smuzhiyun(in which case only the libraries are built and installed). This is 9*4882a593Smuzhiyunuseful because the programs are often not needed, and also because 10*4882a593Smuzhiyunbuilding the programs against uClibc causes several issues (lack of 11*4882a593Smuzhiyunobstack_printf() in uClibc for example). 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunBased on the former patch by Thomas Petazzoni. 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun[Vincent: tweak patch for 0.166] 16*4882a593Smuzhiyun[Bernd: rebased patch for 0.177] 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunSigned-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 19*4882a593SmuzhiyunSigned-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> 20*4882a593SmuzhiyunSigned-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 21*4882a593Smuzhiyun[Rebased on 0.183] 22*4882a593SmuzhiyunSigned-off-by: Peter Seiderer <ps.report@gmx.net> 23*4882a593Smuzhiyun[Fabrice: don't error out if obstack is not found] 24*4882a593SmuzhiyunSigned-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 25*4882a593Smuzhiyun--- 26*4882a593Smuzhiyun Makefile.am | 6 +++++- 27*4882a593Smuzhiyun configure.ac | 6 ++++++ 28*4882a593Smuzhiyun 2 files changed, 11 insertions(+), 1 deletion(-) 29*4882a593Smuzhiyun 30*4882a593Smuzhiyundiff --git a/Makefile.am b/Makefile.am 31*4882a593Smuzhiyunindex 9c47afa..edf8dfc 100644 32*4882a593Smuzhiyun--- a/Makefile.am 33*4882a593Smuzhiyun+++ b/Makefile.am 34*4882a593Smuzhiyun@@ -26,8 +26,12 @@ AM_MAKEFLAGS = --no-print-directory 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun pkginclude_HEADERS = version.h 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun+if ENABLE_PROGS 39*4882a593Smuzhiyun+PROGS_SUBDIR = src 40*4882a593Smuzhiyun+endif 41*4882a593Smuzhiyun+ 42*4882a593Smuzhiyun SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \ 43*4882a593Smuzhiyun- libasm debuginfod src po doc tests 44*4882a593Smuzhiyun+ libasm debuginfod $(PROGS_SUBDIR) po doc tests 45*4882a593Smuzhiyun 46*4882a593Smuzhiyun EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ 47*4882a593Smuzhiyun COPYING COPYING-GPLV2 COPYING-LGPLV3 48*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac 49*4882a593Smuzhiyunindex d345495..0dd4b1e 100644 50*4882a593Smuzhiyun--- a/configure.ac 51*4882a593Smuzhiyun+++ b/configure.ac 52*4882a593Smuzhiyun@@ -393,6 +393,12 @@ AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]), 53*4882a593Smuzhiyun [tests_use_rpath=$enableval], [tests_use_rpath=no]) 54*4882a593Smuzhiyun AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes) 55*4882a593Smuzhiyun 56*4882a593Smuzhiyun+AC_ARG_ENABLE([progs], 57*4882a593Smuzhiyun+ AS_HELP_STRING([--enable-progs], [enable progs]), 58*4882a593Smuzhiyun+ enable_progs=$enableval, 59*4882a593Smuzhiyun+ enable_progs=yes) 60*4882a593Smuzhiyun+AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) 61*4882a593Smuzhiyun+ 62*4882a593Smuzhiyun dnl zlib is mandatory. 63*4882a593Smuzhiyun save_LIBS="$LIBS" 64*4882a593Smuzhiyun LIBS= 65*4882a593Smuzhiyun@@ -579,7 +585,7 @@ saved_LIBS="$LIBS" 66*4882a593Smuzhiyun AC_SEARCH_LIBS([_obstack_free], [obstack]) 67*4882a593Smuzhiyun LIBS="$saved_LIBS" 68*4882a593Smuzhiyun case "$ac_cv_search__obstack_free" in 69*4882a593Smuzhiyun- no) AC_MSG_FAILURE([failed to find _obstack_free]) ;; 70*4882a593Smuzhiyun+ no) obstack_LIBS= ;; 71*4882a593Smuzhiyun -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;; 72*4882a593Smuzhiyun *) obstack_LIBS= ;; 73*4882a593Smuzhiyun esac 74*4882a593Smuzhiyun-- 75*4882a593Smuzhiyun2.30.1 76*4882a593Smuzhiyun 77