-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_conf_user_xgrafix.sh
executable file
·72 lines (56 loc) · 2.34 KB
/
run_conf_user_xgrafix.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# this script will run configure with some standard
# edit this for the install dir:
prefix=/usr/local
# valid precision is either float or double:
precision=double
# running dir
run_dir=`pwd`
xoopic_parent_dir=`dirname $run_dir`
# base confopts:
# note that this file is duplicated in xgrafix and xoopic, so a couple of
# values are overspecified - ignore warnings like 'urecognized options with-SCALAR'
confopts="--prefix=$prefix --with-XGRAFIX-lib=${xoopic_parent_dir}/xgrafix/src --with-XGRAFIX-include=${xoopic_parent_dir}/xgrafix/src"
# MPI :
# confopts="$confopts --enable-MPI"
if [ `uname -s` == 'Darwin' ]; then
# for Mac OS (condition added by JK, 2015-11-09)
# extra="/sw"
extra="/opt/local" # for macports
confopts="$confopts --enable-debug --with-tclconfig=$extra/lib --with-tkconfig=$extra/lib --with-dfftw-incdir=$extra/include --with-sfftw-incdir=$extra/include"
elif [ `lsb_release -a | grep 'Distributor' | awk '{ print $3 '}` == 'openSUSE' ]; then
# disable compiling with FFTW on SUSE; they ise fftw3 instead of fftw
confopts="$confopts --disable-fftw"
#else
# for non-OS X system, add optimisation
# confopts="$confopts --enable-fulloptimize"
fi
# I recommend getting dependencies for xoopic through macports (macports.org)
# I find thatxgrafix will build but will crash if you link against the system
# tcl/tk. I'm not sure why, and this may be fixed at some point, but
# currently my best solution has been using macports for tcl/tk and other deps.
# once you have macports, you can get the dependencies
# with the following:
# sudo port install imagemagick +no_x11 bison fftw automake libpng tcl tk
# add 'hdf5' to the end if you also want hdf5
# I also recommend getting gfortran / gcc 4.2 from AT&T:
# http://r.research.att.com/tools/
#
# changed by JK, 2015-11-09
for i in /lib64 /usr/lib64 /usr/local/lib64; do
# check for some common library paths
if [ -d $i ]; then
# make sure 64-bit library directory is checked for libraries
export PATH=$PATH:$i
fi
done
confopts="$confopts $@"
echo "configuring with options: $confopts"
./configure $confopts && \
echo "
Configure successful!
if you have a multicore machine, now you can build with:
'make -j 4' (for 4 threaded compiling)
and install with:
'make install' or 'sudo make install', depending on whether you have write
permissions to $prefix"