source: trunk/gsdl/packages/configure@ 10433

Last change on this file since 10433 was 10433, checked in by kjdon, 19 years ago

made the yaz configure command not use xml2 and iconv library. at some stage need to modify the greenstone configure script so that we can use these if they are there

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