From e028c0e5442c1b202dd73b38f54314da01bd4957 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 26 Jul 2014 14:56:40 +0000 Subject: [PATCH] configure: use new poppler-data pkg-config file if available. poppler-data package would now advertize its datadir path with a pkg-config file. This is better than having to guess it from poppler's prefix, or having the package builder manually set --datarootdir. --- configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 9436fdd..ea6b045 100644 --- a/configure.ac +++ b/configure.ac @@ -105,7 +105,12 @@ if test x$enable_relocatable = xyes; then fi fi -AC_DEFINE_DIR(POPPLER_DATADIR, "{datarootdir}/poppler", [Poppler data dir]) +dnl ##### Check for installed poppler-data. Use the same datarootdir as default otherwise. +PKG_CHECK_EXISTS(poppler-data, + [POPPLER_DATADIR=`$PKG_CONFIG --variable=poppler_datadir poppler-data` + AC_DEFINE_DIR(POPPLER_DATADIR, "{POPPLER_DATADIR}", [Poppler data dir])], + [AC_DEFINE_DIR(POPPLER_DATADIR, "{datarootdir}/poppler", [Poppler data dir])] + ) dnl ##### Checks for header files. AC_PATH_XTRA -- 1.8.1.2