#! /bin/sh PACKAGES=`pwd` cd .. GSDLHOME=`pwd` cd $PACKAGES GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # check for running bash under cygwin if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ; then GSDLOS=windows fi prefix="" bindir="" HOSTTARGETFLAGS="" # parse any arguments given from toplevel configure while test $# -ne 0; do case "$1" in --cache-file=*) cache_filename=`echo $1 | sed s/--cache-file=//` # turn relative path into an absolute path cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'` cache_dir=`cd $cache_dir 2>/dev/null && pwd` cache_basefile=`echo $cache_filename | sed 's@.*/@@'` cache_file="$cache_dir/$cache_basefile" if test ! -f "$cache_file"; then CACHE_FILE="" else CACHE_FILE="--cache-file=$cache_file" fi ;; --prefix=*) prefix=`echo $1 | sed s/--prefix=//` ;; --bindir=*) # where to install binaries to bindir=`echo $1 | sed s/--bindir=//` # turn relative path into an absolute path if test -d "$bindir" ; then bindir=`cd "$bindir" ; pwd ` cd "$PACKAGES" elif test -z `echo $bindir | sed '/^\// p;D'` ; then rel_bindir="`echo $bindir | sed s@/.*@@`" cd "$rel_bindir" bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`" cd "$PACKAGES" else # bindir doesn't exist, and isn't relative true fi ;; --host=* | --target=*) HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1" ;; *) # ignore all other options for now ;; esac shift done # note! Our GSDL package currently always installs into it's source # directory, ignoring any --prefix given to configure. # When this is fixed, uncomment the relevant lines below... ##if test -z "$prefix" ; then prefix="${GSDLHOME}" ##fi ##if test -z "$bindir" ; then bindir="${prefix}/bin/$GSDLOS" ##fi # This loads the top configure's cache file, with variables already set. if test -f "$cache_file" ; then . $cache_file fi # we assume that gzip and tar are on the search path. # non-GNU versions of tar don't take the -z option. # configure mysql echo "" echo "Configuring MySQL" echo "" cd "$PACKAGES/mysql" if test ! -e mysql-4.0.16; then gzip -dc mysql-4.0.16.tar.gz | tar -xf - fi cd mysql-4.0.16 ./configure $CACHE_FILE --prefix="$PACKAGES/mysql" --libexec="$PACKAGES/mysql/libexec" cd "$PACKAGES" if test ! -e libexec; then mkdir libexec fi # configure the wvWare Word document converter if test -e "$PACKAGES/wv"; then echo "" echo "Configuring wvWare" echo "" cd "$PACKAGES/wv" gzip -dc wv-0.7.1-gs.tar.gz | tar -xf - cd wv-gs # datadir is for default location of wvHtml.xml config file ./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS fi # configure the pdftohtml converter if test -e "$PACKAGES/pdftohtml"; then echo "" echo "Configuring pdftohtml" echo "" cd "$PACKAGES/pdftohtml" gzip -dc pdftohtml_0_34.tar.gz | tar -xf - cd pdftohtml_0_34 ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS fi # rtftohtml converter if test -e "$PACKAGES/rtftohtml"; then echo "" echo "Configuring rtftohtml"http://kanuka.cs.waikato.ac.nz:8070/gsdl3 echo "" cd "$PACKAGES/rtftohtml" gzip -dc rtftohtml-gs.tar.gz | tar -xf - cd rtftohtml_src ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS fi # configure wget if test -e "$PACKAGES/wget"; then echo "" echo "Configuring wget" echo "" cd "$PACKAGES/wget" gzip -dc wget.tar.gz | tar -xf - cd "$PACKAGES/wget/wget-1.5.3" ./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS fi # configure powerpoint converter if test -e "$PACKAGES/xlhtml"; then echo "" echo "Configuring xlhtml (powerpoint & excel converter)" echo "" cd "$PACKAGES/xlhtml" gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf - cd xlhtml-0.4.9.0 ./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS fi