From 7d8559ddda9e0c02ca9685a76a1fedc95dc34902 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 29 Aug 2020 14:49:17 +0200 Subject: Configure: Add static-lib option Add --enable-static-lib --- Makefile.in | 2 +- configure.ac | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 7e24a34e..f5237354 100644 --- a/Makefile.in +++ b/Makefile.in @@ -26,7 +26,7 @@ INSTALL_DATA=@INSTALL_DATA@ client=$(addprefix $(exedir)/,@CLIENT@) daemon=$(exedir)/bird -static_lib=$(exedir)/libbird.a +static_lib=$(addprefix $(exedir)/,@STATIC_LIB@) protocols=@protocols@ prefix=@prefix@ diff --git a/configure.ac b/configure.ac index 9de32908..b0555999 100644 --- a/configure.ac +++ b/configure.ac @@ -12,6 +12,12 @@ AC_ARG_ENABLE([client], [enable_client=yes] ) +AC_ARG_ENABLE([static-lib], + [AS_HELP_STRING([--enable-static-lib], [enable building of BIRD daemon static library @<:@no@:>@])], + [], + [enable_static_lib=no] +) + AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [enable internal debugging routines @<:@no@:>@])], [], @@ -456,6 +462,12 @@ fi AC_SUBST([CLIENT]) AC_SUBST([CLIENT_LIBS]) +STATIC_LIB= +if test "$enable_static_lib" = yes ; then + STATIC_LIB="$STATIC_LIB libbird.a" +fi +AC_SUBST([STATIC_LIB]) + mkdir -p $objdir/sysdep AC_CONFIG_HEADERS([$objdir/sysdep/autoconf.h:sysdep/autoconf.h.in]) AC_CONFIG_FILES([Makefile:Makefile.in]) @@ -473,5 +485,6 @@ AC_MSG_RESULT([ Routing protocols: $protocols]) AC_MSG_RESULT([ LibSSH support in RPKI: $enable_libssh]) AC_MSG_RESULT([ Kernel MPLS support: $enable_mpls_kernel]) AC_MSG_RESULT([ Client: $enable_client]) +AC_MSG_RESULT([ Static lib: $enable_static_lib]) rm -f $objdir/.*-stamp -- cgit v1.2.3