summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
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 bc027616295d..bcf41f4ce668 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1949,6 +1949,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.]),,
@@ -10105,26 +10109,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)
@@ -13001,6 +13018,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])