UNPKG

libzim

Version:

Bindings to zimlib (read/write OpenZIM files)

82 lines (63 loc) 2.06 kB
AC_INIT(zimwriter, 0.92, [Tommi Maekitalo <tommi@tntnet.org>]) AM_INIT_AUTOMAKE([subdir-objects]) abi_current=1 abi_revision=0 abi_age=0 sonumber=${abi_current}:${abi_revision}:${abi_age} AC_SUBST(sonumber) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_SRCDIR([src/filesource.cpp]) AC_PROG_CXX AC_PROG_LIBTOOL AC_LANG(C++) AC_CHECK_HEADER([zim/file.h], , AC_MSG_ERROR([zimlib headers not found])) AC_CHECK_HEADER([tntdb/connect.h], , AC_MSG_ERROR([tntdb headers not found])) AC_COMPILE_IFELSE( [AC_LANG_SOURCE([#include <zim/article.h> void foo() { zim::Article a; a.getUrl(); }])] ,, AC_MSG_ERROR([zimlibrary do not work - please update])) # # compression algorithms # # zlib AC_ARG_ENABLE([zlib], AS_HELP_STRING([--enable-zlib], [add support for zlib compression (disabled by default)]), [enable_zlib=$enableval], [enable_zlib=no]) if test "$enable_zlib" = "yes" then AC_CHECK_HEADER([zlib.h], , AC_MSG_ERROR([zlib header not found])) AC_DEFINE(ENABLE_ZLIB, [1], [defined if zlib compression is enabled]) fi AM_CONDITIONAL(WITH_ZLIB, test "$enable_zlib" = "yes") # bzip2 AC_ARG_ENABLE([bzip2], AS_HELP_STRING([--enable-bzip2], [add support for bzip2 compression (disabled by default)]), [enable_bzip2=$enableval], [enable_bzip2=no]) if test "$enable_bzip2" = "yes" then AC_CHECK_HEADER([bzlib.h], , AC_MSG_ERROR([bzip2 header files not found])) AC_DEFINE(ENABLE_BZIP2, [1], [defined if bzip2 compression is enabled]) fi AM_CONDITIONAL(WITH_BZIP2, test "$enable_bzip2" = "yes") # lzma AC_ARG_ENABLE([lzma], AS_HELP_STRING([--disable-lzma], [add support for lzma compression (enabled by default)]), [enable_lzma=$enableval], [enable_lzma=yes]) if test "$enable_lzma" = "yes" then AC_CHECK_HEADER([lzma.h], , AC_MSG_ERROR([lzma header files not found])) AC_DEFINE(ENABLE_LZMA, [1], [defined if lzma compression is enabled]) fi AM_CONDITIONAL(WITH_LZMA, test "$enable_lzma" = "yes") # output AC_CONFIG_FILES([ Makefile src/Makefile include/Makefile test/Makefile ]) AC_OUTPUT