summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Engelhard <rene@debian.org>2014-08-06 00:03:21 +0200
committerRene Engelhard <rene@debian.org>2014-08-06 00:03:21 +0200
commitd85f513934bb5735a2c0c343fbe7dc2b9c11af3e (patch)
treed87cdad5e89f5d631d903388d242f0ffc635be27
parent6e93ea106e7444980532b090deacdf6eb7397aed (diff)
implement --with-system-coinmp
Change-Id: I02928097f049e8f3cbefbc872b570b2d2b072658
-rw-r--r--RepositoryExternal.mk15
-rw-r--r--config_host.mk.in3
-rw-r--r--configure.ac16
3 files changed, 32 insertions, 2 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a9c9e5342ec0..196182908eb8 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2250,6 +2250,8 @@ endif # ENABLE_LPSOLVE
ifneq ($(ENABLE_COINMP),)
+ifneq ($(SYSTEM_COINMP),TRUE)
+
define gb_LinkTarget__use_coinmp
$(call gb_LinkTarget_use_package,$(1),coinmp)
ifeq ($(COM),MSC)
@@ -2279,6 +2281,19 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
coinmp \
))
+else # SYSTEM_COINMP
+
+define gb_LinkTarget__use_coinmp
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(COINMP_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(COINMP_LIBS))
+
+endef
+
+endif
+
else
gb_LinkTarget__use_coinmp :=
diff --git a/config_host.mk.in b/config_host.mk.in
index 4f889836661a..31dea01f0c5f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -109,6 +109,9 @@ export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
export ENABLE_CHART_TESTS=@ENABLE_CHART_TESTS@
export ENABLE_CMIS=@ENABLE_CMIS@
export ENABLE_COINMP=@ENABLE_COINMP@
+export SYSTEM_COINMP=@SYSTEM_COINMP@
+export COINMP_CFLAGS=@COINMP_CFLAGS@
+export COINMP_LIBS=@COINMP_LIBS@
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
export ENABLE_CUPS=@ENABLE_CUPS@
export ENABLE_CURL=@ENABLE_CURL@
diff --git a/configure.ac b/configure.ac
index e91773f61276..3aadd12fa02b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1867,6 +1867,11 @@ AC_ARG_WITH(system-lpsolve,
[Use lpsolve already on system.]),,
[with_system_lpsolve="$with_system_libs"])
+AC_ARG_WITH(system-coinmp,
+ AS_HELP_STRING([--with-system-coinmp],
+ [Use CoinMP already on system.]),,
+ [with_system_coinmp="$with_system_libs"])
+
AC_ARG_WITH(system-liblangtag,
AS_HELP_STRING([--with-system-liblangtag],
[Use liblangtag library already on system.]),,
@@ -9661,12 +9666,19 @@ AC_MSG_CHECKING([whether to build with CoinMP])
if test "$enable_coinmp" != "no"; then
ENABLE_COINMP=TRUE
AC_MSG_RESULT([yes])
- # Should we check for system CoinMP ? How to do that ?
- BUILD_TYPE="$BUILD_TYPE COINMP"
+ if test "$with_system_coinmp" = "yes"; then
+ SYSTEM_COINMP=TRUE
+ PKG_CHECK_MODULES( COINMP, coinmp )
+ else
+ BUILD_TYPE="$BUILD_TYPE COINMP"
+ fi
else
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_COINMP)
+AC_SUBST(SYSTEM_COINMP)
+AC_SUBST(COINMP_CFLAGS)
+AC_SUBST(COINMP_LIBS)
ENABLE_LPSOLVE=
AC_MSG_CHECKING([whether to build with lpsolve])