0

./configure script outputs checking if and checking whether on execution

how the two results are different for checking conditions?

4
  • autoconf will by default create a configure script that says checking whether.... If a script says checking if ... then that's probably the developer's own words (there are 5 checking if when compiling bash for example, all from custom test macros). Are you referring to a specific project's configure script?
    – Kusalananda
    Commented Apr 27, 2019 at 6:50
  • no, i see this very often in ./configure script outputs of many common project (when compiling their source)
    – guest
    Commented Apr 27, 2019 at 6:59
  • oh, so it is a good identification (hint) for custom macros (as introduced by the developer - and not by autoconf - as it would always choose the whether keyword for checking any kinds of conditions, instead of the 'custom' if keyword)?
    – guest
    Commented Apr 27, 2019 at 7:00
  • i initially thought whether may refer exclusively to boolean conditions (with two possible conditional values - true or false), and if is used for any other checks.
    – guest
    Commented Apr 27, 2019 at 7:06

1 Answer 1

2

The configure script will most often use the wording checking whether because this is the default wording in the default autoconf macros.

If a project's configure script says checking if, then this means the same thing and is probably produced by a custom test macro that the developers have written themselves (or borrowed).

As an example, when configuring bash 5.0.7 on my machine, I get 44 checking whether and only 5 checking if. The checking if mostly come from custom test macros.

checking if the linker (/usr/bin/ld) is GNU ld... yes
checking if dup2 fails to clear the close-on-exec flag... no
checking if opendir() opens non-directories... no
checking if getcwd() will dynamically allocate memory with 0 size... yes
checking if signal handlers must be reinstalled when invoked... no

(the first one here is actually not a macro specific to bash, but it's still from the project's aclocal.m4 file)

In a project I'm maintaining for work, in which we mostly use default test macros and macros from the Autoconf Archive, there are no checking if at all, but 65 outputs of the other kind.

At the end of the day, there is no effective difference between the two, just as there is no real difference between them in spoken English.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .