diff options
author | Adrian Thurston <thurston@colm.net> | 2021-11-27 21:17:26 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2021-11-27 21:17:26 +0000 |
commit | fc61ecb3a22b89864916ec538eaf04840e7dd6b5 (patch) | |
tree | aa12da3d527d2533fbb819cd56f28ffd2a854b6a /configure.ac | |
parent | 0fc29d2aabb4878697d9f8221c3a5ec60fba9df2 (diff) | |
download | colm-fc61ecb3a22b89864916ec538eaf04840e7dd6b5.tar.gz |
fix: check enable_static and enable_shared and link libcolm appropriately
If --disable-static or --disable-shared is used, then pass this info to
compilation of main.cc and link with libcolm appropriately. Default to a static
as has been done for some time. refs adrian-thurston/ragel#70.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index aa127b68..fc034f28 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,7 @@ AC_PROG_CXX AC_CHECK_TOOL(AR, ar) AC_PROG_RANLIB AC_PROG_LIBTOOL + SED_SUBST=["\ -e 's|@CXX@|${CXX}|g' \ -e 's|@CC@|${CC}|g' \ @@ -420,6 +421,13 @@ test -e src/include/colm || ln -s .. src/include/colm echo "#define VERSION \"$VERSION\"" > src/version.h echo "#define PUBDATE \"$PUBDATE\"" >> src/version.h +if test "x$enable_static" = "xyes"; then + AC_DEFINE([LINK_STATIC], [1], [Link static lib when invoking C compile and link]) +fi + +if test "x$enable_shared" = "xyes"; then + AC_DEFINE([LINK_SHARED], [1], [Link shared lib when invoking C compile and link]) +fi dnl dnl Wrap up. |