forked from ViennaRNA/probing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
134 lines (105 loc) · 4.11 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT([RNApbfold],[0.1],[[email protected]],[RNApbfold])
dnl Every other copy of the package version number gets its value from here
AM_INIT_AUTOMAKE
dnl change the default installation prefix
dnl AC_PREFIX_DEFAULT(/usr/local/RNA)
dnl configure options
AM_WITH_DMALLOC
AC_ARG_WITH(cluster, [ --with-cluster build AnalyseSeqs and AnalyseDists])
AC_ARG_WITH(perl, [ --without-perl don't build Perl module])
AC_ARG_WITH(forester, [ --without-forester don't build RNAforester program])
AC_ARG_WITH(kinfold, [ --without-kinfold don't build Kinfold program])
AC_ARG_WITH(openmp, [ --without-openmp don't build RNA2Dfold program with OpenMP Multithread support])
AC_ARG_ENABLE(floatpf, [ --enable-floatpf use float instead of double for partition function], [])
AC_ARG_VAR(PERLPREFIX, [Prefix for installation of the Perl module.
By default the perl module is installed wherever Perl thinks it belongs, ignoring the $prefix used by configure])
dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
AC_CONFIG_HEADERS([config.h])
AC_SUBST(VERSION)
ISODATE=`date +%Y-%m-%d`
AC_SUBST(ISODATE)
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CC_FPIC
AC_ARG_VAR(FPIC,[compiler flag for generating PIC code that can be used in a shared library])
if test "$GCC" = yes; then
AC_DEFINE(UNUSED, __attribute__ ((unused)), avoid warning about unused variables)
else
AC_DEFINE(UNUSED,, only for gcc)
fi
AC_PROG_INSTALL
AC_PROG_RANLIB
AM_PROG_CC_C_O
AC_PATH_PROG(PerlCmd, perl)
if test -n "$PerlCmd"; then
if $PerlCmd -e 'require 5.004'; then :
else
AC_MSG_RESULT(You need Perl version 5.004 or higher for the Perl module)
with_perl="no"
fi
fi
if test -z "$PerlCmd"; then
AC_MSG_RESULT(No suitable Perl found -- will not build Perl module)
AC_MSG_RESULT(You may set the PerlCmd environment variable to point to
a suitable perl binary)
with_perl="no"
fi
if test "$with_forester" != "no"; then
if test -f $srcdir/RNAforester/Makefile.am; then
AC_CONFIG_SUBDIRS(RNAforester)
else
AC_MSG_WARN([RNAforester subdirectory does not exist])
with_forester="no"
fi
fi
if test "$with_kinfold" != "no"; then
if test -f $srcdir/Kinfold/Makefile.am; then
AC_CONFIG_SUBDIRS(Kinfold)
else
AC_MSG_WARN([Kinfold subdirectory does not exist])
with_kinfold="no"
fi
fi
AM_CONDITIONAL(MAKE_PERL_EXT, test "$with_perl" != "no")
AM_CONDITIONAL(MAKE_CLUSTER, test "$with_cluster" = "yes")
AM_CONDITIONAL(MAKE_FORESTER, test "$with_forester" != "no")
AM_CONDITIONAL(MAKE_KINFOLD, test "$with_kinfold" != "no")
AM_CONDITIONAL(USE_OPENMP, test "$with_openmp" != "no")
dnl Checks for libraries.
dnl AC_REPLACE_GNU_GETOPT
AC_CHECK_LIB([m],[cos])
AC_CHECK_LIB([gslcblas],[cblas_dgemm])
AC_CHECK_LIB([gsl],[gsl_blas_dgemm])
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h strings.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_C_INLINE([])
dnl Checks for library functions.
AC_CHECK_FUNCS(strdup strstr strchr erand48)
AC_CONFIG_FILES([Makefile ViennaRNA.spec examples/Makefile Utils/Makefile Progs/Makefile lib/Makefile H/Makefile man/Makefile man/RNAheat.1 man/RNAsubopt.1 man/RNAdistance.1 man/RNAinverse.1 man/RNAeval.1 man/RNAfold.1 man/RNApdist.1 man/RNAplot.1 man/RNALfold.1 man/RNAalifold.1 man/RNAduplex.1 man/RNAcofold.1 man/RNAplfold.1 man/RNAup.1 man/RNApaln.1 man/RNAaliduplex.1])
AC_OUTPUT
eval _bindir=$(eval echo $bindir)
eval _libdir=$(eval echo $libdir)
eval _includedir=${includedir}
eval _datadir=$datadir
eval _mandir=$mandir
AC_MSG_NOTICE(
[
Configure successful with the following options:
Perl Extension: ${with_perl:-yes}
Analyse{Dists,Seqs}: ${with_cluster:-no}
Kinfold: ${with_kinfold:-yes}
RNAforester: ${with_forester:-yes}
OpenMP Support: ${with_openmp:-yes}
Files will be installed in the following directories:
Executables: $_bindir
Libraries: $_libdir
Header files: $_includedir
Extra Data: $_datadir
Man pages: $_mandir
])