configure

changeset 502
21dc299387a6
parent 467
66f145f5c932
child 511
f9ab28562fda
equal deleted inserted replaced
501:ea61e191043e 502:21dc299387a6
2 2
3 # Defaults 3 # Defaults
4 4
5 PREFIX=/usr/local 5 PREFIX=/usr/local
6 SYSCONFDIR="$PREFIX/etc/prosody" 6 SYSCONFDIR="$PREFIX/etc/prosody"
7 DATADIR="$PREFIX/var/lib/prosody"
7 LUA_SUFFIX="" 8 LUA_SUFFIX=""
8 LUA_DIR="/usr" 9 LUA_DIR="/usr"
9 LUA_BINDIR="/usr/bin" 10 LUA_BINDIR="/usr/bin"
10 LUA_INCDIR="/usr/include" 11 LUA_INCDIR="/usr/include"
11 LUA_LIBDIR="/usr/lib" 12 LUA_LIBDIR="/usr/lib"
12 IDN_LIB=idn 13 IDN_LIB=idn
13 OPENSSL_LIB=ssl 14 OPENSSL_LIB=crypto
14 15
15 # Help 16 # Help
16 17
17 show_help() { 18 show_help() {
18 cat <<EOF 19 cat <<EOF
21 --help This help. 22 --help This help.
22 --prefix=DIR Prefix where Prosody should be installed. 23 --prefix=DIR Prefix where Prosody should be installed.
23 Default is $PREFIX 24 Default is $PREFIX
24 --sysconfdir=DIR Location where the config file should be installed. 25 --sysconfdir=DIR Location where the config file should be installed.
25 Default is \$PREFIX/etc/prosody 26 Default is \$PREFIX/etc/prosody
27 --datadir=DIR Location where the server data should be stored.
28 Default is \$PREFIX/var/lib/prosody
26 --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames. 29 --lua-suffix=SUFFIX Versioning suffix to use in Lua filenames.
27 Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...) 30 Default is "$LUA_SUFFIX" (lua$LUA_SUFFIX...)
28 --with-lua=PREFIX Use Lua from given prefix. 31 --with-lua=PREFIX Use Lua from given prefix.
29 Default is $LUA_DIR 32 Default is $LUA_DIR
30 --with-lua-include=DIR You can also specify Lua's includes dir. 33 --with-lua-include=DIR You can also specify Lua's includes dir.
58 ;; 61 ;;
59 --prefix=*) 62 --prefix=*)
60 PREFIX="$value" 63 PREFIX="$value"
61 PREFIX_SET=yes 64 PREFIX_SET=yes
62 ;; 65 ;;
66 --data-dir=*)
67 DATADIR="$value"
68 DATADIR_SET=yes
69 ;;
63 --require-config) 70 --require-config)
64 REQUIRE_CONFIG=yes 71 REQUIRE_CONFIG=yes
65 ;; 72 ;;
66 --lua-suffix=*) 73 --lua-suffix=*)
67 LUA_SUFFIX="$value" 74 LUA_SUFFIX="$value"
98 then SYSCONFDIR=/etc/prosody 105 then SYSCONFDIR=/etc/prosody
99 else SYSCONFDIR=$PREFIX/etc/prosody 106 else SYSCONFDIR=$PREFIX/etc/prosody
100 fi 107 fi
101 fi 108 fi
102 109
110 if [ "$PREFIX_SET" = "yes" -a ! "$DATADIR_SET" = "yes" ]
111 then
112 if [ "$PREFIX" = "/usr" ]
113 then DATADIR=/var/lib/prosody
114 else DATADIR=$PREFIX/var/lib/prosody
115 fi
116 fi
117
103 find_program() { 118 find_program() {
104 path="$PATH" 119 path="$PATH"
105 item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`" 120 item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`"
106 path="`echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p'`" 121 path="`echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p'`"
107 found="no" 122 found="no"
219 # This file was automatically generated by the configure script. 234 # This file was automatically generated by the configure script.
220 # Run "./configure --help" for details. 235 # Run "./configure --help" for details.
221 236
222 PREFIX=$PREFIX 237 PREFIX=$PREFIX
223 SYSCONFDIR=$SYSCONFDIR 238 SYSCONFDIR=$SYSCONFDIR
239 DATADIR=$DATADIR
224 LUA_SUFFIX=$LUA_SUFFIX 240 LUA_SUFFIX=$LUA_SUFFIX
225 LUA_DIR=$LUA_DIR 241 LUA_DIR=$LUA_DIR
226 LUA_INCDIR=$LUA_INCDIR 242 LUA_INCDIR=$LUA_INCDIR
227 LUA_LIBDIR=$LUA_LIBDIR 243 LUA_LIBDIR=$LUA_LIBDIR
228 LUA_BINDIR=$LUA_BINDIR 244 LUA_BINDIR=$LUA_BINDIR

mercurial