AC_PROG_CPP_WERROR
if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -pedantic'
+ ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
fi
AC_SUBST(ac_libiberty_warn_cflags)
AC_C_CONST
AC_C_INLINE
-AC_C_BIGENDIAN_CROSS
+AC_C_BIGENDIAN
dnl When we start using libtool:
dnl Default to a non shared library. This may be overridden by the
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
-AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
-checkfuncs="$checkfuncs getsysinfo table sysctl"
+checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
strtod strtol strtoul tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
sysconf times sbrk gettimeofday ffs snprintf vsnprintf \
- pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl \
- realpath canonicalize_file_name)
+ pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl wait3 wait4 \
+ realpath canonicalize_file_name __fsetlocking)
+ AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf])
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
# dont have to check them here.
# Of the functions in $checkfuncs, newlib only has strerror.
- AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
+ AC_DEFINE(HAVE_STRERROR)
setobjs=yes
else
# Not a target library, so we set things up to run the test suite.
- CHECK=check-cplus-dem
+ CHECK=really-check
fi
case "${host}" in
*-*-cygwin* | *-*-mingw*)
- AC_DEFINE_NOAUTOHEADER(HAVE_SYS_ERRLIST)
- AC_DEFINE_NOAUTOHEADER(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
+ AC_DEFINE(HAVE_SYS_NERR)
;;
esac
# don't have to check them here.
# Of the functions in $checkfuncs, VxWorks only has strerror.
- AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
+ AC_DEFINE(HAVE_STRERROR)
setobjs=yes
;;
[AC_MSG_RESULT([no])])
AC_CHECK_FUNCS($checkfuncs)
+ AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf])
+ AC_CHECK_DECLS([calloc, getenv, malloc, realloc, sbrk])
libiberty_NEED_DECLARATION(canonicalize_file_name)
fi