From 01b2a2ddaa75f10bad3438e0bb4aa5d8c5463391 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 14 Feb 2019 09:30:11 +0100 Subject: [PATCH] configure: python-chm: check for libchm if option is set --- src/common/autoconfig.h.in | 3 +++ src/configure.ac | 5 +++++ 2 files changed, 8 insertions(+) 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])