summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-12-13 23:07:45 +0100
committerJan-Marek Glogowski <glogow@fbihome.de>2021-12-15 19:53:44 +0100
commit79ca2a6a7c8e0102aa8e7e3af709d5cf2e4d9532 (patch)
tree58263bf5e320f65f5023d25e76e5c3e1972d1979 /m4
parent7c22bed187c12122fe29459279771ca414799ac8 (diff)
Simplify CURL and LIBCMIS tests
... by expanding libo_CHECK_SYSTEM_MODULE with yet an other parameter to optionally disable the feature completely and adding the matching AC_ARG_ENABLE. As a result, --disable-cmis becomes --disable-libcmis. Also adds more documentation to m4/libo_externals.m4. And use simpler help strings, now hopefully correctly escaped. Change-Id: I8ac67145721d8518cca6f6867bc05738a87ed77a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126771 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'm4')
-rw-r--r--m4/libo_externals.m430
1 files changed, 24 insertions, 6 deletions
diff --git a/m4/libo_externals.m4 b/m4/libo_externals.m4
index b2b314fec933..dc493154a726 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -7,16 +7,30 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# <lowercase check>,<variable prefix>,<pkg-config query>,
-# <internal CFLAGS>,<internal LIBS>,<external (default: FALSE)>
+# <internal CFLAGS>,<internal LIBS>,<prefer external (default: FALSE)>,
+# <can be disabled (default: FALSE)>
+#
+# FALSE is actually a blank value, so TRUE matches any not-blank value.
+#
+# Used configure.ac variables:
+# - enable_$1: should normally not be set manually; use test_$1 instead
+# - test_$1: set to no, if the feature shouldn't be tested at all
+# - test_system_$1: set to no, if the system library should not be used
+#
AC_DEFUN([libo_CHECK_SYSTEM_MODULE], [
AC_ARG_WITH(system-$1,
AS_HELP_STRING([m4_ifnblank([$6],[--without-system-$1],[--with-system-$1])],
- [m4_ifnblank([$6],
- Build and bundle the internal $1 instead of using the operating system one.,
- Use $1 from the operating system instead of building and bundling it.)]),
+ m4_ifnblank([$6],
+ [Build and bundle the internal $1.],
+ [Use $1 from the operating system.])),
,[m4_ifnblank([$6],[with_system_$1="yes"],[with_system_$1="$with_system_libs"])])
+m4_ifnblank([$7],[
+ AC_ARG_ENABLE([$1],
+ AS_HELP_STRING([--disable-$1],[Disable $1 support.]),
+ ,[enable_$1="yes"])
+])
AC_MSG_CHECKING([which $1 to use])
-if test "$test_$1" != "no"; then
+if test "$test_$1" != no -a "$enable_$1" != no; then
ENABLE_$2=TRUE
if test "$with_system_$1" = yes -a "$test_system_$1" != no; then
AC_MSG_RESULT([external])
@@ -33,7 +47,11 @@ if test "$test_$1" != "no"; then
BUILD_TYPE="$BUILD_TYPE $2"
fi
else
- AC_MSG_RESULT([ignored])
+ if test "$test_$1" != no -a "$enable_$1" = no; then
+ AC_MSG_RESULT([disabled])
+ else
+ AC_MSG_RESULT([ignored / not supported by OS])
+ fi
fi
AC_SUBST([ENABLE_$2])
AC_SUBST([SYSTEM_$2])