1 | define(Major_Version, [1]) |
---|
2 | define(Minor_Version, [5]) |
---|
3 | define(Release_Serial, [0]) |
---|
4 | |
---|
5 | define(Version, [Major_Version].[Minor_Version]) |
---|
6 | AC_INIT([Rappture],[Version],[rappture@nanohub.org]) |
---|
7 | AC_CONFIG_AUX_DIR(cf) |
---|
8 | AC_CONFIG_HEADER(libs/rappture/config.h) |
---|
9 | |
---|
10 | RAPPTURE_MAJOR_VERSION=Major_Version |
---|
11 | RAPPTURE_MINOR_VERSION=Minor_Version |
---|
12 | RAPPTURE_RELEASE_SERIAL=Release_Serial |
---|
13 | RAPPTURE_VERSION=Version |
---|
14 | |
---|
15 | WITH_R=yes |
---|
16 | WITH_JAVA=yes |
---|
17 | WITH_MATLAB=yes |
---|
18 | WITH_MKOCTFILE2=yes |
---|
19 | WITH_MKOCTFILE3=yes |
---|
20 | WITH_OCTAVE=yes |
---|
21 | WITH_PERL=yes |
---|
22 | WITH_PYTHON=yes |
---|
23 | WITH_RUBY=yes |
---|
24 | WITH_RUBY_SITELIBDIR=yes |
---|
25 | WITH_TCL=yes |
---|
26 | |
---|
27 | AC_ARG_WITH( |
---|
28 | [R], |
---|
29 | [AS_HELP_STRING([--with-R[=DIR]], |
---|
30 | [location of R interpreter @<:@default=yes@:>@])], |
---|
31 | [WITH_R=${with_val}], |
---|
32 | [WITH_R=yes]) |
---|
33 | |
---|
34 | AC_ARG_WITH( |
---|
35 | [java], |
---|
36 | [AS_HELP_STRING([--with-java[=DIR]], |
---|
37 | [location of java @<:@default=yes@:>@])], |
---|
38 | [WITH_JAVA=${with_val}], |
---|
39 | [WITH_JAVA=yes]) |
---|
40 | |
---|
41 | AC_ARG_WITH( |
---|
42 | [matlab], |
---|
43 | [AS_HELP_STRING([--with-matlab[=DIR]], |
---|
44 | [location of matlab and mex compiler @<:@default=yes@:>@])], |
---|
45 | [WITH_MATLAB=${with_val}], |
---|
46 | [WITH_MATLAB=yes]) |
---|
47 | |
---|
48 | AC_ARG_WITH( |
---|
49 | [mkoctfile2], |
---|
50 | [AS_HELP_STRING([--with-mkoctfile2[=DIR]], |
---|
51 | [path of octave compiler `mkoctfile' @<:@default=no@:>@])], |
---|
52 | [WITH_MKOCTFILE2=${with_val}], |
---|
53 | [WITH_MKOCTFILE2=no]) |
---|
54 | |
---|
55 | AC_ARG_WITH( |
---|
56 | [mkoctfile3], |
---|
57 | [AS_HELP_STRING([--with-mkoctfile3[=DIR]], |
---|
58 | [path of octave compiler `mkoctfile' @<:@default=no@:>@])], |
---|
59 | [WITH_MKOCTFILE3=${with_val}], |
---|
60 | [WITH_MKOCTFILE3=no]) |
---|
61 | |
---|
62 | AC_ARG_WITH( |
---|
63 | [octave], |
---|
64 | [AS_HELP_STRING([--with-octave[=DIR]], |
---|
65 | [path of default octave compiler `mkoctfile' @<:@default=yes@:>@])], |
---|
66 | [WITH_OCTAVE=${with_val}], |
---|
67 | [with_octave=yes]) |
---|
68 | |
---|
69 | AC_ARG_WITH( |
---|
70 | [perl], |
---|
71 | [AS_HELP_STRING([--with-perl[=DIR]], |
---|
72 | [location of perl library @<:@default=yes@:>@])], |
---|
73 | [WITH_PERL=${with_val}], |
---|
74 | [WITH_PERL=yes]) |
---|
75 | |
---|
76 | AC_ARG_WITH( |
---|
77 | [python], |
---|
78 | [AS_HELP_STRING([--with-python[=DIR]], |
---|
79 | [location of python library @<:@default=yes@:>@])], |
---|
80 | [WITH_PYTHON=${with_val}], |
---|
81 | [WITH_PYTHON=yes]) |
---|
82 | |
---|
83 | AC_ARG_WITH( |
---|
84 | [ruby], |
---|
85 | AC_HELP_STRING( |
---|
86 | --with-ruby=PATH, |
---|
87 | [ path to the ruby interpreter [[ruby]] ]), |
---|
88 | [WITH_RUBY=${with_val}], |
---|
89 | [WITH_RUBY=yes]) |
---|
90 | |
---|
91 | AC_ARG_WITH( |
---|
92 | [ruby_sitelibdir], |
---|
93 | AC_HELP_STRING( |
---|
94 | --with-ruby-sitelibdir=PATH, |
---|
95 | [ path to install ruby scripts [[auto-detect]] ]), |
---|
96 | [WITH_RUBY_SITELIBDIR=${with_val}], |
---|
97 | [WITH_RUBY_SITELIBDIR=NONE ]) |
---|
98 | |
---|
99 | AC_ARG_WITH( |
---|
100 | [tcl], |
---|
101 | [AS_HELP_STRING([--with-tcl[=DIR]], |
---|
102 | [location of tcl library @<:@default=yes@:>@])], |
---|
103 | [WITH_TCL=${with_val}], |
---|
104 | [WITH_TCL=yes]) |
---|
105 | |
---|
106 | AC_ARG_WITH( |
---|
107 | [install], |
---|
108 | [AS_HELP_STRING([--with-install[=DIR]], |
---|
109 | [location of installation @<:@default=yes@:>@])], |
---|
110 | [WITH_INSTALL=${withval}], |
---|
111 | [WITH_INSTALL=yes]) |
---|
112 | |
---|
113 | AC_ARG_WITH( |
---|
114 | [vtk], |
---|
115 | [AS_HELP_STRING([--with-vtk], |
---|
116 | [Build VTK for rappture])], |
---|
117 | [WITH_VTK=${withval}], |
---|
118 | [WITH_VTK=no]) |
---|
119 | |
---|
120 | #------------------------------------------------------------------------ |
---|
121 | # Handle the --prefix=... option |
---|
122 | #------------------------------------------------------------------------ |
---|
123 | |
---|
124 | if test "${prefix}" = "NONE"; then |
---|
125 | prefix=/usr/local |
---|
126 | fi |
---|
127 | if test "${exec_prefix}" = "NONE"; then |
---|
128 | exec_prefix=$prefix |
---|
129 | fi |
---|
130 | |
---|
131 | AC_PROG_INSTALL |
---|
132 | AC_PROG_RANLIB |
---|
133 | AC_PROG_LN_S |
---|
134 | AC_PROG_MKDIR_P |
---|
135 | AC_PROG_MAKE_SET |
---|
136 | |
---|
137 | # Check for C, C++, and FORTRAN |
---|
138 | AC_PROG_CC |
---|
139 | AC_PROG_CXX |
---|
140 | # Avoid g95 |
---|
141 | AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32]) |
---|
142 | |
---|
143 | AC_LANG([C]) |
---|
144 | |
---|
145 | AC_HEADER_STDC |
---|
146 | AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?)) |
---|
147 | |
---|
148 | AC_LANG([C++]) |
---|
149 | AC_PATH_X |
---|
150 | |
---|
151 | # ----------------------------------------------------------------------- |
---|
152 | # |
---|
153 | # Compiler characteristics: |
---|
154 | # Check for existence of types of size_t and pid_t |
---|
155 | # |
---|
156 | # ----------------------------------------------------------------------- |
---|
157 | |
---|
158 | AC_C_BIGENDIAN |
---|
159 | AC_CHECK_SIZEOF(int) |
---|
160 | AC_CHECK_SIZEOF(long) |
---|
161 | AC_CHECK_SIZEOF(long long) |
---|
162 | AC_CHECK_SIZEOF(void *) |
---|
163 | |
---|
164 | SIZEOF_LONG="${ac_cv_sizeof_long}" |
---|
165 | SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" |
---|
166 | SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" |
---|
167 | SIZEOF_INT="${ac_cv_sizeof_int}" |
---|
168 | |
---|
169 | |
---|
170 | AC_CHECK_FUNCS(sysinfo) |
---|
171 | AC_CHECK_FUNCS(gettimeofday) |
---|
172 | AC_CHECK_FUNC(localtime,,AC_MSG_ERROR(oops! no localtime ?!?)) |
---|
173 | AC_CHECK_FUNC(getenv,,AC_MSG_ERROR(oops! no getenv ?!?)) |
---|
174 | |
---|
175 | AC_CHECK_HEADERS(sys/sysinfo.h) |
---|
176 | |
---|
177 | AC_CHECK_LIB(ncurses, clrtoeol,,AC_MSG_ERROR([ncurses library missing?])) |
---|
178 | AC_CHECK_HEADERS(ncurses.h,,AC_MSG_WARN(ncurses headers missing ?)) |
---|
179 | |
---|
180 | AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++)) |
---|
181 | AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?)) |
---|
182 | AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?)) |
---|
183 | AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?)) |
---|
184 | AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?)) |
---|
185 | AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?)) |
---|
186 | AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?)) |
---|
187 | AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?)) |
---|
188 | AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
189 | AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?)) |
---|
190 | AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?)) |
---|
191 | AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?)) |
---|
192 | AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
193 | AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?)) |
---|
194 | AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?)) |
---|
195 | AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?)) |
---|
196 | |
---|
197 | AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?)) |
---|
198 | AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?)) |
---|
199 | AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?)) |
---|
200 | AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?)) |
---|
201 | AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?)) |
---|
202 | AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?)) |
---|
203 | AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?)) |
---|
204 | AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?)) |
---|
205 | AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?)) |
---|
206 | dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?)) |
---|
207 | AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?)) |
---|
208 | AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?)) |
---|
209 | AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?)) |
---|
210 | |
---|
211 | AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?)) |
---|
212 | if test "${ac_cv_header_inttypes_h}" = "yes" ; then |
---|
213 | HAVE_INTTYPES_H=1 |
---|
214 | else |
---|
215 | HAVE_INTTYPES_H=0 |
---|
216 | fi |
---|
217 | |
---|
218 | |
---|
219 | if test "$with_install" != "yes"; then |
---|
220 | INSTALL_PREFIX=$with_install |
---|
221 | else |
---|
222 | INSTALL_PREFIX=$prefix |
---|
223 | fi |
---|
224 | |
---|
225 | if test "${libdir}" != "${prefix}/lib"; then |
---|
226 | LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}" |
---|
227 | else |
---|
228 | LIB_SEARCH_DIRS="-L${libdir}" |
---|
229 | fi |
---|
230 | |
---|
231 | SVN_VERSION=`svnversion $srcdir` |
---|
232 | |
---|
233 | make_command="" |
---|
234 | for m in "$MAKE" make gmake gnumake ; do |
---|
235 | if test "x${m}" != "x" ; then |
---|
236 | if ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then |
---|
237 | make_command=$m; break; |
---|
238 | fi |
---|
239 | fi |
---|
240 | done |
---|
241 | if test "x${make_command}" = "x" ; then |
---|
242 | AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) |
---|
243 | fi |
---|
244 | |
---|
245 | #-------------------------------------------------------------------- |
---|
246 | # Set the default compiler switches based on the --enable-symbols |
---|
247 | # option. |
---|
248 | #-------------------------------------------------------------------- |
---|
249 | |
---|
250 | SC_CONFIG_CFLAGS |
---|
251 | SC_ENABLE_SYMBOLS |
---|
252 | |
---|
253 | AC_SUBST(CFLAGS_DEBUG) |
---|
254 | AC_SUBST(CFLAGS_OPTIMIZE) |
---|
255 | AC_SUBST(HAVE_INTTYPES_H) |
---|
256 | AC_SUBST(INSTALL_PREFIX) |
---|
257 | AC_SUBST(LIB_SEARCH_DIRS) |
---|
258 | AC_SUBST(MAKE, ${make_command}) |
---|
259 | AC_SUBST(SVN_VERSION) |
---|
260 | AC_SUBST(SHLIB_CFLAGS) |
---|
261 | AC_SUBST(SHLIB_LD) |
---|
262 | AC_SUBST(SHLIB_LDFLAGS) |
---|
263 | AC_SUBST(SHLIB_SUFFIX) |
---|
264 | AC_SUBST(SIZEOF_INT) |
---|
265 | AC_SUBST(SIZEOF_LONG) |
---|
266 | AC_SUBST(SIZEOF_LONG_LONG) |
---|
267 | AC_SUBST(SIZEOF_VOID_P) |
---|
268 | AC_SUBST(STLIB_LD) |
---|
269 | AC_SUBST(TCL_INC_SPEC) |
---|
270 | AC_SUBST(TCL_LIB_SPEC) |
---|
271 | AC_SUBST(TCL_CFLAGS_DEBUG) |
---|
272 | AC_SUBST(TCL_CFLAGS_OPTIMIZE) |
---|
273 | AC_SUBST(TCL_SHLIB_CFLAGS) |
---|
274 | AC_SUBST(TCL_SHLIB_LD) |
---|
275 | AC_SUBST(TCL_SHLIB_LDFLAGS) |
---|
276 | AC_SUBST(TCL_SHLIB_SUFFIX) |
---|
277 | AC_SUBST(TK_INC_SPEC) |
---|
278 | AC_SUBST(TK_LIB_SPEC) |
---|
279 | AC_SUBST(TCL_CFLAGS_DEBUG) |
---|
280 | AC_SUBST(TCL_SHLIB_CFLAGS) |
---|
281 | AC_SUBST(TCL_SHLIB_SUFFIX) |
---|
282 | AC_SUBST(TCL_SHLIB_LD) |
---|
283 | AC_SUBST(TCL_SHLIB_LDFLAGS) |
---|
284 | AC_SUBST(TK_XLIBSW) |
---|
285 | AC_SUBST(TK_VERSION) |
---|
286 | AC_SUBST(X_INCLUDES) |
---|
287 | AC_SUBST(X_LIBRARIES) |
---|
288 | AC_SUBST(WORDSIZE) |
---|
289 | AC_SUBST(RAPPTURE_MAJOR_VERSION) |
---|
290 | AC_SUBST(RAPPTURE_MINOR_VERSION) |
---|
291 | AC_SUBST(RAPPTURE_RELEASE_SERIAL) |
---|
292 | AC_SUBST(RAPPTURE_VERSION) |
---|
293 | AC_SUBST(WITH_VTK) |
---|
294 | AC_SUBST(WITH_R) |
---|
295 | AC_SUBST(WITH_JAVA) |
---|
296 | AC_SUBST(WITH_MATLAB) |
---|
297 | AC_SUBST(WITH_MKOCTFILE2) |
---|
298 | AC_SUBST(WITH_MKOCTFILE3) |
---|
299 | AC_SUBST(WITH_OCTAVE) |
---|
300 | AC_SUBST(WITH_PERL) |
---|
301 | AC_SUBST(WITH_PYTHON) |
---|
302 | AC_SUBST(WITH_RUBY) |
---|
303 | AC_SUBST(WITH_RUBY_SITELIBDIR) |
---|
304 | AC_SUBST(WITH_TCL) |
---|
305 | AC_SUBST(WITH_VTK) |
---|
306 | |
---|
307 | dnl read Makefile.in and write Makefile |
---|
308 | AC_CONFIG_FILES([ |
---|
309 | Makefile |
---|
310 | fixrunpaths.tcl |
---|
311 | apps/Makefile |
---|
312 | apps/about |
---|
313 | apps/copy_rappture_examples |
---|
314 | apps/encodedata |
---|
315 | apps/rappture |
---|
316 | apps/rappture-csh.env |
---|
317 | apps/rappture.env |
---|
318 | apps/rappture.use |
---|
319 | apps/rerun |
---|
320 | apps/simsim |
---|
321 | apps/xmldiff |
---|
322 | libs/Makefile |
---|
323 | libs/objects/Makefile |
---|
324 | libs/objects/RpHash.h |
---|
325 | libs/rappture/Makefile |
---|
326 | libs/rappture2/Makefile |
---|
327 | rapptureConfig.sh |
---|
328 | ]) |
---|
329 | AC_OUTPUT |
---|
330 | |
---|