https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119250

--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---

this:
# gcc_AC_CHECK_DECLS doesn't support overloaded functions, so use the
# normal autoconf function for these.  But force definition of
# HAVE_DECL_BASENAME like gcc_AC_CHECK_DECLS does, to suppress the bizarre
# basename handling in libiberty.h.
AC_CHECK_DECLS([basename(const char*)], [ ],
               AC_CHECK_DECLS([basename(char*)], [], [], [
#undef HAVE_DECL_BASENAME
#define HAVE_DECL_BASENAME 1
#if HAVE_LIBGEN_H
# include <libgen.h>
#endif
#include "ansidecl.h"
#include "system.h"]),[
#undef HAVE_DECL_BASENAME
#define HAVE_DECL_BASENAME 1
#include "ansidecl.h"
#include "system.h"])

"works" in that auto-host.h gets HAVE_DECL_BASENAME = 1 now, but the mechanism
is messy  it causes a bunch of warnings in the configure log (because we get
HAVE_DECL_BASENAME = 0 followed by HAVE_DECL_BASENAME = 1)

Not really sure what existing AC_ process can deal with this

Reply via email to