[1668] | 1 | #! /bin/sh
|
---|
| 2 |
|
---|
| 3 | PACKAGES=`pwd`
|
---|
[1704] | 4 | cd ..
|
---|
| 5 | GSDLHOME=`pwd`
|
---|
| 6 | cd $PACKAGES
|
---|
| 7 | GSDLOS=`uname | tr A-Z a-z`
|
---|
[2169] | 8 | # bindir can be overridden on command line.
|
---|
[2019] | 9 | bindir=$GSDLHOME/bin/$GSDLOS
|
---|
[1668] | 10 |
|
---|
[2380] | 11 | USE_CORBA=false
|
---|
[2019] | 12 |
|
---|
[1715] | 13 | # parse any arguments given from toplevel configure
|
---|
| 14 | while test $# -ne 0; do
|
---|
| 15 | case "$1" in
|
---|
| 16 | --cache-file=*)
|
---|
| 17 | cache_filename=`echo $1 | sed s/--cache-file=//`
|
---|
| 18 | # turn relative path into an absolute path
|
---|
| 19 | cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
|
---|
| 20 | cache_dir=`cd $cache_dir 2>/dev/null && pwd`
|
---|
| 21 |
|
---|
| 22 | cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
|
---|
| 23 | cache_file="$cache_dir/$cache_basefile"
|
---|
| 24 | if test ! -f "$cache_file"; then
|
---|
| 25 | CACHE_FILE=""
|
---|
| 26 | else
|
---|
| 27 | CACHE_FILE="--cache-file=$cache_file"
|
---|
| 28 | fi
|
---|
| 29 | ;;
|
---|
[1940] | 30 | --enable-z3950)
|
---|
| 31 | USE_Z3950=true
|
---|
| 32 | ;;
|
---|
[2113] | 33 | --enable-corba)
|
---|
| 34 | USE_CORBA=true
|
---|
| 35 | ;;
|
---|
[2173] | 36 | --with-micodir=*)
|
---|
| 37 | if test $1 = ""; then
|
---|
| 38 | $1 = "default"
|
---|
| 39 | fi
|
---|
| 40 | MICO_DIR=$1
|
---|
| 41 | ;;
|
---|
[2019] | 42 | --bindir=*)
|
---|
[2169] | 43 | bindir=`echo $1 | sed s/--bindir=//`
|
---|
| 44 | if test -d $bindir ; then
|
---|
| 45 | bindir=`cd $bindir ; pwd `
|
---|
| 46 | cd "$PACKAGES"
|
---|
| 47 | elif test -z `echo $bindir | sed '/^\// p;D'` ; then
|
---|
| 48 | # turn relative path into an absolute path
|
---|
| 49 | rel_bindir=`echo $bindir | sed s@/.*@@`
|
---|
| 50 | cd $rel_bindir
|
---|
| 51 | bindir=`pwd`/`echo $bindir | sed s@^[^/]*/@@`
|
---|
| 52 | cd "$PACKAGES"
|
---|
| 53 | else
|
---|
| 54 | # bindir doesn't exist, and isn't relative
|
---|
| 55 | true
|
---|
| 56 | fi
|
---|
[2019] | 57 | ;;
|
---|
[1715] | 58 | *)
|
---|
| 59 | # ignore all other options for now
|
---|
| 60 | ;;
|
---|
| 61 | esac
|
---|
| 62 | shift
|
---|
| 63 | done
|
---|
| 64 |
|
---|
[2169] | 65 | # we assume that gzip and tar are on the search path.
|
---|
| 66 | # non-GNU versions of tar don't take the -z option.
|
---|
| 67 |
|
---|
| 68 |
|
---|
[2204] | 69 | echo USE_CORBA = $USE_CORBA
|
---|
| 70 | echo MICO_DIR = $MICO_DIR
|
---|
[2380] | 71 | if test $USE_CORBA = true ; then
|
---|
[2173] | 72 | if test $MICO_DIR = default; then
|
---|
| 73 | # configure the MICO CORBA ORB
|
---|
| 74 | echo ""
|
---|
| 75 | echo "Configuring MICO CORBA"
|
---|
| 76 | echo ""
|
---|
[1715] | 77 |
|
---|
[2173] | 78 | cd "$PACKAGES/mico"
|
---|
| 79 | gzip -dc mico-2.3.5.tar.gz | tar -xf -
|
---|
| 80 | cd mico
|
---|
| 81 | ./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
|
---|
| 82 | sed 's/tools//' $PACKAGES/mico/mico/Makefile | sed 's/ldconfig//' >$PACKAGES/mico/mico/Makefile.out
|
---|
| 83 | mv $PACKAGES/mico/mico/Makefile.out $PACKAGES/mico/mico/Makefile
|
---|
| 84 | else
|
---|
| 85 | #MICO is on the system path
|
---|
| 86 | echo ""
|
---|
| 87 | echo "Taking MICO from system paths"
|
---|
| 88 | echo ""
|
---|
| 89 | fi
|
---|
[2169] | 90 | else
|
---|
| 91 | echo "corba support disabled - mico compiler not required."
|
---|
| 92 | echo " add '--enable-corba' to the configure command to include corba support."
|
---|
| 93 | echo ""
|
---|
[2113] | 94 | fi
|
---|
[1715] | 95 |
|
---|
[2129] | 96 |
|
---|
| 97 |
|
---|
| 98 |
|
---|
[2169] | 99 |
|
---|
[1668] | 100 | # configure the wvWare Word document converter
|
---|
| 101 | echo ""
|
---|
| 102 | echo "Configuring wvWare"
|
---|
[1978] | 103 | echo ""
|
---|
[1668] | 104 |
|
---|
[1996] | 105 | cd "$PACKAGES/wv"
|
---|
[2169] | 106 | gzip -dc wv-0.6.3-gs.tar.gz | tar -xf -
|
---|
[1978] | 107 | cd wv-gs
|
---|
[2169] | 108 | ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir"
|
---|
[1668] | 109 |
|
---|
[1961] | 110 | # configure the pdftohtml converter
|
---|
| 111 | echo ""
|
---|
| 112 | echo "Configuring pdftohtml"
|
---|
| 113 | echo ""
|
---|
[1668] | 114 |
|
---|
[1996] | 115 | cd "$PACKAGES/pdftohtml"
|
---|
[2349] | 116 | gzip -dc pdftohtml_gs.tar.gz | tar -xf -
|
---|
[1961] | 117 |
|
---|
[2349] | 118 |
|
---|
[1715] | 119 | # YAZ Z39.50 toolkit
|
---|
[2052] | 120 | echo ""
|
---|
| 121 | echo "Configuring YAZ"
|
---|
[2169] | 122 | if test x$USE_Z3950 = xtrue ;
|
---|
[1940] | 123 | then
|
---|
| 124 | echo ""
|
---|
| 125 | cd "$PACKAGES/yaz"
|
---|
| 126 | ./configure $CACHE_FILE
|
---|
| 127 | else
|
---|
[2052] | 128 | echo "Z39.50 support disabled - YAZ library not required."
|
---|
| 129 | echo " add '--enable-z3950' to the configure command to include z39.50 support."
|
---|
[1940] | 130 | echo ""
|
---|
| 131 | fi
|
---|
[1715] | 132 |
|
---|
[1704] | 133 | # configure wget
|
---|
| 134 | echo ""
|
---|
| 135 | echo "Configuring wget"
|
---|
| 136 | echo ""
|
---|
| 137 | cd $PACKAGES/wget
|
---|
[2349] | 138 | gzip -dc wget.tar.gz | tar -xf -
|
---|
[1704] | 139 | cd $PACKAGES/wget/wget-1.5.3
|
---|
[2169] | 140 | ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir"
|
---|
| 141 |
|
---|
| 142 |
|
---|
| 143 |
|
---|