root/gs2-extensions/imagemagick/trunk/src/setup.bash @ 30679

Revision 30679, 1.8 KB (checked in by davidb, 4 years ago)

Minor tweak to setup file for when it is run/used outside of Greenstone

Line 
1extdesc="the ImageMagick extension"
2
3full_setup=`pwd`/${BASH_SOURCE}
4fulldir=${full_setup%/*}
5fulldir=${fulldir%/.}
6
7if [ "x$GSDLHOME" = "x" ] ; then
8  if [ -e ../../setup.bash ] ; then
9    export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd
10    export gsopt_noexts=
11  else
12    # backstop
13    GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
14    # check for running bash under cygwin
15    if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ; then
16      GSDLOS=windows
17    fi
18
19  fi
20fi
21
22if [ "x$GEXTIMAGEMAGICK" = "x" ] ; then
23  export GEXTIMAGEMAGICK=$fulldir
24  export GEXTIMAGEMAGICK_INSTALLED=$GEXTIMAGEMAGICK/$GSDLOS
25
26  # Developer setting (for compilation: configure in ImageMagick)
27  # better in devel.bash?
28  export PKG_CONFIG_PATH="$GEXTIMAGEMAGICK_INSTALLED/lib/pkgconfig:$PKG_CONFIG_PATH"
29
30  export MAGICK_HOME=$GEXTIMAGEMAGICK_INSTALLED
31  export PATH=$GEXTIMAGEMAGICK_INSTALLED/bin:$GEXTIMAGEMAGICK_INSTALLED/script:$PATH
32
33  if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
34    export LD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib
35  else
36    export LD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib:$LD_LIBRARY_PATH
37  fi
38  if [ "x$DYLD_FALLBACK_LIBRARY_PATH" = "x" ] ; then
39    export DYLD_FALLBACK_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib
40  else
41    export DYLD_FALLBACK_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib:$DYLD_FALLBACK_LIBRARY_PATH
42  fi
43
44  if [ -e "devel-srcpack" ] ; then
45    export LD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/devel/lib:$LD_LIBRARY_PATH
46    export DYLD_FALLBACK_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/devel/lib:$DYLD_FALLBACK_LIBRARY_PATH
47  fi
48
49 
50  extdir=${GEXTIMAGEMAGICK##*/}
51
52  if [ "x$GSDLEXTS" = "x" ] ; then
53    export GSDLEXTS=$extdir
54  else
55    export GSDLEXTS=$GSDLEXTS:$extdir
56  fi
57
58
59  echo "+Your environment is now setup for $extdesc"
60else
61  echo "+Your environment is already setup for $extdesc"
62fi
Note: See TracBrowser for help on using the browser.