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])
18 PKG_CHECK_MODULES([$2], [$3])
19 $2_CFLAGS=$(printf '%s' "${$2_CFLAGS}" | sed -e "s/-I/${ISYSTEM?}/g")
20 FilterLibs "${$2_LIBS}"
21 $2_LIBS="$filteredlibs"
23 AC_MSG_RESULT([internal])
27 BUILD_TYPE="$BUILD_TYPE $2"
34 dnl vim:set shiftwidth=4 softtabstop=4 expandtab: