source: trunk/gsdl/packages/configure@ 12764

Last change on this file since 12764 was 12519, checked in by kjdon, 18 years ago

removed cgicc stuff

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.9 KB
Line 
1#! /bin/sh
2
3PACKAGES=`pwd`
4cd ..
5GSDLHOME=`pwd`
6cd $PACKAGES
7
8GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9# check for running bash under cygwin
10if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
11then
12 GSDLOS=windows
13fi
14
15prefix=""
16bindir=""
17HOSTTARGETFLAGS=""
18
19USE_CORBA=false
20MICO_DIR=default
21# yaz compilation enabled by default, can switch it off with --disable-yaz
22USE_YAZ=true
23# z3950 server disabled by default, switch it on with --enable-z3950
24USE_Z3950=false
25# parse any arguments given from toplevel configure
26while test $# -ne 0; do
27 case "$1" in
28 --cache-file=*)
29 cache_filename=`echo $1 | sed s/--cache-file=//`
30 # turn relative path into an absolute path
31 cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
32 cache_dir=`cd $cache_dir 2>/dev/null && pwd`
33
34 cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
35 cache_file="$cache_dir/$cache_basefile"
36 if test ! -f "$cache_file"; then
37 CACHE_FILE=""
38 else
39 CACHE_FILE="--cache-file=$cache_file"
40 fi
41 ;;
42 --enable-z3950)
43 USE_Z3950=true
44 ;;
45 --disable-yaz)
46 USE_YAZ=false
47 ;;
48 --enable-corba)
49 USE_CORBA=true
50 ;;
51 --with-micodir=*)
52 if test $1 = ""; then
53 $1 = "default"
54 fi
55 MICO_DIR=$1
56 ;;
57 --prefix=*)
58 prefix=`echo $1 | sed s/--prefix=//`
59 ;;
60 --bindir=*)
61 # where to install binaries to
62 bindir=`echo $1 | sed s/--bindir=//`
63 # turn relative path into an absolute path
64 if test -d "$bindir" ; then
65 bindir=`cd "$bindir" ; pwd `
66 cd "$PACKAGES"
67 elif test -z `echo $bindir | sed '/^\// p;D'` ; then
68 rel_bindir="`echo $bindir | sed s@/.*@@`"
69 cd "$rel_bindir"
70 bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
71 cd "$PACKAGES"
72 else
73 # bindir doesn't exist, and isn't relative
74 true
75 fi
76 ;;
77 --host=* | --target=*)
78 HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
79 ;;
80 *)
81 # ignore all other options for now
82 ;;
83 esac
84 shift
85done
86
87# note! Our GSDL package currently always installs into it's source
88# directory, ignoring any --prefix given to configure.
89# When this is fixed, uncomment the relevant lines below...
90
91##if test -z "$prefix" ; then
92prefix="${GSDLHOME}"
93##fi
94
95##if test -z "$bindir" ; then
96bindir="${prefix}/bin/$GSDLOS"
97##fi
98
99# This loads the top configure's cache file, with variables already set.
100if test -f "$cache_file" ; then
101 . $cache_file
102fi
103
104# we assume that gzip and tar are on the search path.
105# non-GNU versions of tar don't take the -z option.
106
107if test $USE_CORBA = true ; then
108 if test $MICO_DIR = default; then
109 # configure the MICO CORBA ORB
110 echo ""
111 echo "Configuring MICO CORBA"
112 echo ""
113
114 cd "$PACKAGES/mico"
115 gzip -dc mico-2.3.5.tar.gz | tar -xf -
116 cd mico && \
117 ./configure $CACHE_FILE --prefix=$PACKAGES/mico/ --disable-coss --disable-naming --disable-relship --disable-events --disable-streams --disable-property --disable-trader --disable-time --disable-debug --enable-optimize --enable-final --enable-speed-tune
118 sed 's/tools//' $PACKAGES/mico/mico/Makefile | sed 's/ldconfig//' >$PACKAGES/mico/mico/Makefile.out
119 mv $PACKAGES/mico/mico/Makefile.out $PACKAGES/mico/mico/Makefile
120 else
121 #MICO is on the system path
122 echo ""
123 echo "Taking MICO from system paths"
124 echo ""
125 fi
126else
127 echo "corba support disabled - mico compiler not required."
128 echo " add '--enable-corba' to the configure command to include corba support."
129 echo ""
130fi
131
132
133
134
135
136# configure the wvWare Word document converter
137echo ""
138echo "Configuring wvWare"
139echo ""
140
141cd "$PACKAGES/wv"
142gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
143# datadir is for default location of wvHtml.xml config file
144cd wv-gs && \
145./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
146
147# configure the pdftohtml converter
148echo ""
149echo "Configuring pdftohtml"
150echo ""
151
152cd "$PACKAGES/pdftohtml"
153gzip -dc pdftohtml_0_36_gs.tar.gz | tar -xf -
154cd pdftohtml_gs && \
155./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
156
157# rtftohtml converter
158echo ""
159echo "Configuring rtftohtml"
160echo ""
161
162cd "$PACKAGES/rtftohtml"
163gzip -dc rtftohtml-gs.tar.gz | tar -xf -
164cd rtftohtml_src && \
165./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
166
167
168# D2M stuff needed for z3950server
169echo ""
170echo "Configuring D2M"
171if test x$USE_Z3950 = xtrue ;
172then
173 USE_YAZ=true
174 echo ""
175 cd "$PACKAGES/d2m"
176 ./configure $CACHE_FILE --prefix="$PACKAGES/d2m" $HOSTTARGETFLAGS
177else
178 echo "Z39.50 support disabled - D2M library not required."
179 echo " add '--enable-z3950' to the configure command to include z39.50 support."
180 echo ""
181fi
182
183# YAZ Z39.50 toolkit
184echo ""
185echo "Configuring YAZ"
186if test x$USE_YAZ = xtrue ;
187then
188 echo "YAZ library support enabled"
189 echo "add --disable-yaz to the configure command to disable this"
190 echo ""
191 cd "$PACKAGES/yaz"
192 gzip -dc yaz-2.1.4.tar.gz | tar -xf -
193 cd yaz-2.1.4 && \
194 ./configure $CACHE_FILE --prefix="$PACKAGES/yaz" $HOSTTARGETFLAGS
195else
196 echo "YAZ support disabled"
197 echo ""
198fi
199
200# configure wget
201echo ""
202echo "Configuring wget"
203echo ""
204cd "$PACKAGES/wget"
205gzip -dc wget.tar.gz | tar -xf -
206cd "$PACKAGES/wget/wget-1.9" && \
207./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
208
209# configure expat (needs to be done before XML::Parser
210echo ""
211echo "Configuring expat"
212echo ""
213cd "$PACKAGES/expat"
214gzip -dc expat-1.95.8.tar.gz | tar -xf -
215cd "$PACKAGES/expat/expat-1.95.8" && \
216./configure $CACHE_FILE --disable-shared --prefix=$PACKAGES/expat --bindir="$bindir" $HOSTTARGETFLAGS
217
218# configure XML::Parser perl module
219echo ""
220echo "Configuring XML::Parser"
221echo ""
222cd "$PACKAGES/cpan"
223perl_dir=`echo 'my $vn = $]; $vn =~ s/5\.00(\d).*$/perl-5.$1/; print "$vn" ' | perl`
224gzip -dc XML-Parser-2.34.tar.gz | tar -xf -
225cd "$PACKAGES/cpan/XML-Parser-2.34" && \
226perl Makefile.PL \
227 INSTALLSITELIB="$GSDLHOME/perllib/cpan/$perl_dir" \
228 PREFIX="$GSDLHOME/perllib/cpan/XML" \
229 INSTALLMAN1DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
230 INSTALLMAN3DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
231 SITEPREFIX="$GSDLHOME/perllib/cpan" \
232 EXPATINCPATH="$GSDLHOME/packages/expat/include" \
233 EXPATLIBPATH="$GSDLHOME/packages/expat/lib"
234
235# configure powerpoint converter
236echo ""
237echo "Configuring xlhtml (powerpoint & excel converter)"
238echo ""
239cd "$PACKAGES/xlhtml"
240gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
241cd xlhtml-0.4.9.0 && \
242./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
243
244
245# configure IsisGdl program
246echo ""
247echo "Configuring IsisGdl (CDS/ISIS database reader)"
248echo ""
249cd "$PACKAGES/isis-gdl" && \
250./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
251
252# configure cgicc
253#echo ""
254#echo "Configuring cgicc"
255#echo ""
256#cd "$PACKAGES/cgicc"
257#gzip -dc cgicc-3.1.5.tar.gz | tar -xf -
258#cd "$PACKAGES/cgicc/cgicc-3.1.5" && \
259#./configure $CACHE_FILE --disable-shared --prefix=$PACKAGES/cgicc --bindir="$bindir" $HOSTTARGETFLAGS
260
Note: See TracBrowser for help on using the repository browser.