From 5b2df41b35f70c2abc4fc1ef430311e3967e999a Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 8 Jun 2012 23:21:50 +0000 Subject: * 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 --- lib/mkmf.rb | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'lib') 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 main() entry point is used by + # +lib+. If +func+ is +nil+, the main() 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 main() function is + # of strings. If +func+ is +nil+ , then the main() 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 have_func('foo') returned true, then the + # To check functions in an additional library, you need to check that + # library first using have_library(). The +func+ shall be + # either mere function name or function name with arguments. + # + # For example, if have_func('foo') 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 have_library(). + # # For example, if have_var('foo') 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 --with-_config_ or - # --without-_config_ option. Returns true if the with option is - # given, false if the without option is given, and the default value + # --without-_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 --enable-_config_ or - # --disable-_config_ option. Returns true if the enable option is - # given, false if the disable option is given, and the default value + # --disable-_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 + # --with-pkg-config command line option. def pkg_config(pkg) if pkgconfig = with_config("#{pkg}-config") and find_executable0(pkgconfig) # iff package specific config command is given -- cgit v1.2.3