Blame SOURCES/libidn-1.33-Allow-disabling-Emacs-support.patch

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