diff options
Diffstat (limited to 'camel/Makefile.am')
-rw-r--r-- | camel/Makefile.am | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/camel/Makefile.am b/camel/Makefile.am index 408a0e33d0..7dafb8bf83 100644 --- a/camel/Makefile.am +++ b/camel/Makefile.am @@ -204,13 +204,31 @@ camel-lock-helper: camel-lock-helper.o camel-lock.o if CAMEL_LOCK_HELPER_SETUID install-exec-local: - chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper - chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper + @if test `whoami` = root ; then \ + chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper ; \ + chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper ; \ + else \ + echo '*** WARNING ***' ; \ + echo "Camel will not be able to open mbox files until you perform the following steps:" ; \ + echo " 1. Become root" ; \ + echo " 2. chown $(CAMEL_LOCK_HELPER_USER) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \ + echo " 3. chmod u+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \ + echo '*** WARNING ***' ; \ + fi endif if CAMEL_LOCK_HELPER_SETGID install-exec-local: - chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper - chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper + @if test `whoami` = root ; then \ + chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper ; \ + chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper ; \ + else \ + echo '*** WARNING ***' ; \ + echo "Camel will not be able to open mbox files until you perform the following steps:" ; \ + echo " 1. Become root" ; \ + echo " 2. chgrp $(CAMEL_LOCK_HELPER_GROUP) $(DESTDIR)$(sbindir)/camel-lock-helper" ; \ + echo " 3. chmod g+s $(DESTDIR)$(sbindir)/camel-lock-helper" ; \ + echo '*** WARNING ***' ; \ + fi endif |