forked from nathanhaigh/amos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
329 lines (290 loc) · 9.12 KB
/
configure.ac
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
##-- AMOS CONFIGURE --##
# initialize
AC_PREREQ([2.59])
AC_INIT([AMOS Assembler],[3.1.0],[amos-help@lists.sourceforge.net],[amos])
AC_PREFIX_DEFAULT([`pwd`])
AC_CONFIG_SRCDIR([src/AMOS/foundation_AMOS.hh])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_LIBOBJ_DIR([src/GNU])
AM_INIT_AUTOMAKE(1.8)
# allow patters relating to CA
m4_pattern_allow([^AS_UTL])
m4_pattern_allow([^AS_MSG])
# declare some precious variables
AC_ARG_VAR(PERL, [perl command])
AC_ARG_VAR(PYTHON, [python command])
AC_ARG_VAR(NUCMER, [nucmer command])
AC_ARG_VAR(DELTAFILTER, [delta-filter command])
AC_ARG_VAR(SHOWCOORDS, [show-coords command])
AC_ARG_VAR(BLAT, [blat command])
AC_SUBST(docdir, [${datadir}/doc/${PACKAGE_TARNAME}-${PACKAGE_VERSION}])
AC_SUBST(amoslibdir, [${libdir}/AMOS])
AC_SUBST(tigrlibdir, [${libdir}/TIGR])
AC_SUBST(amosincludedir, [${includedir}/AMOS])
AC_SUBST(tigrincludedir, [${includedir}/TIGR])
# check for programs
AC_PROG_CXX
AC_PROG_CC
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_CPP
AC_PATH_PROG(PERL, [perl], [:])
AC_PATH_PROG(PYTHON, [python], [:])
AC_PATH_PROG(NUCMER, [nucmer], [:])
AC_PATH_PROG(DELTAFILTER, [delta-filter], [:])
AC_PATH_PROG(SHOWCOORDS, [show-coords], [:])
AC_PATH_PROG(BLAT, [blat], [:])
# initialize Python
# AC_PROG_PYTHON()
# check for Perl modules
AC_PROG_PERL_MODULES(Statistics::Descriptive, LIBSTATISTICS_DESCRIPTIVE_PERL=1, LIBSTATISTICS_DESCRIPTIVE_PERL=0)
AC_PROG_PERL_MODULES(XML::Parser, LIBXML_PARSER_PERL=1, LIBXML_PARSER_PERL=0)
AC_PROG_PERL_MODULES(DBI, LIBDBI_PERL=1, LIBDBI_PERL=0)
# check for libraries
AC_CHECK_LIB(m, pow)
AC_CHECK_LIB(c, fopen)
AC_CHECK_LIB(z, main)
case ${LIBS} in
*"-lz "*)
have_libz=yes
;;
esac
AC_CHECK_LIB(expat, XML_ParserCreate)
case ${LIBS} in
*"-lexpat "*)
have_libexpat=yes
;;
esac
# check for headers
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(
[ \
fcntl.h \
inttypes.h \
limits.h \
stdlib.h \
unistd.h \
],
[],
AC_MSG_ERROR([required header not found please use a supported compiler])
)
# check for typedefs, structures, and compiler characteristics
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_MODE_T
AC_STRUCT_TM
AC_C_BIGENDIAN
AC_SYS_LARGEFILE
AMOS_C_BITFIELDS
AMOS_QT4
AMOS_BOOST
AMOS_CA
AMOS_OPENMP
AMOS_JELLYFISH
# check for functions which can be replaced with libGNU modules:
# getopt strtod strtol
gl_GETOPT
gl_FUNC_STRTOD
gl_FUNC_STRTOL
# check for functions not in libGNU
AC_FUNC_FORK
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(
[ \
dup2 \
floor \
localtime \
lstat \
memmove \
memset \
mkdir \
pow \
rmdir \
sqrt \
stat \
strchr \
strdup \
strstr \
],
[],
AC_MSG_ERROR([required function not found please use a supported compiler])
)
# check the platform
AC_CANONICAL_HOST
# set the automake build conditionals, e.g. BUILD_AMOScmp
AMOS_BUILD_CONDITIONAL([AMOScmp], [no])
AMOS_BUILD_CONDITIONAL([minimus], [no])
AMOS_BUILD_CONDITIONAL([Simulator], [no])
AMOS_BUILD_CONDITIONAL([Experimental], [no])
AMOS_BUILD_CONDITIONAL([all], [yes])
AM_CONDITIONAL(BUILD_LIBZ, [test x"${have_libz}" = x"yes"])
AM_CONDITIONAL(BUILD_LIBEXPAT, [test x"${have_libexpat}" = x"yes"])
AM_CONDITIONAL(BUILD_QT4, [test x"${have_qt4_test}" = x"yes"])
AM_CONDITIONAL(BUILD_BOOST, [test x"${have_boost_test}" = x"yes"])
# makefiles to configure
AC_CONFIG_FILES(
[ \
Makefile \
doc/Makefile \
src/Makefile \
src/GNU/Makefile \
src/AMOS/Makefile \
src/Bambus/Makefile \
src/Bambus/Bundler/Makefile \
src/Bambus/Output/Makefile \
src/Bambus/Untangler/Makefile \
src/Common/Makefile \
src/Graph/Makefile \
src/Slice/Makefile \
src/CelMsg/Makefile \
src/Message/Makefile \
src/Bank/Makefile \
src/Align/Makefile \
src/Tigger/Makefile \
src/Compare/Makefile \
src/Casm/Makefile \
src/CtgTrim/Makefile \
src/Sim/Makefile \
src/Validation/Makefile \
src/Converters/Makefile \
src/Utils/Makefile \
src/PerlModules/Makefile \
src/PythonModules/Makefile \
src/Pipeline/Makefile \
src/Staden/Makefile \
src/Staden/read/Makefile \
src/Staden/progs/Makefile \
src/Contig/Makefile \
src/Foundation/Makefile \
src/hawkeye/Makefile \
src/Experimental/Makefile \
]
)
# make it happen
AC_OUTPUT
# dump some configuration confirmations
echo \
"
-- ${PACKAGE_STRING} Configuration Results --
C compiler: ${CC} ${CFLAGS}
C++ compiler: ${CXX} ${CXXFLAGS}"
if test x"${GCC}" = x"yes" ; then
gcc_version=`${CC} --version | head -n 1`
echo " GCC version: ${gcc_version}"
else
gcc_version=''
fi
echo \
" Host System type: ${host}
Install prefix: ${prefix}
Install eprefix: ${exec_prefix}
See config.h for further configuration information.
Email <${PACKAGE_BUGREPORT}> with questions and bug reports.
"
# alert the user of possible problems
case "${host}" in
*alpha*osf*)
case "${CFLAGS} ${CXXFLAGS}" in
*-g*)
echo "WARNING! TIGR alphas may bomb when -g flag is turned on"
echo " use \`configure CFLAGS= CXXFLAGS=' to avoid"
;;
esac
;;
*sparc*solaris*)
case "${gcc_version}" in
*2.*.*)
if test x"${enable_largefile}" != x"no"; then
echo "WARNING! TIGR suns using GCC 2.x.x will bomb on largefile support"
echo " use \`configure --disable-largefile' to avoid"
fi
;;
esac
;;
*x86_64*)
case "${gcc_version}" in
*3.3.*)
echo "WARNING! GCC ${gcc_version} has bugs that affect x86_64 AMOS"
echo " please install a newer version of GCC and reconfigure"
;;
esac
;;
esac
case "${gcc_version}" in
*2.96.*)
echo "WARNING! GCC ${gcc_version} has bugs that affect AMOS"
echo " please install a newer version of GCC and reconfigure"
;;
esac
if test x"${PERL}" = x":" || ! test -x "${PERL}"; then
echo "WARNING! perl was not found but is required to run AMOS scripts"
echo " install perl if planning on using AMOS scripts"
fi
if test x"${PYTHON}" = x":" || ! test -x "${PYTHON}"; then
echo "WARNING! python was not found but is required to run goBambus2"
echo " install python if planning on using goBambus2"
fi
if test x"${NUCMER}" = x":" || ! test -x "${NUCMER}"; then
echo "WARNING! nucmer was not found but is required to run AMOScmp and minimus2"
echo " install nucmer if planning on using these programs"
fi
if test x"${DELTAFILTER}" = x":" || ! test -x "${DELTAFILTER}"; then
echo "WARNING! delta-filter was not found but is required to run AMOScmp-shortReads-alignmentTrimmed"
echo " install delta-filter if planning on using AMOScmp-shortReads-alignmentTrimmed"
fi
if test x"${SHOWCOORDS}" = x":" || ! test -x "${DELTAFILTER}"; then
echo "WARNING! show-coords was not found but is required to run minimus2"
echo " install show-coords if planning on using minimus2"
fi
if test x"${BLAT}" = x":" || ! test -x "${BLAT}"; then
echo "WARNING! BLAT was not found but is required to run minimus2-blat"
echo " install BLAT if planning on using minimus2-blat"
fi
if test x"${have_qt4}" != x"yes"; then
echo "WARNING! Qt4 toolkit was not found but is required to run AMOS GUIs"
echo " install Qt4 or locate Qt4 with configure to build GUIs"
echo " see config.log for more information on what went wrong"
elif test x"${have_qt4_test}" != x"yes"; then
echo "WARNING! Qt4 toolkit malfunctioning but is required to run AMOS GUIs"
echo " try compiling GUIs manually or reinstall Qt4 toolkit to build GUIs"
echo " see config.log for more information on what went wrong"
fi
if test x"${have_boost}" != x"yes"; then
echo "WARNING! Boost graph toolkit was not found but is required to run parts of the AMOS Scaffolder (Bambus 2)"
echo " install Boost or locate Boost with configure to build Scaffolder"
echo " see config.log for more information on what went wrong"
elif test x"${have_boost_test}" != x"yes"; then
echo "WARNING! Boost graph toolkit malfunctioning but is required to run parts of the AMOS Scaffolder (Bambus 2)"
echo " try compiling manually or reinstall Boost toolkit to build AMOS Scaffolder"
echo " see config.log for more information on what went wrong"
fi
if test x"${have_libz}" != x"yes"; then
echo "WARNING! libz was not found but is required for certain read trace IO"
echo " install libz if planning on using compressed trace formats"
fi
if test x"${have_libexpat}" != x"yes"; then
echo "WARNING! libexpat was not found but is required for the toAmos_new file conversion tool"
echo " install libexpat if planning on using toAmos_new"
fi
if test x"${JELLYFISH_LDADD}" = x""; then
echo "WARNING! Omitting support for Jellyfish kmer counting library"
fi
if test x"${LIBSTATISTICS_DESCRIPTIVE_PERL}" = x"0"; then
echo "WARNING! Statistics::Descriptive Perl module was not found but is required to run some AMOS scripts"
fi
if test x"${LIBXML_PARSER_PERL}" = x"0"; then
echo "WARNING! XML::Parser Perl module was not found but is required to run some AMOS scripts"
fi
if test x"${LIBDBI_PERL}" = x"0"; then
echo "WARNING! DBI Perl module was not found but is required to run some AMOS scripts"
fi
##-- END OF CONFIGURE --##