source: trunk/gsdl/packages/configure@ 11146

Last change on this file since 11146 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
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
[2380]19USE_CORBA=false
[2642]20MICO_DIR=default
[2019]21
[1715]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 ;;
[1940]39 --enable-z3950)
40 USE_Z3950=true
41 ;;
[2113]42 --enable-corba)
43 USE_CORBA=true
44 ;;
[2173]45 --with-micodir=*)
46 if test $1 = ""; then
47 $1 = "default"
48 fi
49 MICO_DIR=$1
50 ;;
[2421]51 --prefix=*)
52 prefix=`echo $1 | sed s/--prefix=//`
53 ;;
[2019]54 --bindir=*)
[2421]55 # where to install binaries to
[2169]56 bindir=`echo $1 | sed s/--bindir=//`
[2952]57 # turn relative path into an absolute path
58 if test -d "$bindir" ; then
59 bindir=`cd "$bindir" ; pwd `
[2169]60 cd "$PACKAGES"
61 elif test -z `echo $bindir | sed '/^\// p;D'` ; then
[2952]62 rel_bindir="`echo $bindir | sed s@/.*@@`"
63 cd "$rel_bindir"
64 bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
[2169]65 cd "$PACKAGES"
66 else
67 # bindir doesn't exist, and isn't relative
68 true
69 fi
[2019]70 ;;
[2725]71 --host=* | --target=*)
72 HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
73 ;;
[1715]74 *)
75 # ignore all other options for now
76 ;;
77 esac
78 shift
79done
80
[2421]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
[2952]93# This loads the top configure's cache file, with variables already set.
94if test -f "$cache_file" ; then
95 . $cache_file
96fi
[2421]97
[2169]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
[2380]101if test $USE_CORBA = true ; then
[2173]102 if test $MICO_DIR = default; then
103 # configure the MICO CORBA ORB
104 echo ""
105 echo "Configuring MICO CORBA"
106 echo ""
[1715]107
[2173]108 cd "$PACKAGES/mico"
109 gzip -dc mico-2.3.5.tar.gz | tar -xf -
[6334]110 cd mico && \
[2173]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
[2169]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 ""
[2113]124fi
[1715]125
[2129]126
127
128
[2169]129
[1668]130# configure the wvWare Word document converter
131echo ""
132echo "Configuring wvWare"
[1978]133echo ""
[1668]134
[1996]135cd "$PACKAGES/wv"
[3075]136gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
[2582]137# datadir is for default location of wvHtml.xml config file
[6334]138cd wv-gs && \
[2725]139./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
[1668]140
[1961]141# configure the pdftohtml converter
142echo ""
143echo "Configuring pdftohtml"
144echo ""
[1668]145
[1996]146cd "$PACKAGES/pdftohtml"
[7284]147gzip -dc pdftohtml_0_36_gs.tar.gz | tar -xf -
148cd pdftohtml_gs && \
[2725]149./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
[1961]150
[2582]151# rtftohtml converter
152echo ""
153echo "Configuring rtftohtml"
154echo ""
[2349]155
[2582]156cd "$PACKAGES/rtftohtml"
157gzip -dc rtftohtml-gs.tar.gz | tar -xf -
[6334]158cd rtftohtml_src && \
[2902]159./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
[2582]160
161
[1715]162# YAZ Z39.50 toolkit
[2052]163echo ""
164echo "Configuring YAZ"
[2169]165if test x$USE_Z3950 = xtrue ;
[1940]166then
167 echo ""
[10173]168 cd "$PACKAGES/yaz"
169 gzip -dc yaz-2.1.4.tar.gz | tar -xf -
170 cd yaz-2.1.4 && \
[10433]171 ./configure $CACHE_FILE --prefix="$PACKAGES/yaz" --with-xml2=no --with-iconv=no $HOSTTARGETFLAGS
[10173]172 cd "$PACKAGES/d2m"
173 ./configure $CACHE_FILE --prefix="$PACKAGES/d2m" $HOSTTARGETFLAGS
[1940]174else
[2052]175 echo "Z39.50 support disabled - YAZ library not required."
176 echo " add '--enable-z3950' to the configure command to include z39.50 support."
[1940]177 echo ""
178fi
[1715]179
[1704]180# configure wget
181echo ""
182echo "Configuring wget"
183echo ""
[3000]184cd "$PACKAGES/wget"
[2349]185gzip -dc wget.tar.gz | tar -xf -
[7672]186cd "$PACKAGES/wget/wget-1.9" && \
[2725]187./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
[2169]188
[8658]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
[2809]198# configure XML::Parser perl module
199echo ""
200echo "Configuring XML::Parser"
201echo ""
[2988]202cd "$PACKAGES/cpan"
[8066]203perl_dir=`echo 'my $vn = $]; $vn =~ s/5\.00(\d).*$/perl-5.$1/; print "$vn" ' | perl`
[8658]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" \
[9402]212 EXPATINCPATH="$GSDLHOME/packages/expat/include" \
[8658]213 EXPATLIBPATH="$GSDLHOME/packages/expat/lib"
[2169]214
[2985]215# configure powerpoint converter
216echo ""
[2988]217echo "Configuring xlhtml (powerpoint & excel converter)"
[2985]218echo ""
[2988]219cd "$PACKAGES/xlhtml"
[2985]220gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
[6334]221cd xlhtml-0.4.9.0 && \
[2985]222./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
[2809]223
[6128]224
225# configure IsisGdl program
226echo ""
[6334]227echo "Configuring IsisGdl (CDS/ISIS database reader)"
[6128]228echo ""
[6334]229cd "$PACKAGES/isis-gdl" && \
[6128]230./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
Note: See TracBrowser for help on using the repository browser.