configure: python-chm: check for libchm if option is set

This commit is contained in:
Jean-Francois Dockes 2019-02-14 09:30:11 +01:00
parent 34c345be93
commit 01b2a2ddaa
2 changed files with 8 additions and 0 deletions

View File

@ -33,6 +33,9 @@
/* Define to 1 if you have the `kqueue' function. */
#undef HAVE_KQUEUE
/* Define to 1 if you have the `chm' library (-lchm). */
#undef HAVE_LIBCHM
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL

View File

@ -257,6 +257,11 @@ AC_ARG_ENABLE(python-chm, AC_HELP_STRING([--disable-python-chm],
[Do not build the libchm Python wrapper.]),
pythonChmEnabled=$enableval, pythonChmEnabled=yes)
if test X$pythonChmEnabled = Xyes; then
AC_CHECK_LIB([chm], [chm_resolve_object], [],
[AC_MSG_ERROR([--enable-python-chm is set but libchm is not found])])
fi
AM_CONDITIONAL(MAKEPYTHONCHM, [test X$pythonChmEnabled = Xyes])