summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-21 17:02:31 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2020-09-23 18:13:24 +0200
commit43edf3e45eb5682cfb8f002878dd2051ee3fe701 (patch)
tree22f329129faba8987dccc2dabbfd354a3fa8a43e /configure.ac
parent1e41300a9552f90b3d75d5ffadd31ae42a28d249 (diff)
add an explicit --disable-qrcodegen configure option
Change-Id: If8e965fa955aecdb9e7011bdddc690de9cad0c4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103120 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103158 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac52
1 files changed, 35 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index cdf0ecadf3d9..5e309fd30ac7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1924,6 +1924,10 @@ AC_ARG_WITH(system-hunspell,
[Use libhunspell already on system.]),,
[with_system_hunspell="$with_system_libs"])
+libo_FUZZ_ARG_ENABLE(qrcodegen,
+ AS_HELP_STRING([--disable-qrcodegen],
+ [Disable use of qrcodegen external library.]))
+
AC_ARG_WITH(system-qrcodegen,
AS_HELP_STRING([--with-system-qrcodegen],
[Use libqrcodegen already on system.]),,
@@ -10075,26 +10079,39 @@ AC_SUBST(HUNSPELL_LIBS)
dnl ===================================================================
dnl Check for system qrcodegen
dnl ===================================================================
-AC_MSG_CHECKING([which libqrcodegen to use])
-if test "$with_system_qrcodegen" = "yes"; then
- AC_MSG_RESULT([external])
- SYSTEM_QRCODEGEN=TRUE
- AC_LANG_PUSH([C++])
- AC_CHECK_HEADER(qrcodegen/QrCode.hpp, [],
- [AC_MSG_ERROR(qrcodegen headers not found.)], [#include <stdexcept>])
- AC_CHECK_LIB([qrcodegencpp], [main], [:],
- [ AC_MSG_ERROR(qrcodegen C++ library not found.) ], [])
- QRCODEGEN_LIBS=-lqrcodegencpp
- AC_LANG_POP([C++])
- QRCODEGEN_CFLAGS=$(printf '%s' "$QRCODEGEN_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
- FilterLibs "${QRCODEGEN_LIBS}"
- QRCODEGEN_LIBS="${filteredlibs}"
-else
- AC_MSG_RESULT([internal])
+AC_MSG_CHECKING([whether to use libqrcodegen])
+if test "$enable_libqrcodegen" = "no"; then
+ AC_MSG_RESULT([no])
+ ENABLE_QRCODEGEN=
SYSTEM_QRCODEGEN=
- BUILD_TYPE="$BUILD_TYPE QRCODEGEN"
+else
+ AC_MSG_RESULT([yes])
+ ENABLE_QRCODEGEN=TRUE
+ AC_MSG_CHECKING([which libqrcodegen to use])
+ if test "$with_system_qrcodegen" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_QRCODEGEN=TRUE
+ AC_LANG_PUSH([C++])
+ AC_CHECK_HEADER(qrcodegen/QrCode.hpp, [],
+ [AC_MSG_ERROR(qrcodegen headers not found.)], [#include <stdexcept>])
+ AC_CHECK_LIB([qrcodegencpp], [main], [:],
+ [ AC_MSG_ERROR(qrcodegen C++ library not found.) ], [])
+ QRCODEGEN_LIBS=-lqrcodegencpp
+ AC_LANG_POP([C++])
+ QRCODEGEN_CFLAGS=$(printf '%s' "$QRCODEGEN_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+ FilterLibs "${QRCODEGEN_LIBS}"
+ QRCODEGEN_LIBS="${filteredlibs}"
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_QRCODEGEN=
+ BUILD_TYPE="$BUILD_TYPE QRCODEGEN"
+ fi
+ if test "$ENABLE_QRCODEGEN" = TRUE; then
+ AC_DEFINE(ENABLE_QRCODEGEN)
+ fi
fi
AC_SUBST(SYSTEM_QRCODEGEN)
+AC_SUBST(ENABLE_QRCODEGEN)
AC_SUBST(QRCODEGEN_CFLAGS)
AC_SUBST(QRCODEGEN_LIBS)
@@ -12954,6 +12971,7 @@ AC_CONFIG_HEADERS([config_host/config_mpl.h])
AC_CONFIG_HEADERS([config_host/config_oox.h])
AC_CONFIG_HEADERS([config_host/config_options.h])
AC_CONFIG_HEADERS([config_host/config_options_calc.h])
+AC_CONFIG_HEADERS([config_host/config_qrcodegen.h])
AC_CONFIG_HEADERS([config_host/config_typesizes.h])
AC_CONFIG_HEADERS([config_host/config_vendor.h])
AC_CONFIG_HEADERS([config_host/config_vcl.h])