gcc, configure: When checking for basename, use the same process as libiberty [PR119250].
We need the configure result from the decl check for basename() in the GCC
configuration to match that obtained when configuring libiberty or we get
conflicts when <libgen.h> is included in any TU that also includes "system.h"
or "libiberty.h" directly.
PR other/119250
gcc/ChangeLog:
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Match the configure test in libiberty when checking
the basename decl.