How to install ANAROOT on OSX Mountain Lion 10.8.2

0. Some information

This document is written based on the programs whose version is

1. Install autoconf, automake, libtool

Here’s the script that installs all at once in “/Applications/autotools”. If you want to download the latest version of each program, change the number of variables “AUTOCONF, ”AUTOMAKE“, and ”LIBTOOL".

#!/bin/bash
BUILD=/tmp/devtools # or wherever you'd like to build
TARGET=/Applications/autotools

AUTOCONF=2.69
AUTOMAKE=1.13
LIBTOOL=2.4

mkdir -p $BUILD
mkdir -p $TARGET

cd $BUILD
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-$AUTOCONF.tar.gz
tar xzf autoconf-$AUTOCONF.tar.gz
cd autoconf-$AUTOCONF
./configure --prefix=$TARGET
make
make install

cd $BUILD
curl -OL http://ftpmirror.gnu.org/automake/automake-$AUTOMAKE.tar.gz
tar xzf automake-$AUTOMAKE.tar.gz
cd automake-$AUTOMAKE
./configure --prefix=$TARGET
make
make install

cd $BUILD
curl -OL http://ftpmirror.gnu.org/libtool/libtool-$LIBTOOL.tar.gz
tar xzf libtool-$LIBTOOL.tar.gz
cd libtool-$LIBTOOL
./configure --prefix=$TARGET
make
make install

rm -rf $BUILD

Add the following lines in “~/.bash_profile” to use the programs anywhere.

export PATH=$PATH:/Applications/autotools/bin
export MANPATH=$MANPATH:/Applications/autotools/share
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Applications/autotools/lib

2. Install ANAROOT

Download the latest ANAROOT package from the link below.

http://ribf.riken.jp/RIBFDAQ/index.php?Tools%2FAnalysis%2FANAROOT%2FInstallation

You have to add one more in between second and third line of the instruction on the page

tar zxvf anaroot_v4.5.5.tgz
cd anaroot
mv configure.in configure.ac
./autogen.sh –prefix=$PWD
make install

3. Configuration for using ANAROOT

Add the line below in “~/.bash_profile”. In case you changed the destination of installation, you should change the directory.

source /Applications/ANAROOT-v4.5.5/setup.sh

4. Change in “rootlogon.C”

Line 98 inside the “rootlogon.C”.

modules.push_back(install_dir+“/lib/”+“libanaroot.so”); // load at once

You have to change the extension “so” into “dylib” so that

modules.push_back(install_dir+“/lib/”+“libanaroot.dylib”); // load at once