Project

General

Profile

Feature #3399 ยป rbconfig.rb

jojelino (jojelino _), 06/07/2010 02:18 AM

 
1

    
2
# This file was created by mkconfig.rb when ruby was built.  Any
3
# changes made to this file will be lost the next time ruby is built.
4

    
5
module RbConfig
6
  RUBY_VERSION == "1.9.3" or
7
    raise "ruby lib version (1.9.3) doesn't match executable version (#{RUBY_VERSION})"
8

    
9
  TOPDIR = File.dirname(__FILE__).chomp!("/lib/ruby/1.9.1/i386-mingw32")
10
  DESTDIR = TOPDIR && TOPDIR[/\A[a-z]:/i] || '' unless defined? DESTDIR
11
  CONFIG = {}
12
  CONFIG["DESTDIR"] = DESTDIR
13
  CONFIG["MAJOR"] = "1"
14
  CONFIG["MINOR"] = "9"
15
  CONFIG["TEENY"] = "1"
16
  CONFIG["PATCHLEVEL"] = "-1"
17
  CONFIG["INSTALL"] = '/usr/bin/ginstall -c'
18
  CONFIG["EXEEXT"] = ".exe"
19
  CONFIG["prefix"] = (TOPDIR || DESTDIR + "/usr/mingw")
20
  CONFIG["ruby_install_name"] = "ruby"
21
  CONFIG["RUBY_INSTALL_NAME"] = "ruby"
22
  CONFIG["RUBY_SO_NAME"] = "msvcrt-ruby191"
23
  CONFIG["PACKAGE"] = "ruby"
24
  CONFIG["BUILTIN_TRANSSRCS"] = " newline.c"
25
  CONFIG["MANTYPE"] = "doc"
26
  CONFIG["NROFF"] = "/usr/bin/nroff"
27
  CONFIG["vendorhdrdir"] = "$(rubyhdrdir)/vendor_ruby"
28
  CONFIG["sitehdrdir"] = "$(rubyhdrdir)/site_ruby"
29
  CONFIG["rubyhdrdir"] = "$(includedir)/$(RUBY_BASE_NAME)-$(ruby_version)"
30
  CONFIG["UNIVERSAL_INTS"] = ""
31
  CONFIG["UNIVERSAL_ARCHNAMES"] = ""
32
  CONFIG["configure_args"] = " 'optflags=-mno-cygwin -O4' '--enable-load-relative' '--target=i686-pc-mingw32' '--prefix=/usr/mingw' '--disable-install-doc' 'target_alias=i686-pc-mingw32'"
33
  CONFIG["vendordir"] = "$(rubylibprefix)/vendor_ruby"
34
  CONFIG["sitedir"] = "$(rubylibprefix)/site_ruby"
35
  CONFIG["ruby_version"] = "1.9.1"
36
  CONFIG["sitearch"] = "i386-msvcrt"
37
  CONFIG["arch"] = "i386-mingw32"
38
  CONFIG["RI_BASE_NAME"] = "ri"
39
  CONFIG["ridir"] = "$(datarootdir)/$(RI_BASE_NAME)"
40
  CONFIG["rubylibprefix"] = "$(libdir)/$(RUBY_BASE_NAME)"
41
  CONFIG["MAKEFILES"] = "Makefile GNUmakefile"
42
  CONFIG["THREAD_MODEL"] = "win32"
43
  CONFIG["EXPORT_PREFIX"] = " "
44
  CONFIG["COMMON_HEADERS"] = "winsock2.h windows.h"
45
  CONFIG["COMMON_MACROS"] = ""
46
  CONFIG["COMMON_LIBS"] = "m"
47
  CONFIG["MAINLIBS"] = ""
48
  CONFIG["ENABLE_SHARED"] = "yes"
49
  CONFIG["DLDLIBS"] = ""
50
  CONFIG["SOLIBS"] = "$(LIBS)"
51
  CONFIG["LIBRUBYARG_SHARED"] = "-l$(RUBY_SO_NAME)"
52
  CONFIG["LIBRUBYARG_STATIC"] = "-l$(RUBY_SO_NAME)-static"
53
  CONFIG["LIBRUBYARG"] = "$(LIBRUBYARG_SHARED)"
54
  CONFIG["LIBRUBY"] = "lib$(RUBY_SO_NAME).dll.a"
55
  CONFIG["LIBRUBY_ALIASES"] = ""
56
  CONFIG["LIBRUBY_SO"] = "$(RUBY_SO_NAME).dll"
57
  CONFIG["LIBRUBY_A"] = "lib$(RUBY_SO_NAME)-static.a"
58
  CONFIG["RUBYW_INSTALL_NAME"] = "$(RUBYW_BASE_NAME)"
59
  CONFIG["rubyw_install_name"] = "$(RUBYW_INSTALL_NAME)"
60
  CONFIG["LIBRUBY_DLDFLAGS"] = " -mno-cygwin -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=$(LIBRUBY) $(RUBYDEF)"
61
  CONFIG["LIBRUBY_LDSHARED"] = "$(CC) -mno-cygwin -shared $(if $(filter-out -g -g0,$(debugflags)),,-g3)"
62
  CONFIG["warnflags"] = "-Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long"
63
  CONFIG["debugflags"] = "-g"
64
  CONFIG["optflags"] = "-mno-cygwin -O4"
65
  CONFIG["cxxflags"] = " $(optflags) $(debugflags) $(warnflags)"
66
  CONFIG["cflags"] = " $(optflags) $(debugflags) $(warnflags)"
67
  CONFIG["cppflags"] = ""
68
  CONFIG["INSTALLDOC"] = "nodoc"
69
  CONFIG["RDOCTARGET"] = "nodoc"
70
  CONFIG["EXECUTABLE_EXTS"] = ".exe .com .cmd .bat"
71
  CONFIG["ARCHFILE"] = ""
72
  CONFIG["EXTOUT"] = ".ext"
73
  CONFIG["PREP"] = "miniruby$(EXEEXT)"
74
  CONFIG["TEST_RUNNABLE"] = "yes"
75
  CONFIG["setup"] = "Setup"
76
  CONFIG["EXTSTATIC"] = ""
77
  CONFIG["STRIP"] = "strip"
78
  CONFIG["TRY_LINK"] = ""
79
  CONFIG["LIBPATHENV"] = ""
80
  CONFIG["RPATHFLAG"] = ""
81
  CONFIG["LIBPATHFLAG"] = " -L%s"
82
  CONFIG["LINK_SO"] = ""
83
  CONFIG["LIBEXT"] = "a"
84
  CONFIG["DLEXT2"] = ""
85
  CONFIG["DLEXT"] = "so"
86
  CONFIG["LDSHAREDXX"] = "$(CXX) -mno-cygwin -shared $(if $(filter-out -g -g0,$(debugflags)),,-g3)"
87
  CONFIG["LDSHARED"] = "$(CC) -mno-cygwin -shared $(if $(filter-out -g -g0,$(debugflags)),,-g3)"
88
  CONFIG["CCDLFLAGS"] = " -mno-cygwin "
89
  CONFIG["STATIC"] = ""
90
  CONFIG["ARCH_FLAG"] = ""
91
  CONFIG["DLDFLAGS"] = " -mno-cygwin  -Wl,--enable-auto-image-base,--enable-auto-import $(DEFFILE)"
92
  CONFIG["ALLOCA"] = ""
93
  CONFIG["CHDIR"] = "cd -P"
94
  CONFIG["RMALL"] = "rm -fr"
95
  CONFIG["RMDIRS"] = "rmdir -p"
96
  CONFIG["CP"] = "cp"
97
  CONFIG["RM"] = "rm -f"
98
  CONFIG["CAPITARGET"] = "nodoc"
99
  CONFIG["DOXYGEN"] = "doxygen"
100
  CONFIG["DOT"] = ""
101
  CONFIG["MAKEDIRS"] = "/usr/bin/mkdir -p"
102
  CONFIG["MKDIR_P"] = "/usr/bin/mkdir -p"
103
  CONFIG["INSTALL_DATA"] = "$(INSTALL) -m 644"
104
  CONFIG["INSTALL_SCRIPT"] = "$(INSTALL)"
105
  CONFIG["INSTALL_PROGRAM"] = "$(INSTALL)"
106
  CONFIG["SET_MAKE"] = ""
107
  CONFIG["LN_S"] = "ln -s"
108
  CONFIG["DLLWRAP"] = "dllwrap"
109
  CONFIG["WINDRES"] = "windres"
110
  CONFIG["NM"] = "nm"
111
  CONFIG["OBJCOPY"] = ":"
112
  CONFIG["OBJDUMP"] = "objdump"
113
  CONFIG["ASFLAGS"] = ""
114
  CONFIG["AS"] = "as"
115
  CONFIG["AR"] = "ar"
116
  CONFIG["RANLIB"] = "ranlib"
117
  CONFIG["try_header"] = ""
118
  CONFIG["COUTFLAG"] = "-o "
119
  CONFIG["OUTFLAG"] = "-o "
120
  CONFIG["CPPOUTFILE"] = "-o conftest.i"
121
  CONFIG["GNU_LD"] = "yes"
122
  CONFIG["GCC"] = "yes"
123
  CONFIG["EGREP"] = "/usr/bin/grep -E"
124
  CONFIG["GREP"] = "/usr/bin/grep"
125
  CONFIG["CPP"] = "$(CC) -E"
126
  CONFIG["CXXFLAGS"] = "$(cxxflags)"
127
  CONFIG["CXX"] = "g++"
128
  CONFIG["OBJEXT"] = "o"
129
  CONFIG["CPPFLAGS"] = " $(DEFS) $(cppflags)"
130
  CONFIG["LDFLAGS"] = "-L. -mno-cygwin "
131
  CONFIG["CFLAGS"] = "$(cflags)"
132
  CONFIG["CC"] = "gcc"
133
  CONFIG["target_os"] = "mingw32"
134
  CONFIG["target_vendor"] = "pc"
135
  CONFIG["target_cpu"] = "i386"
136
  CONFIG["target"] = "i386-pc-mingw32"
137
  CONFIG["host_os"] = "cygwin"
138
  CONFIG["host_vendor"] = "pc"
139
  CONFIG["host_cpu"] = "i686"
140
  CONFIG["host"] = "i686-pc-cygwin"
141
  CONFIG["build_os"] = "cygwin"
142
  CONFIG["build_vendor"] = "pc"
143
  CONFIG["build_cpu"] = "i686"
144
  CONFIG["build"] = "i686-pc-cygwin"
145
  CONFIG["RUBYW_BASE_NAME"] = "rubyw"
146
  CONFIG["RUBY_BASE_NAME"] = "ruby"
147
  CONFIG["RUBY_RELEASE_DATE"] = "2010-06-05"
148
  CONFIG["RUBY_PROGRAM_VERSION"] = "1.9.3"
149
  CONFIG["BASERUBY"] = "ruby"
150
  CONFIG["target_alias"] = "i386-pc-mingw32"
151
  CONFIG["host_alias"] = ""
152
  CONFIG["build_alias"] = ""
153
  CONFIG["LIBS"] = " -mno-cygwin -lshell32 -lws2_32 -limagehlp "
154
  CONFIG["ECHO_T"] = ""
155
  CONFIG["ECHO_N"] = "-n"
156
  CONFIG["ECHO_C"] = ""
157
  CONFIG["DEFS"] = ""
158
  CONFIG["mandir"] = "$(datarootdir)/man"
159
  CONFIG["localedir"] = "$(datarootdir)/locale"
160
  CONFIG["libdir"] = "$(exec_prefix)/lib"
161
  CONFIG["psdir"] = "$(docdir)"
162
  CONFIG["pdfdir"] = "$(docdir)"
163
  CONFIG["dvidir"] = "$(docdir)"
164
  CONFIG["htmldir"] = "$(docdir)"
165
  CONFIG["infodir"] = "$(datarootdir)/info"
166
  CONFIG["docdir"] = "$(datarootdir)/doc/$(PACKAGE)"
167
  CONFIG["oldincludedir"] = "/usr/include"
168
  CONFIG["includedir"] = "$(prefix)/include"
169
  CONFIG["localstatedir"] = "$(prefix)/var"
170
  CONFIG["sharedstatedir"] = "$(prefix)/com"
171
  CONFIG["sysconfdir"] = "$(prefix)/etc"
172
  CONFIG["datadir"] = "$(datarootdir)"
173
  CONFIG["datarootdir"] = "$(prefix)/share"
174
  CONFIG["libexecdir"] = "$(exec_prefix)/libexec"
175
  CONFIG["sbindir"] = "$(exec_prefix)/sbin"
176
  CONFIG["bindir"] = "$(exec_prefix)/bin"
177
  CONFIG["exec_prefix"] = "$(prefix)"
178
  CONFIG["PACKAGE_URL"] = ""
179
  CONFIG["PACKAGE_BUGREPORT"] = ""
180
  CONFIG["PACKAGE_STRING"] = ""
181
  CONFIG["PACKAGE_VERSION"] = ""
182
  CONFIG["PACKAGE_TARNAME"] = ""
183
  CONFIG["PACKAGE_NAME"] = ""
184
  CONFIG["PATH_SEPARATOR"] = ":"
185
  CONFIG["SHELL"] = "/bin/sh"
186
  CONFIG["rubylibdir"] = "$(rubylibprefix)/$(ruby_version)"
187
  CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
188
  CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
189
  CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
190
  CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
191
  CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
192
  CONFIG["topdir"] = File.dirname(__FILE__)
193
  MAKEFILE_CONFIG = {}
194
  CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
195
  def RbConfig::expand(val, config = CONFIG)
196
    newval = val.gsub(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) {
197
      var = $&
198
      if !(v = $1 || $2)
199
	'$'
200
      elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
201
	pat, sub = $1, $2
202
	config[v] = false
203
	config[v] = RbConfig::expand(key, config)
204
	key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
205
	key
206
      else
207
	var
208
      end
209
    }
210
    val.replace(newval) unless newval == val
211
    val
212
  end
213
  CONFIG.each_value do |val|
214
    RbConfig::expand(val)
215
  end
216

    
217
  # returns the absolute pathname of the ruby command.
218
  def RbConfig.ruby
219
    File.join(
220
      RbConfig::CONFIG["bindir"],
221
      RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
222
    )
223
  end
224
end
225
Config = RbConfig # compatibility for ruby-1.8.4 and older.
226
CROSS_COMPILING = nil unless defined? CROSS_COMPILING