funcs="$funcs basename"
funcs="$funcs bcmp"
funcs="$funcs bcopy"
+funcs="$funcs bsearch"
funcs="$funcs bzero"
funcs="$funcs calloc"
funcs="$funcs clock"
+funcs="$funcs ffs"
funcs="$funcs getcwd"
funcs="$funcs getpagesize"
funcs="$funcs index"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
if test "x" = "y"; then
- AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bzero calloc clock getcwd)
- AC_CHECK_FUNCS(getpagesize index insque mkstemps memchr memcmp memcpy memmove)
- AC_CHECK_FUNCS(memset putenv random rename rindex sigsetmask strcasecmp)
- AC_CHECK_FUNCS(setenv strchr strdup strncasecmp strrchr strstr strtod strtol)
- AC_CHECK_FUNCS(strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid)
- AC_CHECK_FUNCS(getrusage on_exit psignal strerror strsignal sysconf times)
- AC_CHECK_FUNCS(sbrk gettimeofday)
+ AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock)
+ AC_CHECK_FUNCS(getcwd getpagesize index insque mkstemps memchr memcmp memcpy)
+ AC_CHECK_FUNCS(memmove memset putenv random rename rindex sigsetmask)
+ AC_CHECK_FUNCS(strcasecmp setenv strchr strdup strncasecmp strrchr strstr)
+ AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf)
+ AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal)
+ AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs)
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.])
# For each of these functions, if the host does not provide the
# function we want to put FN.o in LIBOBJS, and if the host does
-# provide the function, we want to define HAVE_FN in config.h. Also,
-# if the host does not provide alloca, we set ALLOCA to alloca.o
+# provide the function, we want to define HAVE_FN in config.h.
setobjs=
CHECK=
# newlib provide and which ones we will be expected to provide.
if test "x${with_newlib}" = "xyes"; then
- ALLOCA="alloca.o"
LIBOBJS="asprintf.o basename.o insque.o random.o strdup.o vasprintf.o"
for f in $funcs; do
# Of the functions in $checkfuncs, newlib only has strerror.
AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
+ case "${host}" in
+ *-*-cygwin*)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
+ ;;
+ esac
+
setobjs=yes
fi
# tests. This will only work if the compiler works.
AC_PROG_CC_WORKS
AC_REPLACE_FUNCS($funcs)
-
- case "${host}" in
- *-*-interix)
- # On Interix, it wrongly concludes that the MSVC compiler supports alloca.
- # (MSVC does on Win32, not on Interix.)
- # This should be temporary.
-
- ac_cv_header_alloca_h=no
- ac_cv_func_alloca_works=no
- ALLOCA=alloca.o
- cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
- cat >> confdefs.h <<EOF
-#define STACK_DIRECTION -1
-EOF
- ;;
- *)
- AC_FUNC_ALLOCA
- ;;
- esac
-
+ libiberty_AC_FUNC_C_ALLOCA
AC_FUNC_VFORK
if test $ac_cv_func_vfork_works = no; then
LIBOBJS="$LIBOBJS vfork.o"