diff options
Diffstat (limited to 'autosetup/cc.tcl')
-rw-r--r-- | autosetup/cc.tcl | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/autosetup/cc.tcl b/autosetup/cc.tcl index c6702a2..5f066b5 100644 --- a/autosetup/cc.tcl +++ b/autosetup/cc.tcl @@ -4,8 +4,8 @@ # @synopsis: # # The 'cc' module supports checking various 'features' of the C or C++ -# compiler/linker environment. Common commands are cc-check-includes, -# cc-check-types, cc-check-functions, cc-with, make-autoconf-h and make-template. +# compiler/linker environment. Common commands are 'cc-check-includes', +# 'cc-check-types', 'cc-check-functions', 'cc-with', 'make-config-header' and 'make-template'. # # The following environment variables are used if set: # @@ -70,8 +70,8 @@ proc cctest_decl {name} { # @cc-check-sizeof type ... # # Checks the size of the given types (between 1 and 32, inclusive). -# Defines a variable with the size determined, or "unknown" otherwise. -# e.g. for type 'long long', defines SIZEOF_LONG_LONG. +# Defines a variable with the size determined, or 'unknown' otherwise. +# e.g. for type 'long long', defines 'SIZEOF_LONG_LONG'. # Returns the size of the last type. # proc cc-check-sizeof {args} { @@ -111,7 +111,7 @@ proc cc-check-some-feature {list script} { # @cc-check-includes includes ... # -# Checks that the given include files can be used +# Checks that the given include files can be used. proc cc-check-includes {args} { cc-check-some-feature $args { set with {} @@ -136,8 +136,8 @@ proc cc-check-includes {args} { # @cc-include-needs include required ... # -# Ensures that when checking for 'include', a check is first -# made for each 'required' file, and if found, it is #included +# Ensures that when checking for '$include', a check is first +# made for each '$required' file, and if found, it is included with '#include'. proc cc-include-needs {file args} { foreach depfile $args { dict set ::autosetup(cc-include-deps) $file $depfile 1 @@ -155,7 +155,7 @@ proc cc-check-types {args} { # @cc-check-defines define ... # -# Checks that the given preprocessor symbol is defined +# Checks that the given preprocessor symbol is defined. proc cc-check-defines {args} { cc-check-some-feature $args { cctest_define $each @@ -165,8 +165,8 @@ proc cc-check-defines {args} { # @cc-check-decls name ... # # Checks that each given name is either a preprocessor symbol or rvalue -# such as an enum. Note that the define used is HAVE_DECL_xxx -# rather than HAVE_xxx +# such as an enum. Note that the define used is 'HAVE_DECL_xxx' +# rather than 'HAVE_xxx'. proc cc-check-decls {args} { set ret 1 foreach name $args { @@ -185,7 +185,7 @@ proc cc-check-decls {args} { # @cc-check-functions function ... # -# Checks that the given functions exist (can be linked) +# Checks that the given functions exist (can be linked). proc cc-check-functions {args} { cc-check-some-feature $args { cctest_function $each @@ -195,7 +195,7 @@ proc cc-check-functions {args} { # @cc-check-members type.member ... # # Checks that the given type/structure members exist. -# A structure member is of the form "struct stat.st_mtime" +# A structure member is of the form 'struct stat.st_mtime'. proc cc-check-members {args} { cc-check-some-feature $args { cctest_member $each @@ -209,13 +209,13 @@ proc cc-check-members {args} { # First checks for no library required, then checks each of the libraries # in turn. # -# If the function is found, the feature is defined and lib_$function is defined -# to -l$lib where the function was found, or "" if no library required. -# In addition, -l$lib is prepended to the LIBS define. +# If the function is found, the feature is defined and 'lib_$function' is defined +# to '-l$lib' where the function was found, or "" if no library required. +# In addition, '-l$lib' is prepended to the 'LIBS' define. # # If additional libraries may be needed for linking, they should be specified -# as $extralibs as "-lotherlib1 -lotherlib2". -# These libraries are not automatically added to LIBS. +# with '$extralibs' as '-lotherlib1 -lotherlib2'. +# These libraries are not automatically added to 'LIBS'. # # Returns 1 if found or 0 if not. # @@ -255,12 +255,12 @@ proc cc-check-function-in-lib {function libs {otherlibs {}}} { # Checks for existence of the given compiler tools, taking # into account any cross compilation prefix. # -# For example, when checking for "ar", first AR is checked on the command -# line and then in the environment. If not found, "${host}-ar" or -# simply "ar" is assumed depending upon whether cross compiling. -# The path is searched for this executable, and if found AR is defined +# For example, when checking for 'ar', first 'AR' is checked on the command +# line and then in the environment. If not found, '${host}-ar' or +# simply 'ar' is assumed depending upon whether cross compiling. +# The path is searched for this executable, and if found 'AR' is defined # to the executable name. -# Note that even when cross compiling, the simple "ar" is used as a fallback, +# Note that even when cross compiling, the simple 'ar' is used as a fallback, # but a warning is generated. This is necessary for some toolchains. # # It is an error if the executable is not found. @@ -286,10 +286,10 @@ proc cc-check-tools {args} { # # Checks for existence of the given executables on the path. # -# For example, when checking for "grep", the path is searched for -# the executable, 'grep', and if found GREP is defined as "grep". +# For example, when checking for 'grep', the path is searched for +# the executable, 'grep', and if found 'GREP' is defined as 'grep'. # -# If the executable is not found, the variable is defined as false. +# If the executable is not found, the variable is defined as 'false'. # Returns 1 if all programs were found, or 0 otherwise. # proc cc-check-progs {args} { @@ -375,12 +375,12 @@ proc cc-update-settings {args} { # @cc-with settings ?{ script }? # -# Sets the given 'cctest' settings and then runs the tests in 'script'. -# Note that settings such as -lang replace the current setting, while -# those such as -includes are appended to the existing setting. +# Sets the given 'cctest' settings and then runs the tests in '$script'. +# Note that settings such as '-lang' replace the current setting, while +# those such as '-includes' are appended to the existing setting. # # If no script is given, the settings become the default for the remainder -# of the auto.def file. +# of the 'auto.def' file. # ## cc-with {-lang c++} { ## # This will check with the C++ compiler @@ -392,7 +392,7 @@ proc cc-update-settings {args} { ## # back to just the C++ compiler ## } # -# The -libs setting is special in that newer values are added *before* earlier ones. +# The '-libs' setting is special in that newer values are added *before* earlier ones. # ## cc-with {-libs {-lc -lm}} { ## cc-with {-libs -ldl} { @@ -418,7 +418,7 @@ proc cc-with {settings args} { # @cctest ?settings? # -# Low level C compiler checker. Compiles and or links a small C program +# Low level C/C++ compiler checker. Compiles and or links a small C program # according to the arguments and returns 1 if OK, or 0 if not. # # Supported settings are: @@ -434,7 +434,7 @@ proc cc-with {settings args} { ## -sourcefile file Shorthand for -source [readfile [get-define srcdir]/$file] ## -nooutput 1 Treat any compiler output (e.g. a warning) as an error # -# Unless -source or -sourcefile is specified, the C program looks like: +# Unless '-source' or '-sourcefile' is specified, the C program looks like: # ## #include <firstinclude> /* same for remaining includes in the list */ ## @@ -556,7 +556,7 @@ proc cctest {args} { # @make-autoconf-h outfile ?auto-patterns=HAVE_*? ?bare-patterns=SIZEOF_*? # -# Deprecated - see make-config-header +# Deprecated - see 'make-config-header' proc make-autoconf-h {file {autopatterns {HAVE_*}} {barepatterns {SIZEOF_* HAVE_DECL_*}}} { user-notice "*** make-autoconf-h is deprecated -- use make-config-header instead" make-config-header $file -auto $autopatterns -bare $barepatterns @@ -565,19 +565,19 @@ proc make-autoconf-h {file {autopatterns {HAVE_*}} {barepatterns {SIZEOF_* HAVE_ # @make-config-header outfile ?-auto patternlist? ?-bare patternlist? ?-none patternlist? ?-str patternlist? ... # # Examines all defined variables which match the given patterns -# and writes an include file, $file, which defines each of these. +# and writes an include file, '$file', which defines each of these. # Variables which match '-auto' are output as follows: -# - defines which have the value "0" are ignored. +# - defines which have the value '0' are ignored. # - defines which have integer values are defined as the integer value. -# - any other value is defined as a string, e.g. "value" +# - any other value is defined as a string, e.g. '"value"' # Variables which match '-bare' are defined as-is. -# Variables which match '-str' are defined as a string, e.g. "value" +# Variables which match '-str' are defined as a string, e.g. '"value"' # Variables which match '-none' are omitted. # -# Note that order is important. The first pattern which matches is selected +# Note that order is important. The first pattern that matches is selected. # Default behaviour is: # -# -bare {SIZEOF_* HAVE_DECL_*} -auto HAVE_* -none * +## -bare {SIZEOF_* HAVE_DECL_*} -auto HAVE_* -none * # # If the file would be unchanged, it is not written. proc make-config-header {file args} { |