source: main/branches/64_bit_Greenstone/greenstone2/build-src/packages/configure@ 23594

Last change on this file since 23594 was 23594, checked in by sjm84, 13 years ago

Another set of trunk changes to commit to this branch

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