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

44 lines
1.4 KiB
Diff
Raw Normal View History

2013-06-24 12:14:13 +00:00
diff --git a/Makefile.in b/Makefile.in
index a93a1e6..fb30c19 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -108,6 +108,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE)
+OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@
#### End of system configuration section. ####
diff --git a/common.mk b/common.mk
index e5069e5..ca5e3f9 100644
--- a/common.mk
+++ b/common.mk
@@ -107,7 +107,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT)
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES)
+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES)
GEM_PRELUDE = $(srcdir)/gem_prelude.rb
YES_GEM_PRELUDE = $(GEM_PRELUDE)
NO_GEM_PRELUDE =
diff --git a/configure.in b/configure.in
index 7977aaf..1ef42cd 100644
--- a/configure.in
+++ b/configure.in
@@ -3494,6 +3494,13 @@ AC_SUBST(rubyarchhdrdir)dnl
AC_SUBST(sitearchhdrdir)dnl
AC_SUBST(vendorarchhdrdir)dnl
+AC_ARG_WITH(prelude,
+ AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]),
+ [prelude=$withval])
+if test "$prelude" != ""; then
+ AC_SUBST(OPTIONAL_PRELUDES, $prelude)
+fi
+
AC_ARG_WITH(mantype,
AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]),
[