From 4f44f82090011f76f3ce5419f6e2b1787e4c1ddb Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Fri, 11 Mar 2016 09:08:05 +0100 Subject: Add support for ical to configure.ac Signed-off-by: Olliver Schinagl --- configure.ac | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/configure.ac b/configure.ac index 4396242..6b67627 100644 --- a/configure.ac +++ b/configure.ac @@ -80,6 +80,26 @@ AC_FUNC_MALLOC AC_CHECK_FUNC(dlopen, LIBDL="", [AC_CHECK_LIB([dl], [dlopen], LIBDL="-ldl")]) AC_SUBST(LIBDL) +# Check for libical +AC_ARG_WITH([ical], AS_HELP_STRING([--without-ical], + [Disable iCalendar/caldav support \ + (default is with)])) +AS_IF([test "x${with_ical}" != "xno" ], + AC_CHECK_LIB([ical], [icalparser_new], + AC_CHECK_HEADERS([libical/ical.h], + LIBICAL="-lical" [have_ical=yes], + [have_ical=no]), + [have_ical=no]) + AC_SUBST(LIBICAL), + [have_ical=no] +) +AS_IF([test "x${have_ical}" = "xyes"], + [], + [AS_IF([test "x${with_ical}" = "xyes"], + [AC_MSG_ERROR([Please install libical and its headers])] + )] +) + AC_CONFIG_FILES([ Makefile data/Makefile @@ -115,6 +135,8 @@ echo "Building documentation...: ${build_doc}" echo "Building tests...........: ${have_tests}" echo "Generate coverage .......: ${have_lcov}" echo +echo "Using libical ...........: ${have_ical}" +echo echo "Installation.............: make install (as root if needed, with 'su' or 'sudo')" echo " prefix.................: $prefix" echo -- cgit v0.12