source: gsdl/trunk/packages/configure@ 14167

Last change on this file since 14167 was 14167, checked in by mdewsnip, 17 years ago

Fixed HTML Tidy configuration on Solaris.

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