diff -Naur colm-0.14.7.orig/configure.ac colm-0.14.7/configure.ac
--- colm-0.14.7.orig/configure.ac	2021-02-10 07:04:55.000000000 +0100
+++ colm-0.14.7/configure.ac	2023-02-07 17:35:08.462977144 +0100
@@ -45,6 +45,7 @@
 AC_CHECK_TOOL(AR, ar)
 AC_PROG_RANLIB
 AC_PROG_LIBTOOL
+
 SED_SUBST=["\
 	-e 's|@CXX@|${CXX}|g' \
 	-e 's|@CC@|${CC}|g' \
@@ -424,6 +425,13 @@
 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.
diff -Naur colm-0.14.7.orig/src/main.cc colm-0.14.7/src/main.cc
--- colm-0.14.7.orig/src/main.cc	2020-12-24 00:37:24.000000000 +0100
+++ colm-0.14.7/src/main.cc	2023-02-07 17:36:51.313669629 +0100
@@ -485,7 +485,14 @@
 				" -I%s/../aapl"
 				" -I%s/include"
 				" -L%s"
-				" %s/libcolm.a",
+#if defined(LINK_STATIC)
+ 				" %s/libcolm.a",
+#elif defined(LINK_SHARED)
+				" %s/libcolm.so",
+#else
+#				error "must enabled at least one of shared or static libs"
+#endif
+
 				binaryFn, intermedFn, srcLocation,
 				srcLocation, location, location );
 	}
