source: trunk/gsdl/packages/configure@ 2902

Last change on this file since 2902 was 2902, checked in by jrm21, 21 years ago

rtftohtml now uses configure, as solaris make assumes $(CC) is "cc", even
if only gcc is installed.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1#! /bin/sh
2
3PACKAGES=`pwd`
4cd ..
5GSDLHOME=`pwd`
6cd $PACKAGES
7GSDLOS=`uname | tr A-Z a-z`
8prefix=""
9bindir=""
10HOSTTARGETFLAGS=""
11
12USE_CORBA=false
13MICO_DIR=default
14
15# parse any arguments given from toplevel configure
16while 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 if test -d $bindir ; then
51 bindir=`cd $bindir ; pwd `
52 cd "$PACKAGES"
53 elif test -z `echo $bindir | sed '/^\// p;D'` ; then
54 # turn relative path into an absolute path
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
72done
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
79prefix="${GSDLHOME}"
80##fi
81
82##if test -z "$bindir" ; then
83bindir="${prefix}/bin/$GSDLOS"
84##fi
85
86
87
88# we assume that gzip and tar are on the search path.
89# non-GNU versions of tar don't take the -z option.
90
91
92echo USE_CORBA = $USE_CORBA
93echo MICO_DIR = $MICO_DIR
94
95if test $USE_CORBA = true ; then
96 if test $MICO_DIR = default; then
97 # configure the MICO CORBA ORB
98 echo ""
99 echo "Configuring MICO CORBA"
100 echo ""
101
102 cd "$PACKAGES/mico"
103 gzip -dc mico-2.3.5.tar.gz | tar -xf -
104 cd mico
105 ./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
106 sed 's/tools//' $PACKAGES/mico/mico/Makefile | sed 's/ldconfig//' >$PACKAGES/mico/mico/Makefile.out
107 mv $PACKAGES/mico/mico/Makefile.out $PACKAGES/mico/mico/Makefile
108 else
109 #MICO is on the system path
110 echo ""
111 echo "Taking MICO from system paths"
112 echo ""
113 fi
114else
115 echo "corba support disabled - mico compiler not required."
116 echo " add '--enable-corba' to the configure command to include corba support."
117 echo ""
118fi
119
120
121
122
123
124# configure the wvWare Word document converter
125echo ""
126echo "Configuring wvWare"
127echo ""
128
129cd "$PACKAGES/wv"
130gzip -dc wv-0.6.3-gs.tar.gz | tar -xf -
131cd wv-gs
132# datadir is for default location of wvHtml.xml config file
133./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
134
135# configure the pdftohtml converter
136echo ""
137echo "Configuring pdftohtml"
138echo ""
139
140cd "$PACKAGES/pdftohtml"
141gzip -dc pdftohtml_gs.tar.gz | tar -xf -
142cd pdftohtml_0_22
143# following line is temporary...
144rm -f xpdf/config.h
145./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
146
147# rtftohtml converter
148echo ""
149echo "Configuring rtftohtml"
150echo ""
151
152cd "$PACKAGES/rtftohtml"
153gzip -dc rtftohtml-gs.tar.gz | tar -xf -
154cd rtftohtml_src
155./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
156
157
158# YAZ Z39.50 toolkit
159echo ""
160echo "Configuring YAZ"
161if test x$USE_Z3950 = xtrue ;
162then
163 echo ""
164 cd "$PACKAGES/yaz"
165 ./configure $CACHE_FILE $HOSTTARGETFLAGS
166else
167 echo "Z39.50 support disabled - YAZ library not required."
168 echo " add '--enable-z3950' to the configure command to include z39.50 support."
169 echo ""
170fi
171
172# configure wget
173echo ""
174echo "Configuring wget"
175echo ""
176cd $PACKAGES/wget
177gzip -dc wget.tar.gz | tar -xf -
178cd $PACKAGES/wget/wget-1.5.3
179./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
180
181# configure XML::Parser perl module
182echo ""
183echo "Configuring XML::Parser"
184echo ""
185cd $PACKAGES/cpan
186gzip -dc XML-Parser-2.27.tar.gz | tar -xf -
187cd $PACKAGES/cpan/XML-Parser-2.27
188perl Makefile.PL "$GSDLHOME"
189
190
191
Note: See TracBrowser for help on using the repository browser.