source: trunk/gsdl/packages/configure@ 2976

Last change on this file since 2976 was 2952, checked in by jrm21, 22 years ago

added " characters around some variables in case they have spaces in them.

Only try to source the top cache file if it exists.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.7 KB
RevLine 
[1668]1#! /bin/sh
2
3PACKAGES=`pwd`
[1704]4cd ..
5GSDLHOME=`pwd`
6cd $PACKAGES
[2952]7GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
[2421]8prefix=""
9bindir=""
[2725]10HOSTTARGETFLAGS=""
[1668]11
[2380]12USE_CORBA=false
[2642]13MICO_DIR=default
[2019]14
[1715]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 ;;
[1940]32 --enable-z3950)
33 USE_Z3950=true
34 ;;
[2113]35 --enable-corba)
36 USE_CORBA=true
37 ;;
[2173]38 --with-micodir=*)
39 if test $1 = ""; then
40 $1 = "default"
41 fi
42 MICO_DIR=$1
43 ;;
[2421]44 --prefix=*)
45 prefix=`echo $1 | sed s/--prefix=//`
46 ;;
[2019]47 --bindir=*)
[2421]48 # where to install binaries to
[2169]49 bindir=`echo $1 | sed s/--bindir=//`
[2952]50 # turn relative path into an absolute path
51 if test -d "$bindir" ; then
52 bindir=`cd "$bindir" ; pwd `
[2169]53 cd "$PACKAGES"
54 elif test -z `echo $bindir | sed '/^\// p;D'` ; then
[2952]55 rel_bindir="`echo $bindir | sed s@/.*@@`"
56 cd "$rel_bindir"
57 bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
[2169]58 cd "$PACKAGES"
59 else
60 # bindir doesn't exist, and isn't relative
61 true
62 fi
[2019]63 ;;
[2725]64 --host=* | --target=*)
65 HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
66 ;;
[1715]67 *)
68 # ignore all other options for now
69 ;;
70 esac
71 shift
72done
73
[2421]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
[2952]86# This loads the top configure's cache file, with variables already set.
87if test -f "$cache_file" ; then
88 . $cache_file
89fi
[2421]90
[2169]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
[2380]94if test $USE_CORBA = true ; then
[2173]95 if test $MICO_DIR = default; then
96 # configure the MICO CORBA ORB
97 echo ""
98 echo "Configuring MICO CORBA"
99 echo ""
[1715]100
[2173]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
[2169]113else
114 echo "corba support disabled - mico compiler not required."
115 echo " add '--enable-corba' to the configure command to include corba support."
116 echo ""
[2113]117fi
[1715]118
[2129]119
120
121
[2169]122
[1668]123# configure the wvWare Word document converter
124echo ""
125echo "Configuring wvWare"
[1978]126echo ""
[1668]127
[1996]128cd "$PACKAGES/wv"
[2169]129gzip -dc wv-0.6.3-gs.tar.gz | tar -xf -
[1978]130cd wv-gs
[2582]131# datadir is for default location of wvHtml.xml config file
[2725]132./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
[1668]133
[1961]134# configure the pdftohtml converter
135echo ""
136echo "Configuring pdftohtml"
137echo ""
[1668]138
[1996]139cd "$PACKAGES/pdftohtml"
[2349]140gzip -dc pdftohtml_gs.tar.gz | tar -xf -
[2421]141cd pdftohtml_0_22
[2725]142./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
[1961]143
[2582]144# rtftohtml converter
145echo ""
146echo "Configuring rtftohtml"
147echo ""
[2349]148
[2582]149cd "$PACKAGES/rtftohtml"
150gzip -dc rtftohtml-gs.tar.gz | tar -xf -
[2902]151cd rtftohtml_src
152./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
[2582]153
154
[1715]155# YAZ Z39.50 toolkit
[2052]156echo ""
157echo "Configuring YAZ"
[2169]158if test x$USE_Z3950 = xtrue ;
[1940]159then
160 echo ""
161 cd "$PACKAGES/yaz"
[2725]162 ./configure $CACHE_FILE $HOSTTARGETFLAGS
[1940]163else
[2052]164 echo "Z39.50 support disabled - YAZ library not required."
165 echo " add '--enable-z3950' to the configure command to include z39.50 support."
[1940]166 echo ""
167fi
[1715]168
[1704]169# configure wget
170echo ""
171echo "Configuring wget"
172echo ""
173cd $PACKAGES/wget
[2349]174gzip -dc wget.tar.gz | tar -xf -
[1704]175cd $PACKAGES/wget/wget-1.5.3
[2725]176./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
[2169]177
[2809]178# configure XML::Parser perl module
179echo ""
180echo "Configuring XML::Parser"
181echo ""
182cd $PACKAGES/cpan
[2895]183gzip -dc XML-Parser-2.27.tar.gz | tar -xf -
184cd $PACKAGES/cpan/XML-Parser-2.27
[2915]185perl Makefile.PL "$GSDLHOME"
[2169]186
187
[2809]188
[2914]189
Note: See TracBrowser for help on using the repository browser.