dnl ---- configure.ac for gb.pdf

m4_include([../version.m4])
AC_INIT([gambas3-gb-pdf],[GB_VERSION],[GB_MAIL],[],[GB_URL])
AC_CONFIG_MACRO_DIR([m4])

GB_INIT(gb.pdf)
LT_INIT
PKG_PROG_PKG_CONFIG

GB_COMPONENT_PKG_CONFIG(
  poppler, POPPLER, gb.pdf, [src],
  'poppler >= 0.20'
)

if test "$have_poppler" = "yes"; then

  AC_MSG_CHECKING([for poppler version])
  gb_poppler_version=$($PKG_CONFIG --modversion poppler | (IFS='.' read a b c && printf "0x%02d%02d%02d" $(expr $a + 0) $(expr $b + 0) $(expr $c + 0)))
  AC_DEFINE_UNQUOTED(GB_POPPLER_VERSION, $gb_poppler_version, [Poppler version])
  AC_MSG_RESULT([$gb_poppler_version])

fi

AC_CONFIG_FILES([\
Makefile \
src/Makefile \
])
AC_OUTPUT

GB_PRINT_MESSAGES
