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