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