AutoCorrect: fix not immediately replacement of Emoji :short_names:
[LibreOffice.git] / m4 / libo_externals.m4
blob3fe9fce18648febd9ce73a3eee0c4143cf3aaf8e
1 dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 AC_DEFUN([libo_CHECK_SYSTEM_MODULE], [
10 AC_ARG_WITH(system-$1,
11     AS_HELP_STRING([--with-system-$1],
12         [Use $1 from operating system instead of building and bundling it.]),,
13     [with_system_$1="$with_system_libs"])
14 AC_MSG_CHECKING([which $1 to use])
15 if test "$with_system_$1" = "yes"; then
16     AC_MSG_RESULT([external])
17     SYSTEM_$2=TRUE
18     PKG_CHECK_MODULES([$2], [$3])
19     $2_CFLAGS=$(printf '%s' "${$2_CFLAGS}" | sed -e "s/-I/${ISYSTEM?}/g")
20 else
21     AC_MSG_RESULT([internal])
22     SYSTEM_$2=
23     $2_CFLAGS=$4
24     $2_LIBS=$5
25     BUILD_TYPE="$BUILD_TYPE $2"
27 AC_SUBST([SYSTEM_$2])
28 AC_SUBST([$2_CFLAGS])
29 AC_SUBST([$2_LIBS])
32 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: