This is the mail archive of the mailing list for the elfutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Support --enable-static


I do not see an easy way how to build elfutils statically and it also does not
use -rpath, therefore one needs to fiddle with LD_LIBRARY_PATH.

(Moreover I find shared libraries build inconvenient for debugging as GDB does
not pre-load before 'run' DT_NEEDED libraries which it could.)

OK for check-in?


2012-09-14  Jan Kratochvil  <>

	* New option --enable-static.  Default to the
	BUILD_STATIC conditional.
	(BUILD_STATIC): Use $enable_static.

diff --git a/ b/
index adec1c1..8e6e2db 100644
--- a/
+++ b/
@@ -190,8 +190,19 @@ if test "$use_gcov" = yes; then
 AM_CONDITIONAL(GCOV, test "$use_gcov" = yes)
-test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes])
+AS_HELP_STRING([--enable-static], [build static binaries @<:@default=no@:>@])],[dnl
+case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *) AC_MSG_ERROR([invalid --enable-static option $enableval]) ;;
+if test "$use_mudflap" = yes -o "$use_gprof" = yes -o "$use_gcov" = yes; then
+  enable_static=yes
+  enable_static=no
+AM_CONDITIONAL(BUILD_STATIC, [test "$enable_static" = yes])
 AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]