diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-07 05:19:01 +0100 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-12-09 15:47:48 +0100 |
commit | 8677e994d37329a28ca8278358a99d18b9cada69 (patch) | |
tree | 1c2ec14f4fc8121c03296b30933dabd63a0d6125 /m4/libo_externals.m4 | |
parent | 748b8ad4184130b74ae3fdd7178be2999948d64e (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>
Diffstat (limited to 'm4/libo_externals.m4')
-rw-r--r-- | m4/libo_externals.m4 | 12 |
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]) |