-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
189 lines (156 loc) · 5.83 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
# Last modified: 2009-10-29.21
#
dnl Copyright (C) 2008 Stefan Bienert
dnl
dnl This file is part of CoRB.
dnl
dnl CoRB is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation, either version 3 of the License, or
dnl (at your option) any later version.
dnl
dnl CoRB is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with CoRB. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.60)
AC_INIT([corb], [0.1], [Stefan Bienert <[email protected]>])
AC_CONFIG_AUX_DIR([share/misc/config])
AC_CONFIG_MACRO_DIR([share/misc/m4])
AM_INIT_AUTOMAKE([filename-length-max=99 -Wall -Werror])
AM_PATH_LISPDIR
AC_CONFIG_SRCDIR([src/corb.c])
AC_CONFIG_HEADERS(src/config.h:src/config.h.in)
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# Checks for programs.
AC_PROG_SED
AC_PROG_GREP
AC_PROG_AWK
AC_PROG_MKDIR_P
# development options
# development features
CRB_ARG_ENABLE_CUM([development], [cflags-warnings assert memcheck])
CRB_ARG_ENABLE_CFLAGS_WARNINGS_OPT
CRB_ARG_ENABLE_MEMCHECK
CRB_ARG_ENABLE_ASSERT
# development tools
CRB_ARG_WITH_CUM([development],
[pc_elisp reformat read_viennaparams ex_cmp_er2de_rnaeval
opt_brot_design_terms brot_iterative eval_structure_file
doctool])
CRB_ARG_WITH_PC_ELISP
CRB_ARG_WITH_PERL_PROG([reformat], [build reformat tool for source code])
CRB_ARG_WITH_PERL_PROG([read_viennaparams],
[build conversion tool for Vienna energy tables])
CRB_ARG_WITH_PERL_PROG([ex_cmp_er2de_rnaeval],
[compare Nearest Neighbour model parameters to Vienna package])
CRB_ARG_WITH_PERL_PROG([opt_brot_design_terms],
[Optimiser for parameters in brot])
CRB_ARG_WITH_PERL_PROG([brot_iterative], [build tool to run brot iteratively])
CRB_ARG_WITH_PERL_PROG([eval_structure_file],
[build tool to test brot on a set of structures])
CRB_ARG_WITH_PERL_PROG([doctool], [build documentation tool])
# Checks for header files
CRB_CHECK_HEADERS([assert.h float.h limits.h stddef.h stdlib.h time.h])
AC_HEADER_STDBOOL
gl_SIZE_MAX() # check for SIZE_MAX macro
# Checks for libraries.
CRB_ARG_ENABLE_CHECK_PTHREADS
CRB_CHECK_LIBMATH
#CRB_CHECK_LIBCAIRO([1.5.1], [cairo_create], [function1 function2])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC # AC_REPLACE_FUNCS(malloc) with check for GNU libc compatibility
AC_FUNC_REALLOC # like AC_FUNC_MALLOC
#AC_CHECK_FUNCS([snprintf], , [AC_LIBOBJ(snprintf)
# AC_REPLACE_FUNCS([memchr])
# AC_REPLACE_FUNCS([strchr])])
AC_CHECK_FUNCS([snprintf],[AC_DEFINE([HAVE_SNPRINTF],
[1],
[Define to 1 if you have the `snprintf' function.])])
AC_DEFINE([PREFER_PORTABLE_SNPRINTF],
[1],
[Define to 1 to get a portable snprintf.])
AC_REPLACE_FUNCS([memset])
AC_REPLACE_FUNCS([vprintf])
AC_REPLACE_FUNCS([vfprintf])
AC_REPLACE_FUNCS([strerror])
AC_REPLACE_FUNCS([strtoul])
AC_REPLACE_FUNCS([floor])
AC_REPLACE_FUNCS([pow])
AC_REPLACE_FUNCS([time])
CRB_ARG_ENABLE_CFLAGS_WARNINGS_EVAL
# enhance config.h
AH_TOP([
#ifdef __cplusplus
extern "C" {
#endif
#ifndef CRB_CONFIG_H
#define CRB_CONFIG_H])
AH_BOTTOM([
#endif /* CRB_CONFIG_H */
#ifdef __cplusplus
}
#endif])
AC_CONFIG_FILES([
Makefile
share/Makefile
share/doc/Makefile
share/misc/Makefile
share/misc/bin/Makefile
share/misc/emacs/Makefile
src/libcrbfallback/Makefile
src/libcrbbasic/Makefile
src/libcrbrna/Makefile
src/libcrbbrot/Makefile
src/libcrbapps/Makefile
src/Makefile
])
AC_OUTPUT
CRB_EVAL_VAR([__crb_bindir], [$bindir])
CRB_EVAL_VAR([__crb_infodir], [$infodir])
CRB_EVAL_VAR([__crb_pdfdir], [$pdfdir])
CRB_EVAL_VAR([__crb_htmldir], [$htmldir])
CRB_CFLAGS_CREATE_LIST([__crb_fmtd_cflags],
[ ])
AC_MSG_NOTICE(
[Finished successful
Configuration Report
====================
Build:
${PACKAGE_NAME} applications:
development tools:
reformat: $with_reformat
read_viennaparams: $with_read_viennaparams
ex_cmp_er2de_rnaeval: $with_ex_cmp_er2de_rnaeval
brot_iterative: $with_brot_iterative
eval_structure_file: $with_eval_structure_file
doctool: $with_doctool
emacs lisp byte code: $with_pc_elisp
Build settings:
dnl Perl: $PERL
Enable memory checking: $enable_memcheck
Enable assertions: $enable_assert
Enable usage of POSIX threads: $enable_pthreads
CC: $CC
CFLAGS: $__crb_fmtd_cflags
Installation directories:
Executables: $__crb_bindir
Manual (pdf): $__crb_pdfdir
Manual (info): $__crb_infodir
Manual (html): $__crb_htmldir]
)dnl# AC_MSG_NOTICE
dnl# Local variables:
dnl# eval: (add-hook 'write-file-hooks 'time-stamp)
dnl# time-stamp-start: "Last modified: "
dnl# time-stamp-format: "%:y-%02m-%02d.%02H"
dnl# time-stamp-end: "$"
dnl# End: