9b5df2
From d011a6ae00ce9abd445d6d01ce9131a7b97ef5bc Mon Sep 17 00:00:00 2001
9b5df2
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
9b5df2
Date: Tue, 3 Oct 2017 10:04:18 +0200
9b5df2
Subject: [PATCH] Allow disabling Emacs support
9b5df2
MIME-Version: 1.0
9b5df2
Content-Type: text/plain; charset=UTF-8
9b5df2
Content-Transfer-Encoding: 8bit
9b5df2
9b5df2
This patch adds --disable-emacs configure option to disable installing
9b5df2
LISP scripts for Emacs.
9b5df2
9b5df2
Signed-off-by: Petr Písař <ppisar@redhat.com>
9b5df2
---
9b5df2
 configure.ac    | 9 ++++++++-
9b5df2
 src/Makefile.am | 2 ++
9b5df2
 2 files changed, 10 insertions(+), 1 deletion(-)
9b5df2
9b5df2
diff --git a/configure.ac b/configure.ac
9b5df2
index 649ddcd..a6dc9ff 100644
9b5df2
--- a/configure.ac
9b5df2
+++ b/configure.ac
9b5df2
@@ -50,7 +50,6 @@ AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
9b5df2
 AM_GNU_GETTEXT(external)
9b5df2
 AM_GNU_GETTEXT_VERSION(0.19.3)
9b5df2
 AM_ICONV
9b5df2
-AM_PATH_LISPDIR
9b5df2
 
9b5df2
 if test "$am_cv_func_iconv" != "yes"; then
9b5df2
   AC_MSG_NOTICE([
9b5df2
@@ -100,6 +99,14 @@ AM_CONDITIONAL(JAVA, test "$enable_java" != "no")
9b5df2
 AC_MSG_CHECKING([if implementation in Java should be built])
9b5df2
 AC_MSG_RESULT($enable_java)
9b5df2
 
9b5df2
+# Check for Emacs
9b5df2
+AC_ARG_ENABLE(emacs, AC_HELP_STRING([--disable-emacs], [disable Emacs support]),
9b5df2
+		enable_emacs=$enableval, enable_emacs=yes)
9b5df2
+AM_CONDITIONAL(EMACS, test "$enable_emacs" != "no")
9b5df2
+if test "$enable_emacs" != "no"; then
9b5df2
+    AM_PATH_LISPDIR
9b5df2
+fi
9b5df2
+
9b5df2
 # Check for C#
9b5df2
 if test -n "$HAVE_CSHARPCOMP"; then
9b5df2
   gt_CSHARPEXEC
9b5df2
diff --git a/src/Makefile.am b/src/Makefile.am
9b5df2
index 6832c20..ec99560 100644
9b5df2
--- a/src/Makefile.am
9b5df2
+++ b/src/Makefile.am
9b5df2
@@ -20,7 +20,9 @@ AM_CFLAGS = $(WERROR_CFLAGS) $(WARN_CFLAGS)
9b5df2
 AM_CPPFLAGS = -I$(top_srcdir)/lib -I../lib -I$(top_srcdir)/gl -I../gl
9b5df2
 AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\"
9b5df2
 
9b5df2
+if EMACS
9b5df2
 dist_lisp_DATA = punycode.el idna.el
9b5df2
+endif
9b5df2
 
9b5df2
 bin_PROGRAMS = idn
9b5df2
 idn_SOURCES = idn.c
9b5df2
-- 
9b5df2
2.13.6
9b5df2