]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
libevent: produce smaller binaries when shipping libevent
authorVincent Bernat <bernat@luffy.cx>
Tue, 29 Jan 2013 20:42:37 +0000 (21:42 +0100)
committerVincent Bernat <bernat@luffy.cx>
Tue, 29 Jan 2013 20:42:37 +0000 (21:42 +0100)
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

index 5b7d4fda3f820a2563229ca2e8e97d7d34ba80e4..a08f52e0d7a8568299dde84ade553135dcfc9630 100644 (file)
@@ -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])