AC_INIT
AC_CONFIG_SRCDIR([xmalloc.c])
-# FIXME: libiberty doesn't support --disable-static
-enable_static=yes
-
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
# keeping the changes in LD private, export them just because LD is
AC_PROG_CPP_WERROR
if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
+ ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
fi
AC_SUBST(ac_libiberty_warn_cflags)
+AC_PROG_CC_C_O
+# autoconf is lame and doesn't give us any substitution variable for this.
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
+ NO_MINUS_C_MINUS_O=yes
+else
+ OUTPUT_OPTION='-o $@'
+fi
+AC_SUBST(NO_MINUS_C_MINUS_O)
+AC_SUBST(OUTPUT_OPTION)
+
AC_C_CONST
AC_C_INLINE
AC_C_BIGENDIAN_CROSS
+dnl When we start using libtool:
dnl Default to a non shared library. This may be overridden by the
dnl configure option --enable-shared.
-AM_DISABLE_SHARED
+dnl AM_DISABLE_SHARED
-AM_PROG_LIBTOOL
+dnl When we start using libtool:
+dnl AM_PROG_LIBTOOL
dnl When we start using automake:
dnl AM_CONFIG_HEADER(config.h:config.in)
# 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
funcs="$funcs ffs"
funcs="$funcs getcwd"
funcs="$funcs getpagesize"
+funcs="$funcs gettimeofday"
funcs="$funcs index"
funcs="$funcs insque"
funcs="$funcs memchr"
funcs="$funcs strchr"
funcs="$funcs strdup"
funcs="$funcs strncasecmp"
+funcs="$funcs strndup"
funcs="$funcs strrchr"
funcs="$funcs strstr"
funcs="$funcs strtod"
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.
if test "x" = "y"; then
AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
- getcwd getpagesize index insque mkstemps memchr memcmp memcpy \
+ getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
memmove mempcpy memset putenv random rename rindex sigsetmask \
- strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr \
+ strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
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])
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.])
else
# Not a target library, so we set things up to run the test suite.
- CHECK=check-cplus-dem
+ CHECK=really-check
fi
libiberty_cv_var_sys_errlist=yes
;;
+ *-*-msdosdjgpp*)
+ # vfork and fork are stubs.
+ ac_cv_func_vfork_works=no
+ ;;
+
*-*-uwin*)
# Under some versions of uwin, vfork is notoriously buggy and the test
# can hang configure; on other versions, vfork exists just as a stub.
[AC_MSG_RESULT([no])])
AC_CHECK_FUNCS($checkfuncs)
+ AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf])
libiberty_NEED_DECLARATION(canonicalize_file_name)
fi
# Figure out which version of pexecute to use.
case "${host}" in
- *-*-mingw* | *-*-winnt*) pex=./pex-win32 ;;
- *-*-msdosdjgpp*) pex=./pex-djgpp ;;
- *-*-msdos*) pex=./pex-msdos ;;
- *-*-os2-emx*) pex=./pex-os2 ;;
- *) pex=./pex-unix ;;
+ *-*-mingw* | *-*-winnt*) pexecute=./pex-win32.o ;;
+ *-*-msdosdjgpp*) pexecute=./pex-djgpp.o ;;
+ *-*-msdos*) pexecute=./pex-msdos.o ;;
+ *) pexecute=./pex-unix.o ;;
esac
-pexecute=${pex}.o
-ltpexecute=${pex}.lo
AC_SUBST(pexecute)
-AC_SUBST(ltpexecute)
libiberty_AC_FUNC_STRNCMP
fi
AC_SUBST(INSTALL_DEST)
-# Add `./' to avoid VPATH.
m4_pattern_allow(LIBOBJS)
L=""
for l in x $LIBOBJS; do
done
LIBOBJS="$L"
-m4_pattern_allow(LTLIBOBJS)
-L=""
-for l in x $LTLIBOBJS; do
- case $l in
- x) ;;
- *) L="$L ./$l" ;;
- esac
-done
-LTLIBOBJS="$L"
-
-dnl Delete it when we start creating shared library with libtool.
-AC_SUBST(enable_shared)
-
# We need multilib support, but only if configuring for the target.
AC_CONFIG_FILES([Makefile testsuite/Makefile])
AC_CONFIG_COMMANDS([default],