WebReference.com - Part 1 of Chapter 3 from Programming Jabber, O'Reilly & Associates (3/4)
[previous] [next] |
Programming Jabber
Running the Configure Server
Examining the contents of the jabber-1.4.1 directory, we see the following files:
configure (the configuration script)
jabber.xml (the server configuration file)
Makefile (for compiling the Jabber server)
README (some basic instructions)
UPGRADE (information on upgrading from an earlier server version)
as well as a number of directories that contain the source code.
The first step is to run the configure
script:
yak:~/jabber-1.4.1$ ./configure
to determine your platform's compiler settings.
If you want SSL support in the Jabber server, run the script with the
--enable-ssl
switch:
yak:~/jabber-1.4.1$ ./configure --enable-ssl
If you specified the --enable-ssl
switch, the
configure
script looks for your SSL installation
and adds the appropriate compiler flags. If it doesn't find your SSL installation, it
says so and your Jabber server is compiled without SSL support.
Next, it will try to determine whether you have pth
installed and if so will use the pth-config
command
to glean the extra compiler options for building the Jabber server.
pth
is required, so if it isn't already installed, it
will be set up within your current jabber-1.4.1 directory
tree (as pth
is included in the jabber-1.4.1.tar.gz tarball)
and the appropriate compiler options added.
If pth
is set up during the course of
running configure
, you may see a message:
"Now please type 'make' to compile. Good luck.
",
which comes at the end of the pth
configure procedure;
you can ignore this because there is only one make
step,
for the Jabber server, that must be carried out as we are merely preparing
the pth
build environment for binding into the Jabber
Server build.
Finally, after extra platform-specific compiler settings are determined, a shell script to set the build environment variables is created with the name platform-settings. This is used in the next step.
Example 3-1 shows typical output from the configure
script.
Running Jabber Configure
========================
Getting pth settings... Done.
Setting Build Parameters... Done.
Generating Settings Script... Done.
You may now type 'make' to build your new Jabber system.
Example 3-1. Typical output from configure
Running make
Once the platform settings have been determined by the configure
script,
we are ready to build the Jabber server with make
:
yak:~/jabber-1.4.1$ make
Example 3-2 shows abbreviated typical output from the make
command.
Making all in pthsock
make[1]: Entering directory `/usr/local/jabber/jabber-1.4.1/pthsock'
gcc -g -Wall -fPIC -I. -I.. -I/usr/local/include -I../jabberd/ -c client.c -o
client.o
gcc -g -Wall -fPIC -I. -I.. -I/usr/local/include -I../jabberd/ -shared -o pthsoc
k_client.so client.o -L/usr/local/lib -lpth -ldl -lresolv
make[1]: Leaving directory `/usr/local/jabber/jabber-1.4.1/pthsock'
Making all in xdb_file
make[1]: Entering directory `/usr/local/jabber/jabber-1.4.1/xdb_file'
gcc -g -Wall -fPIC -I. -I.. -I/usr/local/include -I../jabberd -c xdb_file.c -o
xdb_file.o
...
gcc -g -Wall -fPIC -I. -I.. -I/usr/local/include -DHOME="\"/usr/local/jabber/jab
ber-1.4.1\"" -DCONFIGXML="\"jabber.xml\"" -o jabberd config.o mio.o mio_raw.o mi
o_xml.o mio_ssl.o deliver.o heartbeat.o jabberd.o load.o xdb.o mtq.o static.o lo
g.o lib/expat.o lib/genhash.o lib/hashtable.o lib/jid.o lib/jpacket.o lib/jutil.
o lib/karma.o lib/pool.o lib/pproxy.o lib/rate.o lib/sha.o lib/snprintf.o lib/so
cket.o lib/str.o lib/xmlnode.o lib/xmlparse.o lib/xmlrole.o lib/xmltok.o lib/xst
ream.o lib/xhash.o base/base_connect.o base/base_dynamic.o base/base_exec.o base
/base_stdout.o base/base_accept.o base/base_file.o base/base_format.o base/base_
stderr.o base/base_to.o -Wl,--export-dynamic -L/usr/local/lib -lpth -ldl -lresol
v
make[2]: Leaving directory `/usr/local/jabber/jabber-1.4.1/jabberd'
make[1]: Leaving directory `/usr/local/jabber/jabber-1.4.1/jabberd'
make[1]: Entering directory `/usr/local/jabber/jabber-1.4.1'
make[1]: Nothing to be done for `all-local'.
make[1]: Leaving directory `/usr/local/jabber/jabber-1.4.1'
Example 3-2. Typical output from make
Running from the Build Environment?You may be wondering where the |
[previous] [next] |
Created: January 14, 2002
Revised: January 14, 2002
URL: https://webreference.com/programming/jabber/chap3/1/3.html