diff options
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 8ef11e3..fca0579 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1366,7 +1366,7 @@ AC_HEADER_TIOCGWINSZ AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h iconv.h \ fcntl.h ftw.h unistd.h sys/auxv.h sys/file.h sys/time.h sys/mman.h \ sys/resource.h sys/param.h sys/times.h sys/stat.h sys/locking.h \ - direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h) + direct.h malloc.h langinfo.h ldfcn.h locale.h wchar.h libgen.h) # Check for thread headers. AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=]) @@ -1574,7 +1574,7 @@ AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoq \ popen sysconf strsignal getrusage nl_langinfo \ gettimeofday mbstowcs wcswidth mmap posix_fallocate setlocale \ gcc_UNLOCKED_FUNCS madvise mallinfo mallinfo2 fstatat getauxval \ - clock_gettime munmap msync get_current_dir_name) + clock_gettime munmap msync get_current_dir_name memrchr) # At least for glibc, clock_gettime is in librt. But don't pull that # in if it still doesn't give us the function we want. @@ -1645,9 +1645,17 @@ CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include $GMPINC" # 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*), strstr(const char*,const char*)], , ,[ +# Match the configure test in libiberty so that we have a consistent result. +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"]) + +AC_CHECK_DECLS([strstr(const char*,const char*)], , ,[ #include "ansidecl.h" #include "system.h"]) |