summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-31 13:24:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-31 13:24:27 +0000
commit0f52655b0685e67ad1b4292b52f3194870e804fa (patch)
treefb99aa2a2765656ccc844b44cf57087803ce4a26
parent78711606b3c5e3eec4906ccc9992d7bf72cfe14e (diff)
* lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case
insensitive file system platforms. * README.EXT, README.EXT.ja (Appendix C): utility functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--README.EXT52
-rw-r--r--README.EXT.ja58
-rw-r--r--lib/mkmf.rb6
4 files changed, 124 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 018d103423..234211e75a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Mar 31 22:23:51 2005 Nobuyoshi Nakada <[email protected]>
+
+ * lib/mkmf.rb (SRC_EXT): exclude just case different suffixes on case
+ insensitive file system platforms.
+
+ * README.EXT, README.EXT.ja (Appendix C): utility functions.
+
Thu Mar 31 14:08:43 2005 GOTOU Yuuzou <[email protected]>
* ext/openssl/ossl_engine.c (ossl_engine_s_load): should return
@@ -6,13 +13,13 @@ Thu Mar 31 14:08:43 2005 GOTOU Yuuzou <[email protected]>
Thu Mar 31 11:07:50 2005 Kouhei Sutou <[email protected]>
* lib/rss/parser.rb: @@setter -> @@setters.
-
+
* lib/rss/parser.rb
(RSS::BaseListener.register_uri)
(RSS::BaseListener.uri_registered?)
(RSS::BaseListener.install_get_text_element):
swapped the first argument and the second argument.
-
+
* lib/rss/taxonomy.rb: swapped the first argument and the second
argument for RSS::BaseListener.install_get_text_element.
* lib/rss/image.rb: ditto.
diff --git a/README.EXT b/README.EXT
index aa9c27b51b..d47973749b 100644
--- a/README.EXT
+++ b/README.EXT
@@ -1031,6 +1031,11 @@ Appendix C. Functions Available in extconf.rb
These functions are available in extconf.rb:
+ have_macro(macro, headers)
+
+Checks whether macro is defined with header. Returns true if the macro
+is defined.
+
have_library(lib, func)
Checks whether the library exists, containing the specified function.
@@ -1047,20 +1052,61 @@ Checks whether func exists with header. Returns true if the function
exists. To check functions in an additional library, you need to
check that library first using have_library().
+ have_var(var, header)
+
+Checks whether var exists with header. Returns true if the variable
+exists. To check variables in an additional library, you need to
+check that library first using have_library().
+
have_header(header)
Checks whether header exists. Returns true if the header file exists.
+ find_header(header, path...)
+
+Checks whether header exists in path. Returns true if the header file
+exists.
+
+ have_struct_member(type, member, header)
+
+Checks whether type has member with header. Returns true if the type
+is defined and has the member.
+
+ have_type(type, header, opt)
+
+Checks whether type is defined with header. Returns true if the type
+is defined.
+
+ check_sizeof(type, header)
+
+Checks the size of type in char with header. Returns the size if the
+type is defined, otherwise nil.
+
create_makefile(target)
Generates the Makefile for the extension library. If you don't invoke
this method, the compilation will not be done.
+ find_executable(bin, path)
+
+Finds command in path, which is File::PATH_SEPARATOR-separated list of
+directories. If path is nil or omitted, environment varialbe PATH
+will be used. Returns the path name of the command if it is found,
+otherwise nil.
+
with_config(withval[, default=nil])
Parses the command line options and returns the value specified by
--with-<withval>.
+ enable_config(config, *defaults)
+ disable_config(config, *defaults)
+
+Parses the command line options for boolean. Returns true if
+--enable-<config> is given, or false if --disable-<config> is given.
+Otherwise, yields defaults to the given block and returns the result
+if it is called with a block, or returns defaults.
+
dir_config(target[, default_dir])
dir_config(target[, default_include, default_lib])
@@ -1070,6 +1116,12 @@ to $CFLAGS and/or $LDFLAGS. --with-<target>-dir=/path is equivalent to
--with-<target>-include=/path/include --with-<target>-lib=/path/lib.
Returns an array of the added directories ([include_dir, lib_dir]).
+ pkg_config(pkg)
+
+Obtains the information of pkg by pkg-config command. The actual
+command name can be overriden by --with-pkg-config command line
+option.
+
/*
* Local variables:
* fill-column: 70
diff --git a/README.EXT.ja b/README.EXT.ja
index 62ed8a3d98..c7824698bd 100644
--- a/README.EXT.ja
+++ b/README.EXT.ja
@@ -1149,6 +1149,12 @@ Appendix C. extconf.rb�ǻȤ���ؿ�����
extconf.rb����Ǥ����Ѳ�ǽ�ʥ���ѥ���������å��δؿ��ϰ�
�����̤�Ǥ��롥
+have_macro(macro, headers)
+
+ �إå��ե�����header�򥤥󥯥롼�ɤ��ƥޥ���macro�������
+ ��Ƥ��뤫�ɤ��������å����롥�ޥ������������Ƥ����true
+ ���֤���
+
have_library(lib, func)
�ؿ�func��������Ƥ���饤�֥��lib��¸�ߤ�����å����롥
@@ -1166,21 +1172,67 @@ have_func(func, header)
����ˤ����have_library�Ǥ��Υ饤�֥�������å����Ƥ���
�����ؿ���¸�ߤ����true���֤���
+have_var(var, header)
+
+ �إå��ե�����header�򥤥󥯥롼�ɤ����ѿ�var��¸�ߤ������
+ �����롥var��ɸ��Ǥϥ�󥯤���ʤ��饤�֥����Τ�ΤǤ�
+ ����ˤ����have_library�Ǥ��Υ饤�֥�������å����Ƥ���
+ �����ѿ���¸�ߤ����true���֤���
+
have_header(header)
�إå��ե������¸�ߤ�����å����롥�إå��ե����뤬¸�ߤ�
���true���֤���
+find_header(header, path...)
+
+ �إå��ե�����header��¸�ߤ� -Ipath ���ɲä��ʤ�������å�
+ ���롥�إå��ե����뤬���դ��ä�����true���֤���
+
+have_struct_member(type, member, header)
+
+ �إå��ե�����header�򥤥󥯥롼�ɤ��Ʒ�type�˥���member
+ ��¸�ߤ��뤫������å����롥type���������Ƥ��ơ�member��
+ ���Ĥ����true���֤���
+
+have_type(type, header, opt)
+
+ �إå��ե�����header�򥤥󥯥롼�ɤ��Ʒ�type��¸�ߤ��뤫��
+ �����å����롥type���������Ƥ����true���֤���
+
+check_sizeof(type, header)
+
+ �إå��ե�����header�򥤥󥯥롼�ɤ��Ʒ�type��charñ�̥���
+ ����Ĵ�٤롥type���������Ƥ�������Υ��������֤��������
+ ��Ƥ��ʤ��Ȥ���nil���֤���
+
create_makefile(target)
��ĥ�饤�֥���Ѥ�Makefile���������롥���δؿ���ƤФʤ���
�Ф��Υ饤�֥��ϥ���ѥ��뤵��ʤ���target�ϥ⥸�塼��̾
��ɽ����
+find_executable(command, path)
+
+ ���ޥ��command��File::PATH_SEPARATOR�Ƕ��ڤ�줿�ѥ�̾��
+ �ꥹ��path����õ����path��nil�ޤ��Ͼ�ά���줿���ϡ��Ķ�
+ �ѿ�PATH���ͤ���Ѥ��롥�¹Բ�ǽ�ʥ��ޥ�ɤ����Ĥ��ä����
+ �ϥѥ���ޤ�ե�����̾�����Ĥ���ʤ��ä�����nil���֤���
+
with_config(withval[, default=nil])
���ޥ�ɥ饤����--with-<withval>�ǻ��ꤵ�줿���ץ�����ͤ����롥
+enable_config(config, *defaults)
+disable_config(config, *defaults)
+
+ ���ޥ�ɥ饤����--enable-<config>�ޤ���
+ --disable-<config>�ǻ��ꤵ�줿�����ͤ����롥
+ --enable-<config>�����ꤵ��Ƥ�������true��
+ --disable-<config>�����ꤵ��Ƥ�������false���֤���
+ �ɤ������ꤵ��Ƥ��ʤ����ϡ��֥��å��Ĥ��ǸƤӽФ���Ƥ������
+ *defaults��yield������̡��֥��å��ʤ��ʤ�*defaults���֤���
+
dir_config(target[, default_dir])
dir_config(target[, default_include, default_lib])
@@ -1191,6 +1243,12 @@ dir_config(target[, default_include, default_lib])
�������Ǥ��롥�ɲä��줿 include �ǥ��쥯�ȥ�� lib �ǥ��쥯�ȥ��
������֤��� ([include_dir, lib_dir])
+pkg_config(pkg)
+
+ pkg-config���ޥ�ɤ���ѥå�����pkg�ξ�������롥
+ pkg-config�μºݤΥ��ޥ��̾�ϡ�--with-pkg-config���ޥ��
+ �饤�󥪥ץ����ǻ����ǽ��
+
/*
* Local variables:
* fill-column: 60
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 82a10535a2..0eb3888b39 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -8,7 +8,10 @@ require 'shellwords'
CONFIG = Config::MAKEFILE_CONFIG
ORIG_LIBPATH = ENV['LIB']
-SRC_EXT = ["c", "cc", "m", "cxx", "cpp", "C"]
+SRC_EXT = %w[c cc m cxx cpp]
+if /mswin|bccwin|mingw|msdosdjgpp|human|os2/ !~ CONFIG['build_os']
+ SRC_EXT.concat(%w[C])
+end
$static = $config_h = nil
unless defined? $configure_args
@@ -1164,6 +1167,7 @@ def init_mkmf(config = CONFIG)
$INSTALLFILES = nil
$objs = nil
+ $srcs = nil
$libs = ""
if $enable_shared or Config.expand(config["LIBRUBY"].dup) != Config.expand(config["LIBRUBY_A"].dup)
$LIBRUBYARG = config['LIBRUBYARG']