diff --git a/src/common/autoconfig.h.in b/src/common/autoconfig.h.in index 374d11c1..aaea24fd 100644 --- a/src/common/autoconfig.h.in +++ b/src/common/autoconfig.h.in @@ -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 diff --git a/src/configure.ac b/src/configure.ac index bee7ac84..c52e7f8f 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -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])