source: trunk/gsdl3/packages/configure@ 7206

Last change on this file since 7206 was 6421, checked in by kjdon, 20 years ago

fixed a bug, added a message

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 KB
Line 
1#! /bin/sh
2
3PACKAGES=`pwd`
4cd ..
5GSDLHOME=`pwd`
6cd $PACKAGES
7
8GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9# check for running bash under cygwin
10if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
11then
12 GSDLOS=windows
13fi
14
15prefix=""
16bindir=""
17HOSTTARGETFLAGS=""
18
19# parse any arguments given from toplevel configure
20while test $# -ne 0; do
21 case "$1" in
22 --cache-file=*)
23 cache_filename=`echo $1 | sed s/--cache-file=//`
24 # turn relative path into an absolute path
25 cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
26 cache_dir=`cd $cache_dir 2>/dev/null && pwd`
27
28 cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
29 cache_file="$cache_dir/$cache_basefile"
30 if test ! -f "$cache_file"; then
31 CACHE_FILE=""
32 else
33 CACHE_FILE="--cache-file=$cache_file"
34 fi
35 ;;
36 --prefix=*)
37 prefix=`echo $1 | sed s/--prefix=//`
38 ;;
39 --bindir=*)
40 # where to install binaries to
41 bindir=`echo $1 | sed s/--bindir=//`
42 # turn relative path into an absolute path
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 rel_bindir="`echo $bindir | sed s@/.*@@`"
48 cd "$rel_bindir"
49 bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
50 cd "$PACKAGES"
51 else
52 # bindir doesn't exist, and isn't relative
53 true
54 fi
55 ;;
56 --host=* | --target=*)
57 HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
58 ;;
59 *)
60 # ignore all other options for now
61 ;;
62 esac
63 shift
64done
65
66# note! Our GSDL package currently always installs into it's source
67# directory, ignoring any --prefix given to configure.
68# When this is fixed, uncomment the relevant lines below...
69
70##if test -z "$prefix" ; then
71prefix="${GSDLHOME}"
72##fi
73
74##if test -z "$bindir" ; then
75bindir="${prefix}/bin/$GSDLOS"
76##fi
77
78# This loads the top configure's cache file, with variables already set.
79if test -f "$cache_file" ; then
80 . $cache_file
81fi
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# configure mysql
87echo ""
88echo "Configuring MySQL"
89echo ""
90
91cd "$PACKAGES/mysql"
92if test ! -e mysql-4.0.16; then
93 gzip -dc mysql-4.0.16.tar.gz | tar -xf -
94fi
95cd mysql-4.0.16
96./configure $CACHE_FILE --prefix="$PACKAGES/mysql" --libexec="$PACKAGES/mysql/libexec"
97cd "$PACKAGES"
98if test ! -e libexec; then
99 mkdir libexec
100fi
101
102# configure the wvWare Word document converter
103
104if test -e "$PACKAGES/wv"; then
105 echo ""
106 echo "Configuring wvWare"
107 echo ""
108
109 cd "$PACKAGES/wv"
110 gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
111 cd wv-gs
112 # datadir is for default location of wvHtml.xml config file
113 ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
114fi
115
116# configure the pdftohtml converter
117if test -e "$PACKAGES/pdftohtml"; then
118 echo ""
119 echo "Configuring pdftohtml"
120 echo ""
121
122 cd "$PACKAGES/pdftohtml"
123 gzip -dc pdftohtml_0_34.tar.gz | tar -xf -
124 cd pdftohtml_0_34
125 ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
126fi
127
128# rtftohtml converter
129if test -e "$PACKAGES/rtftohtml"; then
130 echo ""
131 echo "Configuring rtftohtml"http://kanuka.cs.waikato.ac.nz:8070/gsdl3
132 echo ""
133
134 cd "$PACKAGES/rtftohtml"
135 gzip -dc rtftohtml-gs.tar.gz | tar -xf -
136 cd rtftohtml_src
137 ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
138fi
139
140# configure wget
141if test -e "$PACKAGES/wget"; then
142 echo ""
143 echo "Configuring wget"
144 echo ""
145 cd "$PACKAGES/wget"
146 gzip -dc wget.tar.gz | tar -xf -
147 cd "$PACKAGES/wget/wget-1.5.3"
148 ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
149fi
150
151# configure powerpoint converter
152if test -e "$PACKAGES/xlhtml"; then
153 echo ""
154 echo "Configuring xlhtml (powerpoint & excel converter)"
155 echo ""
156 cd "$PACKAGES/xlhtml"
157 gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
158 cd xlhtml-0.4.9.0
159 ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
160fi
Note: See TracBrowser for help on using the repository browser.