I think the right path to go down is to add libgen.h to the list in AC_CHECK_HEADERS for every project that uses basename() (including libiberty itself, and binutils, gdb, and gcc), and then everyone who uses basename() from libiberty.h would need to include libgen.h *if* it's found by configure.