improve pdfium linking

This commit is contained in:
John Cupitt 2018-12-12 17:24:49 +00:00
parent b4afd75757
commit 596794c05a
2 changed files with 4 additions and 7 deletions

View File

@ -881,6 +881,7 @@ if test x"$with_pdfium" != x"no"; then
AC_MSG_WARN([PDFium found, disabling poppler]) AC_MSG_WARN([PDFium found, disabling poppler])
with_poppler=no with_poppler=no
fi fi
EXTRA_LIBS_USED="$EXTRA_LIBS_USED $PDFIUM_LIBS"
with_pdfium=yes with_pdfium=yes
],[ ],[
with_pdfium=no with_pdfium=no
@ -1179,7 +1180,7 @@ if test x"$with_jpeg" != x"no"; then
], ],
[FIND_JPEG( [FIND_JPEG(
[with_jpeg="yes (found by search)" [with_jpeg="yes (found by search)"
EXTRA_LIBS_USED="$EXTRA_LIBS_USED -ljpeg" EXTRA_LIBS_USED="$EXTRA_LIBS_USED -ljpeg"
], ],
[AC_MSG_WARN([libjpeg not found; disabling JPEG support]) [AC_MSG_WARN([libjpeg not found; disabling JPEG support])
with_jpeg=no with_jpeg=no

View File

@ -62,7 +62,7 @@ if test "$PDFIUM_LIBS" = ""; then
AC_TRY_LINK([#include <fpdfview.h>], AC_TRY_LINK([#include <fpdfview.h>],
[FPDF_DOCUMENT doc; doc = FPDF_LoadDocument("", "")], [FPDF_DOCUMENT doc; doc = FPDF_LoadDocument("", "")],
[PDFIUM_LIBS="-L${prefix}/lib -lpdfium -lc++ -licuuc"], [PDFIUM_LIBS="${prefix}/lib"],
[PDFIUM_LIBS=no]) [PDFIUM_LIBS=no])
LIBS="$pdfium_save_LIBS" LIBS="$pdfium_save_LIBS"
@ -91,11 +91,7 @@ AC_MSG_RESULT([libraries $pdfium_libraries_result, headers $pdfium_includes_resu
if test x"$PDFIUM_LIBS" != x"no"; then if test x"$PDFIUM_LIBS" != x"no"; then
dir="$PDFIUM_LIBS" dir="$PDFIUM_LIBS"
PDFIUM_LIBS="" PDFIUM_LIBS="-L$dir -lpdfium -lc++ -licuuc"
for i in $pdfium_objects; do
PDFIUM_LIBS="$PDFIUM_LIBS $prefix/lib/pdfium-obj/$i"
done
PDFIUM_LIBS="$PDFIUM_LIBS -L$dir -lm -lpthread"
fi fi
AC_SUBST(PDFIUM_LIBS) AC_SUBST(PDFIUM_LIBS)