Commit 9183b2dc authored by 's avatar

added check for groupadd

git-svn-id: file:///home/svn/mapi/trunk@875 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent b40d261f
......@@ -8,6 +8,13 @@ AM_INIT_AUTOMAKE(foreign no-dependencies no-installinfo)
# Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PATH_PROG(ac_mapi_groupadd, groupadd, no, $PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/ucb)
if test $ac_mapi_groupadd = no ; then
AC_MSG_WARN("groupadd not found, so a MAPI group will not be created.")
else
GROUPADD="$ac_mapi_groupadd"
AC_SUBST(GROUPADD)
fi
AC_MSG_NOTICE([libtool -----------------------------------------------------])
# Turn off static libraries during beta-testing, since they
......
......@@ -60,6 +60,7 @@ dist-hook:
# if installing as root, create a mapi user group
install-exec-hook:
@if test ${USER} = root; then \
groupadd -f ${MAPI_GROUP}; \
echo "Created user group '${MAPI_GROUP}'"; \
if $(GROUPADD) -f ${MAPI_GROUP}; then\
echo "Created user group '${MAPI_GROUP}'"; \
fi \
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment