aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-10-09 05:27:29 +0800
committerDan Vrátil <dvratil@redhat.com>2012-10-09 05:27:29 +0800
commit5437fa7c354b5ddf12b4e13136834d86168e3580 (patch)
tree30f8236f3ce563a40aeadfdbb3eb18b90b2f219c /configure.ac
parent1cfe0327ca436a687383412664e3a5c2869c7dda (diff)
downloadgsoc2013-evolution-5437fa7c354b5ddf12b4e13136834d86168e3580.tar.gz
gsoc2013-evolution-5437fa7c354b5ddf12b4e13136834d86168e3580.tar.zst
gsoc2013-evolution-5437fa7c354b5ddf12b4e13136834d86168e3580.zip
Bug #684447 - Check for highlight during configure.
If the highlight program cannot be found width AC_PATH_PROGS, configure will abort with an error message. You can either a) install highlight b) specify the patch with HIGHLIGHT=/path/to/highlight c) pass --disable-text-highlight to configure to exclude the module This also makes text-highlight module to fallback to text/plain formatter when highlight program would crash or fail to ensure the content is delivered to user.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 95f6ca979b..db4a7af05f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1312,6 +1312,35 @@ fi
AM_CONDITIONAL([ENABLE_AUDIO_INLINE], [test "x$enable_audio_inline" = "xyes"])
+dnl **************************************************
+dnl text-highlight plugins requires highlight utility
+dnl **************************************************
+AC_ARG_ENABLE([text-highlight],
+ [AS_HELP_STRING([--enable-text-highlight],
+ [Enable text-highlight plugin (default=yes)])],
+ [enable_text_highlight="$enableval"], [enable_text_highlight=yes])
+AC_MSG_CHECKING([if source code highlighting support is enabled])
+AC_MSG_RESULT([$enable_text_highlight])
+msg_text_highlight="$enable_text_highlight"
+if test "x$enable_text_highlight" = "xyes"; then
+ AC_ARG_VAR([HIGHLIGHT], [Source code highlighting utility])
+ AC_PATH_PROG([HIGHLIGHT], [highlight])
+ if test "x$HIGHLIGHT" == "x"; then
+ AC_MSG_ERROR([
+
+ Highlight utility not found.
+
+ If you want to disable text-highlight plugin,
+ please append --disable-text-highlight to configure.])
+ fi
+ AC_DEFINE_UNQUOTED(
+ HIGHLIGHT_COMMAND, "$HIGHLIGHT",
+ [Source code highlighting utility])
+
+ msg_text_highlight="$msg_text_highlight ($HIGHLIGHT)"
+fi
+AM_CONDITIONAL([ENABLE_TEXT_HIGHLIGHT], [test "x$enable_text_highlight" = "xyes"])
+
dnl **************************************
dnl Weather calendars require gweather-3.0
dnl **************************************
@@ -1685,6 +1714,7 @@ echo "
SMIME support: $msg_smime
Bogofilter support: $msg_bogofilter
SpamAssassin support: $msg_spamassassin
+ Highlight support: $msg_text_highlight
Plugins: $msg_plugins
User documentation: $with_help
"