From fa1a50ad10814f724b8713865dc222724cb955ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 25 Aug 2011 14:33:51 +0200 Subject: [PATCH] Allow to disable versioned paths. --- configure.in | 11 +++++++++++ tool/mkconfig.rb | 9 ++++++--- version.c | 10 ++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index e742e74..86cb68f 100644 --- a/configure.in +++ b/configure.in @@ -2963,6 +2963,17 @@ else fi AC_SUBST(USE_RUBYGEMS) +AC_ARG_ENABLE(versioned-paths, + AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]), + [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes]) +if test x"$enable_versioned_paths" = xno; then + AC_DEFINE(DISABLE_VERSIONED_PATHS, 1) + USE_VERSIONED_PATHS=NO +else + USE_VERSIONED_PATHS=YES +fi +AC_SUBST(USE_VERSIONED_PATHS) + arch_hdrdir="${EXTOUT}/include/${arch}/ruby" AS_MKDIR_P("${arch_hdrdir}") config_h="${arch_hdrdir}/config.h" diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index a2221f0..47d8c8f 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -42,6 +42,7 @@ v_others = [] vars = {} continued_name = nil continued_line = nil +path_version = "/$(ruby_version)" File.foreach "config.status" do |line| next if /^#/ =~ line name = nil @@ -138,6 +139,8 @@ File.foreach "config.status" do |line| case name when "ruby_version" version = val[/\A"(.*)"\z/, 1] + when /^USE_VERSIONED_PATHS$/ + path_version = nil if /NO/ =~ val end end # break if /^CEOF/ @@ -203,15 +206,15 @@ end print(*v_fast) print(*v_others) print < $data_mode) end -- 1.7.6