summaryrefslogtreecommitdiff
path: root/m4/libo_externals.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/libo_externals.m4')
-rw-r--r--m4/libo_externals.m415
1 files changed, 8 insertions, 7 deletions
diff --git a/m4/libo_externals.m4 b/m4/libo_externals.m4
index dc493154a726..64851d3541e2 100644
--- a/m4/libo_externals.m4
+++ b/m4/libo_externals.m4
@@ -7,24 +7,25 @@ dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 102 -*
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# <lowercase check>,<variable prefix>,<pkg-config query>,
-# <internal CFLAGS>,<internal LIBS>,<prefer external (default: FALSE)>,
+# <prefer external (default: FALSE)>,
# <can be disabled (default: FALSE)>
#
# FALSE is actually a blank value, so TRUE matches any not-blank value.
#
# Used configure.ac variables:
+# - $2_(CFLAGS|LIBS)_internal: must be filled to match the internal build
# - enable_$1: should normally not be set manually; use test_$1 instead
# - test_$1: set to no, if the feature shouldn't be tested at all
# - test_system_$1: set to no, if the system library should not be used
#
AC_DEFUN([libo_CHECK_SYSTEM_MODULE], [
AC_ARG_WITH(system-$1,
- AS_HELP_STRING([m4_ifnblank([$6],[--without-system-$1],[--with-system-$1])],
- m4_ifnblank([$6],
+ AS_HELP_STRING([m4_ifnblank([$4],[--without-system-$1],[--with-system-$1])],
+ m4_ifnblank([$4],
[Build and bundle the internal $1.],
[Use $1 from the operating system.])),
-,[m4_ifnblank([$6],[with_system_$1="yes"],[with_system_$1="$with_system_libs"])])
-m4_ifnblank([$7],[
+,[m4_ifnblank([$4],[with_system_$1="yes"],[with_system_$1="$with_system_libs"])])
+m4_ifnblank([$5],[
AC_ARG_ENABLE([$1],
AS_HELP_STRING([--disable-$1],[Disable $1 support.]),
,[enable_$1="yes"])
@@ -42,8 +43,8 @@ if test "$test_$1" != no -a "$enable_$1" != no; then
else
AC_MSG_RESULT([internal])
SYSTEM_$2=
- $2_CFLAGS=$4
- $2_LIBS=$5
+ $2_CFLAGS="${$2_CFLAGS_internal}"
+ $2_LIBS="${$2_LIBS_internal}"
BUILD_TYPE="$BUILD_TYPE $2"
fi
else