https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119218
--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Andreas Schwab from comment #5) > Why is HAVE_DECL_BASENAME not defined? good question - we start out OK: configure:6951: checking for basename configure:6951: x86_64-apple-darwin21-gcc -o conftest -O0 -g -static-libstdc++ -static-libgcc conftest.c >&5 configure:6951: $? = 0 configure:6951: result: yes but then: configure:7392: checking whether basename is declared configure:7392: x86_64-apple-darwin21-gcc -c -O0 -g conftest.c >&5 conftest.c: In function 'main': conftest.c:166:10: error: 'basename' undeclared (first use in this function) 166 | (void) basename; It seems that the second test does not #include <libgen.h> so maybe that will fix this. Rainer, do you see the same on Solaris?