aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-30 04:22:43 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-30 04:22:43 +0000
commit90aca9cd5cecd28a32461814938b88e0acb1c02a (patch)
treed5cde5855cc0e0d8eaa6578eaedae8db14feccf5 /configure
parent72a0f04a6717b5c577bead62773333ee5f384082 (diff)
downloadprosody-90aca9cd5cecd28a32461814938b88e0acb1c02a.tar.gz
prosody-90aca9cd5cecd28a32461814938b88e0acb1c02a.zip
Installation improvements (auto-creation of data directories)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure b/configure
index 9d071bc1..dda98cd7 100755
--- a/configure
+++ b/configure
@@ -4,13 +4,14 @@
PREFIX=/usr/local
SYSCONFDIR="$PREFIX/etc/prosody"
+DATADIR="$PREFIX/var/lib/prosody"
LUA_SUFFIX=""
LUA_DIR="/usr"
LUA_BINDIR="/usr/bin"
LUA_INCDIR="/usr/include"
LUA_LIBDIR="/usr/lib"
IDN_LIB=idn
-OPENSSL_LIB=ssl
+OPENSSL_LIB=crypto
# Help
@@ -23,6 +24,8 @@ Configure Prosody prior to building.
Default is $PREFIX
--sysconfdir=DIR Location where the config file should be installed.
Default is \$PREFIX/etc/prosody
+--datadir=DIR Location where the server data should be stored.
+ Default is \$PREFIX/var/lib/prosody
--lua-suffix=SUFFIX Versioning suffix to use in Lua filenames.
Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...)
--with-lua=PREFIX Use Lua from given prefix.
@@ -60,6 +63,10 @@ do
PREFIX="$value"
PREFIX_SET=yes
;;
+ --data-dir=*)
+ DATADIR="$value"
+ DATADIR_SET=yes
+ ;;
--require-config)
REQUIRE_CONFIG=yes
;;
@@ -100,6 +107,14 @@ then
fi
fi
+if [ "$PREFIX_SET" = "yes" -a ! "$DATADIR_SET" = "yes" ]
+then
+ if [ "$PREFIX" = "/usr" ]
+ then DATADIR=/var/lib/prosody
+ else DATADIR=$PREFIX/var/lib/prosody
+ fi
+fi
+
find_program() {
path="$PATH"
item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`"
@@ -221,6 +236,7 @@ cat <<EOF > config.unix
PREFIX=$PREFIX
SYSCONFDIR=$SYSCONFDIR
+DATADIR=$DATADIR
LUA_SUFFIX=$LUA_SUFFIX
LUA_DIR=$LUA_DIR
LUA_INCDIR=$LUA_INCDIR