diff -ruN ccp4-6.3.0-dist/configure ccp4-6.3.0/configure
--- ccp4-6.3.0-dist/configure	2012-05-17 03:19:57.000000000 -0700
+++ ccp4-6.3.0/configure	2012-09-17 19:29:22.000000000 -0700
@@ -2462,10 +2462,10 @@
   XCXXFLAGS=${XCXXFLAGS:-" "}
   XMKMF="IMAKECPP=/usr/bin/cpp xmkmf"
   if test "$shared_lib" = yes; then
-    SHARED_LIB_CFLAGS=${SHARED_LIB_CFLAGS:-'-fPIC -fno-common'}
-    SHARE_LIB='${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name ${libdir}/libmmdb.dylib -o libmmdb.dylib $(MMDBOBJS) -lstdc++; ${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name ${libdir}/libccp4c.dylib -o libccp4c.dylib $(CORELIBOBJS) $(CGENERALOBJS) $(CUCOBJS) $(CMTZOBJS) $(CMAPOBJS) $(CSYMOBJS)'
-    SHARE_INST='${INSTALL_DATA} `pwd`/libmmdb.dylib ${libdir}/libmmdb.dylib; ${INSTALL_DATA} `pwd`/libccp4c.dylib ${libdir}/libccp4c.dylib'
-  fi     
+    SHARED_LIB_CFLAGS=${SHARED_LIB_CFLAGS:-'-fPIC -fno-common'}  
+    SHARE_LIB='${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name ${rpath}/libmmdb.dylib -o libmmdb.dylib ${MMDBOBJS} -lstdc++; ${CC} -dynamiclib -flat_namespace -undefined suppress ${SHARED_LIB_CFLAGS} -install_name ${rpath}/libccp4c.dylib -o libccp4c.dylib ${CORELIBOBJS} ${CGENERALOBJS} ${CUCOBJS} ${CMTZOBJS} ${CMAPOBJS} ${CSYMOBJS}'
+	SHARE_INST='${INSTALL_DATA} `pwd`/libmmdb.dylib ${libdir}/libmmdb.dylib; ${INSTALL_DATA} `pwd`/libccp4c.dylib ${libdir}/libccp4c.dylib'
+  fi   
 #need -lcc_dynamic to get restFP and saveFP for g77 3.4 under darwin 7
   case `$FC --version` in
     *3.4* ) 
@@ -2596,8 +2596,8 @@
   if test "$shared_lib" = yes; then
     LD=${LD:-"ld"}
     XLDFLAGS="-limf -lirc"
-    SHARE_LIB=${SHARE_LIB:-'${LD} -dylib -dynamic -flat_namespace -undefined suppress -dylib_install_name ${libdir}/libmmdb.dylib -o libmmdb.dylib $(MMDBOBJS) ${CXX_LIBS} -limf -ldylib1.o; ${LD} -dylib -dynamic -flat_namespace -undefined suppress -dylib_install_name ${libdir}/libccp4c.dylib -o libccp4c.dylib $(CORELIBOBJS) $(CGENERALOBJS) $(CUCOBJS) $(CMTZOBJS) $(CMAPOBJS) $(CSYMOBJS) -ldylib1.o;'}
-    SHARE_INST='$(INSTALL_DATA) `pwd`/libmmdb.dylib $(libdir)/libmmdb.dylib; $(INSTALL_DATA) `pwd`/libccp4c.dylib $(libdir)/libccp4c.dylib;'
+	SHARE_LIB=${SHARE_LIB:-'${LD} -dylib -dynamic -flat_namespace -undefined suppress -dylib_install_name ${rpath}/libmmdb.dylib -o libmmdb.dylib ${MMDBOBJS} -lirc -limf -ldylib1.o; ${LD} -dylib -dynamic -flat_namespace -undefined suppress -dylib_install_name ${rpath}/libccp4c.dylib -o libccp4c.dylib ${CORELIBOBJS} ${CGENERALOBJS} ${CUCOBJS} ${CMTZOBJS} ${CMAPOBJS} ${CSYMOBJS} -ldylib1.o;'}
+	SHARE_INST='$(INSTALL_DATA) `pwd`/libmmdb.dylib $(libdir)/libmmdb.dylib; $(INSTALL_DATA) `pwd`/libccp4c.dylib $(libdir)/libccp4c.dylib;'
     LDCXXFLAGS="-lccp4c -lmmdb \$(XCIF_LIB) \$(XLAPACK_LIB) \$(C_LIBS) \$(XLDFLAGS) -lstdc++"
   fi     
      
@@ -2720,7 +2720,7 @@
 #get CXX_LIBS in general manner
 if test x"$CXX_LIBS" = x ; then
 cat >> conftest.cc << _EOF
-main ()
+int main ()
 {
 
   ;
@@ -2729,7 +2729,7 @@
 _EOF
 
 test_compile="$CXX -v $XCXXFLAGS conftest.cc -o conftest"
-link_output=`eval $test_compile 5>&1 2>&1 | grep crt1`
+link_output=`eval $test_compile 5>&1 2>&1 `
 got_already=
 
 set X $link_output
@@ -4197,7 +4197,8 @@
   CFLAGS="${COPTIM} ${XCFLAGS}"
   FFTW_LIBS="-L${prefix}/lib -lrfftw -lfftw"
   FFTW_CXXFLAGS="-I${prefix}/lib/fftw/fftw -I${prefix}/lib/fftw/rfftw -I${prefix}/include"
-  export CFLAGS
+  FLIBS="-L@PREFIX@/lib/gcc4.7/lib -lgfortran"
+  export CFLAGS FLIBS
 # must use --enable-float
   xopts="--enable-float"
   if test "$shared_lib" = yes; then
diff -ruN ccp4-6.3.0-dist/etc/xloggraph ccp4-6.3.0/etc/xloggraph
--- ccp4-6.3.0-dist/etc/xloggraph	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/etc/xloggraph	2012-09-17 19:17:15.000000000 -0700
@@ -0,0 +1,6 @@
+#!/bin/zsh
+export XUSERFILESEARCHPATH=$CLIB/X11/app-defaults/XCCPJiffy
+xloggraph.exe "$@" &
+export XUSERFILESEARCHPATH=""
+print "Plot button sends pdf to Preview.  Print or save pdf in Preview window."
+exit 0
diff -ruN ccp4-6.3.0-dist/etc/xplot84 ccp4-6.3.0/etc/xplot84
--- ccp4-6.3.0-dist/etc/xplot84	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/etc/xplot84	2012-09-17 19:17:15.000000000 -0700
@@ -0,0 +1,6 @@
+#!/bin/zsh
+export XUSERFILESEARCHPATH=$CLIB/X11/app-defaults/XCCPJiffy
+xplot84driver.exe "$@" &
+export XUSERFILESEARCHPATH=""
+print "Plot button sends pdf to Preview.  Print or save pdf in Preview window."
+exit 0
diff -ruN ccp4-6.3.0-dist/etc/xplot84driver ccp4-6.3.0/etc/xplot84driver
--- ccp4-6.3.0-dist/etc/xplot84driver	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/etc/xplot84driver	2012-09-17 19:17:15.000000000 -0700
@@ -0,0 +1,6 @@
+#!/bin/zsh
+export XUSERFILESEARCHPATH=$CLIB/X11/app-defaults/XCCPJiffy
+xplot84driver.exe "$@" &
+export XUSERFILESEARCHPATH=""
+print "Plot button sends pdf to Preview.  Print or save pdf in Preview window."
+exit 0
diff -ruN ccp4-6.3.0-dist/include/ccp4.setup-bash ccp4-6.3.0/include/ccp4.setup-bash
--- ccp4-6.3.0-dist/include/ccp4.setup-bash	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/include/ccp4.setup-bash	2012-09-17 19:26:30.000000000 -0700
@@ -0,0 +1,466 @@
+#!/bin/bash
+# [The above is just for emacs -- this file should not be executed.]
+
+# CCP4 setup file for bash users.  -*- shell-script -*-
+# $Id: ccp4.setup-bash,v 1.91.2.3 2008/06/09 08:51:17 ccb Exp $
+
+###############################################################################
+
+# Edit this for the current version of ccp4:
+   # if [[ -z $CCP4_VERSION ]];then
+        CCP4_VERSION="ccp4-6.3.0"
+   # fi
+
+###############################################################################
+
+# NOTE: You should not need to edit the rest of this file unless you want to over-ride the 
+# following assignments of $CCP4_MASTER and $BLTWISHPREFIX
+
+# NOTE:  If you have installed ccp4 on OS X with fink, you should not need to
+# change this file or to source it (fink takes care of sourcing it for you).
+
+    # CCP4_MASTER is the location of the top-level directory containing `ccp4'.  
+    # Set it manually by uncommenting and editing the following line:
+    
+    # export CCP4_MASTER="@PREFIX@/opt"
+    
+    # or discover it from the source command if we have a current version of the bash shell
+    
+      #  if [[ -z "$CCP4_MASTER"  ]];then
+            if [[ ${BASH_VERSION} > 3 ]];then
+                CCP4_MASTER="$(dirname $(dirname $(dirname ${BASH_SOURCE} )))"  
+            else
+                # Attempt to this the hard way for older versions of bash
+                if [[ -d "@PREFIX@/opt/${CCP4_VERSION}" ]]; then
+                    CCP4_MASTER="@PREFIX@/opt"
+                elif [[ -d "@PREFIX@/opt/${CCP4_VERSION}" ]]; then
+                    CCP4_MASTER="@PREFIX@/opt" 
+                elif [[ -d "/usr/local/${CCP4_VERSION}" ]]; then
+                    CCP4_MASTER="/usr/local"    
+                elif [[ -d "/usr/local/ccp4/${CCP4_VERSION}" ]]; then
+                    CCP4_MASTER="/usr/local/ccp4"   
+                elif [[ -d "@PREFIX@/opt/ccp4/${CCP4_VERSION}" ]]; then
+                    CCP4_MASTER="@PREFIX@/opt/ccp4"
+                else
+                    CCP4_MASTER="@PREFIX@/opt"
+                fi
+            fi
+      #  fi
+        
+        export CCP4_MASTER
+
+
+    # Discover where bltwish executable is located
+
+    if [[ -z $BLTWISHPREFIX &&  -x $(which bltwish) ]];then
+        BLTWISHPREFIX=$( dirname $( which bltwish )  )
+    fi
+ 
+###############################################################################
+
+
+
+# This file is site specific and may also contain machine-specifics.  The CCP4
+# administrator will have to edit this file and then have anyone who wants to
+# use CCP4 source it from their .login file.  They will require the full path
+# name since no environment variables relevant to CCP4 are known until this is
+# executed.
+
+# For sites with more than one machine, it is recommended that the suite is
+# installed on a single machine and other machines access the source code, and
+# shareable files (such as this one) via shared file systems with NFS, RFS
+# etc.  Non-shareable files reside in $CBIN and $CLIB (see below).
+
+# Copy this file to ccp4.setup and customise it for your needs. There are
+# three sections. You MUST check the first section. You may want to check
+# the second. You don't need to look at the third.
+
+
+################### THIS SECTION MUST BE EDITED #####################
+
+# CCP4_MASTER is the location of the top-level directory containing `ccp4-<version>'
+# This is usually the directory in which you ran the tar command to unpack the
+# code, and is assumed to be shared between machines at a multi-machine site.
+
+# CCP4_MASTER="@PREFIX@/opt"; export CCP4_MASTER  
+# CCP4="$CCP4_MASTER/ccp4-6.3.0"  ; export CCP4
+
+# Check for existence of CCP4_MASTER
+if [[ ! -d $CCP4_MASTER ]] ; then
+    echo "********************* WARNING **********************"
+    echo "The directory $CCP4_MASTER"
+    echo "(assigned to CCP4_MASTER) does not exist."
+    echo "The CCP4 programs will not run correctly, and any"
+    echo "installation attempt will have errors or will fail."
+    echo "********************* WARNING **********************"
+else
+    if [[ -d "$CCP4_MASTER/$CCP4_VERSION"  ]];then                 
+        CCP4="$CCP4_MASTER/$CCP4_VERSION" ; export CCP4
+    else
+        echo "The directory "$CCP4_MASTER/$CCP4_VERSION" cannot be found."
+        echo " Please check that "$CCP4_VERSION" is the right ccp4 version. "
+    fi
+fi
+
+
+# CCP4_SCR: a per-user directory for run-time-generated scratch
+# files. A dedicated scratch filesystem is probably better than (/usr)/tmp
+# BINSORT_SCR: a scratch directory for binsort's use; normally same as CCP4_SCR
+
+export CCP4_SCR="/tmp/$USER"    
+# check to see if this exists and if not try to make it
+test -d $CCP4_SCR || mkdir $CCP4_SCR
+test -d $CCP4_SCR || \
+    echo "Unable to make CCP4_SCR. CCP4 progs will not run correctly."
+
+export BINSORT_SCR="$CCP4_SCR"
+
+### CCP4i setup - you may need to edit CCP4I_TCLTK ###
+# CCP4I_TOP - the top directory of the interface
+export CCP4I_TOP="${CCP4}/share/ccp4i"
+# CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables
+#               as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph
+#               For 'standard' installations this is @PREFIX@/bin
+#               but note the SGI distributed version of Tcl/Tk is not 
+#               appropriate version
+#  export CCP4I_TCLTK="@PREFIX@/bin"    
+if [[ -d "$BLTWISHPREFIX"  &&  -x "$BLTWISHPREFIX/bltwish" ]]; then
+    export CCP4I_TCLTK="$BLTWISHPREFIX"
+else
+    echo " Cannot find bltwish executable. Please make sure it is in your \$PATH "
+fi
+
+    
+# CCP4I_HELP - directory contain ccp4i help - default is $CCP4I_TOP/help
+export CCP4I_HELP="${CCP4I_TOP}/help"
+
+### Optional - setting http_proxy environment
+# The commented out 'export' line below may have to be declared to download
+# and edit protein sequences using the new "Import/Edit Protein Sequences"
+# (This may also be required for remote job submission in arp/warp.)
+# task. If so, uncomment this line and replace the example proxy URL with your
+# relevant URL
+
+#export HTTP_PROXY wwwblah.blah.ac.uk:xxxx/blah.blah
+
+################### NOVICE USERS STOP HERE #####################
+
+################### OPTIONS TO CUSTOMISE CCP4 #####################
+
+# By default, CCP4 directories are prepended to the beginning of paths (PATH,
+# LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH). If ccp4_first_in_path is set
+# to 0, then they will be appended to the end of paths.
+# When deciding local policy, bear in mind the possible existence of
+# other CCP4 installations, and the possibility of non-CCP4 programs
+# with conflicting names.
+ccp4_first_in_path=0
+
+# The following checks the CCP4 server for available updates, and reports back.
+# Comment this line out if you find it annoying.
+# eval python -V >& /dev/null && python $CCP4/etc/ccp4_updates.py -l
+
+# Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile
+# output from programs compiled with Gfortran is in the correct order.
+# Note that there will be some performance penalty for this.
+# # # # # # export GFORTRAN_UNBUFFERED_ALL="Y"
+
+# The commented-out switch statement below provides an example of how
+# to use this file for several machines/architectures sharing $CCP4_MASTER.
+# If necessary, uncomment and edit this.  Otherwise, if you're only supporting
+# a single system alter the uncommented part as necessary.
+#
+# The significance of the environment variables is as follows:
+#   CBIN: location of the executables -- must be on your path (see below);
+#   CLIB: location of (binary) library files such as libccp4.a and libccp4.so;
+#   MANPATH: set this if your system's `man' looks at such an environment
+#      variable to determine where to look for man pages.  By adding 
+#      $CCP4/man to the normal path you get the CCP4 man pages 
+#      with keyword searching as system ones.  
+#   MCTYPE: used for LAUE make -- see LAUE documentation
+#   CCP4_BROWSER: set this if you intend to use the html documentation
+#      (recommended).  It should have the path and name of a html browser eg
+#      /usr/bin/X11/mozilla or @PREFIX@/bin/lynx. The browser will be
+#      started with the alias ccp4help and will open the file
+#      $CHTML/INDEX.html.
+
+ 
+    export CBIN="$CCP4/bin"        
+    export CLIB="$CCP4/lib"    
+
+    CCP4_BROWSER=""; export CCP4_BROWSER="Safari"             
+
+    if test "$MANPATH"; then
+      if [[ $ccp4_first_in_path -eq 1 ]]; then
+        export MANPATH="${CCP4}/man:${MANPATH}"
+      else
+        export MANPATH="${MANPATH}:${CCP4}/man"
+      fi
+    else
+      if [ $ccp4_first_in_path -eq 1 ]; then
+        export MANPATH="${CCP4}/man:/usr/share/man"
+      else
+        export MANPATH="/usr/share/man:${CCP4}/man"
+      fi
+    fi
+    export MCTYPE="unix"             # (only for Laue)
+ 
+
+    if [[   $(uname) == Darwin && $(sw_vers -productVersion) < 10.5 ]];then
+        ulimit -s 65536
+    fi
+ 
+
+# The following are for all systems
+export CCP4_LIB="$CLIB"
+export CCP4_BIN="$CBIN"
+
+# CLASSPATH for Java
+if test "$CLASSPATH"; then
+  if [[ $ccp4_first_in_path -eq 1 ]]; then
+    export CLASSPATH="${CBIN}:${CLASSPATH}"
+  else
+    export CLASSPATH="${CLASSPATH}:${CBIN}"
+  fi
+else
+  if [ $ccp4_first_in_path -eq 1 ]; then
+    export CLASSPATH="${CBIN}:."
+  else
+    export CLASSPATH=".:${CBIN}"
+  fi
+fi
+
+### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ###
+export PLOT_COMMAND='lp -s -dmicrolaser'  
+export PRINT_COMMAND='lp -s -denscript'    
+
+# HARVESTHOME specifies location of harvesting files (defaults to $HOME)
+#export HARVESTHOME     
+
+### CCP4_OPEN ###
+# CCP4_OPEN may be set to 'UNKNOWN' to stop open failures for files opened 
+# as NEW that already exist.  Novices should use 'NEW' to avoid inadvertant 
+# over-writing of existing files, which is then treated as a fatal error.
+
+export CCP4_OPEN="UNKNOWN"    
+
+### BINSORT_MEM ###
+# BINSORT_MEM is workspace used by the binsort program.  In principle this
+# value is machine-dependent.  It may benefit from being enlarged, but values
+# higher than 2M have been reported to cause excessive paging on some systems.
+# You might like to experiment with a program such as fft with different
+# values -- 102400 (bytes) is the default.  csh's `time' command can tell you
+# about paging.
+#
+#  export BINSORT_MEM="8388608"
+
+# LD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.so)
+# at runtime
+#####     if test "$LD_LIBRARY_PATH"; then
+#####       if [[ $ccp4_first_in_path -eq 1 ]]; then
+#####         export LD_LIBRARY_PATH="${CLIB}:${LD_LIBRARY_PATH}"
+#####       else
+#####         export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CLIB}"
+#####       fi
+#####     else
+#####       export LD_LIBRARY_PATH="${CLIB}"
+#####     fi
+#####     
+#####     # DYLD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.dylib)
+#####     # at runtime (used on Mac OS X)
+#####     if test "$DYLD_LIBRARY_PATH"; then
+#####       if [[ $ccp4_first_in_path -eq 1 ]]; then
+#####         export DYLD_LIBRARY_PATH="${CLIB}:${DYLD_LIBRARY_PATH}"
+#####       else
+#####         export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}:${CLIB}"
+#####       fi
+#####     else
+#####       export DYLD_LIBRARY_PATH="${CLIB}"
+#####     fi
+#####     
+#####     ### XAPPLRESDIR ###
+#####     
+#####     # If you want to use xloggraph/xplot84driver, you need to get the application
+#####     # defaults picked up somehow.  As distributed, the file can't just live in an
+#####     # application defaults directory since it requires reading by xrdb to sort out
+#####     # the differences for monochrome displays.  At Daresbury a version of the file
+#####     # assuming a monochrome display is kept in the directory
+#####     # $CCP4_LIB/X11/app-defaults and this is picked up through the
+#####     # XUSERFILESEARCHPATH environment variable.  That means you only see black and
+#####     # white on a colour display.  Alternatively you might make sure that it is
+#####     # read by xrdb on startup of the X Windows system or delegate the
+#####     # responsibility to users to run it.  There are disadvantages to putting an
+#####     # invocation of xrdb in here, one being that the correct value of DISPLAY may
+#####     # not be set at the time this file is read.  Thus edit this part as
+#####     # appropriate.  (SunOS will normally want to use /usr/openwin or $OPENWINHOME
+#####     # instead of /usr; others may want /usr/local/lib or some such):
+#####     if test "$XUSERFILESEARCHPATH"; then
+#####       export XUSERFILESEARCHPATH="$CCP4_LIB/X11/app-defaults/%N:$XUSERFILESEARCHPATH"
+#####     else
+#####       export XUSERFILESEARCHPATH="$CCP4_LIB/X11/app-defaults/%N:/usr/lib/X11/app-defaults"
+#####     fi
+#####     
+#####     ### TRAPPFE ###
+#####     # TRAPFPE is set to ensure (in collaboration with -lfpe) an abort on floating
+#####     # point exceptions under IRIX.  It shouldn't cause harm on other systems, but
+#####     # edit this to comment it out if necessary. 
+#####     export TRAP_FPE="OVERFL=ABORT" ; export DIVZERO="ABORT" ; export INVALID="ABORT"
+#####     
+#####     # The following can be used to put a message of the day to announce news about
+#####     # CCP4 or whatever to CCP4 users.  You might also want to edit this part to
+#####     # have machine-specific messages dependent on `hostname`.
+#####     [[ -f "$CCP4/include/ccp4.msg" ]] && cat "$CCP4/include/ccp4.msg"
+
+################### EXPERIENCED USERS STOP HERE #####################
+
+################### THE REST SHOULDN'T NEED EDITING #####################
+
+### dbCCP4i database handler setup ###
+
+export DBCCP4I_TOP="${CCP4}/share/dbccp4i"
+
+### IMOSFLM environment is now defined here
+
+export MOSFLM_EXEC="${CBIN}/ipmosflm"
+export MOSFLM_WISH="${CCP4I_TCLTK}/wish"
+export IMOSFLM_VERSION="0.6.1"
+
+
+### MMCIFDIC is now defined here. cif_mmdic.lib is a binary file ===
+# so on multiple installs it need to be unique and not in $CLIBD
+
+export MMCIFDIC="$CLIB/cif_mmdic.lib"
+
+### MOLREPLIB Point to the location of the files bs-zeros.dat  ps.resource  symlib.blc
+# They are distributed with CCP4 in $CLIBD. This env must have the trailing \ or /
+
+export MOLREPLIB="$CCP4/lib/data/monomers/"
+
+### CRANK points to location of Crank automation suite within ccp4i
+
+export CRANK="$CCP4/share/ccp4i/crank"
+export CCP4_CRANK="1"
+
+#  ### XIA2 setup
+#  # XIAROOT directory (default is under the share folder)
+#  
+#  if [[ -f "$CCP4/share/XIAROOT/setup.sh" ]]; then
+#      source "$CCP4/share/XIAROOT/setup.sh"
+#  fi
+#  
+# Note: The PATH is updated with the xia2 Applications directory in the 
+# construct below.
+
+### PISA_CONF_FILE is the config file needed to run the stand-alone PISA,
+#   though this can be set on the command line too.
+
+export PISA_CONF_FILE="$CCP4/share/pisa/pisa.cfg"
+
+### CLIBD_MON Point to the location of the dictionary files for REFMAC5
+# They are distributed with CCP4 in $CLIBD/monomers. This env must have 
+# the trailing \ or /
+
+export CLIBD_MON="$CCP4/lib/data/monomers/"
+
+### PUBLIC_FONT84, CCP4_HELPDIR, HELPDIR, MOSHELPFILE ###
+# (essential for the relevant programs)
+export PUBLIC_FONT84="$CLIB/font84.dat"  # plot84 fonts [used by plot84lib]
+
+# location of VMS-style help files required for mosflm [used by hlplib, chelp,
+#   chlp, (ip)mosflm]:
+export CCP4_HELPDIR="$CCP4/help/"            # NB trailing /
+
+# Rasmol path. Needed for prog. to find rasmol.hlp
+export RASMOLPATH="$CCP4/x-windows/RasMol/src"
+
+if [[ $ZSH_NAME != "zsh" ]];then
+
+    # This is specific to bash, so protect it from zsh users
+
+    # CCP4 executables and scripts live in $CBIN and $CETC respectively; put them
+    # on the path in an appropriate order for scripts to be used as wrappers for
+    # binaries of the same name.  Put ccp4 stuff after the current path to avoid
+    # confusion with `.' or whatever in the path:
+    #
+    # This construct prevents the path getting longer each time ccp4.setup is
+    # executed (A. Perrakis)
+    # 
+    ccp4pathlist="${CCP4}/etc ${CBIN} ${CCP4I_TOP}/bin ${DBCCP4I_TOP}/bin ${CCP4}/share/XIAROOT/xia2/Applications"
+    #
+    for dir in ${ccp4pathlist}; do
+      if [[ `expr ":${PATH}:" : ".*:${dir}:"` -eq 0 ]]; then
+        if [[ $ccp4_first_in_path -eq 1 ]]; then
+          export PATH="${dir}:${PATH}"
+        else
+          export PATH="${PATH}:${dir}"
+        fi
+      fi
+    done
+
+fi
+
+# Optional (useful) additional environment variables
+  #export CCP4="$CCP4"
+  export CDOC="$CCP4/doc"
+  export CHTML="$CCP4/html"
+  export CETC="$CCP4/etc"
+  export CEXAM="$CCP4/examples"
+  export CINCL="$CCP4/include"
+  export CLIBD="$CCP4/lib/data"
+  export CLIBS="$CCP4/lib/src"
+  export CPROG="$CCP4/src"
+
+if [[ "`basename $SHELL`" != "ksh" ]]; then
+# useful aliases, at least for developers
+  alias ccp4='pushd $CCP4>/dev/null'
+  alias xtal='pushd $CCP4_MASTER>/dev/null'
+  alias cbin='pushd $CBIN>/dev/null'
+  alias cetc='pushd $CETC>/dev/null'
+  alias cprog='pushd $CPROG>/dev/null'
+  alias cincl='pushd $CINCL>/dev/null'
+  alias clib='pushd $CLIB>/dev/null'
+  alias clibd='pushd $CLIBD>/dev/null'
+  alias clibs='pushd $CLIBS>/dev/null'
+  alias cbin='pushd $CBIN>/dev/null'
+  alias cexam='pushd $CEXAM>/dev/null'
+  alias cdoc='pushd $CDOC>/dev/null'
+  alias chtml='pushd $CHTML>/dev/null'
+  alias ccp4help='$CCP4_BROWSER $CHTML/INDEX.html \&'
+
+### laue, lget, linkimages ###
+# Essential aliases for the Laue software suite
+  alias laue='$CCP4_MASTER/laue/cmd/laue.cmd'
+  alias lget='$CCP4_MASTER/laue/cmd/lget.cmd'
+  alias linkimages='$CCP4_MASTER/laue/cmd/linkimages.cmd'
+
+# additional useful aliases for Laue directories
+  alias llaue='pushd $CCP4_MASTER/laue'
+  alias lsrc='pushd $CCP4_MASTER/laue/src>/dev/null'
+  alias llib='pushd $CCP4_MASTER/laue/lib>/dev/null'
+  alias llibs='pushd $CCP4_MASTER/laue/lib/src>/dev/null'
+  alias ldoc='pushd $CCP4_MASTER/laue/doc>/dev/null'
+  alias lmak='pushd $CCP4_MASTER/laue/make>/dev/null'
+  alias lutils='pushd $CCP4_MASTER/laue/utils>/dev/null'
+  alias lcmd='pushd $CCP4_MASTER/laue/cmd>/dev/null'
+  alias ldl='pushd $CCP4_MASTER/laue/dl>/dev/null'
+  alias ltestd='pushd $CCP4_MASTER/laue/testdata>/dev/null'
+  alias lxdl='pushd $CCP4_MASTER/laue/xdl_view>/dev/null'
+  alias lxdls='pushd $CCP4_MASTER/laue/xdl_view/src>/dev/null'
+  alias lgnom='pushd $CCP4_MASTER/laue/gnom>/dev/null'
+  alias lgnoms='pushd $CCP4_MASTER/laue/gnom/src>/dev/null'
+  alias lbin='pushd $CBIN>/dev/null'
+
+fi             # ksh test
+
+####    # Set-up cctbx environment
+####    [[ -f "$CCP4/lib/cctbx/cctbx_build/setpaths.sh" ]] && source "$CCP4/lib/cctbx/cctbx_build/setpaths.sh"
+####    
+####    # Set-up phaser environment
+####    if [[ -d $CCP4/src/phaser ]] ; then
+####      export phaser_mtype=`$CCP4/src/phaser/bin/machine_type`
+####      export phaser_version=`grep PHASER_VERSION $CCP4/src/phaser/conf/version | awk '{print $3}'`
+####      export phaser_setup_file="${CCP4}/src/phaser/phaser-${phaser_version}/build/${phaser_mtype}/setpaths.sh"
+####      [[ -f "$phaser_setup_file" ]] && source "$phaser_setup_file"
+####    fi
+####    
+#BALBES root configuration
+export BALBES_ROOT="$CCP4/share/BALBES/Package"
diff -ruN ccp4-6.3.0-dist/include/ccp4.setup-csh ccp4-6.3.0/include/ccp4.setup-csh
--- ccp4-6.3.0-dist/include/ccp4.setup-csh	2012-07-04 02:20:49.000000000 -0700
+++ ccp4-6.3.0/include/ccp4.setup-csh	2012-09-17 19:26:30.000000000 -0700
@@ -24,7 +24,7 @@
 # This is usually the directory in which you ran the tar command to unpack the
 # code, and is assumed to be shared between machines at a multi-machine site.
 
-setenv CCP4_MASTER	/xtal                  
+setenv CCP4_MASTER	$TEMPXTAL                  
 setenv CCP4		$CCP4_MASTER/ccp4-6.3.0
 
 # Check for existence of CCP4_MASTER
@@ -54,10 +54,10 @@
 setenv CCP4I_TOP ${CCP4}/share/ccp4i
 # CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables
 #               as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph
-#               For 'standard' installations this is /usr/local/bin
+#               For 'standard' installations this is @/bin
 #               but note the SGI distributed version of Tcl/Tk is not 
 #               appropriate version
-setenv CCP4I_TCLTK /usr/local/bin        
+setenv CCP4I_TCLTK @/bin        
 # CCP4I_HELP - directory contain ccp4i help - default is $CCP4I_TOP/help
 setenv CCP4I_HELP ${CCP4I_TOP}/help
 
@@ -80,7 +80,7 @@
 # When deciding local policy, bear in mind the possible existence of
 # other CCP4 installations, and the possibility of non-CCP4 programs
 # with conflicting names.
-set ccp4_first_in_path = 1
+set ccp4_first_in_path = 0
 
 # The following checks the CCP4 server for available updates, and reports back.
 # Uncomment this line if you want to know about available updates.
@@ -90,7 +90,7 @@
 # Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile
 # output from programs compiled with Gfortran is in the correct order.
 # Note that there will be some performance penalty for this.
-#setenv GFORTRAN_UNBUFFERED_ALL Y
+## setenv GFORTRAN_UNBUFFERED_ALL Y
 
 # Gfortran 4.3.0 has new GFORTRAN_UNBUFFERED_PRECONNECTED variable
 # to make only STDOUT and STDERR unbuffered.
@@ -114,7 +114,7 @@
 #   MCTYPE: used for LAUE make -- see LAUE documentation
 #   CCP4_BROWSER: set this if you intend to use the html documentation
 #      (recommended).  It should have the path and name of a html browser eg
-#      /usr/bin/X11/mozilla or /usr/local/bin/lynx. The browser will be
+#      /usr/bin/X11/mozilla or @/bin/lynx. The browser will be
 #      started with the alias ccp4help and will open the file
 #      $CHTML/INDEX.html.
 
@@ -155,7 +155,7 @@
     case 6:
     case 7:
     case 8:
-      limit stacksize 65536
+      limit stacksize unlimited
       breaksw
     default:
       breaksw
diff -ruN ccp4-6.3.0-dist/include/ccp4.setup-dist ccp4-6.3.0/include/ccp4.setup-dist
--- ccp4-6.3.0-dist/include/ccp4.setup-dist	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/include/ccp4.setup-dist	2012-09-17 19:26:30.000000000 -0700
@@ -0,0 +1,431 @@
+#!/bin/csh
+# CCP4 setup file for C-shell (or tcsh) users.  -*- shell-script -*-
+
+# $Id: ccp4.setup-dist,v 1.116.2.3 2008/11/20 15:19:24 rmk65 Exp $
+
+# This file is site specific and may also contain machine-specifics.  The CCP4
+# administrator will have to edit this file and then have anyone who wants to
+# use CCP4 source it from their .login file.  They will require the full path
+# name since no environment variables relevant to CCP4 are known until this is
+# executed.
+
+# For sites with more than one machine, it is recommended that the suite is
+# installed on a single machine and other machines access the source code, and
+# shareable files (such as this one) via shared file systems with NFS, RFS
+# etc.  Non-shareable files reside in $CBIN and $CLIB (see below).
+
+# Copy this file to ccp4.setup and customise it for your needs. There are
+# three sections. You MUST check the first section. You may want to check
+# the second. You don't need to look at the third.
+
+################### THIS SECTION MUST BE EDITED #####################
+
+# CCP4_MASTER is the location of the top-level directory containing `ccp4-<version>'
+# This is usually the directory in which you ran the tar command to unpack the
+# code, and is assumed to be shared between machines at a multi-machine site.
+
+setenv CCP4_MASTER	@PREFIX@/opt                  
+setenv CCP4		$CCP4_MASTER/ccp4-6.3.0
+
+# Check for existence of CCP4_MASTER
+if (! -e $CCP4_MASTER) then
+    echo "********************* WARNING **********************"
+    echo "The directory $CCP4_MASTER"
+    echo "(assigned to CCP4_MASTER) does not exist."
+    echo "The CCP4 programs will not run correctly, and any"
+    echo "installation attempt will have errors or will fail."
+    echo "********************* WARNING **********************"
+endif 
+
+# CCP4_SCR: a per-user directory for run-time-generated scratch
+# files. A dedicated scratch filesystem is probably better than (/usr)/tmp
+# BINSORT_SCR: a scratch directory for binsort's use; normally same as CCP4_SCR
+
+setenv CCP4_SCR      /tmp/$USER	
+# check to see if this exists and if not try to make it
+if (! -e $CCP4_SCR) mkdir $CCP4_SCR
+if (! -e $CCP4_SCR) \
+    echo "Unable to make CCP4_SCR. CCP4 progs will not run correctly."
+
+setenv BINSORT_SCR   $CCP4_SCR
+
+### CCP4i setup - you may need to edit CCP4I_TCLTK ###
+# CCP4I_TOP - the top directory of the interface
+setenv CCP4I_TOP ${CCP4}/share/ccp4i
+# CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables
+#               as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph
+#               For 'standard' installations this is @PREFIX@/bin
+#               but note the SGI distributed version of Tcl/Tk is not 
+#               appropriate version
+setenv CCP4I_TCLTK @PREFIX@/bin        
+# CCP4I_HELP - directory contain ccp4i help - default is $CCP4I_TOP/help
+setenv CCP4I_HELP ${CCP4I_TOP}/help
+
+### Optional - setting http_proxy environment
+# The commented out 'setenv' line below may have to be declared to download
+# and edit protein sequences using the new "Import/Edit Protein Sequences"
+# (This may also be required for remote job submission in arp/warp.)
+# task. If so, uncomment this line and replace the example proxy URL with your
+# relevant URL
+
+#setenv HTTP_PROXY wwwblah.blah.ac.uk:xxxx/blah.blah
+
+################### NOVICE USERS STOP HERE #####################
+
+################### OPTIONS TO CUSTOMISE CCP4 #####################
+
+# By default, CCP4 directories are prepended to the beginning of paths (PATH,
+# LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH). If ccp4_first_in_path is set
+# to 0, then they will be appended to the end of paths.
+# When deciding local policy, bear in mind the possible existence of
+# other CCP4 installations, and the possibility of non-CCP4 programs
+# with conflicting names.
+set ccp4_first_in_path = 0
+
+# The following checks the CCP4 server for available updates, and reports back.
+# Uncomment this line if you want to know about available updates.
+
+#eval python -V >& /dev/null && python $CCP4/etc/ccp4_updates.py -l
+
+# Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile
+# output from programs compiled with Gfortran is in the correct order.
+# Note that there will be some performance penalty for this.
+# # # # # setenv GFORTRAN_UNBUFFERED_ALL Y
+
+# The commented-out switch statement below provides an example of how
+# to use this file for several machines/architectures sharing $CCP4_MASTER.
+# If necessary, uncomment and edit this.  Otherwise, if you're only supporting
+# a single system alter the uncommented part as necessary.
+#
+# The significance of the environment variables is as follows:
+#   CBIN: location of the executables -- must be on your path (see below);
+#   CLIB: location of (binary) library files such as libccp4.a and libccp4.so;
+#   MANPATH: set this if your system's `man' looks at such an environment
+#      variable to determine where to look for man pages.  By adding 
+#      $CCP4/man to the normal path you get the CCP4 man pages 
+#      with keyword searching as system ones.  
+#   MCTYPE: used for LAUE make -- see LAUE documentation
+#   CCP4_BROWSER: set this if you intend to use the html documentation
+#      (recommended).  It should have the path and name of a html browser eg
+#      /usr/bin/X11/mozilla or @PREFIX@/bin/lynx. The browser will be
+#      started with the alias ccp4help and will open the file
+#      $CHTML/INDEX.html.
+
+#   switch (`hostname`)			# edit this switch statement if used
+#                                       # for multiple systems
+#   case 'foo':
+    setenv CBIN      $CCP4/bin		
+    setenv CLIB      $CCP4/lib	
+
+    setenv CCP4_BROWSER  Safari          
+
+    if (${?MANPATH}) then
+      if ($ccp4_first_in_path) then
+        setenv MANPATH ${CCP4}/man:${MANPATH}
+      else
+        setenv MANPATH ${MANPATH}:${CCP4}/man
+      endif
+    else
+      if ($ccp4_first_in_path) then
+        setenv MANPATH ${CCP4}/man:/usr/share/man
+      else
+        setenv MANPATH /usr/share/man:${CCP4}/man
+      endif
+    endif
+    if (-d $CCP4_MASTER/laue) then 
+      setenv MCTYPE        unix 			# (only for Laue)
+    endif
+#     breaksw
+#   default:
+#     echo "CCP4 not implemented on this system"
+#     exit 1
+#     breaksw
+# endsw
+
+switch (`uname`)
+case 'Darwin': 
+  limit stacksize unlimited
+  breaksw
+default:
+  breaksw
+endsw
+
+# The following are for all systems
+setenv CCP4_LIB $CLIB
+setenv CCP4_BIN $CBIN
+
+# CLASSPATH for Java
+if (${?CLASSPATH}) then
+  if ($ccp4_first_in_path) then
+    setenv CLASSPATH ${CBIN}:${CLASSPATH}
+  else
+    setenv CLASSPATH ${CLASSPATH}:${CBIN}
+  endif
+else
+  if ($ccp4_first_in_path) then
+    setenv CLASSPATH ${CBIN}:.
+  else
+    setenv CLASSPATH .:${CBIN}
+  endif
+endif
+
+#  #Python path for the subprocess fixed module
+#  if (${?PYTHONPATH}) then
+#    if ($ccp4_first_in_path) then
+#        setenv PYTHONPATH ${CCP4}/share/python:${PYTHONPATH}
+#    else
+#        setenv PYTHONPATH ${PYTHONPATH}:${CCP4}/share/python
+#    endif
+#  else
+#      setenv PYTHONPATH ${CCP4}/share/python
+#  endif
+
+### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ###
+setenv PLOT_COMMAND   'lpr'  
+setenv PRINT_COMMAND  'lpr'    
+
+# HARVESTHOME specifies location of harvesting files (defaults to $HOME)
+#setenv HARVESTHOME     
+
+### CCP4_OPEN ###
+# CCP4_OPEN may be set to 'UNKNOWN' to stop open failures for files opened 
+# as NEW that already exist.  Novices should use 'NEW' to avoid inadvertant 
+# over-writing of existing files, which is then treated as a fatal error.
+
+setenv CCP4_OPEN        UNKNOWN	
+
+### BINSORT_MEM ###
+# BINSORT_MEM is workspace used by the binsort program.  In principle this
+# value is machine-dependent.  It may benefit from being enlarged, but values
+# higher than 2M have been reported to cause excessive paging on some systems.
+# You might like to experiment with a program such as fft with different
+# values -- 102400 (bytes) is the default.  csh's `time' command can tell you
+# about paging.
+#
+#  setenv BINSORT_MEM     8388608
+
+#  # LD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.so)
+#  # at runtime
+#  if (${?LD_LIBRARY_PATH}) then
+#    if ($ccp4_first_in_path) then
+#      setenv LD_LIBRARY_PATH ${CLIB}:${LD_LIBRARY_PATH}
+#    else
+#      setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${CLIB}
+#    endif
+#  else
+#    setenv LD_LIBRARY_PATH ${CLIB}
+#  endif
+#  
+#  # DYLD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.dylib)
+#  # at runtime (used on Mac OS X)
+#  if (${?DYLD_LIBRARY_PATH}) then
+#    if ($ccp4_first_in_path) then
+#      setenv DYLD_LIBRARY_PATH ${CLIB}:${DYLD_LIBRARY_PATH}
+#    else
+#      setenv DYLD_LIBRARY_PATH ${DYLD_LIBRARY_PATH}:${CLIB}
+#    endif
+#  else
+#    setenv DYLD_LIBRARY_PATH ${CLIB}
+#  endif
+#  
+### XAPPLRESDIR ###
+
+# If you want to use xloggraph/xplot84driver, you need to get the application
+# defaults picked up somehow.  As distributed, the file can't just live in an
+# application defaults directory since it requires reading by xrdb to sort out
+# the differences for monochrome displays.  At Daresbury a version of the file
+# assuming a monochrome display is kept in the directory
+# $CCP4_LIB/X11/app-defaults and this is picked up through the
+# XUSERFILESEARCHPATH environment variable.  That means you only see black and
+# white on a colour display.  Alternatively you might make sure that it is
+# read by xrdb on startup of the X Windows system or delegate the
+# responsibility to users to run it.  There are disadvantages to putting an
+# invocation of xrdb in here, one being that the correct value of DISPLAY may
+# not be set at the time this file is read.  Thus edit this part as
+# appropriate.  (SunOS will normally want to use /usr/openwin or $OPENWINHOME
+# instead of /usr; others may want /usr/local/lib or some such):
+#  if (-d $CCP4_LIB/X11/app-defaults) then
+#    if ($?XUSERFILESEARCHPATH) then
+#      setenv XUSERFILESEARCHPATH $CCP4_LIB/X11/app-defaults/%N:$XUSERFILESEARCHPATH
+#    else
+#      setenv XUSERFILESEARCHPATH $CCP4_LIB/X11/app-defaults/%N:/usr/lib/X11/app-defaults
+#    endif
+#  endif
+
+### TRAPPFE ###
+# TRAPFPE is set to ensure (in collaboration with -lfpe) an abort on floating
+# point exceptions under IRIX.  It shouldn't cause harm on other systems, but
+# edit this to comment it out if necessary. 
+
+switch (`uname`)
+case '*IRIX*': 
+  setenv TRAP_FPE "OVERFL=ABORT; DIVZERO=ABORT; INVALID=ABORT"
+  breaksw
+default:
+  breaksw
+endsw
+
+# The following can be used to put a message of the day to announce news about
+# CCP4 or whatever to CCP4 users.  You might also want to edit this part to
+# have machine-specific messages dependent on `hostname`.
+if (-e $CCP4/include/ccp4.msg) cat $CCP4/include/ccp4.msg
+
+################### EXPERIENCED USERS STOP HERE #####################
+
+################### THE REST SHOULDN'T NEED EDITING #####################
+
+### dbCCP4i database handler setup ###
+
+setenv DBCCP4I_TOP ${CCP4}/share/dbccp4i
+
+### IMOSFLM environment is now defined here
+
+setenv MOSFLM_EXEC ${CBIN}/ipmosflm
+setenv MOSFLM_WISH ${CCP4I_TCLTK}/wish
+setenv IMOSFLM_VERSION "0.6.1"
+
+### MMCIFDIC is now defined here. cif_mmdic.lib is a binary file ===
+# so on multiple installs it need to be unique and not in $CLIBD
+
+setenv MMCIFDIC $CLIB/cif_mmdic.lib
+
+### MOLREPLIB Point to the location of the files bs-zeros.dat  ps.resource  symlib.blc
+# They are distributed with CCP4 in $CLIBD. This env must have the trailing \ or /
+
+setenv MOLREPLIB $CCP4/lib/data/monomers/
+
+### CRANK points to location of Crank automation suite within ccp4i
+
+setenv CRANK $CCP4/share/ccp4i/crank
+setenv CCP4_CRANK 1
+#  
+#  ### XIA2 setup
+#  # XIAROOT directory (default is under the share folder)
+#  
+#  if (-e $CCP4/share/XIAROOT/setup.csh) then
+#     source $CCP4/share/XIAROOT/setup.csh
+#  endif
+
+# Note: The PATH is updated with the xia2 Applications directory in the 
+# construct below.
+
+### PISA_CONF_FILE is the config file needed to run the stand-alone PISA,
+#   though this can be set on the command line too.
+
+if (-e $CCP4/share/pisa/pisa.cfg) then
+  setenv PISA_CONF_FILE $CCP4/share/pisa/pisa.cfg
+endif
+
+### CLIBD_MON Point to the location of the dictionary files for REFMAC5
+# They are distributed with CCP4 in $CLIBD/monomers. This env must have 
+# the trailing \ or /
+
+setenv CLIBD_MON $CCP4/lib/data/monomers/
+
+### PUBLIC_FONT84, CCP4_HELPDIR, HELPDIR, MOSHELPFILE ###
+# (essential for the relevant programs)
+setenv PUBLIC_FONT84   $CLIB/font84.dat  # plot84 fonts [used by plot84lib]
+
+# location of VMS-style help files required for mosflm [used by hlplib, chelp,
+#   chlp, (ip)mosflm]:
+setenv CCP4_HELPDIR    $CCP4/help/            # NB trailing /
+
+# Rasmol path. Needed for prog. to find rasmol.hlp
+setenv RASMOLPATH $CCP4/x-windows/RasMol/src
+
+# CCP4 executables and scripts live in $CBIN and $CETC respectively; put them
+# on the path in an appropriate order for scripts to be used as wrappers for
+# binaries of the same name.  Put ccp4 stuff after the current path to avoid
+# confusion with `.' or whatever in the path:
+#
+# This construct prevents the path getting longer each time ccp4.setup is
+# executed (A. Perrakis)
+set ccp4pathlist = "${CCP4}/etc ${CBIN} ${CCP4I_TOP}/bin ${DBCCP4I_TOP}/bin ${CCP4}/share/XIAROOT/xia2/Applications"
+#
+foreach dir ( ${ccp4pathlist} )
+  if ( ${?PATH} ) then
+    if ( :${PATH}: !~ *:${dir}:* ) then
+      if ($ccp4_first_in_path) then
+        setenv PATH ${dir}:${PATH}
+      else
+        setenv PATH ${PATH}:${dir}
+      endif
+    endif
+  else
+    setenv PATH ${dir}
+  endif
+end
+
+# Optional (useful) additional environment variables
+  setenv CCP4             $CCP4
+  setenv CDOC             $CCP4/doc
+  setenv CHTML            $CCP4/html
+  setenv CETC             $CCP4/etc
+  setenv CEXAM            $CCP4/examples
+  setenv CINCL            $CCP4/include
+  setenv CLIBD            $CCP4/lib/data
+  setenv CLIBS            $CCP4/lib/src
+  setenv CPROG            $CCP4/src
+
+# useful aliases, at least for developers
+  alias ccp4   'pushd $CCP4>/dev/null'
+  alias xtal   'pushd $CCP4_MASTER>/dev/null'
+  alias cbin   'pushd $CBIN>/dev/null'
+  alias cetc   'pushd $CETC>/dev/null'
+  alias cprog  'pushd $CPROG>/dev/null'
+  alias cincl  'pushd $CINCL>/dev/null'
+  alias clib   'pushd $CLIB>/dev/null'
+  alias clibd  'pushd $CLIBD>/dev/null'
+  alias clibs  'pushd $CLIBS>/dev/null'
+  alias cbin   'pushd $CBIN>/dev/null'
+  alias cexam  'pushd $CEXAM>/dev/null'
+  alias cdoc   'pushd $CDOC>/dev/null'
+  alias chtml  'pushd $CHTML>/dev/null'
+  alias ccp4help '$CCP4_BROWSER $CHTML/INDEX.html &'
+
+### laue, lget, linkimages ###
+
+### only if we have the Laue software suite...
+
+  if (-d $CCP4_MASTER/laue) then 
+
+# Essential aliases for the Laue software suite
+    alias laue '$CCP4_MASTER/laue/cmd/laue.cmd'
+    alias lget '$CCP4_MASTER/laue/cmd/lget.cmd'
+    alias linkimages '$CCP4_MASTER/laue/cmd/linkimages.cmd'
+
+# additional useful aliases for Laue directories
+    alias llaue  'pushd $CCP4_MASTER/laue'
+    alias lsrc   'pushd $CCP4_MASTER/laue/src>/dev/null'
+    alias llib   'pushd $CCP4_MASTER/laue/lib>/dev/null'
+    alias llibs  'pushd $CCP4_MASTER/laue/lib/src>/dev/null'
+    alias ldoc   'pushd $CCP4_MASTER/laue/doc>/dev/null'
+    alias lmak   'pushd $CCP4_MASTER/laue/make>/dev/null'
+    alias lutils 'pushd $CCP4_MASTER/laue/utils>/dev/null'
+    alias lcmd   'pushd $CCP4_MASTER/laue/cmd>/dev/null'
+    alias ldl    'pushd $CCP4_MASTER/laue/dl>/dev/null'
+    alias ltestd 'pushd $CCP4_MASTER/laue/testdata>/dev/null'
+    alias lxdl   'pushd $CCP4_MASTER/laue/xdl_view>/dev/null'
+    alias lxdls  'pushd $CCP4_MASTER/laue/xdl_view/src>/dev/null'
+    alias lgnom  'pushd $CCP4_MASTER/laue/gnom>/dev/null'
+    alias lgnoms 'pushd $CCP4_MASTER/laue/gnom/src>/dev/null'
+    alias lbin   'pushd $CBIN>/dev/null'
+#
+
+  endif 
+
+# Set-up cctbx environment
+# if (-e $CCP4/lib/cctbx/cctbx_build/setpaths.csh) source $CCP4/lib/cctbx/cctbx_build/setpaths.csh
+
+#  # Set-up phaser environment
+#  if (-d $CCP4/src/phaser) then
+#    set phaser_mtype = `$CCP4/src/phaser/bin/machine_type`
+#    set phaser_version = `grep PHASER_VERSION $CCP4/src/phaser/conf/version | awk '{print $3}'`
+#    set phaser_setup_file = "${CCP4}/src/phaser/phaser-${phaser_version}/build/${phaser_mtype}/setpaths.csh"
+#    if (-e $phaser_setup_file) source $phaser_setup_file
+#  endif
+#  
+#  #BALBES root configuration
+  if ( -d $CCP4/share/BALBES/Package) then
+    setenv BALBES_ROOT $CCP4/share/BALBES/Package
+  endif
diff -ruN ccp4-6.3.0-dist/include/ccp4.setup-sh ccp4-6.3.0/include/ccp4.setup-sh
--- ccp4-6.3.0-dist/include/ccp4.setup-sh	2012-07-04 02:20:49.000000000 -0700
+++ ccp4-6.3.0/include/ccp4.setup-sh	2012-09-17 19:26:30.000000000 -0700
@@ -46,7 +46,7 @@
 export CCP4I_TOP=$CCP4/share/ccp4i
 # CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables
 #               as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph
-#               For 'standard' installations this is /usr/local/bin
+#               For 'standard' installations this is @/bin
 #               but note the SGI distributed version of Tcl/Tk is not 
 #               appropriate version
 export CCP4I_TCLTK=/usr/bin
@@ -69,7 +69,7 @@
 # Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile
 # output from programs compiled with Gfortran is in the correct order.
 # Note that there will be some performance penalty for this.
-#export GFORTRAN_UNBUFFERED_ALL=Y
+## export GFORTRAN_UNBUFFERED_ALL=Y
 
 # Gfortran 4.3.0 has new GFORTRAN_UNBUFFERED_PRECONNECTED variable
 # to make only STDOUT and STDERR unbuffered.
@@ -84,7 +84,7 @@
 # When deciding local policy, bear in mind the possible existence of
 # other CCP4 installations, and the possibility of non-CCP4 programs
 # with conflicting names.
-ccp4_first_in_path=1
+ccp4_first_in_path=0
 
 # The following checks the CCP4 server for available updates, and reports back.
 # Uncomment this line if you want to know about available updates.
@@ -106,7 +106,7 @@
 #   MCTYPE: used for LAUE make -- see LAUE documentation
 #   CCP4_BROWSER: set this if you intend to use the html documentation
 #      (recommended).  It should have the path and name of a html browser eg
-#      /usr/bin/X11/mozilla or /usr/local/bin/lynx. The browser will be
+#      /usr/bin/X11/mozilla or @/bin/lynx. The browser will be
 #      started with the alias ccp4help and will open the file
 #      $CHTML/INDEX.html.
 
diff -ruN ccp4-6.3.0-dist/include/ccp4.setup-sh.orig ccp4-6.3.0/include/ccp4.setup-sh.orig
--- ccp4-6.3.0-dist/include/ccp4.setup-sh.orig	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/include/ccp4.setup-sh.orig	2012-09-17 19:26:30.000000000 -0700
@@ -0,0 +1,403 @@
+#! /bin/sh
+# [The above is just for emacs -- this file should not be executed.]
+
+# CCP4 setup file for bash or ksh (untested) users.  Actually, the aliases 
+# can't work asis in ksh.  Should use builtins instead and not worry about
+# ease of keeping in step with the csh one.
+
+# $Id: ccp4.setup-sh,v 1.68 2012/07/04 09:20:49 ccb Exp $
+
+# This file is site specific and may also contain machine-specifics.  The CCP4
+# administrator will have to edit this file and then have anyone who wants to
+# use CCP4 source it from their .login file.  They will require the full path
+# name since no environment variables relevant to CCP4 are known until this is
+# executed.
+
+# For sites with more than one machine, it is recommended that the suite is
+# installed on a single machine and other machines access the source code, and
+# shareable files (such as this one) via shared file systems with NFS, RFS
+# etc.  Non-shareable files reside in $CBIN and $CLIB (see below).
+
+# Copy this file to ccp4.setup and customise it for your needs. There are
+# three sections. You MUST check the first section. You may want to check
+# the second. You don't need to look at the third.
+
+################### THIS SECTION MUST BE EDITED #####################
+
+# CCP4_MASTER is the location of the top-level directory containing `ccp4'.  
+# This is assumed to be shared between machines at a multi-machine site.
+
+export CCP4_MASTER=/xtal
+export CCP4=$CCP4_MASTER/ccp4-6.3.0
+
+# CCP4_SCR: a per-user directory for run-time-generated scratch
+# files. A dedicated scratch filesystem is probably better than (/usr)/tmp
+# BINSORT_SCR: a scratch directory for binsort's use; normally same as CCP4_SCR
+
+export CCP4_SCR=/tmp/$USER	
+# check to see if this exists and if not try to make it
+test -d $CCP4_SCR || mkdir $CCP4_SCR
+test -d $CCP4_SCR || echo "Unable to assign CCP4_SCR. This will cause probs."
+
+export BINSORT_SCR=$CCP4_SCR
+
+### CCP4i setup - you may need to edit CCP4I_TCLTK ###
+# CCP4I_TOP - the top directory of the interface
+export CCP4I_TOP=$CCP4/share/ccp4i
+# CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables
+#               as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph
+#               For 'standard' installations this is @/bin
+#               but note the SGI distributed version of Tcl/Tk is not 
+#               appropriate version
+export CCP4I_TCLTK=/usr/bin
+# CCP4I_HELP - directory contain ccp4i help - default is $CCP4I_TOP/help
+export CCP4I_HELP=$CCP4I_TOP/help
+
+
+###Optional - setting http_proxy environment
+#The commented out 'export' line below may have to be declared to download
+#and edit protein sequences using the new "Import/Edit protein sequences"
+#task. If so, uncomment this line and replace example proxy URL with your 
+#relevant URL
+
+#export HTTP_PROXY wwwblah.blah.ac.uk:xxxx/blah.blah
+
+################### NOVICE USERS STOP HERE #####################
+
+################### OPTIONS TO CUSTOMISE CCP4 #####################
+
+# Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile
+# output from programs compiled with Gfortran is in the correct order.
+# Note that there will be some performance penalty for this.
+## export GFORTRAN_UNBUFFERED_ALL=Y
+
+# Gfortran 4.3.0 has new GFORTRAN_UNBUFFERED_PRECONNECTED variable
+# to make only STDOUT and STDERR unbuffered.
+# Unlike GFORTRAN_UNBUFFERED_ALL it doesn't slow down notably refmac
+# and probably also other programs.
+# Details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33795
+export GFORTRAN_UNBUFFERED_PRECONNECTED=Y
+
+# By default, CCP4 directories are appended to the end of paths (PATH,
+# LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH). If ccp4_first_in_path is set
+# to 1, then they will be prepended to the beginning of paths.
+# When deciding local policy, bear in mind the possible existence of
+# other CCP4 installations, and the possibility of non-CCP4 programs
+# with conflicting names.
+ccp4_first_in_path=0
+
+# The following checks the CCP4 server for available updates, and reports back.
+# Uncomment this line if you want to know about available updates.
+
+#eval python -V >& /dev/null 2>&1 && python $CCP4/etc/ccp4_updates.py -l
+
+# The commented-out switch statement below provides an example of how
+# to use this file for several machines/architectures sharing $CCP4_MASTER.
+# If necessary, uncomment and edit this.  Otherwise, if you're only supporting
+# a single system alter the uncommented part as necessary.
+#
+# The significance of the environment variables is as follows:
+#   CBIN: location of the executables -- must be on your path (see below);
+#   CLIB: location of (binary) library files such as libccp4.a and libccp4.so;
+#   MANPATH: set this if your system's `man' looks at such an environment
+#      variable to determine where to look for man pages.  By adding 
+#      $CCP4/man to the normal path you get the CCP4 man pages 
+#      with keyword searching as system ones.  
+#   MCTYPE: used for LAUE make -- see LAUE documentation
+#   CCP4_BROWSER: set this if you intend to use the html documentation
+#      (recommended).  It should have the path and name of a html browser eg
+#      /usr/bin/X11/mozilla or @/bin/lynx. The browser will be
+#      started with the alias ccp4help and will open the file
+#      $CHTML/INDEX.html.
+
+#   case `hostname` in			# edit this case statement if used
+#                                       # for multiple systems
+#   foo)
+    export CBIN=$CCP4/bin		
+    export CLIB=$CCP4/lib	
+
+    export CCP4_BROWSER=firefox             
+    export MANPATH=$CCP4/man:$MANPATH           # edit this if necessary
+    if test -d $CCP4_MASTER/laue
+    then
+      export MCTYPE=unix 			# (only for Laue)
+    fi
+#     ;;
+#   *)
+#     echo "CCP4 not implemented on this system"
+#     exit 1
+#     ;;
+# esac
+
+# The following are for all systems
+
+export CCP4_LIB=$CLIB
+export CCP4_BIN=$CBIN
+
+# CLASSPATH for Java
+export CLASSPATH=$CBIN:$CLASSPATH                      # edit this if necessary
+
+### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ###
+export PLOT_COMMAND='lp -s'  
+export PRINT_COMMAND='lp -s'    
+
+# HARVESTHOME specifies location of harvesting files (defaults to $HOME)
+export HARVESTHOME=$HOME     
+
+### CCP4_OPEN ###
+# CCP4_OPEN may be set to 'UNKNOWN' to stop open failures for files opened 
+# as NEW that already exist.  Novices should use 'NEW' to avoid inadvertant 
+# over-writing of existing files, which is then treated as a fatal error.
+
+export CCP4_OPEN=UNKNOWN	
+
+### BINSORT_MEM ###
+# BINSORT_MEM is workspace used by the binsort program.  In principle this
+# value is machine-dependent.  It may benefit from being enlarged, but values
+# higher than 2M have been reported to cause excessive paging on some systems.
+# You might like to experiment with a program such as fft with different
+# values -- 102400 (bytes) is the default.  csh's `time' command can tell you
+# about paging.
+#
+#  export BINSORT_MEM=8388608
+
+# LD_LIBRARY_PATH specifies where to find dynamic libraries (e.g. libccp4.so)
+# at runtime
+if test "$LD_LIBRARY_PATH"; then
+  if test $ccp4_first_in_path -eq 1; then
+    export LD_LIBRARY_PATH=$CLIB:$LD_LIBRARY_PATH
+  else
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CLIB
+  fi
+else
+  export LD_LIBRARY_PATH=$CLIB
+fi
+
+# DYLD_LIBRARY_PATH specifies where to find dynamic libraries
+# (e.g. libccp4.dylib) at runtime
+if test "$DYLD_LIBRARY_PATH"; then
+  if test $ccp4_first_in_path -eq 1; then
+    export DYLD_LIBRARY_PATH=$CLIB:$DYLD_LIBRARY_PATH
+  else
+    export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$CLIB
+  fi
+else
+  export DYLD_LIBRARY_PATH=$CLIB
+fi
+
+### XAPPLRESDIR ###
+
+# If you want to use xloggraph/xplot84driver, you need to get the application
+# defaults picked up somehow.  As distributed, the file can't just live in an
+# application defaults directory since it requires reading by xrdb to sort out
+# the differences for monochrome displays.  At Daresbury a version of the file
+# assuming a monochrome display is kept in the directory
+# $CCP4_LIB/X11/app-defaults and this is picked up through the
+# XUSERFILESEARCHPATH environment variable.  That means you only see black and
+# white on a colour display.  Alternatively you might make sure that it is
+# read by xrdb on startup of the X Windows system or delegate the
+# responsibility to users to run it.  There are disadvantages to putting an
+# invocation of xrdb in here, one being that the correct value of DISPLAY may
+# not be set at the time this file is read.  Thus edit this part as
+# appropriate.  (SunOS will normally want to use /usr/openwin or $OPENWINHOME
+# instead of /usr; others may want /usr/local/lib or somw such):
+
+# export XAPPLRESDIR=@PREFIX@/etc/app-defaults/
+
+if test -d $CCP4_LIB/X11/app-defaults ; then
+  if test "$XUSERFILESEARCHPATH"; then
+    export XUSERFILESEARCHPATH=$CCP4_LIB/X11/app-defaults/%N:$XUSERFILESEARCHPATH
+  else
+    export XUSERFILESEARCHPATH=$CCP4_LIB/X11/app-defaults/%N:/usr/lib/X11/app-defaults
+  fi
+fi
+
+### TRAPPFE ###
+# TRAPFPE is set to ensure (in collaboration with -lfpe) an abort on floating
+# point exceptions under IRIX.  It shouldn't cause harm on other systems, but
+# edit this to comment it out if necessary. Have now added a case statement.
+
+case `uname` in
+*IRIX* )
+  export TRAP_FPE="OVERFL=ABORT; DIVZERO=ABORT; INVALID=ABORT"
+  ;;
+* )
+  ;;
+esac
+
+# The following can be used to put a message of the day to announce news about
+# CCP4 or whatever to CCP4 users.  You might also want to edit this part to
+# have machine-specific messages dependent on `hostname`.
+test -r $CCP4/include/ccp4.msg && cat $CCP4/include/ccp4.msg
+
+################### EXPERIENCED USERS STOP HERE #####################
+
+#Python path for the subprocess fixed module
+
+if test $ccp4_first_in_path -eq 1; then
+    export PYTHONPATH=${CCP4}/share/python:${PYTHONPATH}
+else
+    export PYTHONPATH=${PYTHONPATH}:${CCP4}/share/python
+fi
+
+################### THE REST SHOULDN'T NEED EDITING #####################
+
+### dbCCP4i database handler setup ###
+
+export DBCCP4I_TOP=${CCP4}/share/dbccp4i
+
+### IMOSFLM environment is now defined here
+
+export MOSFLM_EXEC=${CBIN}/ipmosflm
+export MOSFLM_WISH=${CCP4I_TCLTK}/wish
+
+### MMCIFDIC is now defined here. cif_mmdic.lib is a binary file ===
+# so on multiple installs it need to be unique and not in $CLIBD
+
+export MMCIFDIC=$CCP4/share/ccif/cif_mmdic.lib
+
+### MOLREPLIB Point to the location of the files bs-zeros.dat  ps.resource  symlib.blc
+# They are distributed with CCP4 in $CLIBD. This env must have the trailing \ or /
+
+export MOLREPLIB=$CCP4/lib/data/monomers/
+
+### CRANK points to location of Crank automation suite within ccp4i
+
+export CRANK=$CCP4I_TOP/crank
+export CCP4_CRANK=1
+
+### XIA2 setup
+# XIAROOT directory (default is under the share folder)
+
+if test -e $CCP4/share/xia2/setup.sh
+then
+export XIA2_HOME=$CCP4/share/xia2
+. $CCP4/share/xia2/setup.sh
+fi
+
+# Note: The PATH is updated with the xia2 Applications directory in the 
+# construct below.
+
+### PISA_CONF_FILE is the config file needed to run the stand-alone PISA,
+#   though this can be set on the command line too.
+
+if test -e $CCP4/share/pisa/pisa.cfg 
+then
+  export PISA_CONF_FILE=$CCP4/share/pisa/pisa.cfg
+fi
+
+### CLIBD_MON Point to the location of the dictionary files for REFMAC5
+# They are distributed with CCP4 in $CLIBD/monomers. This env must have 
+# the trailing \ or /
+
+export CLIBD_MON=$CCP4/lib/data/monomers/
+
+### PUBLIC_FONT84, CCP4_HELPDIR, HELPDIR, MOSHELPFILE ###
+# (essential for the relevant programs)
+export PUBLIC_FONT84=$CLIB/data/ccp4/font84.dat  # plot84 fonts [used by plot84lib]
+
+# location of VMS-style help files required for mosflm [used by hlplib, chelp,
+#   chlp, (ip)mosflm]:
+export CCP4_HELPDIR=$CCP4/help/            # NB trailing /
+
+# Rasmol path. Needed for prog. to find rasmol.hlp
+export RASMOLPATH=$CCP4/x-windows/RasMol
+
+# CCP4 executables and scripts live in $CBIN and $CETC respectively; put them
+# on the path in an appropriate order for scripts to be used as wrappers for
+# binaries of the same name.  Put ccp4 stuff after the current path to avoid
+# confusion with `.' or whatever in the path:
+#
+# This construct prevents the path getting longer each time ccp4.setup is
+# executed (A. Perrakis)
+ccp4pathlist="${CCP4}/etc ${CBIN} ${CCP4I_TOP}/bin ${DBCCP4I_TOP}/bin"
+#
+for dir in ${ccp4pathlist}
+do
+  if [ `expr ":${PATH}:" : ".*:${dir}:"` -eq 0 ]; then
+    if test $ccp4_first_in_path -eq 1; then
+      PATH=${dir}:${PATH}
+    else
+      PATH=${PATH}:${dir}
+    fi
+  fi
+done
+
+# Optional (useful) additional environment variables
+  export CCP4=$CCP4
+  export CDOC=$CCP4/doc
+  export CHTML=$CCP4/html
+  export CETC=$CCP4/etc
+  export CEXAM=$CCP4/examples
+  export CINCL=$CCP4/include
+  export CLIBD=$CCP4/lib/data
+  export CLIBS=$CCP4/lib/libccp4
+  export CPROG=$CCP4/src
+
+# useful aliases, at least for developers
+  alias ccp4='pushd $CCP4>/dev/null'
+  alias xtal='pushd $CCP4_MASTER>/dev/null'
+  alias cbin='pushd $CBIN>/dev/null'
+  alias cetc='pushd $CETC>/dev/null'
+  alias cprog='pushd $CPROG>/dev/null'
+  alias cincl='pushd $CINCL>/dev/null'
+  alias clib='pushd $CLIB>/dev/null'
+  alias clibd='pushd $CLIBD>/dev/null'
+  alias clibs='pushd $CLIBS>/dev/null'
+  alias cbin='pushd $CBIN>/dev/null'
+  alias cexam='pushd $CEXAM>/dev/null'
+  alias cdoc='pushd $CDOC>/dev/null'
+  alias chtml='pushd $CHTML>/dev/null'
+  alias ccp4help='$CCP4_BROWSER $CHTML/INDEX.html'
+
+### laue, lget, linkimages ###
+### only if we have the Laue software suite...
+  if ( test -d $CCP4_MASTER/laue ) ; then
+
+# Essential aliases for the Laue software suite
+
+    alias laue='$CCP4_MASTER/laue/cmd/laue.cmd'
+    alias lget='$CCP4_MASTER/laue/cmd/lget.cmd'
+    alias linkimages='$CCP4_MASTER/laue/cmd/linkimages.cmd'
+
+# additional useful aliases for Laue directories
+    alias llaue='pushd $CCP4_MASTER/laue'
+    alias lsrc='pushd $CCP4_MASTER/laue/src>/dev/null'
+    alias llib='pushd $CCP4_MASTER/laue/lib>/dev/null'
+    alias llibs='pushd $CCP4_MASTER/laue/lib/src>/dev/null'
+    alias ldoc='pushd $CCP4_MASTER/laue/doc>/dev/null'
+    alias lmak='pushd $CCP4_MASTER/laue/make>/dev/null'
+    alias lutils='pushd $CCP4_MASTER/laue/utils>/dev/null'
+    alias lcmd='pushd $CCP4_MASTER/laue/cmd>/dev/null'
+    alias ldl='pushd $CCP4_MASTER/laue/dl>/dev/null'
+    alias ltestd='pushd $CCP4_MASTER/laue/testdata>/dev/null'
+    alias lxdl='pushd $CCP4_MASTER/laue/xdl_view>/dev/null'
+    alias lxdls='pushd $CCP4_MASTER/laue/xdl_view/src>/dev/null'
+    alias lgnom='pushd $CCP4_MASTER/laue/gnom>/dev/null'
+    alias lgnoms='pushd $CCP4_MASTER/laue/gnom/src>/dev/null'
+    alias lbin='pushd $CBIN>/dev/null'
+
+  fi
+
+# Set-up cctbx environment
+test -r $CCP4/lib/cctbx/cctbx_build/setpaths.sh && . $CCP4/lib/cctbx/cctbx_build/setpaths.sh
+
+# Set-up phaser environment
+#if ( test -d $CCP4/src/phaser) ; then
+#  phaser_mtype=`$CCP4/src/phaser/bin/machine_type`
+#  phaser_version=`grep PHASER_VERSION $CCP4/src/phaser/conf/version.sh | awk '{print $3}'`
+#  phaser_setup_file="${CCP4}/src/phaser/phaser-${phaser_version}/build/${phaser_mtype}/setpaths.sh"
+#  test -r $phaser_setup_file && . $phaser_setup_file
+#fi
+
+### BALBES root configuration
+if ( test -d $CCP4/share/BALBES/Package)
+then
+  export BALBES_ROOT=$CCP4/share/BALBES/Package
+fi
+
+# Test for ARP/wARP 7.3 and source
+if ( test -f ${CCP4_MASTER}/arp_warp_7.3/arpwarp_setup.bash )
+then
+   . ${CCP4_MASTER}/arp_warp_7.3/arpwarp_setup.bash
+fi
diff -ruN ccp4-6.3.0-dist/include/ccp4.setup-zsh ccp4-6.3.0/include/ccp4.setup-zsh
--- ccp4-6.3.0-dist/include/ccp4.setup-zsh	1969-12-31 16:00:00.000000000 -0800
+++ ccp4-6.3.0/include/ccp4.setup-zsh	2012-09-17 20:18:16.000000000 -0700
@@ -0,0 +1,308 @@
+#! /bin/zsh -f
+# [The above is just for emacs -- this file should not be executed.]
+# $Id: ccp4.setup-zsh,v 1.30.2.3 2008/06/09 08:51:18 ccb Exp $
+
+###############################################################################
+
+# Edit this for the current version of ccp4:
+ 
+        CCP4_VERSION="ccp4-6.3.0"
+
+
+###############################################################################
+
+# NOTE: You should not need to edit the rest of this file 
+
+# NOTE:  If you have installed ccp4 on OS X with fink, you should not need to
+# change this file or to source it (fink takes care of sourcing it for you).
+
+    # CCP4_MASTER is the location of the top-level directory containing `ccp4'.  
+
+    
+    # Discover it from the source command
+    
+        
+        CCP4_MASTER="$(dirname $(dirname $(dirname $0)))"  
+
+	    # or set it manually by uncommenting and editing the following line:
+	    # export CCP4_MASTER="@PREFIX@/opt"
+ 
+        export CCP4_MASTER
+
+
+    # Discover where bltwish executable is located
+    if [[ -z $BLTWISHPREFIX &&  -x $(which bltwish) ]];then
+        BLTWISHPREFIX=$( dirname $( which bltwish )  )
+    fi
+ 
+###############################################################################    
+
+if [[ -d "$CCP4_MASTER/$CCP4_VERSION"  ]];then                 
+    CCP4="$CCP4_MASTER/$CCP4_VERSION" ; export CCP4
+else
+    print ""
+    print "\e[1m The directory "$CCP4_MASTER/$CCP4_VERSION" cannot be found."
+    print " Please check that "$CCP4_VERSION" is the right ccp4 version.  "
+    print " Edit the file \e[0m $0 \e[1m accordingly. \e[0m"
+    print ""
+fi
+
+# CCP4_SCR: a per-user directory for run-time-generated scratch
+# files. A dedicated scratch filesystem is probably better than (/usr)/tmp
+# BINSORT_SCR: a scratch directory for binsort's use; normally same as CCP4_SCR
+
+export CCP4_SCR="/tmp/$USER"    
+
+# check to see if this exists and if not try to make it
+
+if [[ ! -d "$CCP4_SCR" ]];then
+    mkdir -p "$CCP4_SCR"
+fi
+
+if [[ ! -d "$CCP4_SCR" ]];then
+    echo "Unable to assign CCP4_SCR. This will cause problems."
+fi
+
+export BINSORT_SCR="$CCP4_SCR"
+
+### CCP4i setup - you may need to edit CCP4I_TCLTK ###
+# CCP4I_TOP - the top directory of the interface
+export CCP4I_TOP="$CCP4/share/ccp4i"
+
+# CCP4I_TCLTK - directory containing tclsh,wish and bltwish executables
+#               as used in $CCP4I_TOP/bin/ccp4i,ccp4ish,loggraph
+#               For 'standard' installations this is @PREFIX@/bin
+#               but note the SGI distributed version of Tcl/Tk is not 
+#               appropriate version
+
+if [[ -d "$BLTWISHPREFIX"  &&  -x "$BLTWISHPREFIX/bltwish" ]]; then
+    export CCP4I_TCLTK="$BLTWISHPREFIX"
+else
+    print "\e[1m Cannot find bltwish executable. Please make sure it is in your \$PATH \e[0m"
+fi
+    
+# CCP4I_HELP - directory contain ccp4i help - default is $CCP4I_TOP/help
+export CCP4I_HELP=$CCP4I_TOP/help
+
+################### OPTIONS TO CUSTOMISE CCP4 #####################
+
+# By fink policy, CCP4 directories are appended to the ends of paths.
+ccp4_first_in_path=0
+
+# Set GFORTRAN_UNBUFFERED_ALL to either 1 or Y to ensure that the logfile
+# export GFORTRAN_UNBUFFERED_ALL=Y
+
+# The significance of the environment variables is as follows:
+#   CBIN: location of the executables -- must be on your path (see below);
+#   CLIB: location of (binary) library files such as libccp4.a and libccp4.so;
+#   MANPATH: set this if your system's `man' looks at such an environment
+#      variable to determine where to look for man pages.  By adding 
+#      $CCP4/man to the normal path you get the CCP4 man pages 
+#      with keyword searching as system ones.  
+#   MCTYPE: used for LAUE make -- see LAUE documentation
+#   CCP4_BROWSER: set this if you intend to use the html documentation
+#      (recommended).  It should have the path and name of a html browser eg
+#      /usr/bin/X11/mozilla or @PREFIX@/bin/lynx. The browser will be
+#      started with the alias ccp4help and will open the file
+#      $CHTML/INDEX.html.
+
+    export CBIN=$CCP4/bin        
+    export CLIB=$CCP4/lib    
+
+    CCP4_BROWSER=""
+    if [[ $(uname) == Darwin ]]; then
+        export  CCP4_BROWSER="Safari"
+    elif [[ -x $(which firefox) ]]; then
+        export CCP4_BROWSER="firefox"
+    else 
+        export CCP4_BROWSER="mozilla"
+    fi
+    
+    MANPATH=$CCP4/man:$MANPATH            
+    export MANPATH
+    export MCTYPE=unix             
+ 
+
+# The following are for all systems
+
+export CCP4_LIB=$CLIB
+export CCP4_BIN=$CBIN
+
+# CLASSPATH for Java
+CLASSPATH=$CBIN:$CLASSPATH               # edit this if necessary
+export CLASSPATH
+
+### PLOT_COMMAND PRINT_COMMAND for the XCCPJIFFY programs to compile ###
+export PLOT_COMMAND='lpr'  
+export PRINT_COMMAND='lpr'    
+
+# HARVESTHOME specifies location of harvesting files (defaults to $HOME)
+export HARVESTHOME=$HOME     
+
+### CCP4_OPEN ###
+# CCP4_OPEN may be set to 'UNKNOWN' to stop open failures for files opened 
+# as NEW that already exist.  Novices should use 'NEW' to avoid inadvertant 
+# over-writing of existing files, which is then treated as a fatal error.
+
+export CCP4_OPEN=UNKNOWN    
+
+### dbCCP4i database handler setup ###
+
+export DBCCP4I_TOP="${CCP4}/share/dbccp4i"
+
+### IMOSFLM environment is now defined here
+
+export MOSFLM_EXEC="${CBIN}/ipmosflm"
+export MOSFLM_WISH="${CCP4I_TCLTK}/wish"
+export IMOSFLM_VERSION="1.0.7"
+
+### MMCIFDIC is now defined here. cif_mmdic.lib is a binary file ===
+# so on multiple installs it need to be unique and not in $CLIBD
+
+export MMCIFDIC="$CLIB/cif_mmdic.lib"
+
+### MOLREPLIB Point to the location of the files bs-zeros.dat  ps.resource  symlib.blc
+# They are distributed with CCP4 in $CLIBD. This env must have the trailing \ or /
+
+export MOLREPLIB="$CCP4/lib/data/monomers/"
+
+### CRANK points to location of Crank automation suite within ccp4i
+
+export CRANK="$CCP4/share/ccp4i/crank"
+export CCP4_CRANK="1"
+
+### PISA_CONF_FILE is the config file needed to run the stand-alone PISA,
+#   though this can be set on the command line too.
+
+export PISA_CONF_FILE=$CCP4/share/pisa/pisa.cfg
+
+### CLIBD_MON Point to the location of the dictionary files for REFMAC5
+# They are distributed with CCP4 in $CLIBD/monomers. This env must have 
+# the trailing \ or /
+
+export CLIBD_MON="$CCP4/lib/data/monomers/"
+
+### PUBLIC_FONT84, CCP4_HELPDIR, HELPDIR, MOSHELPFILE ###
+# (essential for the relevant programs)
+export PUBLIC_FONT84="$CLIB/font84.dat"  # plot84 fonts [used by plot84lib]
+
+# location of VMS-style help files required for mosflm [used by hlplib, chelp,
+#   chlp, (ip)mosflm]:
+export CCP4_HELPDIR="$CCP4/help/"            # NB trailing /
+
+# Rasmol path. Needed for prog. to find rasmol.hlp
+export RASMOLPATH="$CCP4/x-windows/RasMol"
+
+# CCP4 executables and scripts live in $CBIN and $CETC respectively; put them
+# on the path in an appropriate order for scripts to be used as wrappers for
+# binaries of the same name.  Prepend ccp4 stuff to the current path to avoid
+# confusion with `.' or whatever in the path:
+#
+
+if [[ $ccp4_first_in_path == 1 ]]; then
+    PATH=${CCP4}/etc:${CBIN}:${CCP4I_TOP}/bin:${DBCCP4I_TOP}/bin:${CCP4}/share/XIAROOT/xia2/Applications:$PATH
+else
+    PATH=$PATH:${CCP4}/etc:${CBIN}:${CCP4I_TOP}/bin:${DBCCP4I_TOP}/bin:${CCP4}/share/XIAROOT/xia2/Applications
+fi
+typeset -U path   # This construct prevents the path getting longer each time 
+                  # ccp4.setup is executed in zsh.
+export PATH
+
+# Optional (useful) additional environment variables
+  export CCP4=$CCP4
+  export CDOC=$CCP4/doc
+  export CHTML=$CCP4/html
+  export CETC=$CCP4/etc
+  export CEXAM=$CCP4/examples
+  export CINCL=$CCP4/include
+  export CLIBD=$CCP4/lib/data
+  export CLIBS=$CCP4/lib/src
+  export CPROG=$CCP4/src
+
+# useful aliases, at least for developers
+  alias ccp4='pushd $CCP4>/dev/null'
+  alias xtal='pushd $CCP4_MASTER>/dev/null'
+  alias cbin='pushd $CBIN>/dev/null'
+  alias cetc='pushd $CETC>/dev/null'
+  alias cprog='pushd $CPROG>/dev/null'
+  alias cincl='pushd $CINCL>/dev/null'
+  alias clib='pushd $CLIB>/dev/null'
+  alias clibd='pushd $CLIBD>/dev/null'
+  alias clibs='pushd $CLIBS>/dev/null'
+  alias cbin='pushd $CBIN>/dev/null'
+  alias cexam='pushd $CEXAM>/dev/null'
+  alias cdoc='pushd $CDOC>/dev/null'
+  alias chtml='pushd $CHTML>/dev/null'
+  alias ccp4help='$CCP4_BROWSER $CHTML/INDEX.html'
+
+### laue, lget, linkimages ###
+# Essential aliases for the Laue software suite
+  alias laue='$CCP4_MASTER/laue/cmd/laue.cmd'
+  alias lget='$CCP4_MASTER/laue/cmd/lget.cmd'
+  alias linkimages='$CCP4_MASTER/laue/cmd/linkimages.cmd'
+
+# additional useful aliases for Laue directories
+  alias llaue='pushd $CCP4_MASTER/laue'
+  alias lsrc='pushd $CCP4_MASTER/laue/src>/dev/null'
+  alias llib='pushd $CCP4_MASTER/laue/lib>/dev/null'
+  alias llibs='pushd $CCP4_MASTER/laue/lib/src>/dev/null'
+  alias ldoc='pushd $CCP4_MASTER/laue/doc>/dev/null'
+  alias lmak='pushd $CCP4_MASTER/laue/make>/dev/null'
+  alias lutils='pushd $CCP4_MASTER/laue/utils>/dev/null'
+  alias lcmd='pushd $CCP4_MASTER/laue/cmd>/dev/null'
+  alias ldl='pushd $CCP4_MASTER/laue/dl>/dev/null'
+  alias ltestd='pushd $CCP4_MASTER/laue/testdata>/dev/null'
+  alias lxdl='pushd $CCP4_MASTER/laue/xdl_view>/dev/null'
+  alias lxdls='pushd $CCP4_MASTER/laue/xdl_view/src>/dev/null'
+  alias lgnom='pushd $CCP4_MASTER/laue/gnom>/dev/null'
+  alias lgnoms='pushd $CCP4_MASTER/laue/gnom/src>/dev/null'
+  alias lbin='pushd $CBIN>/dev/null'
+  
+# Get rid of the ccp4help alias and make a more useful function
+
+    alias ccp4help="" ; unalias ccp4help
+
+    function ccp4help {
+        if [[ $# = 0 ]]; then
+            $CCP4_BROWSER $CHTML/INDEX.html
+        else
+            $CCP4_BROWSER $CHTML/$1.html
+        fi 
+        }  
+
+
+# zsh specific completions:
+        
+  function getccp4progs { 
+        foreach progpage ($CHTML/*.html) 
+            print $progpage:t:r
+        end 
+        }
+        
+  compctl -g "$(getccp4progs)" ccp4help 
+
+  compctl -g '*.mtz' mtzdmp
+
+  compctl -g '*.plt' xplot84
+  compctl -g '*.plt' xplot84driver
+  
+    # Remove any instances of multiple colons
+    PATH=${PATH/::/:}
+
+    # Avoid repeats in the path
+
+    typeset -U path
+    typeset -U manpath
+    typeset -U classpath
+     
+####     # Set up cctbx environment
+####     # Uncomment the following line if required
+####     source "$CCP4/lib/cctbx/cctbx_build/setpaths.sh"     
+
+#BALBES root configuration
+export BALBES_ROOT="$CCP4/share/BALBES/Package"
+
+# End of file
+
+
+
diff -ruN ccp4-6.3.0-dist/lib/DiffractionImage/configure ccp4-6.3.0/lib/DiffractionImage/configure
--- ccp4-6.3.0-dist/lib/DiffractionImage/configure	2012-07-09 06:07:34.000000000 -0700
+++ ccp4-6.3.0/lib/DiffractionImage/configure	2012-09-17 19:28:15.000000000 -0700
@@ -8104,19 +8104,19 @@
       link_all_deplibs=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -11171,26 +11171,26 @@
        lt_int_apple_cc_single_mod=yes
       fi
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
         fi
         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           fi
             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -14727,19 +14727,19 @@
       link_all_deplibs_F77=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -17330,19 +17330,19 @@
       link_all_deplibs_GCJ=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
diff -ruN ccp4-6.3.0-dist/lib/ccif/configure ccp4-6.3.0/lib/ccif/configure
--- ccp4-6.3.0-dist/lib/ccif/configure	2012-05-18 07:50:05.000000000 -0700
+++ ccp4-6.3.0/lib/ccif/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9385,9 +9385,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -13862,9 +13862,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
diff -ruN ccp4-6.3.0-dist/lib/ccp4srs/configure ccp4-6.3.0/lib/ccp4srs/configure
--- ccp4-6.3.0-dist/lib/ccp4srs/configure	2012-07-09 06:07:35.000000000 -0700
+++ ccp4-6.3.0/lib/ccp4srs/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9245,9 +9245,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -12611,13 +12611,13 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 
   else
diff -ruN ccp4-6.3.0-dist/lib/cctbx/ccp4_build ccp4-6.3.0/lib/cctbx/ccp4_build
--- ccp4-6.3.0-dist/lib/cctbx/ccp4_build	2010-12-08 04:57:30.000000000 -0800
+++ ccp4-6.3.0/lib/cctbx/ccp4_build	2012-09-17 19:29:48.000000000 -0700
@@ -8,7 +8,7 @@
   exit 1
 fi
 
-cctbxopts="--command_version_suffix=ccp4-6.1.24 --build=release --repository ${CCP4}/lib/cctbx/cctbx_sources/cctbx_project"
+cctbxopts="--compiler=gcc --command_version_suffix=ccp4-6.3.0  --build=release --repository ${CCP4}/lib/cctbx/cctbx_sources/cctbx_project"
 for arg
 do
 
@@ -39,7 +39,7 @@
 cd cctbx_build
 
 echo "Running libtbx/configure.py"
-python ../cctbx_sources/cctbx_project/libtbx/configure.py $cctbxopts ccp4io=${CCP4} fftw3tbx rstbx smtbx mmtbx
+python ../cctbx_sources/cctbx_project/libtbx/configure.py --compiler=gcc  $cctbxopts ccp4io=${CCP4} fftw3tbx rstbx smtbx mmtbx
 
 echo "Running setpaths.sh"
 . ./setpaths.sh
diff -ruN ccp4-6.3.0-dist/lib/clipper/configure ccp4-6.3.0/lib/clipper/configure
--- ccp4-6.3.0-dist/lib/clipper/configure	2012-07-09 06:07:33.000000000 -0700
+++ ccp4-6.3.0/lib/clipper/configure	2012-09-17 19:28:15.000000000 -0700
@@ -8753,9 +8753,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=echo
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -12270,13 +12270,13 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=echo
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 
   else
@@ -16706,9 +16706,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=echo
-    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
diff -ruN ccp4-6.3.0-dist/lib/fftw/configure ccp4-6.3.0/lib/fftw/configure
--- ccp4-6.3.0-dist/lib/fftw/configure	2010-09-08 08:57:07.000000000 -0700
+++ ccp4-6.3.0/lib/fftw/configure	2012-09-17 19:28:15.000000000 -0700
@@ -7775,19 +7775,19 @@
       link_all_deplibs=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -10877,26 +10877,26 @@
        lt_int_apple_cc_single_mod=yes
       fi
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
         fi
         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           fi
             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -14435,19 +14435,19 @@
       link_all_deplibs_F77=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -17041,19 +17041,19 @@
       link_all_deplibs_GCJ=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
diff -ruN ccp4-6.3.0-dist/lib/libccp4/configure ccp4-6.3.0/lib/libccp4/configure
--- ccp4-6.3.0-dist/lib/libccp4/configure	2012-06-07 07:01:16.000000000 -0700
+++ ccp4-6.3.0/lib/libccp4/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9436,9 +9436,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -13523,13 +13523,13 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 
   else
@@ -17556,9 +17556,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
diff -ruN ccp4-6.3.0-dist/lib/mmdb/configure ccp4-6.3.0/lib/mmdb/configure
--- ccp4-6.3.0-dist/lib/mmdb/configure	2012-07-09 06:07:28.000000000 -0700
+++ ccp4-6.3.0/lib/mmdb/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9332,9 +9332,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -12697,13 +12697,13 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 
   else
diff -ruN ccp4-6.3.0-dist/lib/ssm/configure ccp4-6.3.0/lib/ssm/configure
--- ccp4-6.3.0-dist/lib/ssm/configure	2012-07-09 06:07:33.000000000 -0700
+++ ccp4-6.3.0/lib/ssm/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9217,9 +9217,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -12582,13 +12582,13 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 
   else
diff -ruN ccp4-6.3.0-dist/share/ccp4i/bin/imosflm ccp4-6.3.0/share/ccp4i/bin/imosflm
--- ccp4-6.3.0-dist/share/ccp4i/bin/imosflm	2009-04-21 05:46:23.000000000 -0700
+++ ccp4-6.3.0/share/ccp4i/bin/imosflm	2012-09-17 19:17:15.000000000 -0700
@@ -1,3 +1,16 @@
 #!/bin/sh
 # Start iMosflm interface
+
+if [[ $(uname) == Darwin  ]];then
+
+	CCP4_BROWSER=""
+	export CCP4_BROWSER="Safari"
+
+	if [[ $(sw_vers -productVersion) < 10.6 ]]; then
+	    true
+	else
+	    export MOSFLM_WISH=/usr/bin/wish8.4
+	fi
+fi
+
 exec $CCP4I_TOP/imosflm/src/imosflm
diff -ruN ccp4-6.3.0-dist/share/ccp4i/etc/configure.def.dist ccp4-6.3.0/share/ccp4i/etc/configure.def.dist
--- ccp4-6.3.0-dist/share/ccp4i/etc/configure.def.dist	2012-05-30 05:16:12.000000000 -0700
+++ ccp4-6.3.0/share/ccp4i/etc/configure.def.dist	2012-09-17 19:17:15.000000000 -0700
@@ -63,8 +63,8 @@
 MESSAGE                   _text				""
 BLT_LIBRARY               _text                     ""
 MENU_LENGTH               _positiveint              25
-HYPERTEXT_VIEWER          _text                     firefox
-START_NETSCAPE	          _text			    netscape
+HYPERTEXT_VIEWER          _text                     safari
+START_NETSCAPE	          _text			            open
 O_MAPMAN                  _text                     mapman
 MAPMAN_MAXSIZE		  _positiveint		    4194304
 QUANTA_MBKALL             _text                     mbkall
diff -ruN ccp4-6.3.0-dist/share/ccp4i/src/local.tcl ccp4-6.3.0/share/ccp4i/src/local.tcl
--- ccp4-6.3.0-dist/share/ccp4i/src/local.tcl	2012-07-03 08:44:38.000000000 -0700
+++ ccp4-6.3.0/share/ccp4i/src/local.tcl	2012-09-17 19:17:15.000000000 -0700
@@ -34,7 +34,7 @@
 #d_arg mail_address Mail addressee
 
 return [expr {1 - [catch \
-   "exec Mail -s \"$subject\" $mail_address < $tmp_file"  ]}]
+   "exec osx_ccp4_mail -s \"$subject\" $mail_address < $tmp_file"  ]}]
 }
 
 #d_index_title Interaction with Netscape
diff -ruN ccp4-6.3.0-dist/share/ccp4i/src/system.tcl ccp4-6.3.0/share/ccp4i/src/system.tcl
--- ccp4-6.3.0-dist/share/ccp4i/src/system.tcl	2012-06-22 07:37:52.000000000 -0700
+++ ccp4-6.3.0/share/ccp4i/src/system.tcl	2012-09-17 19:25:37.000000000 -0700
@@ -609,7 +609,7 @@
 to the file:
 [SearchPath TOP etc $system(DOMAIN) $taskname.def]
 but you do not have write permission for this directory.
-Please get the person who installed CCP4i to run it and
+Please issue the command \"sudo -E ccp4i\" and
 do the configure.
 It is OK to continue running CCP4i."
         }
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_ptr_vector.h ccp4-6.3.0/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_ptr_vector.h
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_ptr_vector.h	2012-02-22 08:58:05.000000000 -0800
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_ptr_vector.h	2012-09-17 19:17:15.000000000 -0700
@@ -152,6 +152,7 @@
 #include <vector>
 #include <map>
 
+using namespace std;
 
 /**
 ** This is a container of pointers to objects. The container maintains the
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_vector.h ccp4-6.3.0/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_vector.h
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_vector.h	2012-02-22 08:58:05.000000000 -0800
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/common-v4.5/include/mapped_vector.h	2012-09-17 19:17:15.000000000 -0700
@@ -146,6 +146,7 @@
 #include <vector>
 #include <map>
 
+using namespace std;
 
 /**
 ** Container of objects that maintans their order (as vector does), but
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.cygwin ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.cygwin
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.cygwin	2007-09-12 08:07:27.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.cygwin	2012-09-17 19:20:37.000000000 -0700
@@ -120,7 +120,7 @@
 
 # C++ compiler ANSI/NON-ANSI flags
 ANSI_C_PLUS_FLAG=-ansi
-NON_ANSI_C_PLUS_FLAG=-traditional-cpp
+NON_ANSI_C_PLUS_FLAG=
 C_PLUS_WARNINGS=$(WARNINGS) $(NO_DEPRECATED)
 
 # This variable specifies how to compile the C code. If it is set to C,
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.darwin2 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.darwin2
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.darwin2	2004-06-30 10:09:24.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.darwin2	2012-09-17 19:20:37.000000000 -0700
@@ -18,10 +18,10 @@
 HAVE_STRCASECMP = -DHAVE_STRCASECMP
 #HAVE_STRCASECMP =
 CFLAGS            =  $(OPT) -ansi  $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL) $(HAVE_STRCASECMP)
-CFLAGS_NONANSI    =  $(OPT) -traditional-cpp $(ABI)  $(LDEFINES) $(LINCLUDES)$(G++INCL) $(HAVE_STRCASECMP)
+CFLAGS_NONANSI    =  $(OPT)  $(ABI)  $(LDEFINES) $(LINCLUDES)$(G++INCL) $(HAVE_STRCASECMP)
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL) $(HAVE_STRCASECMP)
 C++FLAGS          =  $(OPT) -ansi  -DINCL_TEMPLATE_SRC $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL) $(HAVE_STRCASECMP)
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL) $(HAVE_STRCASECMP)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL) $(HAVE_STRCASECMP)
 C++FLAGS_RELAXED = $(C++FLAGS)
 
 LDFLAGS   = $(ABI) -w
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.darwin3 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.darwin3
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.darwin3	2007-09-12 08:07:27.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.darwin3	2012-09-17 19:20:37.000000000 -0700
@@ -106,7 +106,7 @@
 
 # C compiler ANSI/NON-ANSI flags
 ANSI_C_FLAG=-ansi
-NON_ANSI_C_FLAG=-traditional-cpp
+NON_ANSI_C_FLAG=
 C_WARNINGS=$(WARNINGS)
 
 # C compiler flags
@@ -122,7 +122,7 @@
 
 # C++ compiler ANSI/NON-ANSI flags
 ANSI_C_PLUS_FLAG=-ansi
-NON_ANSI_C_PLUS_FLAG=-traditional-cpp
+NON_ANSI_C_PLUS_FLAG=
 C_PLUS_WARNINGS=$(WARNINGS)
 
 # This variable specifies how to compile the C code. If it is set to C,
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.darwin4 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.darwin4
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.darwin4	2008-01-23 08:44:26.000000000 -0800
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.darwin4	2012-09-17 19:20:37.000000000 -0700
@@ -122,7 +122,7 @@
 
 # C++ compiler ANSI/NON-ANSI flags
 ANSI_C_PLUS_FLAG=-ansi
-NON_ANSI_C_PLUS_FLAG=-traditional-cpp
+NON_ANSI_C_PLUS_FLAG=
 C_PLUS_WARNINGS=$(WARNINGS)
 
 # This variable specifies how to compile the C code. If it is set to C,
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.ecc ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.ecc
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.ecc	2004-09-21 09:50:57.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.ecc	2012-09-17 19:20:37.000000000 -0700
@@ -19,7 +19,7 @@
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL)
 
 C++FLAGS          =  $(OPT) -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
 C++FLAGS_RELAXED  =  $(C++FLAGS)
 
 LDFLAGS   = $(ABI) -w 
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.gnu2 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.gnu2
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.gnu2	2004-11-05 06:31:02.000000000 -0800
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.gnu2	2012-09-17 19:20:37.000000000 -0700
@@ -20,7 +20,7 @@
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL)
 
 C++FLAGS          =  $(OPT) -ansi  -DINCL_TEMPLATE_SRC $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
 C++FLAGS_RELAXED = $(C++FLAGS_NONANSI)
 
 LDFLAGS   = $(ABI) -w -static
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.gnu3 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.gnu3
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.gnu3	2007-09-12 08:07:27.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.gnu3	2012-09-17 19:20:37.000000000 -0700
@@ -120,7 +120,7 @@
 
 # C++ compiler ANSI/NON-ANSI flags
 ANSI_C_PLUS_FLAG=-ansi
-NON_ANSI_C_PLUS_FLAG=-traditional-cpp
+NON_ANSI_C_PLUS_FLAG=
 C_PLUS_WARNINGS=$(WARNINGS) $(NO_DEPRECATED)
 
 # This variable specifies how to compile the C code. If it is set to C,
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.gnu4 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.gnu4
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.gnu4	2009-08-17 01:26:47.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.gnu4	2012-09-17 19:20:37.000000000 -0700
@@ -120,7 +120,7 @@
 
 # C++ compiler ANSI/NON-ANSI flags
 ANSI_C_PLUS_FLAG=-ansi
-NON_ANSI_C_PLUS_FLAG=-traditional-cpp
+NON_ANSI_C_PLUS_FLAG=
 C_PLUS_WARNINGS=$(WARNINGS) $(NO_DEPRECATED)
 
 # This variable specifies how to compile the C code. If it is set to C,
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc	2004-07-01 05:53:44.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc	2012-09-17 19:20:37.000000000 -0700
@@ -20,7 +20,7 @@
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL)
 
 C++FLAGS          =  $(OPT) -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
 C++FLAGS_RELAXED  =  $(C++FLAGS)
 
 LDFLAGS   = $(ABI) -w -static
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc10 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc10
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc10	2009-04-21 07:47:08.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc10	2012-09-17 19:20:37.000000000 -0700
@@ -26,7 +26,7 @@
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL) -D_GCC_LIMITS_H_
 
 C++FLAGS          =  $(OPT) -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW -D_GCC_LIMITS_H_ $(ABI) $(C_PLUS_WARNINGS) $(LDEFINES) $(LINCLUDES) $(G++INCL)
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW -D_GCC_LIMITS_H_ $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW -D_GCC_LIMITS_H_ $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
 C++FLAGS_RELAXED  =  $(C++FLAGS)
 
 LDFLAGS   = $(ABI) -w
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc8 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc8
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc8	2005-01-24 06:25:51.000000000 -0800
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc8	2012-09-17 19:20:37.000000000 -0700
@@ -20,7 +20,7 @@
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL)
 
 C++FLAGS          =  $(OPT) -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
 C++FLAGS_RELAXED  =  $(C++FLAGS)
 
 LDFLAGS   = $(ABI) -w -Kc++
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc9 ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc9
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.icc9	2009-04-21 07:47:08.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.icc9	2012-09-17 19:20:37.000000000 -0700
@@ -26,7 +26,7 @@
 CFLAGS_NONANSI    =  $(OPT) $(ABI)  $(LDEFINES) $(LINCLUDES) $(G++INCL)
 
 C++FLAGS          =  $(OPT) -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(C_PLUS_WARNINGS) $(LDEFINES) $(LINCLUDES) $(G++INCL) -cxxlib-icc
-C++FLAGS_NONANSI  =  $(OPT) -traditional-cpp -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
+C++FLAGS_NONANSI  =  $(OPT)  -DINCL_TEMPLATE_SRC -DHAVE_STRCASECMP -DHAVE_PLACEMENT_NEW $(ABI) $(LDEFINES) $(LINCLUDES) $(G++INCL)
 C++FLAGS_RELAXED  =  $(C++FLAGS)
 
 LDFLAGS   = $(ABI) -w
diff -ruN ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.template ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.template
--- ccp4-6.3.0-dist/src/harvest_app_/pdb_extract/etc/make.platform.template	2007-09-12 08:07:27.000000000 -0700
+++ ccp4-6.3.0/src/harvest_app_/pdb_extract/etc/make.platform.template	2012-09-17 19:20:37.000000000 -0700
@@ -121,7 +121,7 @@
 
 # C++ compiler ANSI/NON-ANSI flags
 ANSI_C_PLUS_FLAG=-ansi
-NON_ANSI_C_PLUS_FLAG=-traditional-cpp
+NON_ANSI_C_PLUS_FLAG=
 C_PLUS_WARNINGS=$(WARNINGS)
 
 # This variable specifies how to compile the C code. If it is set to C,
diff -ruN ccp4-6.3.0-dist/src/leiden/configure ccp4-6.3.0/src/leiden/configure
--- ccp4-6.3.0-dist/src/leiden/configure	2012-04-25 06:22:30.000000000 -0700
+++ ccp4-6.3.0/src/leiden/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9309,9 +9309,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
@@ -12716,13 +12716,13 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
        if test "$lt_cv_apple_cc_single_mod" != "yes"; then
-      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
-      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
     fi
 
   else
@@ -17372,9 +17372,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds_FC="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds_FC="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
diff -ruN ccp4-6.3.0-dist/src/phaser/ccp4_build ccp4-6.3.0/src/phaser/ccp4_build
--- ccp4-6.3.0-dist/src/phaser/ccp4_build	2012-05-25 04:50:51.000000000 -0700
+++ ccp4-6.3.0/src/phaser/ccp4_build	2012-09-17 19:30:17.000000000 -0700
@@ -63,7 +63,7 @@
 
     # all other arguments passed to phaser build
     *)
-      phaseropts="$phaseropts $1" ;;
+      phaseropts="$phaseropts --compiler=gcc $1" ;;
 
     esac
 shift
diff -ruN ccp4-6.3.0-dist/src/rapper/configure ccp4-6.3.0/src/rapper/configure
--- ccp4-6.3.0-dist/src/rapper/configure	2008-05-29 08:14:10.000000000 -0700
+++ ccp4-6.3.0/src/rapper/configure	2012-09-17 19:28:15.000000000 -0700
@@ -7802,16 +7802,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct=no
@@ -9623,10 +9623,10 @@
     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
     #	       `"' quotes if we put them in here... so don't!
 		output_verbose_link_cmd='echo'
-    archive_cmds='$CC -dynamiclib $archargs $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
+    archive_cmds='$CC -dynamiclib $archargs $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     module_cmds='$CC -bundle $archargs $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
-		  archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+		  archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
 		  module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     hardcode_direct=no
     hardcode_automatic=yes
@@ -10704,17 +10704,17 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_CXX='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_CXX='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_CXX='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
 
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
-        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       fi
         module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     hardcode_direct_CXX=no
@@ -14507,16 +14507,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_F77='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_F77='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_F77='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct_F77=no
@@ -16800,16 +16800,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_GCJ='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_GCJ='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_GCJ='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct_GCJ=no
diff -ruN ccp4-6.3.0-dist/src/rapper/gc7.0/Makefile.in ccp4-6.3.0/src/rapper/gc7.0/Makefile.in
--- ccp4-6.3.0-dist/src/rapper/gc7.0/Makefile.in	2008-01-24 05:52:42.000000000 -0800
+++ ccp4-6.3.0/src/rapper/gc7.0/Makefile.in	2012-09-17 19:17:15.000000000 -0700
@@ -295,7 +295,7 @@
 CYGPATH_W = @CYGPATH_W@
 DARWIN_THREADS_FALSE = @DARWIN_THREADS_FALSE@
 DARWIN_THREADS_TRUE = @DARWIN_THREADS_TRUE@
-DEFS = @DEFS@
+DEFS = @DEFS@ -D_XOPEN_SOURCE
 DEPDIR = @DEPDIR@
 ECHO = @ECHO@
 ECHO_C = @ECHO_C@
diff -ruN ccp4-6.3.0-dist/src/rapper/gc7.0/configure ccp4-6.3.0/src/rapper/gc7.0/configure
--- ccp4-6.3.0-dist/src/rapper/gc7.0/configure	2009-09-03 13:35:57.000000000 -0700
+++ ccp4-6.3.0/src/rapper/gc7.0/configure	2012-09-17 19:28:15.000000000 -0700
@@ -10133,19 +10133,19 @@
       link_all_deplibs=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $verstring'
          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -13165,26 +13165,26 @@
        lt_int_apple_cc_single_mod=yes
       fi
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
         fi
         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           fi
             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $verstring'
           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -16639,19 +16639,19 @@
       link_all_deplibs_F77=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $verstring'
          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -19233,19 +19233,19 @@
       link_all_deplibs_GCJ=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $verstring'
          module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
diff -ruN ccp4-6.3.0-dist/src/rapper/libxml2/configure ccp4-6.3.0/src/rapper/libxml2/configure
--- ccp4-6.3.0-dist/src/rapper/libxml2/configure	2012-03-06 10:07:08.000000000 -0800
+++ ccp4-6.3.0/src/rapper/libxml2/configure	2012-09-17 19:28:15.000000000 -0700
@@ -9254,9 +9254,9 @@
   esac
   if test "$_lt_dar_can_shared" = "yes"; then
     output_verbose_link_cmd=func_echo_all
-    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
     module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
-    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
     module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
 
   else
diff -ruN ccp4-6.3.0-dist/src/refmac5_/covmat.h ccp4-6.3.0/src/refmac5_/covmat.h
--- ccp4-6.3.0-dist/src/refmac5_/covmat.h	2012-01-09 04:16:57.000000000 -0800
+++ ccp4-6.3.0/src/refmac5_/covmat.h	2012-09-17 19:17:15.000000000 -0700
@@ -44,7 +44,7 @@
 	~covar_matrix();
     void Make_matrix();						// computes re and im from sigmas and D's
 	void Print();
-	void SetZeroRows(int,int,int,int,int,int);	// specifies the order numbers of rows(=columns) for which the covariances should be 0.
+	void SetZeroRows(int = -1,int = -1,int = -1,int = -1,int = -1,int = -1);	// specifies the order numbers of rows(=columns) for which the covariances should be 0.
 	int CheckZeroRow(int row);				// returns 1 if row has been set to be covariance zeroed, 0 otherwise
 	int GetNumZeroRows();					// returns the number of rows with covariaces zeroed
 
@@ -2106,7 +2106,7 @@
 
 // defines zero rows. If the first argument is negative, resets all no non-zero.
 template <typename realnum>
-void covar_matrix<realnum>::SetZeroRows( int r1=-1, int r2=-1, int r3=-1, int r4=-1, int r5=-1, int r6=-1 )
+void covar_matrix<realnum>::SetZeroRows( int r1, int r2, int r3, int r4, int r5, int r6 )
 {
   int r[6] = {r1,r2,r3,r4,r5,r6};
   int i=0;
diff -ruN ccp4-6.3.0-dist/x-windows/Mosflm/jpg/configure ccp4-6.3.0/x-windows/Mosflm/jpg/configure
--- ccp4-6.3.0-dist/x-windows/Mosflm/jpg/configure	2007-12-10 03:08:59.000000000 -0800
+++ ccp4-6.3.0/x-windows/Mosflm/jpg/configure	2012-09-17 19:28:15.000000000 -0700
@@ -7434,19 +7434,19 @@
       link_all_deplibs=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -10536,26 +10536,26 @@
        lt_int_apple_cc_single_mod=yes
       fi
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
         fi
         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           fi
             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -14094,19 +14094,19 @@
       link_all_deplibs_F77=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -16700,19 +16700,19 @@
       link_all_deplibs_GCJ=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
diff -ruN ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/namfil.c ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/namfil.c
--- ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/namfil.c	2003-03-10 05:38:21.000000000 -0800
+++ ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/namfil.c	2012-09-17 19:17:15.000000000 -0700
@@ -78,7 +78,7 @@
    *  Find first hash in FILNAM, it will hold sign if NUM is negative and
    *  there is room for it.
    */
-	fsthsh = (int) strchr(filnam, '#')- (int) filnam;
+	fsthsh = (int)(uintptr_t) strchr(filnam, '#')- (int)(uintptr_t) filnam;
 	if (fsthsh > 0)
 	{
 		for (i = len-1; i>=fsthsh; i--)
diff -ruN ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/rdbinary.c ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/rdbinary.c
--- ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/rdbinary.c	2003-07-25 04:14:53.000000000 -0700
+++ ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/rdbinary.c	2012-09-17 19:17:15.000000000 -0700
@@ -84,7 +84,7 @@
 
 		if ( global_debug )
 			printf ("Allocated %d bytes at location %d\n",
-			    *filesize, (int) a);
+				*filesize, (int)(uintptr_t) a);
 
 		j = strlen(filename);
 		dskbor_ ( &lun, filename, &j, &istat);
diff -ruN ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/wrfile.c ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/wrfile.c
--- ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/wrfile.c	2003-03-10 05:38:21.000000000 -0800
+++ ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/wrfile.c	2012-09-17 19:17:15.000000000 -0700
@@ -15,6 +15,7 @@
  ****************************************************************/
 #include <string.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include "filec.h"
 
 int wrfile (char* filename, char* head, char* array, 
@@ -35,7 +36,7 @@
 	{
 		printf("Filename      : %s\n", filename);
 		printf("Header        : \n%s<END\n", head);
-		printf("Array address : %d\n", (int) array);
+		printf("Array address : %d\n", (int)(uintptr_t) array);
 		printf("Array dim     : %d\n", naxis);
 		for (i=0; i<naxis; i++)
 			printf("              : %d\n", axis[i]);
diff -ruN ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/wrmad.c ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/wrmad.c
--- ccp4-6.3.0-dist/x-windows/Mosflm/src/dps/util/filec/wrmad.c	2003-03-10 05:38:22.000000000 -0800
+++ ccp4-6.3.0/x-windows/Mosflm/src/dps/util/filec/wrmad.c	2012-09-17 19:17:15.000000000 -0700
@@ -47,7 +47,7 @@
 	{
 		printf("Filename      : %s\n", filename);
 		printf("Header        : \n%s<END\n", head);
-		printf("Array address : %d\n", (int) array);
+		printf("Array address : %d\n", (int)(uintptr_t) array);
 		printf("Array size    : %d %d\n", as1, as2);
 		printf("Image size    : %d %d\n", is1, is2);
 	}
diff -ruN ccp4-6.3.0-dist/x-windows/RasMol/src/Imakefile ccp4-6.3.0/x-windows/RasMol/src/Imakefile
--- ccp4-6.3.0-dist/x-windows/RasMol/src/Imakefile	2013-02-08 15:21:54.000000000 -0500
+++ ccp4-6.3.0/x-windows/RasMol/src/Imakefile	2013-02-08 15:22:23.000000000 -0500
@@ -162,10 +162,8 @@
 #endif
 
 #if defined __APPLE__ || defined __DARWIN__
-#ifdef _CALL_SYSV
-CC = xlc
-CCOPTIONS = -D_LONGLONG -qstrict
-#endif
+CC = gcc
+CXX = g++
 #endif
 
 #if __GNUC__ > 3
diff -ruN ccp4-6.3.0-dist/x-windows/XCCPJIFFY/EditString.c ccp4-6.3.0/x-windows/XCCPJIFFY/EditString.c
--- ccp4-6.3.0-dist/x-windows/XCCPJIFFY/EditString.c	2003-11-19 01:46:38.000000000 -0800
+++ ccp4-6.3.0/x-windows/XCCPJIFFY/EditString.c	2012-09-17 19:17:15.000000000 -0700
@@ -256,10 +256,10 @@
 WidgetClass editStringWidgetClass = (WidgetClass)&editStringClassRec;
 
 
-static char                   space_char [] = {' ',NULL};
+static char                   space_char [] = {' ',(uintptr_t)NULL};
 static XawTextBlock           new_input,
-                              no_input = {0, 0, NULL, NULL},
-                              space_input = {0, 1, space_char, NULL};
+                              no_input = {0, 0, NULL, (uintptr_t)NULL},
+							  space_input = {0, 1, space_char, (uintptr_t)NULL};
 
 /***********************************************************/
 static void
diff -ruN ccp4-6.3.0-dist/x-windows/XCCPJIFFY/ZDr2d.c ccp4-6.3.0/x-windows/XCCPJIFFY/ZDr2d.c
--- ccp4-6.3.0-dist/x-windows/XCCPJIFFY/ZDr2d.c	2003-07-01 09:57:00.000000000 -0700
+++ ccp4-6.3.0/x-windows/XCCPJIFFY/ZDr2d.c	2012-09-17 19:17:15.000000000 -0700
@@ -1007,7 +1007,7 @@
     return("Object alredy exists");
 
   gobj = XtNew(GR_OBJECT);
-  memset((void *)gobj, NULL, sizeof(GR_OBJECT));
+  memset((void *)gobj, (uintptr_t)NULL, sizeof(GR_OBJECT));
   gobj->objid = obj_id;
 
   if (!parent_obj_id) {                 /* object attached directly to scene */
@@ -1200,7 +1200,7 @@
 
   ppart = &(w->zDr2d);
   instr = XtNew(INSTRUCTION);
-  memset((void *)instr, NULL, sizeof(INSTRUCTION));
+  memset((void *)instr, (uintptr_t)NULL, sizeof(INSTRUCTION));
   instr->instruction_type = instruction_type;
 
   if (ppart->current_instr)
diff -ruN ccp4-6.3.0-dist/x-windows/XCCPJIFFY/log_file.c ccp4-6.3.0/x-windows/XCCPJIFFY/log_file.c
--- ccp4-6.3.0-dist/x-windows/XCCPJIFFY/log_file.c	2004-12-08 09:57:45.000000000 -0800
+++ ccp4-6.3.0/x-windows/XCCPJIFFY/log_file.c	2012-09-17 19:17:15.000000000 -0700
@@ -214,27 +214,27 @@
 
   log_file_tabs =
      (LOG_FILE_TABLE *)malloc(sizeof(LOG_FILE_TABLE) * (ntables+1));
-  memset((void *)log_file_tabs, NULL,
+  memset((void *)log_file_tabs, (uintptr_t)NULL,
 	 (size_t)sizeof(LOG_FILE_TABLE) * (ntables+1));
   table_list = (char **)XtMalloc(sizeof(char *) * (ntables + 1));
   table_list [ntables] = (char *)NULL;
 
   log_file_keytxts =
      (LOG_FILE_KEYTEXT *)malloc(sizeof(LOG_FILE_KEYTEXT) * (nkeytexts+1));
-  memset((void *)log_file_keytxts, NULL,
+  memset((void *)log_file_keytxts, (uintptr_t)NULL,
 	 (size_t)sizeof(LOG_FILE_KEYTEXT) * (nkeytexts+1));
   keytext_list = (char **)XtMalloc(sizeof(char *) * (nkeytexts + 1));
   keytext_list [nkeytexts] = (char *)NULL;
 
   log_file_txts = (LOG_FILE_TEXT *)malloc(sizeof(LOG_FILE_TEXT) * (ntexts+1));
-  memset((void *)log_file_txts, NULL,
+  memset((void *)log_file_txts, (uintptr_t)NULL,
 	 (size_t)sizeof(LOG_FILE_TEXT) * (ntexts+1));
   text_list = (char **)XtMalloc(sizeof(char *) * (ntexts + 1));
   text_list [ntexts] = (char *)NULL;
 
   log_file_summs =
      (LOG_FILE_SUMMARY *)malloc(sizeof(LOG_FILE_SUMMARY) * (nsumms+1));
-  memset((void *)log_file_summs, NULL,
+  memset((void *)log_file_summs, (uintptr_t)NULL,
 	 (size_t)sizeof(LOG_FILE_SUMMARY) * (nsumms+1));
   summary_list = (char **)XtMalloc(sizeof(char *) * (nsumms + 1));
   summary_list [nsumms] = (char *)NULL;
@@ -568,7 +568,7 @@
 
   /*** Play with absolute/relative scale ***/
 
-  memset((void *)(&scene), (int)NULL, sizeof(scene));
+  memset((void *)(uintptr_t)(&scene), (int)(uintptr_t)NULL, sizeof(scene));
 
   scale = 1.0;                              /* scaling done in plot widget */
 
@@ -756,7 +756,7 @@
     /*** Allocate entry & chain it ***/
 
     pgraph = XtNew(LOG_FILE_GRAPH);
-    memset((void *)pgraph, NULL, (size_t)sizeof(LOG_FILE_GRAPH));
+    memset((void *)pgraph, (uintptr_t)NULL, (size_t)sizeof(LOG_FILE_GRAPH));
     if (!table->graphs)
       table->graphs = pgraph;
     else {
diff -ruN ccp4-6.3.0-dist/x-windows/XCCPJIFFY/plot84_file.c ccp4-6.3.0/x-windows/XCCPJIFFY/plot84_file.c
--- ccp4-6.3.0-dist/x-windows/XCCPJIFFY/plot84_file.c	2004-07-08 08:29:48.000000000 -0700
+++ ccp4-6.3.0/x-windows/XCCPJIFFY/plot84_file.c	2012-09-17 19:17:15.000000000 -0700
@@ -148,7 +148,7 @@
     return("I/O error on plot84 file");
   }
 
-  memset((void *)(&scene), (int)NULL, sizeof(scene));
+  memset((void *)(uintptr_t)(&scene), (int)(uintptr_t)NULL, sizeof(scene));
 
   scale = 0.1;                          /* 10 dots per mm plot 84 convention */
 
diff -ruN ccp4-6.3.0-dist/x-windows/XCCPJIFFY/xloggraph.c ccp4-6.3.0/x-windows/XCCPJIFFY/xloggraph.c
--- ccp4-6.3.0-dist/x-windows/XCCPJIFFY/xloggraph.c	1994-10-11 06:32:44.000000000 -0700
+++ ccp4-6.3.0/x-windows/XCCPJIFFY/xloggraph.c	2012-09-17 19:17:15.000000000 -0700
@@ -487,7 +487,7 @@
 /***************************************************************/
 
 main(
-     Cardinal    argc,
+     int    argc,
      char       *argv[])
 {
   Display             *display;
diff -ruN ccp4-6.3.0-dist/x-windows/XCCPJIFFY/xplot84driver.c ccp4-6.3.0/x-windows/XCCPJIFFY/xplot84driver.c
--- ccp4-6.3.0-dist/x-windows/XCCPJIFFY/xplot84driver.c	2008-10-22 05:32:09.000000000 -0700
+++ ccp4-6.3.0/x-windows/XCCPJIFFY/xplot84driver.c	2012-09-17 19:17:15.000000000 -0700
@@ -229,7 +229,7 @@
 /***************************************************************/
 
 main(
-     Cardinal    argc,
+     int    argc,
      char       *argv[])
 {
   Display             *display;
diff -ruN ccp4-6.3.0-dist/x-windows/libjwc/libjwc_c/configure ccp4-6.3.0/x-windows/libjwc/libjwc_c/configure
--- ccp4-6.3.0-dist/x-windows/libjwc/libjwc_c/configure	2012-07-09 06:11:00.000000000 -0700
+++ ccp4-6.3.0/x-windows/libjwc/libjwc_c/configure	2012-09-17 19:28:15.000000000 -0700
@@ -6882,16 +6882,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct=no
@@ -9723,17 +9723,17 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_CXX='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_CXX='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_CXX='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
 
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
-        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       fi
         module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     hardcode_direct_CXX=no
@@ -13511,16 +13511,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_F77='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_F77='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_F77='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct_F77=no
@@ -15851,16 +15851,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_GCJ='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_GCJ='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_GCJ='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct_GCJ=no
diff -ruN ccp4-6.3.0-dist/x-windows/libjwc/libjwc_f/configure ccp4-6.3.0/x-windows/libjwc/libjwc_f/configure
--- ccp4-6.3.0-dist/x-windows/libjwc/libjwc_f/configure	2012-07-09 06:11:00.000000000 -0700
+++ ccp4-6.3.0/x-windows/libjwc/libjwc_f/configure	2012-09-17 19:28:15.000000000 -0700
@@ -6921,16 +6921,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct=no
@@ -9762,17 +9762,17 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_CXX='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_CXX='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_CXX='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
 
     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
-        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+        archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       fi
         module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     hardcode_direct_CXX=no
@@ -13555,16 +13555,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_F77='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_F77='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_F77='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct_F77=no
@@ -15895,16 +15895,16 @@
     	  lt_int_apple_cc_single_mod=yes
     	fi
     	if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-    	  archive_cmds_GCJ='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+    	  archive_cmds_GCJ='$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
     	else
-        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       fi
       module_cmds_GCJ='$CC -bundle $archargs ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -dynamiclib $archargs -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         else
-          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs${_S_}$CC -dynamiclib $archargs $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
         fi
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym${_S_}$CC -bundle $archargs $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags${_S_}nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       hardcode_direct_GCJ=no
diff -ruN ccp4-6.3.0-dist/x-windows/xdl_view/src/configure ccp4-6.3.0/x-windows/xdl_view/src/configure
--- ccp4-6.3.0-dist/x-windows/xdl_view/src/configure	2012-07-09 06:11:00.000000000 -0700
+++ ccp4-6.3.0/x-windows/xdl_view/src/configure	2012-09-17 19:28:15.000000000 -0700
@@ -8558,19 +8558,19 @@
       link_all_deplibs=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -11732,26 +11732,26 @@
        lt_int_apple_cc_single_mod=yes
       fi
       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
         fi
         module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
         # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
           if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           fi
             module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
           module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -15290,19 +15290,19 @@
       link_all_deplibs_F77=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
@@ -17912,19 +17912,19 @@
       link_all_deplibs_GCJ=yes
     if test "$GCC" = yes ; then
     	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring'
       module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name @PREFIX@/lib/ccp4-6.3.0/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
       module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
     else
       case $cc_basename in
         xlc*)
          output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
+         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo @PREFIX@/lib/ccp4-6.3.0/$soname` $xlcverstring'
          module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}@PREFIX@/lib/ccp4-6.3.0/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
           ;;
        *)
diff -ruN ccp4-6.3.0-dist/x-windows/xdl_view/src/xdl_eg_c.c ccp4-6.3.0/x-windows/xdl_view/src/xdl_eg_c.c
--- ccp4-6.3.0-dist/x-windows/xdl_view/src/xdl_eg_c.c	2012-07-09 06:11:00.000000000 -0700
+++ ccp4-6.3.0/x-windows/xdl_view/src/xdl_eg_c.c	2012-09-17 19:17:15.000000000 -0700
@@ -1,12 +1,12 @@
 #include "xdl_view.h"
 
 /* Dummy data processing routines */
-void rd_data (filnam, a) char *filnam; float a;
+void rd_data (filnam, a) char *filnam; float a[];
 { printf ("\nOpen file %s and read data into 'a'", filnam); return;}
-void wr_data (filnam, a) char *filnam; float a;
+void wr_data (filnam, a) char *filnam; float a[];
 { printf ("\nOpen file %s and write data from 'a'", filnam); return;}
-void trans_a (a) float a; {printf ("Transformation A\n"); return;}
-void trans_b (a) float a; {printf ("Transformation B\n"); return;}
+void trans_a (a) float a[]; {printf ("Transformation A\n"); return;}
+void trans_b (a) float a[]; {printf ("Transformation B\n"); return;}
 
 main()
 {

diff -ruN ccp4-6.3.0-dist/examples/unix/runnable/run-all ccp4-6.3.0/examples/unix/runnable/run-all
--- ccp4-6.3.0-dist/examples/unix/runnable/run-all	2012-05-25 04:10:27.000000000 -0700
+++ ccp4-6.3.0/examples/unix/runnable/run-all	2012-09-17 21:43:50.000000000 -0700
@@ -70,7 +70,7 @@
 # optional examples
 for prog in refmac5_tls.exam tlsanl.exam refmac_sad.exam refmac_twin.exam \
   compar.exam libcheck.exam molrep.exam cpirate.exam cbuccaneer.exam \
-  phaser.exam phaser_EP.exam phaser_sculptor.exam phaser_ensembler.exam \
+  phaser.exam phaser_EP.exam  \
   rampage.exam pointless.exam chef.exam sfcheck.exam scala-complete.exam \
   refmac-rigid.exam aimless.exam ; do

diff -ruN ccp4-6.3.0-dist/src/Prodrg/c_refmac.f ccp4-6.3.0/src/Prodrg/c_refmac.f
--- ccp4-6.3.0-dist/src/Prodrg/c_refmac.f	2010-10-07 04:35:18.000000000 -0700
+++ ccp4-6.3.0/src/Prodrg/c_refmac.f	2012-09-17 22:47:45.000000000 -0700
@@ -98,7 +98,8 @@
       OPEN(11,FILE=SCRFIL('DRGMCI.PDR'),ERR=1400,STATUS='OLD')
       IATR=NMAT
  1300 READ (11,1123,ERR=1399,END=1399) REXELIN
-      IF (REXELIN(1:6).NE.'ATOM  ') GOTO 1300
+      IF (REXELIN(1:6).NE.'ATOM  '.AND.REXELIN(1:6).NE.'HETATM')
+     + GOTO 1300
       I=1
  1305 IF (ANM4(I,1).EQ.REXELIN(13:16)) THEN
          READ (REXELIN(31:54),1126) XC(I),YC(I),ZC(I)

