Fix rusage

This commit is contained in:
Masamichi Takagi
2017-06-02 14:12:55 +09:00
parent 12e7ed644f
commit 6bdafbd33b
7 changed files with 119 additions and 77 deletions

View File

@ -55,6 +55,12 @@ AC_ARG_ENABLE([mcoverlayfs],
[ENABLE_MCOVERLAYFS=$enableval],
[ENABLE_MCOVERLAYFS=yes])
AC_ARG_ENABLE([rusage],
AC_HELP_STRING([--enable-rusage],
[enable rusage implementation]),
[ENABLE_RUSAGE=$enableval],
[ENABLE_RUSAGE=yes])
AC_ARG_WITH([uname_r],
AC_HELP_STRING(
[--with-uname_r=uname_r],[Value of '`uname -r`' on the target platform, default is local value]),
@ -162,12 +168,12 @@ case $WITH_TARGET in
if test "X$BINDIR" = X; then
BINDIR="$prefix/bin"
fi
if test "X$LIBDIR" = X; then
LIBDIR="$prefix/lib"
fi
if test "X$SBINDIR" = X; then
SBINDIR="$prefix/sbin"
fi
if test "X$MCKERNEL_LIBDIR" = X; then
MCKERNEL_LIBDIR="$prefix/lib"
fi
if test "X$ETCDIR" = X; then
ETCDIR="$prefix/etc"
fi
@ -298,8 +304,26 @@ else
AC_MSG_NOTICE([mcoverlayfs is disabled])
fi
if test "x$LIBDIR" != "x" ; then
AC_DEFINE_UNQUOTED(MCKERNEL_LIBDIR,"$LIBDIR",[McKernel specific libraries])
case $ENABLE_RUSAGE in
yes|no)
;;
default)
ENABLE_RUSAGE=yes
;;
*)
AC_MSG_ERROR([unknown rusage argument: $ENABLE_RUSAGE])
;;
esac
if test "x$ENABLE_RUSAGE" = "xyes" ; then
AC_MSG_NOTICE([rusage is enabled])
AC_DEFINE([ENABLE_RUSAGE],[1],[whether rusage is enabled])
else
AC_MSG_NOTICE([rusage is disabled])
fi
if test "x$MCKERNEL_LIBDIR" != "x" ; then
AC_DEFINE_UNQUOTED(MCKERNEL_LIBDIR,"$MCKERNEL_LIBDIR",[McKernel specific libraries])
fi
AC_SUBST(CC)
@ -309,14 +333,15 @@ AC_SUBST(KDIR)
AC_SUBST(UNAME_R)
AC_SUBST(TARGET)
AC_SUBST(BINDIR)
AC_SUBST(LIBDIR)
AC_SUBST(SBINDIR)
AC_SUBST(MCKERNEL_LIBDIR)
AC_SUBST(ETCDIR)
AC_SUBST(KMODDIR)
AC_SUBST(KERNDIR)
AC_SUBST(MANDIR)
AC_SUBST(CFLAGS)
AC_SUBST(ENABLE_MCOVERLAYFS)
AC_SUBST(ENABLE_RUSAGE)
AC_SUBST(IHK_VERSION)
AC_SUBST(MCKERNEL_VERSION)
@ -326,6 +351,7 @@ AC_SUBST(MCKERNEL_RELEASE_DATE)
AC_SUBST(DCFA_RESEASE_DATE)
AC_SUBST(uncomment_if_ENABLE_MEMDUMP)
AC_CONFIG_HEADERS([kernel/include/config.h])
AC_CONFIG_HEADERS([executer/config.h])
AC_CONFIG_FILES([
Makefile