source: gsdl/trunk/packages/configure@ 14999

Last change on this file since 14999 was 14167, checked in by mdewsnip, 17 years ago

Fixed HTML Tidy configuration on Solaris.

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