source: trunk/gsdl/packages/configure@ 9402

Last change on this file since 9402 was 9402, checked in by davidb, 19 years ago

Trailing <space> after \ caused XML-Parser to fail to generate Makefile.
Space now deleted.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 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 ./configure $CACHE_FILE $HOSTTARGETFLAGS
170else
171 echo "Z39.50 support disabled - YAZ library not required."
172 echo " add '--enable-z3950' to the configure command to include z39.50 support."
173 echo ""
174fi
175
176# configure wget
177echo ""
178echo "Configuring wget"
179echo ""
180cd "$PACKAGES/wget"
181gzip -dc wget.tar.gz | tar -xf -
182cd "$PACKAGES/wget/wget-1.9" && \
183./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
184
185# configure expat (needs to be done before XML::Parser
186echo ""
187echo "Configuring expat"
188echo ""
189cd "$PACKAGES/expat"
190gzip -dc expat-1.95.8.tar.gz | tar -xf -
191cd "$PACKAGES/expat/expat-1.95.8" && \
192./configure $CACHE_FILE --prefix=$PACKAGES/expat --bindir="$bindir" $HOSTTARGETFLAGS
193
194# configure XML::Parser perl module
195echo ""
196echo "Configuring XML::Parser"
197echo ""
198cd "$PACKAGES/cpan"
199perl_dir=`echo 'my $vn = $]; $vn =~ s/5\.00(\d).*$/perl-5.$1/; print "$vn" ' | perl`
200gzip -dc XML-Parser-2.34.tar.gz | tar -xf -
201cd "$PACKAGES/cpan/XML-Parser-2.34" && \
202perl Makefile.PL \
203 INSTALLSITELIB="$GSDLHOME/perllib/cpan/$perl_dir" \
204 PREFIX="$GSDLHOME/perllib/cpan/XML" \
205 INSTALLMAN1DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
206 INSTALLMAN3DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
207 SITEPREFIX="$GSDLHOME/perllib/cpan" \
208 EXPATINCPATH="$GSDLHOME/packages/expat/include" \
209 EXPATLIBPATH="$GSDLHOME/packages/expat/lib"
210
211# configure powerpoint converter
212echo ""
213echo "Configuring xlhtml (powerpoint & excel converter)"
214echo ""
215cd "$PACKAGES/xlhtml"
216gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
217cd xlhtml-0.4.9.0 && \
218./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
219
220
221# configure IsisGdl program
222echo ""
223echo "Configuring IsisGdl (CDS/ISIS database reader)"
224echo ""
225cd "$PACKAGES/isis-gdl" && \
226./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
Note: See TracBrowser for help on using the repository browser.