1 | #! /bin/sh
|
---|
2 |
|
---|
3 | PACKAGES=`pwd`
|
---|
4 | cd ..
|
---|
5 | GSDLHOME=`pwd`
|
---|
6 | cd $PACKAGES
|
---|
7 | GSDLOS=`uname | tr A-Z a-z`
|
---|
8 | prefix=""
|
---|
9 | bindir=""
|
---|
10 |
|
---|
11 | USE_CORBA=false
|
---|
12 | MICO_DIR=default
|
---|
13 |
|
---|
14 | # parse any arguments given from toplevel configure
|
---|
15 | while test $# -ne 0; do
|
---|
16 | case "$1" in
|
---|
17 | --cache-file=*)
|
---|
18 | cache_filename=`echo $1 | sed s/--cache-file=//`
|
---|
19 | # turn relative path into an absolute path
|
---|
20 | cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
|
---|
21 | cache_dir=`cd $cache_dir 2>/dev/null && pwd`
|
---|
22 |
|
---|
23 | cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
|
---|
24 | cache_file="$cache_dir/$cache_basefile"
|
---|
25 | if test ! -f "$cache_file"; then
|
---|
26 | CACHE_FILE=""
|
---|
27 | else
|
---|
28 | CACHE_FILE="--cache-file=$cache_file"
|
---|
29 | fi
|
---|
30 | ;;
|
---|
31 | --enable-z3950)
|
---|
32 | USE_Z3950=true
|
---|
33 | ;;
|
---|
34 | --enable-corba)
|
---|
35 | USE_CORBA=true
|
---|
36 | ;;
|
---|
37 | --with-micodir=*)
|
---|
38 | if test $1 = ""; then
|
---|
39 | $1 = "default"
|
---|
40 | fi
|
---|
41 | MICO_DIR=$1
|
---|
42 | ;;
|
---|
43 | --prefix=*)
|
---|
44 | prefix=`echo $1 | sed s/--prefix=//`
|
---|
45 | ;;
|
---|
46 | --bindir=*)
|
---|
47 | # where to install binaries to
|
---|
48 | bindir=`echo $1 | sed s/--bindir=//`
|
---|
49 | if test -d $bindir ; then
|
---|
50 | bindir=`cd $bindir ; pwd `
|
---|
51 | cd "$PACKAGES"
|
---|
52 | elif test -z `echo $bindir | sed '/^\// p;D'` ; then
|
---|
53 | # turn relative path into an absolute path
|
---|
54 | rel_bindir=`echo $bindir | sed s@/.*@@`
|
---|
55 | cd $rel_bindir
|
---|
56 | bindir=`pwd`/`echo $bindir | sed s@^[^/]*/@@`
|
---|
57 | cd "$PACKAGES"
|
---|
58 | else
|
---|
59 | # bindir doesn't exist, and isn't relative
|
---|
60 | true
|
---|
61 | fi
|
---|
62 | ;;
|
---|
63 | *)
|
---|
64 | # ignore all other options for now
|
---|
65 | ;;
|
---|
66 | esac
|
---|
67 | shift
|
---|
68 | done
|
---|
69 |
|
---|
70 | # note! Our GSDL package currently always installs into it's source
|
---|
71 | # directory, ignoring any --prefix given to configure.
|
---|
72 | # When this is fixed, uncomment the relevant lines below...
|
---|
73 |
|
---|
74 | ##if test -z "$prefix" ; then
|
---|
75 | prefix="${GSDLHOME}"
|
---|
76 | ##fi
|
---|
77 |
|
---|
78 | ##if test -z "$bindir" ; then
|
---|
79 | bindir="${prefix}/bin/$GSDLOS"
|
---|
80 | ##fi
|
---|
81 |
|
---|
82 |
|
---|
83 |
|
---|
84 | # we assume that gzip and tar are on the search path.
|
---|
85 | # non-GNU versions of tar don't take the -z option.
|
---|
86 |
|
---|
87 |
|
---|
88 | echo USE_CORBA = $USE_CORBA
|
---|
89 | echo MICO_DIR = $MICO_DIR
|
---|
90 |
|
---|
91 | if test $USE_CORBA = true ; then
|
---|
92 | if test $MICO_DIR = default; then
|
---|
93 | # configure the MICO CORBA ORB
|
---|
94 | echo ""
|
---|
95 | echo "Configuring MICO CORBA"
|
---|
96 | echo ""
|
---|
97 |
|
---|
98 | cd "$PACKAGES/mico"
|
---|
99 | gzip -dc mico-2.3.5.tar.gz | tar -xf -
|
---|
100 | cd mico
|
---|
101 | ./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
|
---|
102 | sed 's/tools//' $PACKAGES/mico/mico/Makefile | sed 's/ldconfig//' >$PACKAGES/mico/mico/Makefile.out
|
---|
103 | mv $PACKAGES/mico/mico/Makefile.out $PACKAGES/mico/mico/Makefile
|
---|
104 | else
|
---|
105 | #MICO is on the system path
|
---|
106 | echo ""
|
---|
107 | echo "Taking MICO from system paths"
|
---|
108 | echo ""
|
---|
109 | fi
|
---|
110 | else
|
---|
111 | echo "corba support disabled - mico compiler not required."
|
---|
112 | echo " add '--enable-corba' to the configure command to include corba support."
|
---|
113 | echo ""
|
---|
114 | fi
|
---|
115 |
|
---|
116 |
|
---|
117 |
|
---|
118 |
|
---|
119 |
|
---|
120 | # configure the wvWare Word document converter
|
---|
121 | echo ""
|
---|
122 | echo "Configuring wvWare"
|
---|
123 | echo ""
|
---|
124 |
|
---|
125 | cd "$PACKAGES/wv"
|
---|
126 | gzip -dc wv-0.6.3-gs.tar.gz | tar -xf -
|
---|
127 | cd wv-gs
|
---|
128 | # datadir is for default location of wvHtml.xml config file
|
---|
129 | ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages"
|
---|
130 |
|
---|
131 | # configure the pdftohtml converter
|
---|
132 | echo ""
|
---|
133 | echo "Configuring pdftohtml"
|
---|
134 | echo ""
|
---|
135 |
|
---|
136 | cd "$PACKAGES/pdftohtml"
|
---|
137 | gzip -dc pdftohtml_gs.tar.gz | tar -xf -
|
---|
138 | cd pdftohtml_0_22
|
---|
139 | # following line is temporary...
|
---|
140 | rm -f xpdf/config.h
|
---|
141 | ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir"
|
---|
142 |
|
---|
143 | # rtftohtml converter
|
---|
144 | echo ""
|
---|
145 | echo "Configuring rtftohtml"
|
---|
146 | echo ""
|
---|
147 |
|
---|
148 | cd "$PACKAGES/rtftohtml"
|
---|
149 | gzip -dc rtftohtml-gs.tar.gz | tar -xf -
|
---|
150 | #cd rtftohtml_src
|
---|
151 | #./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir"
|
---|
152 |
|
---|
153 |
|
---|
154 | # YAZ Z39.50 toolkit
|
---|
155 | echo ""
|
---|
156 | echo "Configuring YAZ"
|
---|
157 | if test x$USE_Z3950 = xtrue ;
|
---|
158 | then
|
---|
159 | echo ""
|
---|
160 | cd "$PACKAGES/yaz"
|
---|
161 | ./configure $CACHE_FILE
|
---|
162 | else
|
---|
163 | echo "Z39.50 support disabled - YAZ library not required."
|
---|
164 | echo " add '--enable-z3950' to the configure command to include z39.50 support."
|
---|
165 | echo ""
|
---|
166 | fi
|
---|
167 |
|
---|
168 | # configure wget
|
---|
169 | echo ""
|
---|
170 | echo "Configuring wget"
|
---|
171 | echo ""
|
---|
172 | cd $PACKAGES/wget
|
---|
173 | gzip -dc wget.tar.gz | tar -xf -
|
---|
174 | cd $PACKAGES/wget/wget-1.5.3
|
---|
175 | ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir"
|
---|
176 |
|
---|
177 |
|
---|
178 |
|
---|