25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

* src/configure.ac: Update installation permissions (EJAB-402)

* src/configure: Likewise

* src/Makefile.in: The mnesia, ebin and priv dirs are now
installed in different locations. Install header files and
documentation (EJAB-696)
* doc/guide.tex: Likewise
* doc/guide.html: Likewise

* include/*.hrl: Place for all ejabberd header files (EJAB-696)
* src/*/*.erl: Update references to header files
* src/*/Makefile.in: Include the include/ dir

SVN Revision: 1441
This commit is contained in:
Badlop 2008-07-13 19:10:01 +00:00
parent 6134205383
commit f25316c1e7
39 changed files with 311 additions and 143 deletions

View File

@ -1,5 +1,18 @@
2008-07-13 Badlop <badlop@process-one.net> 2008-07-13 Badlop <badlop@process-one.net>
* src/configure.ac: Update installation permissions (EJAB-402)
* src/configure: Likewise
* src/Makefile.in: The mnesia, ebin and priv dirs are now
installed in different locations. Install header files and
documentation (EJAB-696)
* doc/guide.tex: Likewise
* doc/guide.html: Likewise
* include/*.hrl: Place for all ejabberd header files (EJAB-696)
* src/*/*.erl: Update references to header files
* src/*/Makefile.in: Include the include/ dir
* src/configure.ac: Allow to execute ejabberd with a normal * src/configure.ac: Allow to execute ejabberd with a normal
system user (thanks to Viq)(EJAB-402) system user (thanks to Viq)(EJAB-402)
* src/configure: Likewise * src/configure: Likewise

View File

@ -16,7 +16,7 @@ all: release pdf html
release: release:
@echo "Notes for the releaser:" @echo "Notes for the releaser:"
@echo "* Do not forget to add a link to the release notes in guide.tex" @echo "* Do not forget to add a link to the release notes in guide.tex"
@echo "* Do not forget to update the version number in src/ejabberd.hrl!" @echo "* Do not forget to update the version number in src/ejabberd.app!"
@echo "* Do not forget to update the features in introduction.tex (including \new{} and \improved{} tags)." @echo "* Do not forget to update the features in introduction.tex (including \new{} and \improved{} tags)."
@echo "Press any key to continue" @echo "Press any key to continue"
@read foo @read foo

View File

@ -359,26 +359,31 @@ To get the full list run the command:
</PRE><P>Note that you probably need administrative privileges in the system </PRE><P>Note that you probably need administrative privileges in the system
to install <TT>ejabberd</TT>.</P><P>The files and directories created are, by default: to install <TT>ejabberd</TT>.</P><P>The files and directories created are, by default:
</P><DL CLASS="description"><DT CLASS="dt-description"> </P><DL CLASS="description"><DT CLASS="dt-description">
<B><TT>/etc/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Configuration files: <B><TT>/etc/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Configuration directory:
<DL CLASS="description"><DT CLASS="dt-description"> <DL CLASS="description"><DT CLASS="dt-description">
<B><TT>ejabberd.cfg</TT></B></DT><DD CLASS="dd-description"> ejabberd configuration file <B><TT>ejabberd.cfg</TT></B></DT><DD CLASS="dd-description"> ejabberd configuration file
</DD><DT CLASS="dt-description"><B><TT>ejabberdctl.cfg</TT></B></DT><DD CLASS="dd-description"> Configuration file of the administration script </DD><DT CLASS="dt-description"><B><TT>ejabberdctl.cfg</TT></B></DT><DD CLASS="dd-description"> Configuration file of the administration script
</DD><DT CLASS="dt-description"><B><TT>inetrc</TT></B></DT><DD CLASS="dd-description"> Network DNS configuration </DD><DT CLASS="dt-description"><B><TT>inetrc</TT></B></DT><DD CLASS="dd-description"> Network DNS configuration file
</DD></DL>
</DD><DT CLASS="dt-description"><B><TT>/lib/ejabberd/</TT></B></DT><DD CLASS="dd-description">
<DL CLASS="description"><DT CLASS="dt-description">
<B><TT>ebin/</TT></B></DT><DD CLASS="dd-description"> Erlang binary files (*.beam)
</DD><DT CLASS="dt-description"><B><TT>include/</TT></B></DT><DD CLASS="dd-description"> Erlang header files (*.hrl)
</DD><DT CLASS="dt-description"><B><TT>priv/</TT></B></DT><DD CLASS="dd-description"> Additional files required at runtime
<DL CLASS="description"><DT CLASS="dt-description">
<B><TT>bin/</TT></B></DT><DD CLASS="dd-description"> Binary C programs
</DD><DT CLASS="dt-description"><B><TT>lib/</TT></B></DT><DD CLASS="dd-description"> Binary system libraries (*.so)
</DD><DT CLASS="dt-description"><B><TT>msgs/</TT></B></DT><DD CLASS="dd-description"> Translation files (*.msgs)
</DD></DL>
</DD></DL> </DD></DL>
</DD><DT CLASS="dt-description"><B><TT>/sbin/ejabberdctl</TT></B></DT><DD CLASS="dd-description"> Administration script (see section&#XA0;<A HREF="#ejabberdctl">4.1</A>) </DD><DT CLASS="dt-description"><B><TT>/sbin/ejabberdctl</TT></B></DT><DD CLASS="dd-description"> Administration script (see section&#XA0;<A HREF="#ejabberdctl">4.1</A>)
</DD><DT CLASS="dt-description"><B><TT>/var/lib/ejabberd/</TT></B></DT><DD CLASS="dd-description"> </DD><DT CLASS="dt-description"><B><TT>/share/doc/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Documentation of ejabberd
</DD><DT CLASS="dt-description"><B><TT>/var/lib/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Spool directory:
<DL CLASS="description"><DT CLASS="dt-description"> <DL CLASS="description"><DT CLASS="dt-description">
<B><TT>.erlang.cookie</TT></B></DT><DD CLASS="dd-description"> Erlang cookie file (see section <A HREF="#cookie">5.3</A>) <B><TT>.erlang.cookie</TT></B></DT><DD CLASS="dd-description"> Erlang cookie file (see section <A HREF="#cookie">5.3</A>)
</DD><DT CLASS="dt-description"><B><TT>db</TT></B></DT><DD CLASS="dd-description"> Mnesia database spool files </DD><DT CLASS="dt-description"><B><TT>acl.DCD, ...</TT></B></DT><DD CLASS="dd-description"> Mnesia database spool files (*.DCD, *.DCL, *.DAT)
</DD><DT CLASS="dt-description"><B><TT>ebin</TT></B></DT><DD CLASS="dd-description"> Binary Erlang files (*.beam)
</DD><DT CLASS="dt-description"><B><TT>priv</TT></B></DT><DD CLASS="dd-description">
<DL CLASS="description"><DT CLASS="dt-description">
<B><TT>bin</TT></B></DT><DD CLASS="dd-description"> Binary C programs
</DD><DT CLASS="dt-description"><B><TT>lib</TT></B></DT><DD CLASS="dd-description"> Binary system libraries (*.so)
</DD><DT CLASS="dt-description"><B><TT>msgs</TT></B></DT><DD CLASS="dd-description"> Translated strings (*.msgs)
</DD></DL> </DD></DL>
</DD></DL> </DD><DT CLASS="dt-description"><B><TT>/var/log/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Log directory (see section&#XA0;<A HREF="#logfiles">7.2</A>):
</DD><DT CLASS="dt-description"><B><TT>/var/log/ejabberd/</TT></B></DT><DD CLASS="dd-description"> Log files (see section&#XA0;<A HREF="#logfiles">7.2</A>):
<DL CLASS="description"><DT CLASS="dt-description"> <DL CLASS="description"><DT CLASS="dt-description">
<B><TT>ejabberd.log</TT></B></DT><DD CLASS="dd-description"> ejabberd service log <B><TT>ejabberd.log</TT></B></DT><DD CLASS="dd-description"> ejabberd service log
</DD><DT CLASS="dt-description"><B><TT>sasl.log</TT></B></DT><DD CLASS="dd-description"> Erlang/OTP system log </DD><DT CLASS="dt-description"><B><TT>sasl.log</TT></B></DT><DD CLASS="dd-description"> Erlang/OTP system log
@ -2904,7 +2909,7 @@ Starts the Erlang system detached from the system console.
Specify the directory where Erlang binary files (*.beam) are located. Specify the directory where Erlang binary files (*.beam) are located.
</DD><DT CLASS="dt-description"><B><TT>-s ejabberd</TT></B></DT><DD CLASS="dd-description"> </DD><DT CLASS="dt-description"><B><TT>-s ejabberd</TT></B></DT><DD CLASS="dd-description">
Tell Erlang runtime system to start the <TT>ejabberd</TT> application. Tell Erlang runtime system to start the <TT>ejabberd</TT> application.
</DD><DT CLASS="dt-description"><B><TT>-mnesia dir "/var/lib/ejabberd/db/nodename"</TT></B></DT><DD CLASS="dd-description"> </DD><DT CLASS="dt-description"><B><TT>-mnesia dir "/var/lib/ejabberd/"</TT></B></DT><DD CLASS="dd-description">
Specify the Mnesia database directory. Specify the Mnesia database directory.
</DD><DT CLASS="dt-description"><B><TT>-sasl sasl_error_logger {file, "/var/log/ejabberd/sasl.log"}</TT></B></DT><DD CLASS="dd-description"> </DD><DT CLASS="dt-description"><B><TT>-sasl sasl_error_logger {file, "/var/log/ejabberd/sasl.log"}</TT></B></DT><DD CLASS="dd-description">
Path to the Erlang/OTP system log file. Path to the Erlang/OTP system log file.
@ -3074,10 +3079,10 @@ Contains IP addresses of clients.
If the loglevel is set to 5, it contains whole conversations and passwords. If the loglevel is set to 5, it contains whole conversations and passwords.
If a logrotate system is used, there may be several log files with similar information, If a logrotate system is used, there may be several log files with similar information,
so it is preferable to secure the whole <TT>/var/log/ejabberd/</TT> directory. so it is preferable to secure the whole <TT>/var/log/ejabberd/</TT> directory.
</DD><DT CLASS="dt-description"><B><TT>Mnesia database spool files: /var/lib/ejabberd/db/*</TT></B></DT><DD CLASS="dd-description"> </DD><DT CLASS="dt-description"><B><TT>Mnesia database spool files in /var/lib/ejabberd/</TT></B></DT><DD CLASS="dd-description">
The files store binary data, but some parts are still readable. The files store binary data, but some parts are still readable.
The files are generated by Mnesia and their permissions cannot be set directly, The files are generated by Mnesia and their permissions cannot be set directly,
so it is preferable to secure the whole <TT>/var/lib/ejabberd/db/</TT> directory. so it is preferable to secure the whole <TT>/var/lib/ejabberd/</TT> directory.
</DD><DT CLASS="dt-description"><B><TT>Erlang cookie file: /var/lib/ejabberd/.erlang.cookie</TT></B></DT><DD CLASS="dd-description"> </DD><DT CLASS="dt-description"><B><TT>Erlang cookie file: /var/lib/ejabberd/.erlang.cookie</TT></B></DT><DD CLASS="dd-description">
See section <A HREF="#cookie">5.3</A>. See section <A HREF="#cookie">5.3</A>.
</DD></DL><P> <A NAME="clustering"></A> </P><!--TOC chapter Clustering--> </DD></DL><P> <A NAME="clustering"></A> </P><!--TOC chapter Clustering-->

View File

@ -360,26 +360,31 @@ to install \term{ejabberd}.
The files and directories created are, by default: The files and directories created are, by default:
\begin{description} \begin{description}
\titem{/etc/ejabberd/} Configuration files: \titem{/etc/ejabberd/} Configuration directory:
\begin{description} \begin{description}
\titem{ejabberd.cfg} ejabberd configuration file \titem{ejabberd.cfg} ejabberd configuration file
\titem{ejabberdctl.cfg} Configuration file of the administration script \titem{ejabberdctl.cfg} Configuration file of the administration script
\titem{inetrc} Network DNS configuration \titem{inetrc} Network DNS configuration file
\end{description}
\titem{/lib/ejabberd/}
\begin{description}
\titem{ebin/} Erlang binary files (*.beam)
\titem{include/} Erlang header files (*.hrl)
\titem{priv/} Additional files required at runtime
\begin{description}
\titem{bin/} Binary C programs
\titem{lib/} Binary system libraries (*.so)
\titem{msgs/} Translation files (*.msgs)
\end{description}
\end{description} \end{description}
\titem{/sbin/ejabberdctl} Administration script (see section~\ref{ejabberdctl}) \titem{/sbin/ejabberdctl} Administration script (see section~\ref{ejabberdctl})
\titem{/var/lib/ejabberd/} \titem{/share/doc/ejabberd/} Documentation of ejabberd
\titem{/var/lib/ejabberd/} Spool directory:
\begin{description} \begin{description}
\titem{.erlang.cookie} Erlang cookie file (see section \ref{cookie}) \titem{.erlang.cookie} Erlang cookie file (see section \ref{cookie})
\titem{db} Mnesia database spool files \titem{acl.DCD, ...} Mnesia database spool files (*.DCD, *.DCL, *.DAT)
\titem{ebin} Binary Erlang files (*.beam)
\titem{priv}
\begin{description}
\titem{bin} Binary C programs
\titem{lib} Binary system libraries (*.so)
\titem{msgs} Translated strings (*.msgs)
\end{description} \end{description}
\end{description} \titem{/var/log/ejabberd/} Log directory (see section~\ref{logfiles}):
\titem{/var/log/ejabberd/} Log files (see section~\ref{logfiles}):
\begin{description} \begin{description}
\titem{ejabberd.log} ejabberd service log \titem{ejabberd.log} ejabberd service log
\titem{sasl.log} Erlang/OTP system log \titem{sasl.log} Erlang/OTP system log
@ -3720,7 +3725,7 @@ The command line parameters:
Specify the directory where Erlang binary files (*.beam) are located. Specify the directory where Erlang binary files (*.beam) are located.
\titem{-s ejabberd} \titem{-s ejabberd}
Tell Erlang runtime system to start the \ejabberd{} application. Tell Erlang runtime system to start the \ejabberd{} application.
\titem{-mnesia dir "/var/lib/ejabberd/db/nodename"} \titem{-mnesia dir "/var/lib/ejabberd/"}
Specify the Mnesia database directory. Specify the Mnesia database directory.
\titem{-sasl sasl\_error\_logger \{file, "/var/log/ejabberd/sasl.log"\}} \titem{-sasl sasl\_error\_logger \{file, "/var/log/ejabberd/sasl.log"\}}
Path to the Erlang/OTP system log file. Path to the Erlang/OTP system log file.
@ -3953,10 +3958,10 @@ write and execute those files and directories.
If the loglevel is set to 5, it contains whole conversations and passwords. If the loglevel is set to 5, it contains whole conversations and passwords.
If a logrotate system is used, there may be several log files with similar information, If a logrotate system is used, there may be several log files with similar information,
so it is preferable to secure the whole \term{/var/log/ejabberd/} directory. so it is preferable to secure the whole \term{/var/log/ejabberd/} directory.
\titem{Mnesia database spool files: /var/lib/ejabberd/db/*} \titem{Mnesia database spool files in /var/lib/ejabberd/}
The files store binary data, but some parts are still readable. The files store binary data, but some parts are still readable.
The files are generated by Mnesia and their permissions cannot be set directly, The files are generated by Mnesia and their permissions cannot be set directly,
so it is preferable to secure the whole \term{/var/lib/ejabberd/db/} directory. so it is preferable to secure the whole \term{/var/lib/ejabberd/} directory.
\titem{Erlang cookie file: /var/lib/ejabberd/.erlang.cookie} \titem{Erlang cookie file: /var/lib/ejabberd/.erlang.cookie}
See section \ref{cookie}. See section \ref{cookie}.
\end{description} \end{description}

View File

@ -12,32 +12,34 @@ ERLANG_CFLAGS= @ERLANG_CFLAGS@
EXPAT_LIBS = @EXPAT_LIBS@ EXPAT_LIBS = @EXPAT_LIBS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
ERLC_FLAGS += @ERLANG_SSL39@
ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj ASN_FLAGS = -bber_bin +der +compact_bit_string +optimize +noobj
EFLAGS += @ERLANG_SSL39@
EFLAGS += -I ../include
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
ERLC_FLAGS+=+debug_info EFLAGS+=+debug_info
endif endif
ifdef ejabberd_debug ifdef ejabberd_debug
ERLC_FLAGS+=-Dejabberd_debug EFLAGS+=-Dejabberd_debug
endif endif
ifeq (@hipe@, true) ifeq (@hipe@, true)
ERLC_FLAGS+=+native EFLAGS+=+native
endif endif
ifeq (@roster_gateway_workaround@, true) ifeq (@roster_gateway_workaround@, true)
ERLC_FLAGS+=-DROSTER_GATEWAY_WORKAROUND EFLAGS+=-DROSTER_GATEWAY_WORKAROUND
endif endif
ifeq (@full_xml@, true) ifeq (@full_xml@, true)
ERLC_FLAGS+=-DFULL_XML_SUPPORT EFLAGS+=-DFULL_XML_SUPPORT
endif endif
ifeq (@transient_supervisors@, false) ifeq (@transient_supervisors@, false)
ERLC_FLAGS+=-DNO_TRANSIENT_SUPERVISORS EFLAGS+=-DNO_TRANSIENT_SUPERVISORS
endif endif
INSTALL_EPAM= INSTALL_EPAM=
@ -58,18 +60,47 @@ BEAMS = $(SOURCES:.erl=.beam)
DESTDIR = DESTDIR =
EJABBERDDIR = $(DESTDIR)@localstatedir@/lib/ejabberd # /etc/ejabberd/
BEAMDIR = $(EJABBERDDIR)/ebin
SPOOLDIR = $(EJABBERDDIR)/db
PRIVDIR = $(EJABBERDDIR)/priv
COOKIEFILE = $(EJABBERDDIR)/.erlang.cookie
SODIR = $(PRIVDIR)/lib
PBINDIR = $(PRIVDIR)/bin
MSGSDIR = $(PRIVDIR)/msgs
LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd ETCDIR = $(DESTDIR)@sysconfdir@/ejabberd
# /sbin/
SBINDIR = $(DESTDIR)@sbindir@ SBINDIR = $(DESTDIR)@sbindir@
# /lib/ejabberd/
EJABBERDDIR = $(DESTDIR)@libdir@/ejabberd
# /share/doc/ejabberd
PACKAGE_TARNAME = @PACKAGE_TARNAME@
DATAROOTDIR = @datarootdir@
DOCDIR = @docdir@
# /usr/lib/ejabberd/ebin/
BEAMDIR = $(EJABBERDDIR)/ebin
# /usr/lib/ejabberd/include/
INCLUDEDIR = $(EJABBERDDIR)/include
# /usr/lib/ejabberd/priv/
PRIVDIR = $(EJABBERDDIR)/priv
# /usr/lib/ejabberd/priv/bin
PBINDIR = $(PRIVDIR)/bin
# /usr/lib/ejabberd/priv/lib
SODIR = $(PRIVDIR)/lib
# /usr/lib/ejabberd/priv/msgs
MSGSDIR = $(PRIVDIR)/msgs
# /var/lib/ejabberd/
SPOOLDIR = $(DESTDIR)@localstatedir@/lib/ejabberd
# /var/lib/ejabberd/.erlang.cookie
COOKIEFILE = $(SPOOLDIR)/.erlang.cookie
# /var/log/ejabberd/
LOGDIR = $(DESTDIR)@localstatedir@/log/ejabberd
ifeq ($(shell uname),Darwin) ifeq ($(shell uname),Darwin)
DYNAMIC_LIB_CFLAGS = -fPIC -bundle -flat_namespace -undefined suppress DYNAMIC_LIB_CFLAGS = -fPIC -bundle -flat_namespace -undefined suppress
else else
@ -86,7 +117,7 @@ $(BEAMS): $(ERLBEHAVBEAMS)
all-recursive: $(ERLBEHAVBEAMS) all-recursive: $(ERLBEHAVBEAMS)
%.beam: %.erl %.beam: %.erl
@ERLC@ -W $(ERLC_FLAGS) $< @ERLC@ -W $(EFLAGS) $<
all-recursive install-recursive uninstall-recursive \ all-recursive install-recursive uninstall-recursive \
@ -101,7 +132,7 @@ mostlyclean-recursive maintainer-clean-recursive:
%.hrl: %.asn1 %.hrl: %.asn1
@ERLC@ $(ASN_FLAGS) $< @ERLC@ $(ASN_FLAGS) $<
@ERLC@ -W $(ERLC_FLAGS) $*.erl @ERLC@ -W $(EFLAGS) $*.erl
$(ERLSHLIBS): %.so: %.c $(ERLSHLIBS): %.so: %.c
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) \ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) \
@ -114,41 +145,89 @@ $(ERLSHLIBS): %.so: %.c
$(DYNAMIC_LIB_CFLAGS) $(DYNAMIC_LIB_CFLAGS)
install: all install: all
#
# Configuration files
install -d -m 750 -g @INSTALLUSER@ $(ETCDIR)
[ -f $(ETCDIR)/ejabberd.cfg ] \
&& install -b -m 640 -g @INSTALLUSER@ ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new \
|| install -b -m 640 -g @INSTALLUSER@ ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg
sed -e "s*@rootdir@*@prefix@*" \
-e "s*@installuser@*@INSTALLUSER@*" \
-e "s*@LIBDIR@*@libdir@*" \
-e "s*@SYSCONFDIR@*@sysconfdir@*" \
-e "s*@LOCALSTATEDIR@*@localstatedir@*" \
-e "s*@erl@*@ERL@*" ejabberdctl.template \
> ejabberdctl.example
[ -f $(ETCDIR)/ejabberdctl.cfg ] \
&& install -b -m 640 -g @INSTALLUSER@ ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \
|| install -b -m 640 -g @INSTALLUSER@ ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg
install -b -m 644 -g @INSTALLUSER@ inetrc $(ETCDIR)/inetrc
#
# Administration script
install -m 550 -g @INSTALLUSER@ ejabberdctl.example $(SBINDIR)/ejabberdctl
#
# Binary Erlang files
install -d $(BEAMDIR) install -d $(BEAMDIR)
install -m 644 *.app $(BEAMDIR)
install -m 644 *.beam $(BEAMDIR) install -m 644 *.beam $(BEAMDIR)
rm -f $(BEAMDIR)/configure.beam rm -f $(BEAMDIR)/configure.beam
install -m 644 *.app $(BEAMDIR) #
install -d -m 750 -o @INSTALLUSER@ $(SPOOLDIR) # ejabberd header files
chown -R @INSTALLUSER@ $(SPOOLDIR)/* install -d $(INCLUDEDIR)
chmod -R 750 $(SPOOLDIR)/* install -m 644 ../include/*.hrl $(INCLUDEDIR)
install -d $(SODIR) #
# Binary C programs
install -d $(PBINDIR) install -d $(PBINDIR)
install -m 644 *.so $(SODIR)
$(INSTALL_EPAM) $(INSTALL_EPAM)
#
# Binary system libraries
install -d $(SODIR)
install -m 644 *.so $(SODIR)
#
# Translated strings
install -d $(MSGSDIR) install -d $(MSGSDIR)
install -m 644 msgs/*.msg $(MSGSDIR) install -m 644 msgs/*.msg $(MSGSDIR)
install -d -m 750 -o @INSTALLUSER@ $(ETCDIR) #
[ -f $(ETCDIR)/ejabberd.cfg ] && install -b -m 644 ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg-new || install -b -m 644 -o @INSTALLUSER@ ejabberd.cfg.example $(ETCDIR)/ejabberd.cfg # Spool directory
sed -e "s*@rootdir@*@prefix@*" -e "s*@installuser@*@INSTALLUSER@*" -e "s*@erl@*@ERL@*" ejabberdctl.template > ejabberdctl.example install -d -m 750 -o @INSTALLUSER@ $(SPOOLDIR)
[ -f $(ETCDIR)/ejabberdctl.cfg ] && install -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new || install -b -m 644 -o @INSTALLUSER@ ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg chown -R @INSTALLUSER@ $(SPOOLDIR)
install -b -m 644 inetrc $(ETCDIR)/inetrc chmod -R 750 $(SPOOLDIR)
install -m 550 -o @INSTALLUSER@ ejabberdctl.example $(SBINDIR)/ejabberdctl [ ! -f $(COOKIEFILE) ] || chown -o @INSTALLUSER@ $(COOKIEFILE) ; chmod 400 $(COOKIEFILE)
#
# Log directory
install -d -m 750 -o @INSTALLUSER@ $(LOGDIR) install -d -m 750 -o @INSTALLUSER@ $(LOGDIR)
chown @INSTALLUSER@ $(COOKIEFILE) chown -R @INSTALLUSER@ $(LOGDIR)
chmod -R 750 $(LOGDIR)
#
# Documentation
install -d $(DOCDIR)
install ../doc/guide.html $(DOCDIR)
install ../doc/*.png $(DOCDIR)
install ../doc/*.txt $(DOCDIR)
uninstall: uninstall-binary uninstall: uninstall-binary
uninstall-binary: uninstall-binary:
rm -rf $(BEAMDIR) rm -f $(SBINDIR)/ejabberdctl
rm -rf $(SODIR) rm -fr $(DOCDIR)
rm -rf $(MSGSDIR) rm -f $(BEAMDIR)/*.beam
rm -rf $(PRIVDIR) rm -f $(BEAMDIR)/*.app
rm -rf $(SBINDIR)/ejabberdctl rm -fr $(BEAMDIR)
rm -f $(INCLUDEDIR)/*.hrl
rm -fr $(INCLUDEDIR)
rm -fr $(PBINDIR)
rm -f $(SODIR)/*.so
rm -fr $(SODIR)
rm -f $(MSGSDIR)/*.msgs
rm -fr $(MSGSDIR)
rm -fr $(PRIVDIR)
rm -fr $(EJABBERDDIR)
uninstall-all: uninstall-binary uninstall-all: uninstall-binary
rm -rf $(ETCDIR) rm -rf $(ETCDIR)
rm -rf $(LOGDIR)
rm -rf $(EJABBERDDIR) rm -rf $(EJABBERDDIR)
rm -rf $(SPOOLDIR)
rm -rf $(LOGDIR)
clean: clean-recursive clean-local clean: clean-recursive clean-local

84
src/configure vendored
View File

@ -1,6 +1,8 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61. # Generated by GNU Autoconf 2.61 for ejabberd.erl version.
#
# Report bugs to <ejabberd@process-one.net>.
# #
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@ -570,13 +572,12 @@ MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh} SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package. # Identity of this package.
PACKAGE_NAME= PACKAGE_NAME='ejabberd.erl'
PACKAGE_TARNAME= PACKAGE_TARNAME='ejabberd'
PACKAGE_VERSION= PACKAGE_VERSION='version'
PACKAGE_STRING= PACKAGE_STRING='ejabberd.erl version'
PACKAGE_BUGREPORT= PACKAGE_BUGREPORT='ejabberd@process-one.net'
ac_unique_file="ejabberd.erl"
# Factoring default headers for most tests. # Factoring default headers for most tests.
ac_includes_default="\ ac_includes_default="\
#include <stdio.h> #include <stdio.h>
@ -752,7 +753,7 @@ sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var' localstatedir='${prefix}/var'
includedir='${prefix}/include' includedir='${prefix}/include'
oldincludedir='/usr/include' oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE}' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
infodir='${datarootdir}/info' infodir='${datarootdir}/info'
htmldir='${docdir}' htmldir='${docdir}'
dvidir='${docdir}' dvidir='${docdir}'
@ -1216,7 +1217,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures this package to adapt to many kinds of systems. \`configure' configures ejabberd.erl version to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1264,7 +1265,7 @@ Fine tuning of the installation directories:
--infodir=DIR info documentation [DATAROOTDIR/info] --infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale] --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man] --mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --docdir=DIR documentation root [DATAROOTDIR/doc/ejabberd]
--htmldir=DIR html documentation [DOCDIR] --htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR]
@ -1276,7 +1277,9 @@ _ACEOF
fi fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of ejabberd.erl version:";;
esac
cat <<\_ACEOF cat <<\_ACEOF
Optional Features: Optional Features:
@ -1331,6 +1334,7 @@ Some influential environment variables:
Use these variables to override the choices made by `configure' or to help Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations. it to find libraries and programs with nonstandard names/locations.
Report bugs to <ejabberd@process-one.net>.
_ACEOF _ACEOF
ac_status=$? ac_status=$?
fi fi
@ -1391,7 +1395,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
configure ejabberd.erl configure version
generated by GNU Autoconf 2.61 generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@ -1405,7 +1409,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was It was created by ejabberd.erl $as_me version, which was
generated by GNU Autoconf 2.61. Invocation command line was generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@ $ $0 $@
@ -1738,6 +1742,14 @@ fi
@ -4132,7 +4144,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------- ##
## Report this to ejabberd@process-one.net ##
## --------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@ -4377,7 +4394,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------- ##
## Report this to ejabberd@process-one.net ##
## --------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@ -4621,7 +4643,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------- ##
## Report this to ejabberd@process-one.net ##
## --------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@ -4889,7 +4916,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------- ##
## Report this to ejabberd@process-one.net ##
## --------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@ -5677,7 +5709,12 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------- ##
## Report this to ejabberd@process-one.net ##
## --------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ echo "$as_me:$LINENO: checking for $ac_header" >&5 { echo "$as_me:$LINENO: checking for $ac_header" >&5
@ -5850,7 +5887,12 @@ echo "$as_me: WARNING: krb5.h: section \"Present But Cannot Be Compiled\"" >
echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;} echo "$as_me: WARNING: krb5.h: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5 { echo "$as_me:$LINENO: WARNING: krb5.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;} echo "$as_me: WARNING: krb5.h: in the future, the compiler will take precedence" >&2;}
( cat <<\_ASBOX
## --------------------------------------- ##
## Report this to ejabberd@process-one.net ##
## --------------------------------------- ##
_ASBOX
) | sed "s/^/$as_me: WARNING: /" >&2
;; ;;
esac esac
{ echo "$as_me:$LINENO: checking for krb5.h" >&5 { echo "$as_me:$LINENO: checking for krb5.h" >&5
@ -6306,7 +6348,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by $as_me, which was This file was extended by ejabberd.erl $as_me version, which was
generated by GNU Autoconf 2.61. Invocation command line was generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -6349,7 +6391,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\ ac_cs_version="\\
config.status ejabberd.erl config.status version
configured by $0, generated by GNU Autoconf 2.61, configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"

View File

@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
AC_PREREQ(2.53) AC_PREREQ(2.53)
AC_INIT(ejabberd.erl,, ejabberd@process-one.net) AC_INIT(ejabberd.erl, version, [ejabberd@process-one.net], [ejabberd])
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC

View File

@ -58,7 +58,7 @@
]). ]).
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("eldap/eldap.hrl"). -include("eldap.hrl").
-record(state, {host, -record(state, {host,
eldap_id, eldap_id,

View File

@ -19,7 +19,8 @@ else
DYNAMIC_LIB_CFLAGS = -fpic -shared DYNAMIC_LIB_CFLAGS = -fpic -shared
endif endif
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -13,13 +13,13 @@ HOST=localhost
ERLANG_NODE=$NODE@$HOST ERLANG_NODE=$NODE@$HOST
ERL=@erl@ ERL=@erl@
INSTALLUSER=@installuser@ INSTALLUSER=@installuser@
ROOTDIR=@rootdir@ ETCDIR=@SYSCONFDIR@/ejabberd
EJABBERD_CONFIG_PATH=$ROOTDIR/etc/ejabberd/ejabberd.cfg EJABBERD_CONFIG_PATH=$ETCDIR/ejabberd.cfg
LOGS_DIR=$ROOTDIR/var/log/ejabberd/ LOGDIR=@LOCALSTATEDIR@/log/ejabberd
EJABBERD_DB=$ROOTDIR/var/lib/ejabberd/db/$NODE SPOOLDIR=@LOCALSTATEDIR@/lib/ejabberd
# read custom configuration # read custom configuration
CONFIG=$ROOTDIR/etc/ejabberd/ejabberdctl.cfg CONFIG=$ETCDIR/ejabberdctl.cfg
[ -f "$CONFIG" ] && . "$CONFIG" [ -f "$CONFIG" ] && . "$CONFIG"
# parse command line parameters # parse command line parameters
@ -32,8 +32,8 @@ while [ $# -ne 0 ] ; do
--node) ERLANG_NODE=$1; shift ;; --node) ERLANG_NODE=$1; shift ;;
--config) EJABBERD_CONFIG_PATH=$1 ; shift ;; --config) EJABBERD_CONFIG_PATH=$1 ; shift ;;
--ctl-config) CONFIG=$1 ; shift ;; --ctl-config) CONFIG=$1 ; shift ;;
--logs) LOGS_DIR=$1 ; shift ;; --logs) LOGDIR=$1 ; shift ;;
--spool) EJABBERD_DB=$1 ; shift ;; --spool) SPOOLDIR=$1 ; shift ;;
*) ARGS="$ARGS $PARAM" ;; *) ARGS="$ARGS $PARAM" ;;
esac esac
done done
@ -65,23 +65,29 @@ fi
ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $KERNEL_OPTS" ERLANG_OPTS="+K $POLL -smp $SMP +P $ERL_PROCESSES $KERNEL_OPTS"
# define additional environment variables # define additional environment variables
EJABBERD_EBIN=$ROOTDIR/var/lib/ejabberd/ebin EJABBERDDIR=@LIBDIR@/ejabberd
EJABBERD_MSGS_PATH=$ROOTDIR/var/lib/ejabberd/priv/msgs BEAMDIR=$EJABBERDDIR/ebin
EJABBERD_SO_PATH=$ROOTDIR/var/lib/ejabberd/priv/lib PRIVDIR=$EJABBERDDIR/priv
EJABBERD_BIN_PATH=$ROOTDIR/var/lib/ejabberd/priv/bin PBINDIR=$PRIVDIR/bin
EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log SODIR=$PRIVDIR/lib
SASL_LOG_PATH=$LOGS_DIR/sasl.log MSGSDIR=$PRIVDIR/msgs
EJABBERD_LOG_PATH=$LOGDIR/ejabberd.log
SASL_LOG_PATH=$LOGDIR/sasl.log
DATETIME=`date "+%Y%m%d-%H%M%S"` DATETIME=`date "+%Y%m%d-%H%M%S"`
ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump ERL_CRASH_DUMP=$LOGDIR/erl_crash_$DATETIME.dump
ERL_INETRC=$ROOTDIR/etc/ejabberd/inetrc ERL_INETRC=$ETCDIR/inetrc
HOME=$ROOTDIR/var/lib/ejabberd HOME=$SPOOLDIR
# create the home dir with the proper user if doesn't exist, because it stores cookie file
[ -d $HOME ] || $EXEC_CMD "mkdir -p $HOME"
# export global variables # export global variables
export EJABBERD_CONFIG_PATH export EJABBERD_CONFIG_PATH
export EJABBERD_MSGS_PATH export MSGSDIR
export EJABBERD_LOG_PATH export EJABBERD_LOG_PATH
export EJABBERD_SO_PATH export SODIR
export EJABBERD_BIN_PATH export PBINDIR
export ERL_CRASH_DUMP export ERL_CRASH_DUMP
export ERL_INETRC export ERL_INETRC
export ERL_MAX_PORTS export ERL_MAX_PORTS
@ -99,8 +105,8 @@ start ()
$EXEC_CMD "$ERL \ $EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \ $NAME $ERLANG_NODE \
-noinput -detached \ -noinput -detached \
-pa $EJABBERD_EBIN \ -pa $BEAMDIR \
-mnesia dir \"\\\"$EJABBERD_DB\\\"\" \ -mnesia dir \"\\\"$SPOOLDIR\\\"\" \
-s ejabberd \ -s ejabberd \
-sasl sasl_error_logger \\{file,\\\"$SASL_LOG_PATH\\\"\\} \ -sasl sasl_error_logger \\{file,\\\"$SASL_LOG_PATH\\\"\\} \
$ERLANG_OPTS $ARGS \"$@\"" $ERLANG_OPTS $ARGS \"$@\""
@ -151,8 +157,8 @@ live ()
echo "" echo ""
$EXEC_CMD "$ERL \ $EXEC_CMD "$ERL \
$NAME $ERLANG_NODE \ $NAME $ERLANG_NODE \
-pa $EJABBERD_EBIN \ -pa $BEAMDIR \
-mnesia dir \"\\\"$EJABBERD_DB\\\"\" \ -mnesia dir \"\\\"$SPOOLDIR\\\"\" \
-s ejabberd \ -s ejabberd \
$ERLANG_OPTS $ARGS \"$@\"" $ERLANG_OPTS $ARGS \"$@\""
} }
@ -163,7 +169,7 @@ ctl ()
$EXEC_CMD "$ERL \ $EXEC_CMD "$ERL \
$NAME ejabberdctl \ $NAME ejabberdctl \
-noinput \ -noinput \
-pa $EJABBERD_EBIN \ -pa $BEAMDIR \
-s ejabberd_ctl -extra $ERLANG_NODE $@" -s ejabberd_ctl -extra $ERLANG_NODE $@"
result=$? result=$?
case $result in case $result in
@ -178,8 +184,8 @@ ctl ()
echo "Optional parameters when starting an ejabberd node:" echo "Optional parameters when starting an ejabberd node:"
echo " --config file Config file of ejabberd: $EJABBERD_CONFIG_PATH" echo " --config file Config file of ejabberd: $EJABBERD_CONFIG_PATH"
echo " --ctl-config file Config file of ejabberdctl: $CONFIG" echo " --ctl-config file Config file of ejabberdctl: $CONFIG"
echo " --logs dir Directory for logs: $LOGS_DIR" echo " --logs dir Directory for logs: $LOGDIR"
echo " --spool dir Database spool dir: $EJABBERD_DB" echo " --spool dir Database spool dir: $SPOOLDIR"
echo " --node nodename ejabberd node name: $ERLANG_NODE" echo " --node nodename ejabberd node name: $ERLANG_NODE"
echo "";; echo "";;
esac esac

View File

@ -9,7 +9,8 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -16,7 +16,9 @@ else
DYNAMIC_LIB_CFLAGS = -fpic -shared DYNAMIC_LIB_CFLAGS = -fpic -shared
endif endif
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -43,8 +43,8 @@
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-include("web/ejabberd_http.hrl"). -include("ejabberd_http.hrl").
-include("web/ejabberd_web_admin.hrl"). -include("ejabberd_web_admin.hrl").
-record(offline_msg, {us, timestamp, expire, from, to, packet}). -record(offline_msg, {us, timestamp, expire, from, to, packet}).

View File

@ -42,8 +42,8 @@
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-include("web/ejabberd_http.hrl"). -include("ejabberd_http.hrl").
-include("web/ejabberd_web_admin.hrl"). -include("ejabberd_web_admin.hrl").
-record(offline_msg, {user, timestamp, expire, from, to, packet}). -record(offline_msg, {user, timestamp, expire, from, to, packet}).

View File

@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -41,8 +41,8 @@
%% API. %% API.
-export([start_link/2]). -export([start_link/2]).
-include("../ejabberd.hrl"). -include("ejabberd.hrl").
-include("../jlib.hrl"). -include("jlib.hrl").
-define(PROCNAME, ejabberd_mod_proxy65_service). -define(PROCNAME, ejabberd_mod_proxy65_service).

View File

@ -58,7 +58,7 @@
]). ]).
-include("mod_proxy65.hrl"). -include("mod_proxy65.hrl").
-include("../ejabberd.hrl"). -include("ejabberd.hrl").
-define(WAIT_TIMEOUT, 60000). %% 1 minute (is it enough?) -define(WAIT_TIMEOUT, 60000). %% 1 minute (is it enough?)

View File

@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -47,8 +47,8 @@
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-include("mod_roster.hrl"). -include("mod_roster.hrl").
-include("web/ejabberd_http.hrl"). -include("ejabberd_http.hrl").
-include("web/ejabberd_web_admin.hrl"). -include("ejabberd_web_admin.hrl").
start(Host, Opts) -> start(Host, Opts) ->

View File

@ -46,8 +46,8 @@
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-include("mod_roster.hrl"). -include("mod_roster.hrl").
-include("web/ejabberd_http.hrl"). -include("ejabberd_http.hrl").
-include("web/ejabberd_web_admin.hrl"). -include("ejabberd_web_admin.hrl").
start(Host, Opts) -> start(Host, Opts) ->

View File

@ -52,8 +52,8 @@
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-include("mod_roster.hrl"). -include("mod_roster.hrl").
-include("web/ejabberd_http.hrl"). -include("ejabberd_http.hrl").
-include("web/ejabberd_web_admin.hrl"). -include("ejabberd_web_admin.hrl").
-record(sr_group, {group_host, opts}). -record(sr_group, {group_host, opts}).
-record(sr_user, {us, group_host}). -record(sr_user, {us, group_host}).

View File

@ -50,7 +50,7 @@
]). ]).
-include("ejabberd.hrl"). -include("ejabberd.hrl").
-include("eldap/eldap.hrl"). -include("eldap.hrl").
-include("jlib.hrl"). -include("jlib.hrl").
-define(PROCNAME, ejabberd_mod_vcard_ldap). -define(PROCNAME, ejabberd_mod_vcard_ldap).

View File

@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -9,7 +9,9 @@ LIBS = @LIBS@ @PAM_LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -19,7 +19,9 @@ else
DYNAMIC_LIB_CFLAGS = -fpic -shared DYNAMIC_LIB_CFLAGS = -fpic -shared
endif endif
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info

View File

@ -9,7 +9,9 @@ LIBS = @LIBS@
ERLANG_CFLAGS = @ERLANG_CFLAGS@ ERLANG_CFLAGS = @ERLANG_CFLAGS@
ERLANG_LIBS = @ERLANG_LIBS@ ERLANG_LIBS = @ERLANG_LIBS@
EFLAGS = -I .. -pz .. EFLAGS += -I ../../include
EFLAGS += -pz ..
# make debug=true to compile Erlang module with debug informations. # make debug=true to compile Erlang module with debug informations.
ifdef debug ifdef debug
EFLAGS+=+debug_info EFLAGS+=+debug_info
@ -21,7 +23,7 @@ BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam))
all: $(BEAMS) all: $(BEAMS)
$(OUTDIR)/%.beam: %.erl ejabberd_http.hrl $(OUTDIR)/%.beam: %.erl
@ERLC@ -W $(EFLAGS) -o $(OUTDIR) $< @ERLC@ -W $(EFLAGS) -o $(OUTDIR) $<
clean: clean: