Autoconf/Automake are at pains to support ancient C compilers that didn't understand the simultaneous use of the -c
and -o
options (create an object file with this name). There's AM_PROG_CC_C_O
and a special wrapper script, and the Automake manual warns you to use them if you want to use subdir-objects
mode.
There isn't an AM_PROG_CXX_C_O
. It is not hard to modify AM_PROG_CC_C_O
to test the C++ compiler instead, but I wonder if it's necessary. Was there ever a Unix C++ compiler (Cfront, maybe?) that didn't support simultaneous use of -c
and -o
? Come to that, just how old are the C compilers that don't support it -- was there ever a C89-supporting compiler with this problem, for instance?
There are compilers, mainly those targeted at the embedded industry, where you must manually compile and link. In those cases, the -c
option does not make sense.
Given that Linux is more and more used in embedded systems, you should definitely take those into account.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With