source: trunk/gsdl/packages/configure@ 13740

Last change on this file since 13740 was 13740, checked in by kjdon, 17 years ago

removed LDFLAGS setting which was committed by mistake

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