Index: /gs2-extensions/imagemagick/trunk/src/CASCADE-MAKE.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/CASCADE-MAKE.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/CASCADE-MAKE.sh	(revision 23291)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+source devel.bash
+
+for d in packages ; do
+    echo "Running $d/CASCADE-MAKE.sh"
+
+    (cd $d ; ./CASCADE-MAKE.sh $*)
+
+    if [ $? != 0 ] ; then
+	echo "Error encountered running $d/CASCADE-MAKE.sh"
+	exit 1
+    fi
+done
+
+if [ $makedist = "1"  ] ; then
+  default_toplevel_make_dist $GSDLOS
+fi
Index: /gs2-extensions/imagemagick/trunk/src/devel.bash
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/devel.bash	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/devel.bash	(revision 23291)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+if [ -d cascade-make ] ; then
+  source cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK . $*
+fi
+
+if [ -z $GEXTIMAGEMAGICK ] ; then
+  source setup.bash
+fi
Index: /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE.sh	(revision 23291)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK .. $*
+
+for d in TIFF LIBPNG JPEG JPEG2000 IMAGEMAGICK ; do
+    echo "    Running CASCADE-MAKE/$d.sh"
+
+    ./CASCADE-MAKE/$d.sh $*
+
+    if [ $? != 0 ] ; then
+	echo "Error encountered running CASCADE-MAKE/$d.sh"
+	exit 1
+    fi
+done
Index: /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/IMAGEMAGICK.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/IMAGEMAGICK.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/IMAGEMAGICK.sh	(revision 23291)
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+package=ImageMagick
+version=-6.6.5-5
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
+
+prefix=$GEXTIMAGEMAGICK_INSTALLED
+
+
+export CFLAGS="$CFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
+export CPPFLAGS="$CPPFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
+export CXXFLAGS="$CXXFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
+export LDFLAGS="$LDFLAGS -L$GEXTIMAGEMAGICK_INSTALLED/lib"
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix
+
+opt_run_make $compile $package $version
+opt_run_make $install $package $version "install"
+opt_run_make $clean $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
Index: /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/JPEG.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/JPEG.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/JPEG.sh	(revision 23291)
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+package=jpeg
+version=-8b
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
+
+prefix=$GEXTIMAGEMAGICK_INSTALLED
+
+
+export CFLAGS="$CFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
+export CPPFLAGS="$CPPFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
+export CXXFLAGS="$CXXFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include"
+export LDFLAGS="$LDFLAGS -L$GEXTIMAGEMAGICK_INSTALLED/lib"
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix
+
+opt_run_make $compile $package $version
+opt_run_make $install $package $version "install"
+opt_run_make $clean $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
Index: /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/JPEG2000.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/JPEG2000.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/JPEG2000.sh	(revision 23291)
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+package=jasper
+version=-1.900.1
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
+
+prefix=$GEXTIMAGEMAGICK_INSTALLED
+
+export CFLAGS="$CFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include -fPIC"
+export CPPFLAGS="$CPPFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include -fPIC"
+export CXXFLAGS="$CXXFLAGS -I$GEXTIMAGEMAGICK_INSTALLED/include -fPIC"
+export LDFLAGS="$LDFLAGS -L$GEXTIMAGEMAGICK_INSTALLED/lib"
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix
+
+opt_run_make $compile $package $version
+opt_run_make $install $package $version "install"
+opt_run_make $clean $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
Index: /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh	(revision 23291)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+package=libpng
+version=-1.4.4
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
+
+prefix=$GEXTIMAGEMAGICK_INSTALLED
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix
+
+opt_run_make $compile $package $version
+opt_run_make $install $package $version "install"
+opt_run_make $clean $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
Index: /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/TIFF.sh
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/TIFF.sh	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/packages/CASCADE-MAKE/TIFF.sh	(revision 23291)
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+package=tiff
+version=-3.9.4
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash GEXTIMAGEMAGICK ../.. $*
+
+prefix=$GEXTIMAGEMAGICK_INSTALLED
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix
+
+opt_run_make $compile $package $version
+opt_run_make $install $package $version "install"
+opt_run_make $clean $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
Index: /gs2-extensions/imagemagick/trunk/src/setup.bash
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/setup.bash	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/setup.bash	(revision 23291)
@@ -0,0 +1,49 @@
+extdesc="the ImageMagick extension"
+
+full_setup=`pwd`/${BASH_SOURCE}
+fulldir=${full_setup%/*}
+fulldir=${fulldir%/.}
+
+if [ "x$GSDLHOME" = "x" ] ; then
+  if [ -e ../../setup.bash ] ; then
+    export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd 
+    export gsopt_noexts=
+  fi
+fi
+
+if [ "x$GEXTIMAGEMAGICK" = "x" ] ; then
+  export GEXTIMAGEMAGICK=$fulldir
+  export GEXTIMAGEMAGICK_INSTALLED=$GEXTIMAGEMAGICK/$GSDLOS
+
+  export PATH=$GEXTIMAGEMAGICK_INSTALLED/bin:$PATH
+
+  if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
+    export LD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib
+  else
+    export LD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib:$LD_LIBRARY_PATH
+  fi
+  if [ "x$DYLD_LIBRARY_PATH" = "x" ] ; then
+    export DYLD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib
+  else
+    export DYLD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/lib:$DYLD_LIBRARY_PATH
+  fi
+
+  if [ -e "devel-srcpack" ] ; then
+    export LD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/devel/lib:$LD_LIBRARY_PATH
+    export DYLD_LIBRARY_PATH=$GEXTIMAGEMAGICK_INSTALLED/devel/lib:$DYLD_LIBRARY_PATH
+  fi
+
+  
+  extdir=${GEXTIMAGEMAGICK##*/}
+
+  if [ "x$GSDLEXTS" = "x" ] ; then
+    export GSDLEXTS=$extdir
+  else 
+    export GSDLEXTS=$GSDLEXTS:$extdir
+  fi
+
+
+  echo "+Your environment is now setup for $extdesc"
+else
+  echo "+Your environment is already setup for $extdesc"
+fi
Index: /gs2-extensions/imagemagick/trunk/src/setup.bat
===================================================================
--- /gs2-extensions/imagemagick/trunk/src/setup.bat	(revision 23291)
+++ /gs2-extensions/imagemagick/trunk/src/setup.bat	(revision 23291)
@@ -0,0 +1,57 @@
+@echo off
+pushd "%CD%"
+CD /D "%~dp0"
+set GSDLLANG=en
+set extdesc="the ImageMagick extension"
+
+if "%OS%" == "Windows_NT" goto WinNT
+if "%OS%" == "" goto Win95
+if "%GSDLLANG%" == "en" echo Setup failed - your PATH has not been set
+if "%GSDLLANG%" == "es" echo No se pudo realizar la configuraci¢n - no se ha establecido la RUTA.
+if "%GSDLLANG%" == "fr" echo Echc de l'installation - votre variable PATH n'a pas t ajuste
+if "%GSDLLANG%" == "ru" echo áâ ­®¢ª  ­¥ ã€ « áì -  ­¥ ¡ë« ãáâ ­®¢«¥­
+goto End
+
+:WinNT
+set GEXTIMAGEMAGICK=%CD%
+set GEXTIMAGEMAGICK_INSTALLED=%GEXTIMAGEMAGICK%\windows
+
+set PATH=%GEXTIMAGEMAGICK_INSTALLED%\bin;%PATH%
+set GS_CP_SET=yes
+goto Success
+
+:Win95
+if "%1" == "SetEnv" goto Win95Env
+REM We'll invoke a second copy of the command processor to make
+REM sure there's enough environment space
+COMMAND /E:2048 /K %0 SetEnv
+goto End
+
+:Win95Env
+set GEXTIMAGEMAGICK=%CD%
+set PATH="%GEXTIMAGEMAGICK_INSTALLED%\bin";"%PATH%"
+set GS_CP_SET=yes
+goto Success
+
+:Success
+
+set fulldir=%~dp0
+
+:: strip off everything up to (and including) ext dir
+set extdir=%fulldir:*ext\=%
+
+:: remove trailing slash
+set extdir=%extdir:\=%
+
+
+if "x%GSDLEXTS%" == "x" (
+  set GSDLEXTS=%extdir%
+) else (
+  set GSDLEXTS=%GSDLEXTS%:%extdir%
+)
+
+echo +Your environment is now setup for %extdesc%
+
+:End
+
+popd
