-
Notifications
You must be signed in to change notification settings - Fork 12
/
configure.ac.in
201 lines (162 loc) · 4.79 KB
/
configure.ac.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
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
# Process this file with autoconf to produce a configure script.
#
# $Id: configure.ac.in,v 1.36 2006-11-03 13:06:53 flux Exp $
AC_PREREQ(2.50)
AC_INIT([mcl], [setversion_VERSION])
PACKAGE=$PACKAGE_NAME
VERSION=$PACKAGE_VERSION
AC_CONFIG_AUX_DIR(autofoo)
AC_CONFIG_SRCDIR([src/shmcl/mcl.c])
AM_INIT_AUTOMAKE
# one day we should use a config.h.in
AC_CONFIG_HEADER(config.h)
# add a `--enable-maintainer-mode' option to `configure'; `maintainer-only' rules turned off by
# default in Makefile.in's
AM_MAINTAINER_MODE
######################## test void*/uint #####################################
AC_CACHE_CHECK([ _____ weak test for C void* <=> unsigned int conversion],
[ac_cv_c_void_uint],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
unsigned test[] =
{ 0x00000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000
, 0x0000000f, 0x00000f00, 0x000f0000, 0x00f00000, 0x0f000000
, 0x0000ffff, 0x00ffff00, 0xffff0000, 0x00ff00ff, 0xff00ff00
, 0x00ffffff, 0x00ffffff, 0xffffff00, 0xffff00ff, 0xffffffff
, 0x80000000, 0x40000000, 0xc0000000, 0x80000001, 0x40000001
} ;
int main
( int argc
, char* argv[]
)
{ int i = 0
; for (i=0;i<sizeof test/sizeof test[0];i++)
{ unsigned x = test[i]
; void* xv = (void*) x
; unsigned xu = (unsigned) xv
; if (x != xu)
{ fprintf(stderr, "%u failed to reappear\n", x)
; exit(1)
; }
}
return 0
; }
]])],
[ac_cv_c_void_uint=passed],
[ac_cv_c_void_uint=failed],
[true]
)]
)
if test "$ac_cv_c_void_uint" = "failed"; then
cat <<EOM
/\ custom check: num <-> void* failed: do not use --abc options.
/\/\ Consider contacting the author (http://micans.org/stijn/contact.html
\/\/
\/ Please include the file config.log.
EOM
fi
######################## helpful reminder #####################################
# extra ./configure options
AC_ARG_ENABLE(helpful-reminder,
AC_HELP_STRING([--enable-helpful-reminder], [output citation reference (default is yes)]),
[ case "${enableval}" in
yes) helpful_reminder=yes ;;
no) helpful_reminder=no ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-helpful-reminder]) ;;
esac
], [helpful_reminder=yes]
)
if test "$helpful_reminder" = "yes"; then
AC_DEFINE(MCL_HELPFUL_REMINDER, [], [output citation reference (default yes)])
fi
######################## rcl scripts #####################################
AC_ARG_ENABLE(rcl,
[ --enable-rcl install rcl scripts ],
[
case "${enableval}" in
yes) cfg_rcl=true ;;
no) cfg_rcl=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-rcl]) ;;
esac
], [cfg_rcl=false]
)
AM_CONDITIONAL(BUILD_RCL, test x$cfg_rcl = xtrue)
######################## blast package #####################################
## AC_ARG_ENABLE(blast,
## [ --enable-blast build bio-informatics tools ],
## [
## case "${enableval}" in
## yes) blast=true ;;
## no) blast=false ;;
## *) AC_MSG_ERROR([bad value ${enableval} for --enable-blast]) ;;
## esac
## ], [blast=false]
## )
## AM_CONDITIONAL(BUILD_BLAST, test x$blast = xtrue)
## it would be nice if we'd be able to set
## our default -I compile option here
## AC_SUBST INCLUDES
## CPPFLAGS
### AC_SUBST(mandir)
#AC_DEFINE_UNQUOTED(MANPATH, $datarootdir, [
# where to look for manual files
#])
#AC_SUBST(datarootdir)
# AC_DEFINE_UNQUOTED([DATA_PATH], [@prefix@/share/man], [Description])
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_RANLIB
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [ceil])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([float.h limits.h malloc.h stdlib.h string.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Figure out how to build C programs using POSIX threads, and
# use the variables given by acx_pthread.m4 in acinclude.m4
ACX_PTHREAD([
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"
])
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([floor memset pow rint sqrt strchr strpbrk strstr])
AC_CHECK_VA_COPY
# AC_CONFIG_FILES([Makefile])
AC_OUTPUT([
Makefile
include/Makefile
doc/Makefile
testing/Makefile
testing/stream/Makefile
testing/blast/Makefile
testing/setops/Makefile
graphs/Makefile
img/Makefile
scripts/Makefile
rcl/Makefile
src/Makefile
src/clew/Makefile
src/mcl/Makefile
src/gryphon/Makefile
src/impala/Makefile
src/shcl/Makefile
src/shmcl/Makefile
src/shmx/Makefile
src/shmcxquery/Makefile
src/shmcx/Makefile
shed/Makefile
])