summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2019-04-10 02:27:41 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2020-08-28 21:20:33 +0200
commit8c9d63168b24ae8ab176f73a7e64ef9e8365b23e (patch)
treea017691774a37812d2de3ab9dd70666bcf259756 /configure.ac
parentf7c34aa227693194e53ca0435dba52c2a839bae8 (diff)
WIP as shared libraryshared
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index eabb3d56..f34f613e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -54,6 +54,12 @@ AC_ARG_ENABLE([mpls-kernel],
[enable_mpls_kernel=try]
)
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared], [enable shared library @<:@no@:>@])],
+ [],
+ [enable_shared=no]
+)
+
AC_ARG_WITH([protocols],
[AS_HELP_STRING([--with-protocols=LIST], [include specified routing protocols @<:@all@:>@])],
[],
@@ -403,6 +409,12 @@ if test "$enable_debug" = yes ; then
fi
fi
+if test "$enable_shared" = yes ; then
+dnl AC_DEFINE([DEBUGGING], [1], [Define to 1 if debugging is enabled])
+ LDFLAGS="$LDFLAGS -shared -Wl,--no-undefined"
+ CFLAGS="$CFLAGS -fPIC"
+fi
+
CLIENT=birdcl
CLIENT_LIBS=
if test "$enable_client" = yes ; then