aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <deremin-solenikov@cavium.com>2019-03-14 00:35:51 +0300
committerMatias Elo <matias.elo@nokia.com>2019-04-16 08:39:22 +0300
commit6811aabac773f935d5eedcd7d781eeb3cf06056f (patch)
tree1e4f132205110ca9561019303c89530d66549fb3
parent939166d4414609717264e6f51f51d4b22cdd022a (diff)
downloadodp-6811aabac773f935d5eedcd7d781eeb3cf06056f.tar.gz
build: support platforms that do not use config
Support platforms that do not use config file. Signed-off-by: Dmitry Eremin-Solenikov <deremin-solenikov@cavium.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Stanislaw Kardach <Stanislaw.Kardach@cavium.com>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--m4/odp_libconfig.m41
-rw-r--r--platform/Makefile.inc7
4 files changed, 9 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index f651e9cac..b2e828ce1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,7 +28,7 @@ endif
@DX_RULES@
-EXTRA_DIST = bootstrap CHANGELOG config/README config/odp-$(with_platform).conf
+EXTRA_DIST = bootstrap CHANGELOG config/README
distcheck-hook:
if test -n "$(DX_CLEANFILES)" ; \
diff --git a/configure.ac b/configure.ac
index f4ad79f5f..878110ab2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -231,6 +231,8 @@ AS_IF([test "${with_platform}" = "linux-generic"],
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"])
+
##########################################################################
# Build examples/tests dynamically
##########################################################################
diff --git a/m4/odp_libconfig.m4 b/m4/odp_libconfig.m4
index 302dc5066..6b5bca268 100644
--- a/m4/odp_libconfig.m4
+++ b/m4/odp_libconfig.m4
@@ -14,6 +14,7 @@ AC_CHECK_PROGS([OD], [od])
AC_PROG_SED
AS_IF([test -z "$OD"], [AC_MSG_ERROR([Could not find 'od'])])
+odp_use_config=true
##########################################################################
# Create a header file odp_libconfig_config.h which containins null
# terminated hex dump of odp-linux.conf
diff --git a/platform/Makefile.inc b/platform/Makefile.inc
index ae4d52f29..f99d39ffc 100644
--- a/platform/Makefile.inc
+++ b/platform/Makefile.inc
@@ -3,8 +3,13 @@ include $(top_srcdir)/Makefile.inc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libodp-linux.pc
+EXTRA_DIST = doc/platform_specific.dox
+
configdir = $(sysconfdir)/odp
+if ODP_USE_CONFIG
config_DATA = $(top_srcdir)/config/odp-$(with_platform).conf
+EXTRA_DIST += $(top_srcdir)/config/odp-$(with_platform).conf
+endif
VPATH = $(srcdir) $(builddir)
lib_LTLIBRARIES = $(LIB)/libodp-linux.la
@@ -21,5 +26,3 @@ AM_CFLAGS = "-DODP_VERSION_BUILD=$(VERSION)"
AM_CFLAGS += $(VISIBILITY_CFLAGS)
AM_CFLAGS += @PTHREAD_CFLAGS@
-
-EXTRA_DIST = doc/platform_specific.dox