summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-03-07 08:24:25 -0500
committerAndras Timar <andras.timar@collabora.com>2019-03-08 08:49:46 +0100
commit172f58ca7cdf323971a9e450620c669fe159c327 (patch)
tree80d771dc5570740eff6a6ffc723df19b0e1807ec /configure.ac
parent5accbeaa6fe8aabb26bbcf953c52ec9fb960ea56 (diff)
build: sanity check PDF import configuration
Also remove a minor mis-merge with PRODUCTNAME. Change-Id: I26c54ad52ab53802dc368b0bfcbde84affa46fdd Reviewed-on: https://gerrit.libreoffice.org/68861 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 22 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 9c8f50d5b5e7..9d5b914bfb0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,6 @@ if test -n "$with_product_name" -a "$with_product_name" != no; then
fi
if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
PRODUCTNAME="${PRODUCTNAME}Dev"
- PRODUCTNAME=AC_PACKAGE_NAME
fi
AC_MSG_RESULT([$PRODUCTNAME])
AC_SUBST(PRODUCTNAME)
@@ -10044,10 +10043,21 @@ AC_SUBST([DCONF_CFLAGS])
AC_SUBST([DCONF_LIBS])
AC_SUBST([ENABLE_DCONF])
+# pdf import?
+AC_MSG_CHECKING([whether to build the PDF import feature])
+ENABLE_PDFIMPORT=
+if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
+ AC_MSG_RESULT([yes])
+ ENABLE_PDFIMPORT=TRUE
+ AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
+else
+ AC_MSG_RESULT([no])
+fi
+
# Pdfium?
AC_MSG_CHECKING([whether to build PDFium])
ENABLE_PDFIUM=
-if test -z "$enable_pdfium" -o "$enable_pdfium" = yes; then
+if test \( -z "$enable_pdfium" -a "ENABLE_PDFIMPORT" == "TRUE" \) -o "$enable_pdfium" = yes; then
AC_MSG_RESULT([yes])
ENABLE_PDFIUM=TRUE
AC_DEFINE(HAVE_FEATURE_PDFIUM)
@@ -10061,8 +10071,8 @@ dnl ===================================================================
dnl Check for poppler
dnl ===================================================================
ENABLE_POPPLER=
-AC_MSG_CHECKING([enable poppler])
-if test -z "$enable_poppler" -o "$enable_poppler" = yes; then
+AC_MSG_CHECKING([whether to build Poppler])
+if test \( -z "$enable_poppler" -a "ENABLE_PDFIMPORT" == "TRUE" \) -o "$enable_poppler" = yes; then
AC_MSG_RESULT([yes])
ENABLE_POPPLER=TRUE
AC_DEFINE(HAVE_FEATURE_POPPLER)
@@ -10071,22 +10081,19 @@ else
fi
AC_SUBST(ENABLE_POPPLER)
-# pdf import?
-AC_MSG_CHECKING([whether to build the PDF import feature])
-ENABLE_PDFIMPORT=
-if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_pdfimport" = yes \); then
- AC_MSG_RESULT([yes])
- ENABLE_PDFIMPORT=TRUE
- AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
-else
- AC_MSG_RESULT([no])
+if test "$ENABLE_PDFIMPORT" == "TRUE" -a "$ENABLE_POPPLER" != "TRUE" -a "$ENABLE_PDFIUM" != "TRUE"; then
+ AC_MSG_ERROR([Cannot import PDF without either Pdfium or Poppler; please enable either of them.])
+fi
+
+if test "$ENABLE_PDFIMPORT" != "TRUE" -a \( "$ENABLE_POPPLER" == "TRUE" -o "$ENABLE_PDFIUM" == "TRUE" \); then
+ AC_MSG_ERROR([Cannot enable Pdfium or Poppler when PDF importing is disabled; please enable PDF import first.])
fi
-if test $ENABLE_PDFIMPORT == TRUE -a $ENABLE_POPPLER == TRUE; then
+if test "$ENABLE_PDFIMPORT" == "TRUE" -a "$ENABLE_POPPLER" == "TRUE"; then
dnl ===================================================================
dnl Check for system poppler
dnl ===================================================================
- AC_MSG_CHECKING([which PDF import backend to use])
+ AC_MSG_CHECKING([which PDF import poppler to use])
if test "$with_system_poppler" = "yes"; then
AC_MSG_RESULT([external])
SYSTEM_POPPLER=TRUE