14 OPENSSL_LIB=crypto |
14 OPENSSL_LIB=crypto |
15 CC=gcc |
15 CC=gcc |
16 LD=gcc |
16 LD=gcc |
17 |
17 |
18 CFLAGS="-fPIC -Wall" |
18 CFLAGS="-fPIC -Wall" |
19 LFLAGS="-shared" |
19 LDFLAGS="-shared" |
20 |
20 |
21 # Help |
21 # Help |
22 |
22 |
23 show_help() { |
23 show_help() { |
24 cat <<EOF |
24 cat <<EOF |
25 Configure Prosody prior to building. |
25 Configure Prosody prior to building. |
26 |
26 |
27 --help This help. |
27 --help This help. |
28 --ostype=OS Use one of the OS presets. |
28 --ostype=OS Use one of the OS presets. |
29 May be one of: debian, macosx |
29 May be one of: debian, macosx, linux |
30 --prefix=DIR Prefix where Prosody should be installed. |
30 --prefix=DIR Prefix where Prosody should be installed. |
31 Default is $PREFIX |
31 Default is $PREFIX |
32 --sysconfdir=DIR Location where the config file should be installed. |
32 --sysconfdir=DIR Location where the config file should be installed. |
33 Default is \$PREFIX/etc/prosody |
33 Default is \$PREFIX/etc/prosody |
34 --datadir=DIR Location where the server data should be stored. |
34 --datadir=DIR Location where the server data should be stored. |
45 Default is $IDN_LIB |
45 Default is $IDN_LIB |
46 --with-ssl=LIB The name of the SSL to link with. |
46 --with-ssl=LIB The name of the SSL to link with. |
47 Default is $OPENSSL_LIB |
47 Default is $OPENSSL_LIB |
48 --cflags=FLAGS Flags to pass to the compiler |
48 --cflags=FLAGS Flags to pass to the compiler |
49 Default is $CFLAGS |
49 Default is $CFLAGS |
50 --lflags=FLAGS Flags to pass to the linker |
50 --ldflags=FLAGS Flags to pass to the linker |
51 Default is $LFLAGS |
51 Default is $LDFLAGS |
52 --c-compiler=CC The C compiler to use when building modules. |
52 --c-compiler=CC The C compiler to use when building modules. |
53 Default is $CC |
53 Default is $CC |
54 --linker=CC The linker to use when building modules. |
54 --linker=CC The linker to use when building modules. |
55 Default is $LD |
55 Default is $LD |
56 --require-config Will cause Prosody to refuse to run when |
56 --require-config Will cause Prosody to refuse to run when |
142 LUA_INCDIR=/usr/include/lua5.1; |
142 LUA_INCDIR=/usr/include/lua5.1; |
143 LUA_INCDIR_SET=yes |
143 LUA_INCDIR_SET=yes |
144 fi |
144 fi |
145 if [ "$OSTYPE" = "macosx" ] |
145 if [ "$OSTYPE" = "macosx" ] |
146 then LUA_INCDIR=/usr/local/include; |
146 then LUA_INCDIR=/usr/local/include; |
147 LUA_INCDIR_SET=yes |
147 LUA_INCDIR_SET=yes |
148 LUA_LIBDIR=/usr/local/lib |
148 LUA_LIBDIR=/usr/local/lib |
149 LUA_LIBDIR_SET=yes |
149 LUA_LIBDIR_SET=yes |
150 CFLAGS="-Wall" |
150 CFLAGS="-Wall" |
151 LFLAGS="-bundle -undefined dynamic_lookup" |
151 LDFLAGS="-bundle -undefined dynamic_lookup" |
152 fi |
152 fi |
|
153 if [ "$OSTYPE" = "linux" ] |
|
154 then LUA_INCDIR=/usr/local/include; |
|
155 LUA_INCDIR_SET=yet |
|
156 LUA_LIBDIR=/usr/local/lib |
|
157 LUA_LIBDIR_SET=yet |
|
158 CFLAGS="-Wall -fPIC" |
|
159 LDFLAGS="-shared" |
|
160 fi |
153 fi |
161 fi |
154 |
162 |
155 if [ "$PREFIX_SET" = "yes" -a ! "$SYSCONFDIR_SET" = "yes" ] |
163 if [ "$PREFIX_SET" = "yes" -a ! "$SYSCONFDIR_SET" = "yes" ] |
156 then |
164 then |
157 if [ "$PREFIX" = "/usr" ] |
165 if [ "$PREFIX" = "/usr" ] |