Blame SOURCES/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch

a54e24
From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001
a54e24
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
a54e24
Date: Fri, 4 Oct 2013 22:13:11 +0200
a54e24
Subject: [PATCH] Allow to specify addition preludes by configuration option.
a54e24
a54e24
---
a54e24
 Makefile.in  | 2 ++
a54e24
 common.mk    | 2 +-
a54e24
 configure.ac | 7 +++++++
a54e24
 3 files changed, 10 insertions(+), 1 deletion(-)
a54e24
a54e24
diff --git a/Makefile.in b/Makefile.in
a54e24
index 7e8ed82..7916993 100644
a54e24
--- a/Makefile.in
a54e24
+++ b/Makefile.in
a54e24
@@ -154,6 +154,8 @@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
a54e24
 COROUTINE_H = @X_FIBER_COROUTINE_H@
a54e24
 COROUTINE_OBJ = $(COROUTINE_H:.h=.@OBJEXT@)
a54e24
 
a54e24
+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@
a54e24
+
a54e24
 #### End of system configuration section. ####
a54e24
 
a54e24
 MAJOR=	@MAJOR@
a54e24
diff --git a/common.mk b/common.mk
a54e24
index 5cfbc3d..3f0a82e 100644
a54e24
--- a/common.mk
a54e24
+++ b/common.mk
a54e24
@@ -156,7 +156,7 @@ ALLOBJS       = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
a54e24
 GOLFOBJS      = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
a54e24
 
a54e24
 DEFAULT_PRELUDES = $(GEM_PRELUDE)
a54e24
-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES)
a54e24
+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES)
a54e24
 GEM_PRELUDE   = $(srcdir)/gem_prelude.rb
a54e24
 PRELUDES      = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c
a54e24
 GOLFPRELUDES  = {$(srcdir)}golf_prelude.c
a54e24
diff --git a/configure.ac b/configure.ac
a54e24
index 028ef7ca3e..cdeff87871 100644
a54e24
--- a/configure.ac
a54e24
+++ b/configure.ac
9f47f6
@@ -3872,6 +3872,13 @@ AC_SUBST(rubyarchhdrdir)dnl
a54e24
 AC_SUBST(sitearchhdrdir)dnl
a54e24
 AC_SUBST(vendorarchhdrdir)dnl
a54e24
 
a54e24
+AC_ARG_WITH(prelude,
a54e24
+		AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]),
a54e24
+		[prelude=$withval])
a54e24
+if test "$prelude" != ""; then
a54e24
+    AC_SUBST(OPTIONAL_PRELUDES, $prelude)
a54e24
+fi
a54e24
+
a54e24
 AC_ARG_WITH(mantype,
a54e24
 	AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
a54e24
 		[
a54e24
-- 
a54e24
1.8.3.1
a54e24