dnl -*- Autoconf -*- AC_INIT([mumi], [m4_translit(m4_esyscmd([cat VERSION]),m4_newline)]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([gnu color-tests -Wall -Wno-portability foreign]) AM_SILENT_RULES([yes]) dnl Check for required programmes and store their full path in the dnl given variables. The variables are used to substitute dnl placeholders in the scripts. dnl The variables only need to be set manually when they cannot be dnl found via the PATH environment variable. AC_DEFUN([find_or_override_prog], [AC_ARG_VAR($1, override location of $2 executable)dnl AS_IF([test -z "$$1"],dnl [AC_PATH_PROG([$1], [$2], no)dnl if test x"$$1" == x"no" ; then AC_MSG_ERROR([Could not find $2.]) fi ],dnl [AC_MSG_NOTICE([Using $$1 as $2 executable.])])]) find_or_override_prog([SASSC], [sassc]) GUILE_PKG([3.0 2.2]) GUILE_PROGS if test "x$GUILD" = "x"; then AC_MSG_ERROR(['guild' binary not found; please check your Guile installation.]) fi GUILE_MODULE_AVAILABLE([have_json], [(json)]) if test "x$have_json" != "xyes"; then AC_MSG_ERROR([Guile-JSON is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_guile_email], [(email email)]) if test "x$have_guile_email" != "xyes"; then AC_MSG_ERROR([guile-email is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_mailutils], [(mailutils mailutils)]) if test "x$have_mailutils" != "xyes"; then AC_MSG_ERROR([Mailutils is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_gcrypt], [(gcrypt base64)]) if test "x$have_gcrypt" != "xyes"; then AC_MSG_ERROR([Guile Gcrypt is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_guile_redis], [(redis)]) if test "x$have_guile_redis" != "xyes"; then AC_MSG_ERROR([Guile Redis is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_guile_webutils], [(webutils sessions)]) if test "x$have_guile_webutils" != "xyes"; then AC_MSG_ERROR([Guile Webutils is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_guile_xapian], [(xapian xapian)]) if test "x$have_guile_xapian" != "xyes"; then AC_MSG_ERROR([Guile Xapian is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_fibers], [(fibers web server)]) if test "x$have_fibers" != "xyes"; then AC_MSG_ERROR([Guile fibers is missing; please install it.]) fi GUILE_MODULE_AVAILABLE([have_kolam], [(kolam graphql)]) if test "x$have_kolam" != "xyes"; then AC_MSG_ERROR([Guile kolam is missing; please install it.]) fi guilemoduledir="${datarootdir}/guile/site/${GUILE_EFFECTIVE_VERSION}" AC_SUBST([guilemoduledir]) AC_SUBST([GUILE_EFFECTIVE_VERSION]) dnl Substitute placeholders to generate these target files AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([mumi/config.scm]) AC_CONFIG_FILES([scripts/mumi], [chmod +x scripts/mumi]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) AC_OUTPUT