aboutsummaryrefslogtreecommitdiff
path: root/bfd/configure.ac
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-05 15:27:37 +0930
committerAlan Modra <amodra@gmail.com>2021-04-05 15:27:37 +0930
commit83c79df86bf40666d1da7cd884bc10d45773df91 (patch)
tree1958fb387f15984aea41c900c959bb88c5dfb71a /bfd/configure.ac
parent5d4d26d14ca3dcf4c2d0745df720a2a5bd1bd6a5 (diff)
downloadfsf-binutils-gdb-83c79df86bf40666d1da7cd884bc10d45773df91.zip
fsf-binutils-gdb-83c79df86bf40666d1da7cd884bc10d45773df91.tar.gz
fsf-binutils-gdb-83c79df86bf40666d1da7cd884bc10d45773df91.tar.bz2
C99 bfd configury
Certain library headers and functions are required by C99. This removes configure tests for them. The patch also removes AC_ISC_POSIX and AC_HEADER_DIRENT, which the autoconf manual states are obsolescent. sys/time.h is no longer tangled up with time.h so it can be handled by the gprof configure. * configure.ac: Don't check for long long or long double type. Don't check for alloca.h, limits.h, stddef.h, stdlib.h, string.h, strings.h, time.h, wchar.h, wctype.h or sys/time.h. Don't check for strtoull, free, malloc, realloc, getenv, strstr, snprintf, vsnprintf, strlen or setitimer. Sort AC_CHECK_DECLS. (AC_ISC_POSIX): Don't invoke. (AC_HEADER_TIME, AC_HEADER_DIRENT, ACX_HEADER_STRING): Likewise. * sysdep.h: Remove many HAVE_*_H checks and fallback declarations. Do test HAVE_SYS_TYPES_H. Don't include sys/time.h. Reorder header order as per automake AC_INCLUDES_DEFAULT. * bfd-in.h: Include inttypes.h unconditionally. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Assume long long and long double are available. (bfd_scan_vma): Assume long long and strtoull are available. * elflink.c: Include limits.h unconditionally. * elfnn-riscv.c: Likewise. * wasm-module.c: Likewise. * hpux-core.c: Include dirent.h unconditionally. * trad-core.c: Likewise. * hosts/x86-64linux.h: Include stdlib.h unconditionally. * peXXigen.c: Remove HAVE_WCHAR_H and HAVE_WCTYPE_H checks. * elf32-m68hc1x.c: Don't include alloca-conf.h. * elf64-hppa.c: Likewise. * som.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * bfd-in2.h: Regenerate. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'bfd/configure.ac')
-rw-r--r--bfd/configure.ac36
1 files changed, 7 insertions, 29 deletions
diff --git a/bfd/configure.ac b/bfd/configure.ac
index cb43ebc..5341c58 100644
--- a/bfd/configure.ac
+++ b/bfd/configure.ac
@@ -22,7 +22,6 @@ AC_INIT([bfd], BFD_VERSION)
AC_CONFIG_SRCDIR([libbfd.c])
AC_CANONICAL_TARGET
-AC_ISC_POSIX
AM_INIT_AUTOMAKE
@@ -205,8 +204,7 @@ BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
BFD_HOSTPTR_T="unsigned long"
-AC_TYPE_LONG_DOUBLE
-AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
+AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
@@ -243,37 +241,16 @@ AC_SUBST(BFD_HOSTPTR_T)
BFD_CC_FOR_BUILD
-AC_CHECK_HEADERS(alloca.h fcntl.h limits.h stddef.h stdlib.h string.h \
- strings.h sys/file.h sys/resource.h sys/stat.h sys/time.h \
- time.h unistd.h wchar.h wctype.h)
-AC_HEADER_TIME
-AC_HEADER_DIRENT
+AC_CHECK_HEADERS(fcntl.h sys/file.h sys/resource.h sys/stat.h sys/types.h \
+ unistd.h)
-ACX_HEADER_STRING
-AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno fls)
-AC_CHECK_FUNCS(strtoull getrlimit)
+AC_CHECK_FUNCS(fcntl fdopen fileno fls getgid getpagesize getrlimit getuid \
+ sysconf)
-AC_CHECK_DECLS(basename)
-AC_CHECK_DECLS(ftello)
-AC_CHECK_DECLS(ftello64)
-AC_CHECK_DECLS(fseeko)
-AC_CHECK_DECLS(fseeko64)
+AC_CHECK_DECLS([basename, ffs, stpcpy, asprintf, vasprintf])
BFD_BINARY_FOPEN
-AC_CHECK_DECLS(ffs)
-AC_CHECK_DECLS(free)
-AC_CHECK_DECLS(getenv)
-AC_CHECK_DECLS(malloc)
-AC_CHECK_DECLS(realloc)
-AC_CHECK_DECLS(stpcpy)
-AC_CHECK_DECLS(strstr)
-AC_CHECK_DECLS(asprintf)
-AC_CHECK_DECLS(vasprintf)
-AC_CHECK_DECLS(snprintf)
-AC_CHECK_DECLS(vsnprintf)
-AC_CHECK_DECLS(strnlen)
-
# Link in zlib if we can. This allows us to read compressed debug sections.
# This is used only by compress.c.
AM_ZLIB
@@ -1089,6 +1066,7 @@ AC_SUBST(lt_cv_dlopen_libs)
# Hopefully a reasonable assumption since fseeko et.al. should be
# upward compatible.
AC_CHECK_FUNCS(ftello ftello64 fseeko fseeko64 fopen64)
+AC_CHECK_DECLS([ftello, ftello64, fseeko, fseeko64, fopen64])
if test x"$ac_cv_func_ftello" = xyes -a x"$ac_cv_func_fseeko" = xyes; then
AC_CHECK_SIZEOF(off_t)
fi