Upstream: maybe Description: we should always check for full path (i.e. ZXing/MultiFormatWriter), however those file hierarchy is made by installation step, thus libreoffice must use the non-prefix. Perhap we should changes the file hierarchy of zxing-cpp project instead? --- a/configure.ac +++ b/configure.ac @@ -11777,35 +11777,16 @@ else SYSTEM_ZXING=TRUE ZXING_CFLAGS= AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - save_IFS=$IFS - IFS=$P_SEP - for i in $CPLUS_INCLUDE_PATH /usr/include; do - dnl Reset IFS as soon as possible, to avoid unexpected side effects (and the - dnl "/usr/include" fallback makes sure we get here at least once; resetting rather than - dnl unsetting follows the advice at "Add recommendation on (not) - dnl unsetting IFS."): - IFS=$save_IFS - dnl TODO: GCC and Clang treat empty paths in CPLUS_INCLUDE_PATH like ".", but we simply - dnl ignore them here: - if test -z "$i"; then - continue - fi - dnl TODO: White space in $i would cause problems: - CXXFLAGS="$save_CXXFLAGS ${CXXFLAGS_CXX11} -I$i/ZXing" - AC_CHECK_HEADER(MultiFormatWriter.h, [ZXING_CFLAGS=-I$i/ZXing; break], - [unset ac_cv_header_MultiFormatWriter_h], [#include ]) - done - CXXFLAGS=$save_CXXFLAGS - if test -z "$ZXING_CFLAGS"; then + AC_CHECK_HEADER([ZXing/MultiFormatWriter.h],[],[ AC_MSG_ERROR(zxing headers not found.) - fi + ], [ + AC_INCLUDES_DEFAULT + #include + ]) AC_CHECK_LIB([ZXing], [main], [ZXING_LIBS=-lZXing], [ AC_CHECK_LIB([ZXingCore], [main], [ZXING_LIBS=-lZXingCore], [ AC_MSG_ERROR(zxing C++ library not found.) ])], []) AC_LANG_POP([C++]) - ZXING_CFLAGS=$(printf '%s' "$ZXING_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g") FilterLibs "${ZXING_LIBS}" ZXING_LIBS="${filteredlibs}" else @@ -11822,8 +11803,8 @@ else save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 $ZXING_CFLAGS" AC_COMPILE_IFELSE([AC_LANG_SOURCE([ - #include - #include + #include + #include int main(){ ZXing::BitMatrix matrix(1, 1); matrix.set(0, 0, true); --- a/cui/source/dialogs/QrCodeGenDialog.cxx +++ b/cui/source/dialogs/QrCodeGenDialog.cxx @@ -19,7 +19,7 @@ #include #if ENABLE_ZXING -#include +#include #include #ifdef __GNUC__ @@ -27,20 +27,20 @@ #pragma GCC diagnostic ignored "-Wshadow" #endif -#include -#include -#include +#include +#include +#include #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #if HAVE_ZXING_TOSVG -#include +#include #endif #if ZXING_VERSION_MAJOR < 2 -#include +#include #endif #endif // ENABLE_ZXING