[Mapserver-users] Re: Mac OS X Apache Install Question
soprina
soprina at mac.com
Tue Mar 25 18:05:38 PST 2003
Sorry...I am using a different e-mail address from my original post so
I have just subscribed with this e-mail address and re-submitted I have
also include my makefile in this e-mail
Thanks for all the info. I am quite new to unix and compiling on mac
os x and appreciate all your help.
So my next question would be how would I go about statically linking
all the libraries when compiling mapserver. I know there are good
reasons for not doing this but I am just thinking about portability and
the problem I am currently facing. I definitely need to be able to
transfer the binary from one machine to another without having to
install a range of supporting libraries. I currently do this with a
windows compile of mapserver and it works well. Alternatively is it
possible that any libraries needed are created/moved to the same folder
that mapserver is compiled in and if so is it likely that mapserver
will work when the all the files are then transfer to another machine?
My current configure command for compile is as follows if this is of
any help?
./configure --with-gd --without-tiff --with-jpeg
--with-proj=/mapserver/libraries/proj-4.4.5
--with-gdal=/sw/bin/gdal-config
--with-ogr=/mapserver/libraries/gdal-1.1.8/ogr
My makefile is:
# Generated automatically from Makefile.in by configure.
# Run ./configure in the main MapServer directory to turn this
Makefile.in
# into a proper Makefile
LIB_INSTALL=/usr/local/lib/
HEADER_INSTALL=/usr/local/include/mapserver-3.5/
#
# mpatrol runtime memory debugger
#
MPATROL=
MPATROL_INC=
MPATROL_LIB=
#
# If you want to ignore missing datafile errors uncomment the following
# line. This is especially useful with large tiled datasets that may not
# have complete data for each tile.
#
#IGNORE_MISSING_DATA=-DIGNORE_MISSING_DATA
IGNORE_MISSING_DATA = -DIGNORE_MISSING_DATA
#
# Apparently these aren't as commonplace as I'd hoped. Edit the
# following line to reflect the missing functions on your platform.
#
# STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP
STRINGS=
# Proj.4 distribution (cartographic projection routines). Not required
for normal use. (EXPERIMENTAL)
PROJ_INC= -I/mapserver/libraries/proj-4.4.5/src
PROJ_LIB= -L/mapserver/libraries/proj-4.4.5/src/.libs -lproj
PROJ= -DUSE_PROJ -DUSE_PROJ_API_H
# GD distribution (graphics library GIF and/or PNG support). (REQUIRED)
#
# - Versions 1.3 to 1.5 write non-LZW GIF (-DUSE_GD_1_3).
# - Versions 1.6 and greater write PNG (-DUSE_GD_1_6). Add -lpng -lz
to GD_LIB line.
#
#
GDFONT_OBJ=gd-1.2/gdfontt.o gd-1.2/gdfonts.o gd-1.2/gdfontmb.o
gd-1.2/gdfontl.o gd-1.2/gdfontg.o
GD_INC=
GD_LIB= -lgd -ljpeg -lttf -lpng -lz
GD= -DUSE_GD_PNG -DUSE_GD_WBMP -DUSE_GD_FT
GD_STATIC =
# PDFlib distribution (PDF library w/ PDF support). (EXPERIMENTAL)
#
#
#
PDF_INC=
PDF_LIB=
PDF=
PDF_OBJ=
# TIFF distribution (raster support for TIFF and GEOTIFF imagery).
(RECOMMENDED)
TIFF_INC=
TIFF_LIB= -ljpeg -lttf -lpng -lz
TIFF=
# JPEG distribution (raster support for grayscale JPEG images, INPUT
ONLY).
JPEG_INC=
JPEG_LIB= -ljpeg
JPEG= -DUSE_JPEG
# EPPL7 Support (this activates ERDAS as well) Included in the
distribution. Probably the best raster alternative if
# you've got EPPL7 laying around. See http://www.lmic.state.mn.us/ for
more information. (RECOMMENDED)
EPPL= -DUSE_EPPL
EPPL_OBJ= epplib.o
# ESRI SDE Support. You MUST have the SDE Client libraries and include
files
# on your system someplace. The actual SDE server you wish to connect
to can
# be elsewhere.
SDE=
SDE_LIB=
SDE_INC=
# Optional OGR Support. OGC Simple Feature inspired interface for
vector
# formats. See http://gdal.velocet.ca/projects/opengis/
OGR= -DUSE_OGR
OGR_LIB=
OGR_INC= -I/mapserver/libraries/gdal-1.1.8/ogr/ogrsf_frmts
-I/mapserver/libraries/gdal-1.1.8/ogr
-I/mapserver/libraries/gdal-1.1.8/ogr/../port
OGR_STATIC=
/mapserver/libraries/gdal-1.1.8/ogr/ogrsf_frmts/ogrsf_frmts.a
/mapserver/libraries/gdal-1.1.8/ogr/ogr.a
/mapserver/libraries/gdal-1.1.8/ogr/../port/cpl.a
# Optional GDAL Support (provides read access to a variety of raster
formats)
# See http://www.remotesensing.org/gdal
GDAL= -DUSE_GDAL
GDAL_LIB= -L/sw/lib -lgdal.1.1
GDAL_INC= -I/sw/include/gdal1
# Optional PostGIS Support. See http://postgis.refractions.net/
POSTGIS=
POSTGIS_LIB=
POSTGIS_INC=
# Optional ORACLESPATIAL Support. Contact: cabral at cttmar.univali.br
ORACLESPATIAL=
ORACLESPATIAL_LIB=
ORACLESPATIAL_INC=
# w3c-libwww ... required for WMS Client Connections
WWW_INC=
WWW_LIB=
# OGC WMS Compatibility: -DUSE_WMS (Requires PROJ4 support)
# OGC WMS Client Connections: -DUSE_WMS_LYR (Requires PROJ4 and libwww)
WMS= -DUSE_WMS
#
# UofMN GIS/Image Processing Extension (very experimental)
#
#EGIS=-DUSE_EGIS
#EGIS_INC=-I./egis/errLog -I./egis/imgSrc -I./egis
#EGIS_LIB=-L./egis/errLog -lerrLog -L./egis/imgSrc -limgGEN -L./egis
-legis
#MAKE_EGIS=egis
#MAKE_EGIS_CLEAN=egis_clean
#
# IMPORTANT NOTE ABOUT REGEX FOR PHP_MAPSCRIPT USERS:
#
# In order to compile the PHP_MAPSCRIPT module, we have to make
MapServer
# uses the same version of the REGEX library that PHP was compiled with:
#
REGEX_OBJ=
REGEX_INC=
#
# Multithreading support.
#
THREAD=
THREAD_LIB=
#
# Pick a compiler, etc. Flex and bison are only required if you need to
modify the mapserver lexer (maplexer.l) or expression parser
(mapparser.y).
#
CXX= c++
CC= gcc
LD= gcc
AR= ar rc
RANLIB= ranlib
LEX= flex
YACC= bison -y
XTRALIBS= -lm
RUNPATHS=
CFLAGS= -O2 -Wall \
$(IGNORE_MISSING_DATA) $(STRINGS) $(EPPL) $(PROJ) $(WMS) \
$(ORACLESPATIAL) $(TIFF) $(JPEG) $(GD) $(PDF) $(SDE) $(OGR) $(GDAL) \
$(POSTGIS) $(MPATROL) $(THREAD) \
$(GD_INC) $(PDF_INC) $(PROJ_INC) $(TIFF_INC) $(JPEG_INC) $(EGIS_INC)
$(SDE_INC) \
$(REGEX_INC) $(MPATROL_INC) $(OGR_INC) $(GDAL_INC) $(POSTGIS_INC) \
$(WWW_INC) $(ORACLESPATIAL_INC)
# Link flags and shared libs only
LDFLAGS= $(RUNPATHS) -L. -lmap $(GD_LIB) $(PDF_LIB) $(TIFF_LIB)
$(PROJ_LIB) \
$(JPEG_LIB) $(EGIS_LIB) $(SDE_LIB) $(OGR_LIB) $(GDAL_LIB) \
$(POSTGIS_LIB) $(WWW_LIB) $(ORACLESPATIAL_LIB) $(MPATROL_LIB) \
$(THREAD_LIB) $(XTRALIBS)
# STATIC_LIBS is full filename with path of libs that will be
statically linked
STATIC_LIBS= $(GD_STATIC) $(OGR_STATIC)
RM= /bin/rm -f
OBJS= maptemplate.o mapbits.o maphash.o mapshape.o mapxbase.o
mapparser.o maplexer.o maptree.o mapsearch.o mapstring.o mapsymbol.o
mapfile.o maplegend.o maputil.o mapscale.o mapquery.o maplabel.o
maperror.o mapprimitive.o mapproject.o mapraster.o mapsde.o mapogr.o
mappostgis.o maplayer.o mapresample.o mapwms.o mapwmslayer.o
maporaclespatial.o mapgml.o mapprojhack.o mapthread.o $(EPPL_OBJ)
$(REGEX_OBJ) $(PDF_OBJ)
#
# --- You shouldn't have to edit anything else. ---
#
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
all: $(MAKE_GD) $(MAKE_EGIS) libmap.a shp2img shp2pdf legend \
mapserv shptree shptreevis shptreetst scalebar sortshp perlvars \
tile4ms
egis::
cd egis/errLog; make; cd ..
cd egis/imgSrc; make; cd ..
cd egis; make; cd ..
php3_mapscript:: libmap.a
cd mapscript/php3; $(MAKE); cd ../..
maplexer.o: maplexer.c map.h mapfile.h
maplexer.c: maplexer.l
$(LEX) -Pmsyy -i -omaplexer.c maplexer.l
mapparser.o: mapparser.c map.h
mapparser.c: mapparser.y
$(YACC) -p msyy -d -omapparser.c mapparser.y
mapogr.o: mapogr.cpp
$(CXX) -c $(CFLAGS) mapogr.cpp -o mapogr.o
lib: libmap.a
libmap: libmap.a
libmap.a: map.h $(OBJS) map.h
$(AR) libmap.a $(OBJS)
$(RANLIB) libmap.a
shp2pdf: libmap.a shp2pdf.o map.h
$(LD) $(CFLAGS) shp2pdf.o $(LDFLAGS) $(STATIC_LIBS) -o shp2pdf
shp2img: libmap.a shp2img.o map.h
$(LD) $(CFLAGS) shp2img.o $(LDFLAGS) $(STATIC_LIBS) -o shp2img
sym2img: libmap.a sym2img.o map.h
$(LD) $(CFLAGS) sym2img.o $(LDFLAGS) $(STATIC_LIBS) -o sym2img
legend: libmap.a legend.o map.h
$(LD) $(CFLAGS) legend.o $(LDFLAGS) $(STATIC_LIBS) -o legend
scalebar: libmap.a scalebar.o map.h
$(LD) $(CFLAGS) scalebar.o $(LDFLAGS) $(STATIC_LIBS) -o scalebar
mapserv: mapserv.h libmap.a mapserv.o cgiutil.o map.h
$(LD) $(CFLAGS) mapserv.o cgiutil.o $(LDFLAGS) $(STATIC_LIBS) -o
mapserv
shpindex: libmap.a shpindex.o map.h
$(LD) $(CFLAGS) shpindex.o $(LDFLAGS) $(STATIC_LIBS) -o shpindex
shptree: libmap.a shptree.o map.h
$(LD) $(CFLAGS) shptree.o $(LDFLAGS) $(STATIC_LIBS) -o shptree
shptreevis: libmap.a shptreevis.o map.h
$(LD) $(CFLAGS) shptreevis.o $(LDFLAGS) $(STATIC_LIBS) -o shptreevis
shptreetst: libmap.a shptreetst.o map.h
$(LD) $(CFLAGS) shptreetst.o $(LDFLAGS) $(STATIC_LIBS) -o shptreetst
sortshp: sortshp.o
$(LD) $(CFLAGS) sortshp.o $(LDFLAGS) $(STATIC_LIBS) -o sortshp
tile4ms: tile4ms.o
$(LD) $(CFLAGS) tile4ms.o $(LDFLAGS) $(STATIC_LIBS) -o tile4ms
perlvars:
touch perlvars
pwd > perlvars
echo $(IGNORE_MISSING_DATA) $(STRINGS) $(EPPL) $(PROJ) $(TTF) $(TIFF)
$(JPEG) $(GD) $(SDE) $(OGR) $(GDAL) >> perlvars
echo -I. $(PROJ_INC) $(GD_INC) $(TTF_INC) $(TIFF_INC) $(JPEG_INC)
$(SDE_INC) $(OGR_INC) $(GDAL_INC) >> perlvars
echo $(LDFLAGS) >> perlvars
echo $(STATIC_LIBS) >> perlvars
egis_clean:
cd egis/errLog; $(MAKE) clean; cd ..
cd egis/imgSrc; $(MAKE) clean; cd ..
cd egis; $(MAKE) clean; cd ..
php3_mapscript_clean::
cd mapscript/php3; $(MAKE) clean; cd ../..
install: libmap.a
cp -f libmap.a $(LIB_INSTALL)
cp -f map.h $(HEADER_INSTALL)
clean: $(MAKE_EGIS_CLEAN)
rm -f libmap.a *.o shp2img shp2pdf mapserv legend shptree shptreevis
shptreetst scalebar sortshp perlvars
distclean:
$(MAKE) clean
rm config.*
sorta-clean:
rm -f *.o
Thanks again for your help
Justin
More information about the MapServer-users
mailing list