aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStanislaw Kardach <skardach@marvell.com>2020-04-23 15:16:53 +0200
committerMatias Elo <matias.elo@nokia.com>2020-06-23 08:53:43 +0300
commitceaad3a190d46a4193f87fb838b27ec6da134991 (patch)
treeb445897870374f66f92accb3a99fa0340838702a /configure.ac
parenta2c38a27e67f36b5a11a3e3979dc34dd1d310346 (diff)
build: allow per-platform lib name
So far the build system (helper, examples, tests) expected that the ODP library is named libodp-linux. However that's only a recommended library name. Therefore move the library name specification to the platform automake files. More precisely platform has to define the following: 1. In configure.m4: ODP_LIB_NAME=<name> 2. In Makefile.am: lib_LTLIBRARIES += $(LIB)/lib<name>.la Where <name> is the library name. Please note that lib_LTLIBRARIES has to be explicitly named (cannot use ODP_LIB_NAME variable), otherwise automake will fail to generate compile target. Trying to perform a substitutions in it is only possible with full library name substitution (see [1]), however then all possible library names have to be defined in EXTRA_LTLIBRARIES which cannot contain substitutions. This would effectively replace one hard-coded place with another. [1] https://www.gnu.org/software/automake/manual/ html_node/Conditional-Libtool-Libraries.html Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f0667dc2c..87d91d03c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -294,6 +294,7 @@ AC_DEFINE_UNQUOTED([_ODP_IMPLEMENTATION_NAME], ["$ODP_IMPLEMENTATION_NAME"],
[Define to the name of the implementation])
AM_CONDITIONAL([ODP_USE_CONFIG], [test "x$odp_use_config" = "xtrue"])
+AC_SUBST([ODP_LIB_NAME])
##########################################################################
# Build examples/tests dynamically
@@ -455,6 +456,7 @@ AC_OUTPUT
AC_MSG_RESULT([
$PACKAGE $VERSION
+ ODP Library name: ${ODP_LIB_NAME}
ODP Library version: ${ODP_LIBSO_VERSION}
Helper Library version: ${ODPHELPER_LIBSO_VERSION}