Repository navigation
Expand file tree
/
Copy pathconfigure.ac
More file actions
595 lines (509 loc) · 20.4 KB
/
Copy pathconfigure.ac
File metadata and controls
595 lines (509 loc) · 20.4 KB
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
AC_PREREQ([2.69])
# 5 argument version only available with aclocal >= 2.64
AC_INIT([IntaRNA], [3.4.1], [], [intaRNA], [http://www.bioinf.uni-freiburg.de] )
# minimal required version of the boost library
BOOST_REQUIRED_VERSION=1.50.0
# minimal required version of the Vienna RNA library
VRNA_REQUIRED_VERSION=2.4.14
# minimal required version of python interpreter (to install intarnapvalue)
PYTHON_REQUIRED_VERSION=3.6
AC_CANONICAL_HOST
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src/easylogging++.h])
AC_CONFIG_HEADERS([src/config.h])
# AC_CONFIG_MACRO_DIR([m4])
m4_include([m4/m4-ax_cxx_compile_stdcxx.m4])
m4_include([m4/m4-ax_openmp.m4])
m4_include([m4/m4-ax_boost_base.m4])
m4_include([m4/m4-ax_boost_system.m4])
m4_include([m4/m4-ax_boost_filesystem.m4])
m4_include([m4/m4-ax_boost_program_options.m4])
m4_include([m4/m4-ax_boost_regex.m4])
m4_include([m4/m4-ax_boost_iostreams.m4])
m4_include([m4/m4-ax_check_zlib.m4])
lt_enable_auto_import=""
case "$host_os" in
cygwin* | mingw* | cegcc*)
AM_LDFLAGS="-Wl,--enable-auto-import $AM_LDFLAGS"
esac
# check for C++ compiler
# store current compiler flags to avoid default setup via AC_PROG_CXX and *_CC
OLD_CXXFLAGS=$CXXFLAGS
OLD_CFLAGS=$CFLAGS
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LN_S
AC_PROG_RANLIB
AC_PROG_MKDIR_P
# reset compiler flags to initial flags
CXXFLAGS=$OLD_CXXFLAGS
CFLAGS=$OLD_CFLAGS
# automake initialisation (mandatory) and check for minimal automake API version
AM_INIT_AUTOMAKE([1.11])
# use the C++ compiler for the following checks
AC_LANG([C++])
# ensure we are using the C++23 standard
AX_CXX_COMPILE_STDCXX([23], [noext], [mandatory])
# Check the C++23 library surface used by IntaRNA. A compiler accepting
# -std=c++23 is not sufficient when paired with an older standard library.
AC_MSG_CHECKING([for required C++23 standard library features])
intarna_saved_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -pedantic-errors"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <cstddef>
#include <sstream>
#include <string>
#include <string_view>]],
[[std::string text{"IntaRNA"};
const bool has_rna = text.contains("RNA") && text.contains('R');
text.resize_and_overwrite(8, [](char * data, std::size_t size) noexcept {
for (std::size_t i = 0; i < size; ++i)
data[i] = 'x';
return size;
});
std::stringstream stream;
stream << text;
const std::string_view stream_view = stream.view();
std::stringstream sink;
sink << stream.view();
(void)has_rna;
(void)stream_view;]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([A C++23 standard library providing std::string::contains, std::string::resize_and_overwrite, and std::stringstream::view is required. Upgrade libstdc++/libc++ or select a newer C++23 toolchain.])])
CXXFLAGS=$intarna_saved_CXXFLAGS
# Prefer the standard implementation, falling back to bundled Kokkos headers.
# The selected backend is also recorded in the installed public configuration.
AC_ARG_WITH([mdspan],
[AS_HELP_STRING([--with-mdspan=auto|std|kokkos],
[select mdspan implementation (def=auto: prefer std, otherwise Kokkos)])],
[intarna_mdspan="$withval"], [intarna_mdspan=auto])
AS_CASE([$intarna_mdspan], [auto|std|kokkos], [],
[AC_MSG_ERROR([--with-mdspan must be auto, std, or kokkos])])
INTARNA_USE_STD_MDSPAN=0
AS_IF([test x"$intarna_mdspan" != x"kokkos"], [
AC_MSG_CHECKING([for C++23 std::mdspan over std::vector])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <mdspan>
#include <vector>
#ifndef __cpp_lib_mdspan
#error C++23 std::mdspan is unavailable
#endif]],
[[std::vector<int> storage(6);
std::mdspan<int, std::dextents<std::size_t, 2>> matrix(storage.data(), 2, 3);
matrix[1, 2] = 42;
std::mdspan<const int, std::dextents<std::size_t, 1>> packed(storage.data(), 6);
return packed[5] != 42;]])],
[AC_MSG_RESULT([yes])
INTARNA_USE_STD_MDSPAN=1],
[AC_MSG_RESULT([no])
AS_IF([test x"$intarna_mdspan" = x"std"],
[AC_MSG_ERROR([--with-mdspan=std requires a C++23 standard library providing std::mdspan. Use --with-mdspan=auto or --with-mdspan=kokkos for the bundled implementation.])])])
])
AS_IF([test "$INTARNA_USE_STD_MDSPAN" = 0], [
AC_MSG_CHECKING([for bundled Kokkos mdspan over std::vector])
intarna_saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-I$srcdir/src $CPPFLAGS"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include "mdspan/mdspan.hpp"
#include <vector>
namespace intarna_mdspan = MDSPAN_IMPL_STANDARD_NAMESPACE;]],
[[std::vector<int> storage(6);
intarna_mdspan::mdspan<int, intarna_mdspan::dextents<std::size_t, 2>> matrix(storage.data(), 2, 3);
matrix[1, 2] = 42;
intarna_mdspan::mdspan<const int, intarna_mdspan::dextents<std::size_t, 1>> packed(storage.data(), 6);
return packed[5] != 42;]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([The bundled Kokkos mdspan headers do not compile with this C++23 toolchain. See config.log and ensure src/mdspan and src/experimental are complete.])])
CPPFLAGS=$intarna_saved_CPPFLAGS
])
AC_DEFINE_UNQUOTED([INTARNA_USE_STD_MDSPAN], [$INTARNA_USE_STD_MDSPAN],
[Use standard mdspan (1) or the bundled Kokkos implementation (0)])
AC_SUBST([INTARNA_USE_STD_MDSPAN])
# check if python is available
AM_PATH_PYTHON([$PYTHON_REQUIRED_VERSION],, [:])
AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != ":"])
AM_COND_IF([HAVE_PYTHON], [HAVE_PYTHON_yesno=yes], [HAVE_PYTHON_yesno=no])
###############################################################################
###############################################################################
############ DEFAULT MACROS IF PKG-CONFIG MISSING ###############
m4_define_default([PKG_PROG_PKG_CONFIG],
[AC_MSG_CHECKING([pkg-config])
AC_MSG_RESULT([no])])
PKG_PROG_PKG_CONFIG
# If the pkg-config autoconf support isn't installed, define its
# autoconf macro to disable any packages depending on it.
#
m4_define_default([PKG_CHECK_MODULES],
[AC_MSG_CHECKING([$1])
AC_MSG_RESULT([no])
$4])
############ SILENT (MINIMAL) MAKEFILE OUTPUT ###################
# show full make output via `make V=1`
m4_ifdef(
[AM_SILENT_RULES],
[AM_SILENT_RULES([yes])]
)
############ PARAMETERS ########################################
###############################################################################
# PKG-CONFIG SETUP
###############################################################################
AC_MSG_CHECKING([whether to use and provide pkg-config information])
pkgconfigEnabled=yes
AC_ARG_ENABLE([pkg-config],
[AS_HELP_STRING([--disable-pkg-config],
[disable pkg-config support (def=enabled)])],
[pkgconfigEnabled="$enableval"],
[pkgconfigEnabled=yes])
AC_MSG_RESULT([$pkgconfigEnabled])
AS_IF([test x"$pkgconfigEnabled" = x"yes"], [
# Checks for pkg-config
AC_CHECK_PROG([HAVE_PKG_CONFIG],[pkg-config],[yes],[no])
], [
HAVE_PKG_CONFIG=no
])
###############################################################################
# DEBUG SUPPORT SETUP
###############################################################################
AC_MSG_CHECKING([whether to build with debug information])
debuger=no
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debug data generation (def=disabled)])],
[debuger="$enableval"])
AC_MSG_RESULT([$debuger])
AS_IF([test x"$debuger" = x"yes"], [
AC_DEFINE([_DEBUG], [1], [Run in DEBUG mode with additional assertions and debug output])
AM_CXXFLAGS="$AM_CXXFLAGS -g -O0 -Wno-uninitialized -Wno-deprecated -DELPP_DEBUG_ERRORS" # -Wall"
], [
AC_DEFINE([NDEBUG], [1], [Run in normal mode with minimal assertions])
AM_CXXFLAGS="$AM_CXXFLAGS -O3 -fno-strict-aliasing -Wno-uninitialized -Wno-deprecated"
])
###############################################################################
# STATIC LINKING SUPPORT
###############################################################################
AC_MSG_CHECKING([whether to build statically linked binaries])
AC_ARG_ENABLE([static-linking],
[AS_HELP_STRING([--enable-static-linking],
[enables static linking of the executables (default=disabled)])],
[enable_static_linking=$enableval],
[enable_static_linking=no])
AC_MSG_RESULT([$enable_static_linking])
AS_IF([test x"$enable_static_linking" = x"yes"], [
AM_LDFLAGS="-static $AM_LDFLAGS"
])
###############################################################################
# MULTI-THREADING SUPPORT SETUP
###############################################################################
AC_MSG_CHECKING([whether to enable multi-threading support])
multithreadingEnabled=yes
AC_ARG_ENABLE([multithreading],
[AS_HELP_STRING([--disable-multithreading],
[disable multi-threading support (def=enabled)])],
[multithreadingEnabled="$enableval"],
[multithreadingEnabled=yes])
AC_MSG_RESULT([$multithreadingEnabled])
AS_IF([test x"$multithreadingEnabled" = x"yes"], [
AC_DEFINE([INTARNA_MULITHREADING], [1], [Enabling multi-threading support])
AC_SUBST([INTARNA_MULITHREADING],[1])
# ensure OPENMP can be used
AX_OPENMP([],[AC_MSG_ERROR([OPENMP support is mandatory for multi-threading compilation])])
AM_CXXFLAGS="$AM_CXXFLAGS $OPENMP_CXXFLAGS"
], [
AC_DEFINE([INTARNA_MULITHREADING], [0], [Disabling multi-threading support])
AC_SUBST([INTARNA_MULITHREADING],[0])
AM_CXXFLAGS="$AM_CXXFLAGS -pthread"
])
###############################################################################
# MULTIPRECISION SUPPORT (via GNU quadmath library)
###############################################################################
AC_MSG_CHECKING([whether to use a multi-precision partition function data type (quadmath)])
enable_multiprecision=no
AC_ARG_ENABLE([multiprecision],
[AS_HELP_STRING([--enable-multiprecision],
[multi-precision partition function data type (default=disabled)])],
[enable_multiprecision=$enableval],
[enable_multiprecision=no])
AC_MSG_RESULT([$enable_multiprecision])
AS_IF([test x"$enable_multiprecision" = x"yes"], [
LIBS="$LIBS -lquadmath"
AC_DEFINE([INTARNA_MULTIPRECISION], [1], [Enabling multiprecision partition function (using quadmath)])
AC_SUBST([INTARNA_MULTIPRECISION],[1])
], [
AC_DEFINE([INTARNA_MULTIPRECISION], [0], [Disabling multiprecision partition function])
AC_SUBST([INTARNA_MULTIPRECISION],[0])
])
###############################################################################
# Vienna RNA package library path support, if not installed in usual directories
###############################################################################
AC_ARG_WITH([vrna],
[AS_HELP_STRING(
[--with-vrna=PREFIX],
[alternative prefix path to Vienna RNA library]
)],
[RNAPATHSET=1],
[RNAPATHSET=0]
)
# handle user-defined path
AS_IF([test $RNAPATHSET = 1 ], [
AS_IF([test "x$HAVE_PKG_CONFIG" = "xyes"], [
# use pkg-config data if available
export PKG_CONFIG_PATH="$with_vrna/lib/pkgconfig/:$PKG_CONFIG_PATH"
], [
# guess compiler and linker flags if needed
AM_CXXFLAGS="-I$with_vrna/include $AM_CXXFLAGS"
AM_LDFLAGS="-L$with_vrna/lib $AM_LDFLAGS"
])
])
###############################################################################
dnl generate doxygen documentation in Doxy
###############################################################################
AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes],[no])
AS_IF([test "x$HAVE_DOXYGEN" = "xyes"], [
# loading m4 macro
m4_include([m4/doxygen.m4])
# setup doxygen documentation to build
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(ON)
DX_PS_FEATURE(OFF)
# generate according options etc.
DX_INIT_DOXYGEN($PACKAGE_NAME, [doc/doxygen.cfg], [doxygen-doc])
])
###############################################################################
# EASYLOGGING++
###############################################################################
# enable easylogging++ performance tracking
AM_CXXFLAGS="$AM_CXXFLAGS -DELPP_FEATURE_PERFORMANCE_TRACKING"
# disable default log file creation
AM_CXXFLAGS="$AM_CXXFLAGS -DELPP_NO_DEFAULT_LOG_FILE"
#############################
# COLORING SETUP
#############################
AC_MSG_CHECKING([whether to enable coloring of console log output])
logColoring=yes
AC_ARG_ENABLE([log-coloring],
[AS_HELP_STRING([--disable-log-coloring],
[disable console log coloring (def=enabled)])],
[logColoring="$enableval"])
AC_MSG_RESULT([$logColoring])
AS_IF([test x"$logColoring" = x"yes"], [
AC_DEFINE([INTARNA_LOG_COLORING], [1], [Enabling console log coloring])
AC_SUBST([INTARNA_LOG_COLORING],[1])
], [
AC_DEFINE([INTARNA_LOG_COLORING], [0], [Disabling console log coloring])
AC_SUBST([INTARNA_LOG_COLORING],[0])
])
#############################
# P-VALUE SCRIPT
#############################
AC_MSG_CHECKING([whether to compile and install 'intarnapvalue' python module])
intarnapvalue=no
AC_ARG_ENABLE([intarnapvalue],
[AS_HELP_STRING([--enable-intarnapvalue],
[build and install the intarnapvalue python3 module])],
[AM_COND_IF([HAVE_PYTHON], [intarnapvalue="$enableval"], [intarnapvalue="no (python not available)"])])
AC_MSG_RESULT([$intarnapvalue])
AM_CONDITIONAL([INSTALL_INTARNAPVALUE],[test x"$intarnapvalue" = x"yes"])
###############################################################################
###############################################################################
# BOOST CHECK
###############################################################################
AX_BOOST_BASE([$BOOST_REQUIRED_VERSION], [FOUND_BOOST=1;], [FOUND_BOOST=0;])
AS_IF([test "x$want_boost" != "xno" && test "x$FOUND_BOOST" = "x1"], [
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_REGEX
AX_BOOST_IOSTREAMS
AC_MSG_CHECKING([for Boost.Serialization binary archives])
intarna_saved_CPPFLAGS=$CPPFLAGS
intarna_saved_LDFLAGS=$LDFLAGS
intarna_saved_LIBS=$LIBS
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
LIBS="-lboost_serialization $LIBS"
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <sstream>
#include <boost/archive/binary_iarchive.hpp>
#include <boost/archive/binary_oarchive.hpp>]],
[[std::stringstream stream;
boost::archive::binary_oarchive output(stream);
int value = 1;
output << value;
boost::archive::binary_iarchive input(stream);
input >> value;]])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Boost.Serialization headers and library are required for .agz accessibility files. Install libboost-serialization-dev or select --with-boost and --with-boost-libdir.])])
CPPFLAGS=$intarna_saved_CPPFLAGS
LDFLAGS=$intarna_saved_LDFLAGS
LIBS=$intarna_saved_LIBS
])
AX_CHECK_ZLIB([], [])
############ CHECKS ############################################
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
##########################################################################
# check boost test results
##########################################################################
# FOUND_BOOST is only defined if want_boost is "yes"
AS_IF([test $want_boost != "no" && test $FOUND_BOOST != 1], [
AC_MSG_NOTICE([])
AC_MSG_NOTICE([The Boost Library was not found!])
AC_MSG_NOTICE([ -> If installed in a non-standard path, please use '--with-boost=PREFIX'.])
AC_MSG_NOTICE([])
DEPENDENCYNOTFOUND=1;
], [
AM_CXXFLAGS="$BOOST_CPPFLAGS $AM_CXXFLAGS"
AM_LDFLAGS="$BOOST_LDFLAGS $AM_LDFLAGS"
LIBS="$LIBS -lboost_regex -lboost_program_options -lboost_filesystem -lboost_system -lboost_iostreams -lboost_serialization -lz"
])
###############################################################################
# BEGIN VIENNA CHECK
###############################################################################
# check for Vienna RNA headers
RNANOTFOUND=0
AS_IF([test x"$HAVE_PKG_CONFIG" = x"yes"], [
AC_MSG_NOTICE([check if VRNA version >= $VRNA_REQUIRED_VERSION])
PKG_CHECK_MODULES([VRNA], [RNAlib2 >= $VRNA_REQUIRED_VERSION], [RNANOTFOUND=0], [RNANOTFOUND=1])
])
AS_IF([test "$RNANOTFOUND" = "0"], [
AC_MSG_CHECKING([for compilation with Vienna RNA package headers])
OLD_CPPFLAGS=$CPPFLAGS
OLD_CXXFLAGS=$CXXFLAGS
OLD_LDFLAGS=$LDFLAGS
AC_LANG_PUSH([C])
CPPFLAGS="$CPPFLAGS $AM_CXXFLAGS"
LDFLAGS="$LDFLAGS $AM_LDFLAGS"
AS_IF([test "x$HAVE_PKG_CONFIG" = "xyes"], [
CPPFLAGS="$CPPFLAGS $VRNA_CFLAGS"
LDFLAGS="$LDFLAGS $VRNA_LIBS"
])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[#include <ViennaRNA/model.h>]],[[vrna_md_t tmp; vrna_md_copy(&tmp,&tmp);]])],
[
AC_MSG_RESULT([yes])
RNANOTFOUND=0;
],
[
AC_MSG_RESULT([no])
AC_MSG_NOTICE([DEBUG : used CPPFLAGS = $CPPFLAGS])
AC_MSG_NOTICE([DEBUG : used LDFLAGS = $LDFLAGS])
RNANOTFOUND=1;
]
)
AC_LANG_POP([C])
CPPFLAGS=$OLD_CPPFLAGS
LDFLAGS=$OLD_LDFLAGS
])
# error output if ViennaRNA not found
AS_IF([test "$RNANOTFOUND" = "1"], [
AC_MSG_NOTICE()
AC_MSG_NOTICE([The Vienna RNA C library version >= $VRNA_REQUIRED_VERSION is required.])
AC_MSG_NOTICE([ -> It can be obtained from http://www.tbi.univie.ac.at/.])
AC_MSG_NOTICE()
AS_IF([test "$RNAPATHSET" = "1"], [
AC_MSG_NOTICE([ -> Can't find the Vienna RNA library in given path '$with_vrna'.])
], [ # else
AC_MSG_NOTICE([ -> If installed in a non-standard path, please use '--with-vrna=PREFIX'.])
])
DEPENDENCYNOTFOUND=1;
],[ # else
# register Vienna RNA lib for linking
AS_IF([test "x$HAVE_PKG_CONFIG" = "xyes"], [
# apply pkg-config options for VRNA package for further build
AM_CXXFLAGS="$AM_CXXFLAGS $VRNA_CFLAGS"
LIBS="$LIBS $VRNA_LIBS"
], [ # else
# guess that only lib information missing
LIBS="$LIBS -lRNA"
])
])
###############################################################################
# END VIENNA CHECK
###############################################################################
###############################################################################
# FINAL DEPENDENCY CHECK AND EXIT IF NEEDED
###############################################################################
# error ABORT if on of the libraries was not found
AS_IF([test "$DEPENDENCYNOTFOUND" = "1"], [
AC_MSG_NOTICE()
AC_MSG_ERROR([Some dependency was not met! See above for errors and relate to './configure --help'.])
])
##########################################################################
# get available personalities
AC_SUBST([PERSONALITIES],[`grep 'return.*"IntaRNA..*"' "$srcdir/src/bin/CommandLineParsing.h" | grep -o '".*"' | tr -d '"' | tr "\n" " "`])
##########################################################################
# Keep strict diagnostics focused on IntaRNA sources. Boost and ViennaRNA
# headers are external dependencies and can contain compiler extensions.
INTARNA_SYSTEM_CPPFLAGS=
#for intarna_cppflag in $BOOST_CPPFLAGS $VRNA_CFLAGS; do # ORIG
for intarna_cppflag in $VRNA_CFLAGS; do
case "$intarna_cppflag" in
-I?*)
intarna_include_path=${intarna_cppflag#-I}
INTARNA_SYSTEM_CPPFLAGS="$INTARNA_SYSTEM_CPPFLAGS -isystem $intarna_include_path"
;;
esac
done
# distribute additional compiler and linker flags
# --> set these variables instead of CXXFLAGS or LDFLAGS
AC_SUBST([AM_CXXFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([INTARNA_SYSTEM_CPPFLAGS])
AC_SUBST([LIBS])
AM_CONDITIONAL(enable_pkg_config, [test "x$HAVE_PKG_CONFIG" = "xyes"])
AM_CONDITIONAL(enable_doxygen, [test "x$HAVE_DOXYGEN" = "xyes"])
# files to generate via autotools (.am or .in source files)
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/IntaRNA/Makefile])
AC_CONFIG_FILES([src/IntaRNA/intarna_config.h])
AC_CONFIG_FILES([src/bin/Makefile])
AC_CONFIG_FILES([perl/Makefile])
AC_CONFIG_FILES([R/Makefile])
AC_CONFIG_FILES([python/Makefile])
AC_CONFIG_FILES([python/bin/Makefile])
AC_CONFIG_FILES([python/intarnapvalue/Makefile])
AC_CONFIG_FILES([python/copomus/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/data/Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([IntaRNA.pc])
# generate the final Makefile etc.
AC_OUTPUT
# get absolute directory paths
eval _prefixdir=$(eval printf "%s" $prefix)
eval _bindir=$(eval printf "%s" $bindir)
eval _libdir=$(eval printf "%s" $libdir)
eval _includedir=$(eval printf "%s" $includedir)
AC_MSG_NOTICE([
======================================
IntaRNA $PACKAGE_VERSION
======================================
Features
--------
* log coloring : $logColoring
* OpenMP multi-threading : $multithreadingEnabled
* intarnapvalue : $intarnapvalue
Install Directories for given 'prefix'
--------------------------------------
* Install prefix : $_prefixdir
* Executables : $_bindir
* Libraries : $_libdir
* Header files : $_includedir
* Python modules : $_pydir
You can run 'make', 'make tests' and 'make install' now!
Run 'make install prefix=XYZ' for installation in an alternative directory.
======================================
])