diff --git a/configure.in b/configure.in index 66816b2e..3b7d1a58 100644 --- a/configure.in +++ b/configure.in @@ -60,8 +60,12 @@ AC_ARG_ENABLE([libevent-install], AS_HELP_STRING([--disable-libevent-install, disable installation of libevent]), [], [enable_libevent_install=yes]) AC_ARG_ENABLE([libevent-regress], - AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]), + AS_HELP_STRING([--disable-libevent-regress, skip regress in make check]), [], [enable_libevent_regress=yes]) +AC_ARG_ENABLE([function-sections], + AS_HELP_STRING([--enable-function-sections, make static library allow smaller binaries with --gc-sections]), + [], [enable_function_sections=no]) + AC_PROG_LIBTOOL @@ -655,7 +659,7 @@ if test x$enable_gcc_warnings = xyes && test "$GCC" = "yes"; then fi LIBEVENT_GC_SECTIONS= -if test "$GCC" = yes ; then +if test "$GCC" = yes && test "$enable_function_sections" = yes ; then AC_CACHE_CHECK( [if linker supports omitting unused code and data], [libevent_cv_gc_sections_works],