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