annotate rDiff/configure @ 0:0f80a5141704

version 0.3 uploaded
author vipints
date Thu, 14 Feb 2013 23:38:36 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
1 #/bin/bash
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
2 #
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
3 # This program is free software; you can redistribute it and/or modify
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
4 # it under the terms of the GNU General Public License as published by
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
5 # the Free Software Foundation; either version 3 of the License, or
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
6 # (at your option) any later version.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
7 #
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
8 # Copyright (C) 2009-2013 Max Planck Society, Sloan-Kettering Institute
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
9 #
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
10
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
11 set -e
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
12 echo "To get more information please run: configure -h"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
13 if [ $# != "0" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
14 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
15 if [ "$1" == "-h" -o $# != "1" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
16 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
17 echo Usage: $0 -h \(this help\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
18 echo Usage: $0 -i \(interactive configuration\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
19 echo Usage: $0 [-a] \(automatic configuration\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
20 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
21 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
22 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
23
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
24 . ./bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
25
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
26 echo ======================================
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
27 echo rDiff configure \(version $RDIFF_VERSION\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
28 echo ======================================
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
29 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
30
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
31 if [ "$1" == "-i" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
32 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
33 echo rDiff base directory \(currently set to \"$RDIFF_PATH\", suggest to set to \"`pwd`\", used if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
34 read RDIFF_PATH
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
35 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
36 echo "Running automatic configuration"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
37 RDIFF_PATH=""
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
38 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
39 if [ "$RDIFF_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
40 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
41 RDIFF_PATH=`pwd`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
42 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
43 echo '=>' Setting rDiff base directory to \"$RDIFF_PATH\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
44 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
45
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
46 if [ "$1" == "-i" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
47 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
48 echo SAMTools directory \(currently set to \"$RDIFF_SAMTOOLS_BIN_DIR\", system version used if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
49 read RDIFF_SAMTOOLS_BIN_DIR
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
50 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
51 echo Checking for samtools
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
52 RDIFF_SAMTOOLS_BIN_DIR=""
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
53 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
54 if [ "$RDIFF_SAMTOOLS_BIN_DIR" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
55 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
56 if [ "$(which samtools)" != "" ] ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
57 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
58 RDIFF_SAMTOOLS_BIN_DIR=$(which samtools)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
59 if [ -f $(dirname $(which samtools))/../include/bam/sam.h ]
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
60 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
61 RDIFF_SAMTOOLS_INCLUDE_DIR=$(dirname $(which samtools))/../include/bam/
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
62 echo "Include found: $RDIFF_SAMTOOLS_INCLUDE_DIR"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
63 elif [ -f $(dirname $(which samtools))/sam.h ]
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
64 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
65 RDIFF_SAMTOOLS_INCLUDE_DIR=$(dirname $(which samtools))/
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
66 echo "Include found: $RDIFF_SAMTOOLS_INCLUDE_DIR"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
67 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
68 echo "ERROR: Include sam.h include not found"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
69 exit -1 ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
70 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
71 if [ -f $(dirname $(which samtools))/../lib/libbam.a ]
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
72 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
73 RDIFF_SAMTOOLS_LIB_DIR=$(dirname $(which samtools))/../lib/
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
74 echo "Library found: $RDIFF_SAMTOOLS_LIB_DIR"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
75 elif [ -f $(dirname $(which samtools))/libbam.a ]
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
76 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
77 RDIFF_SAMTOOLS_LIB_DIR=$(dirname $(which samtools))/
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
78 echo "Library found: $RDIFF_SAMTOOLS_LIB_DIR"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
79 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
80 echo "ERROR: Library libbam.a not found"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
81 exit -1 ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
82 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
83 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
84 echo SAMTools libraries not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
85 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
86 exit -1 ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
87 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
88 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
89 if [ ! -f $RDIFF_SAMTOOLS_BIN_DIR ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
90 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
91 echo "ERROR: Binary $RDIFF_SAMTOOLS_BIN_DIR not found"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
92 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
93 exit -1 ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
94 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
95
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
96 echo SAMTools Include directory \(currently set to \"$RDIFF_SAMTOOLS_INCLUDE_DIR\"\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
97 read RDIFF_SAMTOOLS_INCLUDE_DIR
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
98 if [ ! -f $RDIFF_SAMTOOLS_INCLUDE_DIR/sam.h ]
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
99 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
100 echo "ERROR: Include $RDIFF_SAMTOOLS_INCLUDE_DIR/sam.h include not found"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
101 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
102 exit -1 ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
103 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
104
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
105 echo SAMTools library directory \(currently set to \"$RDIFF_SAMTOOLS_LIB_DIR\"\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
106 read RDIFF_SAMTOOLS_LIB_DIR
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
107 if [ ! -f $RDIFF_SAMTOOLS_LIB_DIR/libbam.a ]
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
108 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
109 echo "ERROR: Library $RDIFF_SAMTOOLS_LIB_DIR/libbam.a include not found"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
110 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
111 exit -1 ;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
112 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
113 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
114 echo '=>' Setting samtools directory to \"$RDIFF_SAMTOOLS_BIN_DIR\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
115 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
116
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
117 if [ "$1" == "-i" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
118 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
119 echo Path to the python binary \(currently set to \"$RDIFF_PYTHON_PATH\", system version used, if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
120 read RDIFF_PYTHON_PATH
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
121 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
122 echo Checking for python and Scipy
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
123 RDIFF_PYTHON_PATH=""
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
124 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
125 if [ "$RDIFF_PYTHON_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
126 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
127 python_found=
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
128 scipy_found=
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
129 for i in python python2.7 python2.6 python2.5 python2.4;
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
130 do
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
131 RDIFF_PYTHON_PATH=`which $i`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
132 python_found=$i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
133 if [ "$RDIFF_PYTHON_PATH" != "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
134 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
135 scipy=`echo import scipy | $RDIFF_PYTHON_PATH 2>&1 | grep -e ImportError|wc -l`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
136 if [ $scipy == "0" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
137 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
138 scipy_found=$RDIFF_PYTHON_PATH
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
139 break
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
140 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
141 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
142 done
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
143 if [ "$python_found" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
144 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
145 echo "ERROR: Python not found"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
146 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
147 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
148 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
149 if [ "$scipy_found" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
150 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
151 echo "ERROR: Scipy not found (for $python_found)"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
152 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
153 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
154 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
155 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
156 echo '=>' Setting Python path to \"$RDIFF_PYTHON_PATH\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
157 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
158
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
159 RDIFF_INTERPRETER="octave"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
160 if [ "$RDIFF_INTERPRETER" == 'octave' ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
161 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
162 if [ "$1" == "-i" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
163 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
164 echo Please enter the full path to octave \(currently set to \"$RDIFF_OCTAVE_BIN_PATH\", system version used, if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
165 read RDIFF_OCTAVE_BIN_PATH
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
166 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
167 RDIFF_OCTAVE_BIN_PATH=""
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
168 echo checking for octave
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
169 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
170 if [ "$RDIFF_OCTAVE_BIN_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
171 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
172 RDIFF_OCTAVE_BIN_PATH=`which octave`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
173 if [ "$RDIFF_OCTAVE_BIN_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
174 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
175 echo octave not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
176 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
177 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
178 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
179 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
180 echo '=>' Setting octave\'s path to \"$RDIFF_OCTAVE_BIN_PATH\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
181 if [ "$1" == "-i" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
182 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
183 echo Please enter the full path to mkoctfile \(currently set to \"$RDIFF_OCTAVE_MKOCT\", system version used, if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
184 read RDIFF_OCTAVE_MKOCT
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
185 else
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
186 RDIFF_OCTAVE_MKOCT=""
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
187 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
188 if [ "$RDIFF_OCTAVE_MKOCT" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
189 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
190 RDIFF_OCTAVE_MKOCT=`which mkoctfile`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
191 if [ "$RDIFF_OCTAVE_MKOCT" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
192 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
193 RDIFF_OCTAVE_MKOCT=$(dirname $RDIFF_OCTAVE_BIN_PATH)/mkoctfile
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
194 if [ ! -f RDIFF_OCTAVE_MKOCT ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
195 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
196 echo mkoctfile not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
197 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
198 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
199 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
200 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
201 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
202 echo '=>' Setting octave\'s path to \"$RDIFF_OCTAVE_MKOCT\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
203 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
204 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
205
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
206 if [ "$RDIFF_INTERPRETER" == 'matlab' ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
207 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
208 echo Please enter the full path to matlab \(currently set to \"$MATLAB_BIN_PATH\", system version used, if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
209 read MATLAB_BIN_PATH
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
210 if [ "$MATLAB_BIN_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
211 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
212 MATLAB_BIN_PATH=`which matlab`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
213 if [ "$MATLAB_BIN_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
214 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
215 echo matlab not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
216 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
217 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
218 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
219 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
220 if [ ! -f $MATLAB_BIN_PATH ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
221 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
222 echo matlab not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
223 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
224 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
225 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
226 echo '=>' Setting matlab\'s path to \"$MATLAB_BIN_PATH\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
227 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
228
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
229 echo Please enter the full path to mex binary \(currently set to \"$MATLAB_MEX_PATH\", system version used if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
230 read MATLAB_MEX_PATH
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
231 if [ "$MATLAB_MEX_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
232 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
233 MATLAB_MEX_PATH=`which mex`
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
234 if [ "$MATLAB_MEX_PATH" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
235 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
236 echo mex not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
237 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
238 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
239 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
240 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
241 if [ ! -f "$MATLAB_MEX_PATH" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
242 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
243 echo mex not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
244 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
245 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
246 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
247 echo '=>' Setting mex\' path to \"$MATLAB_MEX_PATH\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
248 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
249
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
250 echo Please enter the full path to the matlab include directory \(currently set to \"$MATLAB_INCLUDE_DIR\", system version used, if left empty\)
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
251 read MATLAB_INCLUDE_DIR
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
252 if [ "$MATLAB_INCLUDE_DIR" == "" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
253 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
254 MATLAB_INCLUDE_DIR=$(dirname $MATLAB_BIN_PATH)/../extern/include
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
255 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
256 if [ ! -d "$MATLAB_INCLUDE_DIR" ];
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
257 then
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
258 echo matlab include dir not found
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
259 echo please run interactive mode: ./configure -i
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
260 exit -1
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
261 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
262 echo '=>' Setting matlab\'s include directory to \"$MATLAB_INCLUDE_DIR\"
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
263 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
264
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
265 RDIFF_OCTAVE_BIN_PATH=
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
266 fi
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
267
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
268 cp -p bin/rdiff_config.sh bin/rdiff_config.sh.bak
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
269
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
270 grep -v -e RDIFF_OCTAVE_BIN_PATH -e RDIFF_OCTAVE_MKOCT -e MATLAB_BIN_PATH -e MATLAB_MEX_PATH -e MATLAB_INCLUDE_DIR \
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
271 -e RDIFF_PATH -e RDIFF_SRC_PATH -e RDIFF_BIN_PATH \
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
272 -e RDIFF_INTERPRETER bin/rdiff_config.sh.bak \
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
273 -e RDIFF_SAMTOOLS_BIN_DIR -e RDIFF_SAMTOOLS_LIB_DIR -e RDIFF_SAMTOOLS_INCLUDE_DIR -e RDIFF_PYTHON_PATH -e SCIPY_PATH -e $RDIFF_VERSION > bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
274
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
275 echo Generating config file ...
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
276
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
277 # appending the relevant lines to rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
278 echo export RDIFF_VERSION=$RDIFF_VERSION >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
279 echo export RDIFF_PATH=$RDIFF_PATH >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
280 echo export RDIFF_SRC_PATH=${RDIFF_PATH}/src >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
281 echo export RDIFF_BIN_PATH=${RDIFF_PATH}/bin >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
282 echo export RDIFF_INTERPRETER=$RDIFF_INTERPRETER >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
283 echo export RDIFF_MATLAB_BIN_PATH=$MATLAB_BIN_PATH >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
284 echo export RDIFF_MATLAB_MEX_PATH=$MATLAB_MEX_PATH >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
285 echo export RDIFF_MATLAB_INCLUDE_DIR=$MATLAB_INCLUDE_DIR >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
286 echo export RDIFF_OCTAVE_BIN_PATH=$RDIFF_OCTAVE_BIN_PATH >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
287 echo export RDIFF_OCTAVE_MKOCT=$RDIFF_OCTAVE_MKOCT >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
288 echo export RDIFF_SAMTOOLS_BIN_DIR=$RDIFF_SAMTOOLS_BIN_DIR >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
289 echo export RDIFF_SAMTOOLS_LIB_DIR=$RDIFF_SAMTOOLS_LIB_DIR >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
290 echo export RDIFF_SAMTOOLS_INCLUDE_DIR=$RDIFF_SAMTOOLS_INCLUDE_DIR >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
291 echo export RDIFF_PYTHON_PATH=$RDIFF_PYTHON_PATH >> bin/rdiff_config.sh
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
292
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
293 echo Done.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
294 echo
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
295
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
296 echo Please use \'make\' to compile the mex files before using rDiff.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
297 echo To test rDiff use \'make example\' or \'make threeexamples\'.
0f80a5141704 version 0.3 uploaded
vipints
parents:
diff changeset
298 echo