summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-08 23:21:50 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-08 23:21:50 +0000
commit5b2df41b35f70c2abc4fc1ef430311e3967e999a (patch)
treec91edd40a76f963152cc65fb99dce2e43013c866 /lib
parenta60a58b183cfef7fc53ef7e1d3b7c661bd97d3cf (diff)
* README.EXT (prepare extconf.rb): Added note to see MakeMakefile for
documentation of extconf.rb functions. Patch by Zachary Scott. [ruby-trunk - Feature #6522] * README.EXT (Appendix C): Removed in favor of MakeMakefile. Patch by Zachary Scott. * lib/mkmf.rb: Merged documentation from README.EXT Appendix C. Patch by Zachary Scott. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb24
1 files changed, 17 insertions, 7 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index c42bab9f4f..ebc96f8620 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -885,7 +885,7 @@ SRC
end
# Returns whether or not the given entry point +func+ can be found within
- # +lib+. If +func+ is nil, the <code>main()</code> entry point is used by
+ # +lib+. If +func+ is +nil+, the <code>main()</code> entry point is used by
# default. If found, it adds the library to list of libraries to be used
# when linking your extension.
#
@@ -915,7 +915,7 @@ SRC
# Returns whether or not the entry point +func+ can be found within the
# library +lib+ in one of the +paths+ specified, where +paths+ is an array
- # of strings. If +func+ is nil , then the <code>main()</code> function is
+ # of strings. If +func+ is +nil+ , then the <code>main()</code> function is
# used as the entry point.
#
# If +lib+ is found, then the path it was found on is added to the list of
@@ -948,7 +948,11 @@ SRC
# is passed as a preprocessor constant to the compiler using the function
# name, in uppercase, prepended with +HAVE_+.
#
- # For example, if <code>have_func('foo')</code> returned true, then the
+ # To check functions in an additional library, you need to check that
+ # library first using <code>have_library()</code>. The +func+ shall be
+ # either mere function name or function name with arguments.
+ #
+ # For example, if <code>have_func('foo')</code> returned +true+, then the
# +HAVE_FOO+ preprocessor macro would be passed to the compiler.
#
def have_func(func, headers = nil, opt = "", &b)
@@ -967,6 +971,9 @@ SRC
# is passed as a preprocessor constant to the compiler using the variable
# name, in uppercase, prepended with +HAVE_+.
#
+ # To check variables in an additional library, you need to check that
+ # library first using <code>have_library()</code>.
+ #
# For example, if <code>have_var('foo')</code> returned true, then the
# +HAVE_FOO+ preprocessor macro would be passed to the compiler.
#
@@ -1482,8 +1489,8 @@ SRC
# :startdoc:
# Tests for the presence of a <tt>--with-</tt>_config_ or
- # <tt>--without-</tt>_config_ option. Returns true if the with option is
- # given, false if the without option is given, and the default value
+ # <tt>--without-</tt>_config_ option. Returns +true+ if the with option is
+ # given, +false+ if the without option is given, and the default value
# otherwise.
#
# This can be useful for adding custom definitions, such as debug
@@ -1517,8 +1524,8 @@ SRC
end
# Tests for the presence of an <tt>--enable-</tt>_config_ or
- # <tt>--disable-</tt>_config_ option. Returns true if the enable option is
- # given, false if the disable option is given, and the default value
+ # <tt>--disable-</tt>_config_ option. Returns +true+ if the enable option is
+ # given, +false+ if the disable option is given, and the default value
# otherwise.
#
# This can be useful for adding custom definitions, such as debug
@@ -1641,6 +1648,9 @@ SRC
# Handles meta information about installed libraries. Uses your platform's
# pkg-config program if it has one.
+ #
+ # The actual command name can be overridden by
+ # <code>--with-pkg-config</code> command line option.
def pkg_config(pkg)
if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig)
# iff package specific config command is given