summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-12-07 05:19:01 +0100
committerTor Lillqvist <tml@collabora.com>2022-09-26 20:54:56 +0200
commitbe7a238c33dc02dfba40b2ad60485a56f4685d26 (patch)
tree41fdb48a08d7266e90e7a68c46c0cbdc20e00203 /m4
parentdf45cb78617eebcace731c2a8e61cc4aaec2a8cf (diff)
Simplify FONTCONFIG and FREETYPE tests
Add an additional option to libo_CHECK_SYSTEM_MODULE to select the default external lookup. Don't "if" the libo_CHECK_SYSTEM_MODULE, so the AC_SUBST are always run, but set the test_* flags instead. Change-Id: Ie0a1204b34d596fdd57a7ee770418f91bf8c5d00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126464 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140050 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/libo_externals.m412
1 files changed, 8 insertions, 4 deletions
diff --git a/m4/libo_externals.m4 b/m4/libo_externals.m4
index d19178ab8250..b2b314fec933 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -6,15 +6,19 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*
# License, v. 2.0. If a copy of the MPL was not distributed with this
# 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)>
AC_DEFUN([libo_CHECK_SYSTEM_MODULE], [
AC_ARG_WITH(system-$1,
- AS_HELP_STRING([--with-system-$1],
- [Use $1 from operating system instead of building and bundling it.]),,
- [with_system_$1="$with_system_libs"])
+ 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],[with_system_$1="yes"],[with_system_$1="$with_system_libs"])])
AC_MSG_CHECKING([which $1 to use])
if test "$test_$1" != "no"; then
ENABLE_$2=TRUE
- if test "$with_system_$1" = "yes"; then
+ if test "$with_system_$1" = yes -a "$test_system_$1" != no; then
AC_MSG_RESULT([external])
SYSTEM_$2=TRUE
PKG_CHECK_MODULES([$2], [$3])