Blob Blame History Raw
diff --git a/Makefile.in b/Makefile.in
index a93a1e6..fb30c19 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -111,6 +111,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
@@ -3559,6 +3559,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]),
 		[