source: gsdl/tags/gsdl-2_71-distribution/gsdl/packages/configure@ 14121

Last change on this file since 14121 was 13018, checked in by mdewsnip, 18 years ago

Now specifies --bindir to Yaz's configure, so the yaz-client ends up in GSDLHOME/bin/GSDLOS.

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