29215619ed
The goal is to avoid build breakage by pkg-config or whatever helpfully putting default paths like -L/usr/lib64 into *_LIBS, which is entirely useless since ld searches there anyway but may override other -L that occur later on the command line for LO bundled externals. On a Fedora 22 system, at least these variales were affected: CLUCENE_LIBS FIREBIRD_LIBS KDE4_LIBS POSTGRESQL_LIB BOOST_LDFLAGS Change-Id: Ie55f65c3ae29a125f16871d95ad8b716abf5c982 Reviewed-on: https://gerrit.libreoffice.org/19784 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
34 lines
1.1 KiB
Text
34 lines
1.1 KiB
Text
dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*-
|
|
#
|
|
# This file is part of the LibreOffice project.
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# 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/.
|
|
#
|
|
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"])
|
|
AC_MSG_CHECKING([which $1 to use])
|
|
if test "$with_system_$1" = "yes"; then
|
|
AC_MSG_RESULT([external])
|
|
SYSTEM_$2=TRUE
|
|
PKG_CHECK_MODULES([$2], [$3])
|
|
$2_CFLAGS=$(printf '%s' "${$2_CFLAGS}" | sed -e "s/-I/${ISYSTEM?}/g")
|
|
FilterLibs "${$2_LIBS}"
|
|
$2_LIBS="$filteredlibs"
|
|
else
|
|
AC_MSG_RESULT([internal])
|
|
SYSTEM_$2=
|
|
$2_CFLAGS=$4
|
|
$2_LIBS=$5
|
|
BUILD_TYPE="$BUILD_TYPE $2"
|
|
fi
|
|
AC_SUBST([SYSTEM_$2])
|
|
AC_SUBST([$2_CFLAGS])
|
|
AC_SUBST([$2_LIBS])
|
|
])
|
|
|
|
dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
|