Lines Matching defs:for
8 # * May you find forgiveness for yourself and forgive others.
18 # Routines for Steve Bennett's autosetup which are common to trees
24 # For practical purposes, the copy of this file hosted in the SQLite
37 # - Symbols with _ separators are intended for internal use within
50 # [1]: As an example: testing for the -rpath flag, using
60 # $proj__Config is an internal-use-only array for storing whatever generic
118 # use the name of a call higher up in the stack, use -up once for each
174 # For -error and -notice it uses user-notice.
251 # the new value. This is intended for temporarily stripping -Werror
268 # A proxy for cc-check-function-in-lib with the following differences:
291 # @proj-search-for-header-dir ?-dirs LIST? ?-subdirs LIST? header
293 # Searches for $header in a combination of dirs and subdirs, specified
298 proc proj-search-for-header-dir {header args} {
339 msg-checking "Looking for $binName ... "
355 # Uses [proj-find-executable-path $binName] to (verbosely) search for
375 # Looks for the first binary found of the names passed to this
380 # any define'd name that function stores for the result (because the
408 # For example, with a configure flag defined like:
417 # Calling [proj-opt-set] is, for purposes of the above, equivalent to
454 # option, else returns 0. Options set via proj-opt-set "exist" for
502 # @proj-define-for-opt flag def ?msg? ?iftrue? ?iffalse?
509 proc proj-define-for-opt {flag def {msg ""} {iftrue 1} {iffalse 0}} {
535 # where X is 0 for false and 1 for true. $descr is an optional
568 # Check for module-loading APIs (libdl/libltdl)...
570 # Looks for libltdl or dlopen(), the latter either in -ldl or built in
583 # Note that if it finds LIBLTDL it does not look for LIBDL, so will
587 msg-checking "Looking for module-loader APIs... "
602 puts "" ;# cosmetic kludge for cc-check-XXX
709 # @proj-check-compile-commands ?-assume-for-clang? ?configFlag?
711 # Checks the compiler for compile_commands.json support. If
716 # If -assume-for-clang is provided and $configFlag is not empty and CC
719 # To disable that assumption, either don't pass -assume-for-clang or
720 # pass --$configFlag=0 to the configure script. (The reason for this
742 if {"-assume-for-clang" eq [lindex $args 0]} {
770 msg-result "compiler supports -MJ. Assuming it's useful for compile_commands.json"
808 # to update its timestamp. This can be used as a workaround for
855 # Checks for the boolean configure option named by $flagname. If set,
861 # LDFLAGS in order for binaries to be able to generate "gmon.out". In
873 # for this purpose.
964 # Trivia: for .dylib files, the linker needs the -dynamiclib flag
986 # extension for the being-built-on resp. the target platform.
1022 # then it emits msg-checking/msg-result messages for each file.
1032 if {$verbose} { msg-checking "Looking for $f ... " }
1045 # Emscripten is used for doing in-tree builds of web-based WASM stuff,
1047 # places. This is only set up for Unix-style OSes and is untested
1051 # It looks for the SDK in the location specified by --with-emsdk.
1052 # Values of "" or "auto" mean to check for the environment var EMSDK
1191 # The libname argument is only for purposes of running the flag
1234 # "hwaddress is not supported for this target".
1248 # Internal helper for proj-dump-defs-json. Expects to be passed a
1250 # proj-dump-defs-json. If it finds a pattern match for the given
1251 # $name in the various $args, it returns the type flag for that $name,
1266 # Internal helper for proj-defs-format_: returns a JSON-ish quoted
1324 # fully-functional JSON emitter, and will emit broken JSON for
1325 # complicated outputs, but should be sufficient for purposes of
1380 # form which autosetup will expect for passing to [opt-val NAME] and
1385 # For each pair of ALIAS and CANONICAL, if --ALIAS is provided but
1392 # handling of them. For example, when --alias is a hidden alias of
1426 # will use CC_FOR_BUILD=clang, instead of cc, for building in-tree
1435 proc proj-redefine-cc-for-build {} {
1448 # the "antirez" or "msteveb" flavor. It returns 2 for msteveb, else 1
1476 # autosetup exports conventional $prefix-based values for the numerous
1503 # legal for use in (A) makefiles, (B) pkgconfig files, and (C) TCL's
1600 # [define]s (see the code for the whole list). If $tclConfigSh is an
1642 # For certain target environments, if --prefix is _not_ passed in by
1643 # the user, set the prefix to an environment-specific default. For
1650 # Similar modifications may be made for --mandir.
1690 # names. This can be used, for example, to make the output file
1750 # makes proj-dot-ins-append available for re-use.
1786 # For each filename given to it, it validates that the file has no
1792 # line is ignored for purposes of this validation. The intent is that
1816 # Searches $fileList for an existing file. If one is found, its name
1833 # Defines $defName to contain makefile recipe commands for re-running
1847 # A proxy for Autosetup's [define-append]. Appends all non-empty $args
1861 # A proxy for Autosetup's [define-append].
1871 # order, with each -lY resolving symbols for -lX's to its left. This
1935 # The -zero-undef flag causes no -D to be emitted for integer values
1975 # [proj-options-combine] to merge them into a single list for passing
2018 # Internal cache for use via proj-cache-*.
2024 # Helper to generate cache keys for [proj-cache-*].
2028 # Returns a cache key for the given argument:
2030 # integer: relative call stack levels to get the scope name of for
2049 # See proj-cache-key for -key's and -level's semantics, noting that
2050 # this function adds one to -level for purposes of that call.
2079 # Checks for a feature-check cache entry with the given key.
2085 # See proj-cache-key for $key's and $addLevel's semantics, noting that
2086 # this function adds one to $addLevel for purposes of that call.
2165 # - Else if -apply X is used, it's effectively shorthand for -call
2175 for $tgtArrayName(-flag). This
2184 # - For non-arg-consuming flags, each invocation of -flag causes the
2191 # - For arg-consuming flags, the given flag starts with value X, but
2199 # counting values consumed for flags defined like -flag => default).
2208 # be "non-flags" for purposes of this function, even if they
2239 array set blob {}; # holds markers for various per-key state and options
2241 # Parse $prototype for flag definitions...
2269 proj-error -up "[proj-scope]: Missing argument for $k flag"
2272 for {set i 0} {$i < $n} {incr i} {
2276 # Check for :PRAGMA...
2294 proj-error -up "[proj-scope]: Duplicated prototype for flag $k"
2302 proj-error -up "[proj-scope]: Missing argument for $k => flag"
2307 proj-error -up "[proj-scope]: Missing default value for $k flag"
2329 set rv {}; # staging area for the target argv value
2332 # Now look for those flags in $argv...
2333 for {set i 0} {$i < $n} {incr i} {
2357 proj-error -up [proj-scope] "is missing argument for $arg flag"
2432 #proj-warn "Test code for proj-cache"