From ee715bf2f9ee27a1eccb9615578b275fe717dae5 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 29 Jan 2013 21:42:37 +0100 Subject: [PATCH] libevent: produce smaller binaries when shipping libevent When shipping libevent, we try to build smaller binaries by disabling unneeded stuff (openssl, threading, malloc replacement, debug stuff) and enabling `--gc-sections`. On various tests, this remove 80K from lldpd size (stripping excluded). --- m4/libevent.m4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/m4/libevent.m4 b/m4/libevent.m4 index 5b7d4fda..a08f52e0 100644 --- a/m4/libevent.m4 +++ b/m4/libevent.m4 @@ -12,7 +12,9 @@ AC_DEFUN([lldp_CHECK_LIBEVENT], [ ]) # Override configure arguments - ac_configure_args="$ac_configure_args --disable-libevent-regress --disable-thread-support --disable-shared --enable-static" + ac_configure_args="$ac_configure_args --disable-libevent-regress --disable-thread-support --disable-openssl" + ac_configure_args="$ac_configure_args --disable-malloc-replacement --disable-debug-mode --enable-function-sections" + ac_configure_args="$ac_configure_args --disable-shared --enable-static" AC_CONFIG_SUBDIRS([libevent]) AM_CONDITIONAL([LIBEVENT_EMBEDDED], [test x"$LIBEVENT_LDFLAGS" != x]) AC_SUBST([LIBEVENT_LIBS]) -- 2.39.5