[1668] | 1 | #! /bin/sh
|
---|
| 2 |
|
---|
| 3 | PACKAGES=`pwd`
|
---|
[1704] | 4 | cd ..
|
---|
| 5 | GSDLHOME=`pwd`
|
---|
| 6 | cd $PACKAGES
|
---|
[2987] | 7 |
|
---|
[2952] | 8 | GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
---|
[2987] | 9 | # check for running bash under cygwin
|
---|
| 10 | if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
|
---|
| 11 | then
|
---|
| 12 | GSDLOS=windows
|
---|
| 13 | fi
|
---|
| 14 |
|
---|
[2421] | 15 | prefix=""
|
---|
| 16 | bindir=""
|
---|
[2725] | 17 | HOSTTARGETFLAGS=""
|
---|
[1668] | 18 |
|
---|
[2380] | 19 | USE_CORBA=false
|
---|
[2642] | 20 | MICO_DIR=default
|
---|
[2019] | 21 |
|
---|
[1715] | 22 | # parse any arguments given from toplevel configure
|
---|
| 23 | while 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
|
---|
| 79 | done
|
---|
| 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
|
---|
| 86 | prefix="${GSDLHOME}"
|
---|
| 87 | ##fi
|
---|
| 88 |
|
---|
| 89 | ##if test -z "$bindir" ; then
|
---|
| 90 | bindir="${prefix}/bin/$GSDLOS"
|
---|
| 91 | ##fi
|
---|
| 92 |
|
---|
[2952] | 93 | # This loads the top configure's cache file, with variables already set.
|
---|
| 94 | if test -f "$cache_file" ; then
|
---|
| 95 | . $cache_file
|
---|
| 96 | fi
|
---|
[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] | 101 | if 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] | 120 | else
|
---|
| 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] | 124 | fi
|
---|
[1715] | 125 |
|
---|
[2129] | 126 |
|
---|
| 127 |
|
---|
| 128 |
|
---|
[2169] | 129 |
|
---|
[1668] | 130 | # configure the wvWare Word document converter
|
---|
| 131 | echo ""
|
---|
| 132 | echo "Configuring wvWare"
|
---|
[1978] | 133 | echo ""
|
---|
[1668] | 134 |
|
---|
[1996] | 135 | cd "$PACKAGES/wv"
|
---|
[3075] | 136 | gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
|
---|
[2582] | 137 | # datadir is for default location of wvHtml.xml config file
|
---|
[6334] | 138 | cd 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
|
---|
| 142 | echo ""
|
---|
| 143 | echo "Configuring pdftohtml"
|
---|
| 144 | echo ""
|
---|
[1668] | 145 |
|
---|
[1996] | 146 | cd "$PACKAGES/pdftohtml"
|
---|
[7284] | 147 | gzip -dc pdftohtml_0_36_gs.tar.gz | tar -xf -
|
---|
| 148 | cd pdftohtml_gs && \
|
---|
[2725] | 149 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[1961] | 150 |
|
---|
[2582] | 151 | # rtftohtml converter
|
---|
| 152 | echo ""
|
---|
| 153 | echo "Configuring rtftohtml"
|
---|
| 154 | echo ""
|
---|
[2349] | 155 |
|
---|
[2582] | 156 | cd "$PACKAGES/rtftohtml"
|
---|
| 157 | gzip -dc rtftohtml-gs.tar.gz | tar -xf -
|
---|
[6334] | 158 | cd rtftohtml_src && \
|
---|
[2902] | 159 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[2582] | 160 |
|
---|
| 161 |
|
---|
[1715] | 162 | # YAZ Z39.50 toolkit
|
---|
[2052] | 163 | echo ""
|
---|
| 164 | echo "Configuring YAZ"
|
---|
[2169] | 165 | if test x$USE_Z3950 = xtrue ;
|
---|
[1940] | 166 | then
|
---|
| 167 | echo ""
|
---|
[6334] | 168 | cd "$PACKAGES/yaz" && \
|
---|
[2725] | 169 | ./configure $CACHE_FILE $HOSTTARGETFLAGS
|
---|
[1940] | 170 | else
|
---|
[2052] | 171 | echo "Z39.50 support disabled - YAZ library not required."
|
---|
| 172 | echo " add '--enable-z3950' to the configure command to include z39.50 support."
|
---|
[1940] | 173 | echo ""
|
---|
| 174 | fi
|
---|
[1715] | 175 |
|
---|
[1704] | 176 | # configure wget
|
---|
| 177 | echo ""
|
---|
| 178 | echo "Configuring wget"
|
---|
| 179 | echo ""
|
---|
[3000] | 180 | cd "$PACKAGES/wget"
|
---|
[2349] | 181 | gzip -dc wget.tar.gz | tar -xf -
|
---|
[7672] | 182 | cd "$PACKAGES/wget/wget-1.9" && \
|
---|
[2725] | 183 | ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[2169] | 184 |
|
---|
[2809] | 185 | # configure XML::Parser perl module
|
---|
| 186 | echo ""
|
---|
| 187 | echo "Configuring XML::Parser"
|
---|
| 188 | echo ""
|
---|
[2988] | 189 | cd "$PACKAGES/cpan"
|
---|
[8066] | 190 | perl_dir=`echo 'my $vn = $]; $vn =~ s/5\.00(\d).*$/perl-5.$1/; print "$vn" ' | perl`
|
---|
[8077] | 191 | gzip -dc XML-Parser-2.27.tar.gz | tar -xf -
|
---|
| 192 | cd "$PACKAGES/cpan/XML-Parser-2.27" && \
|
---|
[8155] | 193 | perl Makefile.PL "$GSDLHOME"
|
---|
| 194 | # This for XML::Parser 2.31:
|
---|
| 195 | # perl Makefile.PL \
|
---|
| 196 | # INSTALLSITELIB="$GSDLHOME/perllib/cpan/$perl_dir" \
|
---|
| 197 | # PREFIX="$GSDLHOME/perllib/cpan/XML" \
|
---|
| 198 | # INSTALLMAN1DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
|
---|
| 199 | # INSTALLMAN3DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
|
---|
| 200 | # SITEPREFIX="$GSDLHOME/perllib/cpan"
|
---|
[2169] | 201 |
|
---|
| 202 |
|
---|
[2985] | 203 | # configure powerpoint converter
|
---|
| 204 | echo ""
|
---|
[2988] | 205 | echo "Configuring xlhtml (powerpoint & excel converter)"
|
---|
[2985] | 206 | echo ""
|
---|
[2988] | 207 | cd "$PACKAGES/xlhtml"
|
---|
[2985] | 208 | gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
|
---|
[6334] | 209 | cd xlhtml-0.4.9.0 && \
|
---|
[2985] | 210 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|
[2809] | 211 |
|
---|
[6128] | 212 |
|
---|
| 213 | # configure IsisGdl program
|
---|
| 214 | echo ""
|
---|
[6334] | 215 | echo "Configuring IsisGdl (CDS/ISIS database reader)"
|
---|
[6128] | 216 | echo ""
|
---|
[6334] | 217 | cd "$PACKAGES/isis-gdl" && \
|
---|
[6128] | 218 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
|
---|