aboutsummaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2008-07-12 22:02:16 +0000
committerBadlop <badlop@process-one.net>2008-07-12 22:02:16 +0000
commit871d1dfad6f16e45d8cb3aaf7347a6040c918c5d (patch)
tree12a0ce2b7e6a63486ca7b669bba44959a166fc3c /src/configure
parent* src/configure.ac: Improve legibility (diff)
* src/configure.ac: Allow to execute ejabberd with a normal
system user (thanks to Viq)(EJAB-402) * src/configure: Likewise * src/ejabberdctl.template: Likewise * src/Makefile.in: Likewise * doc/guide.tex: Likewise * doc/guide.html: Likewise SVN Revision: 1439
Diffstat (limited to '')
-rwxr-xr-xsrc/configure19
-rw-r--r--src/configure.ac11
2 files changed, 29 insertions, 1 deletions
diff --git a/src/configure b/src/configure
index e484e110c..5b0fda4e9 100755
--- a/src/configure
+++ b/src/configure
@@ -702,6 +702,7 @@ transient_supervisors
full_xml
SSL_LIBS
SSL_CFLAGS
+INSTALLUSER
LTLIBOBJS'
ac_subst_files=''
ac_precious_vars='build_alias
@@ -1303,6 +1304,8 @@ Optional Features:
(default: yes)
--enable-full-xml use XML features in XMPP stream (ex: CDATA)
(default: no, requires XML compliant clients)
+ --enable-user[=USER] allow this system user to start ejabberd (default:
+ no)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -5864,6 +5867,19 @@ fi
+ENABLEUSER=root
+# Check whether --enable-user was given.
+if test "${enable_user+set}" = set; then
+ enableval=$enable_user; case "${enableval}" in
+ yes) ENABLEUSER=`whoami` ;;
+ *) ENABLEUSER=$enableval
+ esac
+ echo "allow this system user to start ejabberd: $ENABLEUSER"
+fi
+
+INSTALLUSER=$ENABLEUSER
+
+
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -6591,10 +6607,11 @@ transient_supervisors!$transient_supervisors$ac_delim
full_xml!$full_xml$ac_delim
SSL_LIBS!$SSL_LIBS$ac_delim
SSL_CFLAGS!$SSL_CFLAGS$ac_delim
+INSTALLUSER!$INSTALLUSER$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/src/configure.ac b/src/configure.ac
index 15d099dc2..f474bfdb2 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -122,4 +122,15 @@ else
fi
AC_CHECK_HEADER(krb5.h,,)
+ENABLEUSER=root
+AC_ARG_ENABLE(user,
+ [AS_HELP_STRING([--enable-user[[[[=USER]]]]], [allow this system user to start ejabberd (default: no)])],
+ [case "${enableval}" in
+ yes) ENABLEUSER=`whoami` ;;
+ *) ENABLEUSER=$enableval
+ esac
+ echo "allow this system user to start ejabberd: $ENABLEUSER"],
+ [])
+AC_SUBST([INSTALLUSER], [$ENABLEUSER])
+
AC_OUTPUT