|
|
Examine the configuration
Any questions and comments are welcome to me.
'./configure' command is very powerfull and in most case, it will achieve all the required tasks. But there may be the case where we have to give it enough information to work fine. So, it is safe to examine the 'Makefile' which was generated by './configure' before preceeding the next step(actual compiling).
Now let's see about how './configure' works. We can think that it takes the following steps:
Taking the procedures above into account, we can think that checking the values in 'Makefile.config' will be enough to decide whether we can compile the source successfully. Now let's examine '(source_directory)/src/Makefile.config'. On my Solaris2.7(x86), it looks like this:
## ## Inherited Makefile options from Configure script ## (Begin of automatically generated section) ## SRCDIR=. EXTRA_CFLAGS=`$(SRCDIR)/apaci` EXTRA_LDFLAGS= EXTRA_LIBS= EXTRA_INCLUDES= EXTRA_DEPS= OSDIR=$(SRCDIR)/os/unix INCDIR=$(SRCDIR)/include INCLUDES0=-I$(OSDIR) -I$(INCDIR) SHELL=/bin/sh OS=Solaris 270 CC=gcc CPP=gcc -E TARGET=httpd OPTIM= CFLAGS_SHLIB= -DSHARED_MODULE LD_SHLIB=ld LDFLAGS_SHLIB=-G LDFLAGS_SHLIB_EXPORT= LDFLAGS_MOD_SHLIB=-G LD_SHCORE_DEF= LD_SHCORE_LIBS= SHARED_CORE_EP=lib$(TARGET).ep SHCORE_IMPLIB= CFLAGS1= -DSOLARIS2=270 -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite -fPIC -DSHARED_CORE INCLUDES1= LIBS_SHLIB= LDFLAGS1= MFLAGS_STATIC=--no-print-directory REGLIB= EXPATLIB=lib/expat-lite/libexpat.a RANLIB=ranlib LIBS1= -lsocket -lnsl -ldl ## ## (End of automatically generated section) ##Note that the above content is good enough for my Solaris.
-DSOLARIS2=270 -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite -fPIC -DSHARED_CORE
#!/bin/sh
echo "Configuring Apache..."
cd apache_1.3.12
# Setting Environment variables.
# Note that the lines below is for Born shell.
# For other Unix shell, modify them.
CFLAGS=-fPIC
export CFLAGS
LD_SHLIB=ld
export LD_SHLIB
LDFLAGS_SHLIB=-G
export LDFLAGS_SHLIB
# Run the 'configure'.
./configure \
--prefix=/export/home/jun/apache_test/test_build \
--enable-rule=SHARED_CORE \
--enable-shared=max
cd ..
echo "Done!"
The required values may differ on the environment(OS and C compiler) you use, so please consult (source_directory)/INSTALL for details. Edit the shell script and examine the result(Makefile.config) until you get the desired one.
Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries.
|
|
ALL CONTENTS COPYRIGHT 2000
, Jun Inamori. All rights reserved.
Any questions and comments are welcome to
Jun Inamori
.