1 | AC_INIT([Rappture],[1.4],[rappture@nanohub.org]) |
---|
2 | AC_CONFIG_AUX_DIR(cf) |
---|
3 | |
---|
4 | RAPPTURE_MAJOR_VERSION=1 |
---|
5 | RAPPTURE_MINOR_VERSION=4 |
---|
6 | RAPPTURE_RELEASE_SERIAL=0 |
---|
7 | |
---|
8 | #------------------------------------------------------------------------ |
---|
9 | # Handle the --prefix=... option |
---|
10 | #------------------------------------------------------------------------ |
---|
11 | |
---|
12 | if test "${prefix}" = "NONE"; then |
---|
13 | prefix=/usr/local |
---|
14 | fi |
---|
15 | if test "${exec_prefix}" = "NONE"; then |
---|
16 | exec_prefix=$prefix |
---|
17 | fi |
---|
18 | |
---|
19 | AC_PROG_INSTALL |
---|
20 | AC_PROG_INSTALL |
---|
21 | AC_PROG_RANLIB |
---|
22 | AC_PROG_LN_S |
---|
23 | AC_PROG_MKDIR_P |
---|
24 | AC_PROG_MAKE_SET |
---|
25 | |
---|
26 | # Check for C, C++, and FORTRAN |
---|
27 | AC_PROG_CC |
---|
28 | AC_PROG_CXX |
---|
29 | # Avoid g95 |
---|
30 | AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32]) |
---|
31 | |
---|
32 | AC_LANG([C]) |
---|
33 | |
---|
34 | AC_HEADER_STDC |
---|
35 | AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?)) |
---|
36 | |
---|
37 | AC_LANG([C++]) |
---|
38 | AC_PATH_X |
---|
39 | |
---|
40 | AC_ARG_WITH( |
---|
41 | [install], |
---|
42 | [AS_HELP_STRING([--with-install[=DIR]], |
---|
43 | [location of installation @<:@default=yes@:>@])], |
---|
44 | [], |
---|
45 | [with_install=yes]) |
---|
46 | |
---|
47 | if test "$with_install" != "yes"; then |
---|
48 | INSTALL_PREFIX=$with_install |
---|
49 | else |
---|
50 | INSTALL_PREFIX=$prefix |
---|
51 | fi |
---|
52 | |
---|
53 | if test "${libdir}" != "${prefix}/lib"; then |
---|
54 | LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}" |
---|
55 | else |
---|
56 | LIB_SEARCH_DIRS="-L${libdir}" |
---|
57 | fi |
---|
58 | |
---|
59 | AC_ARG_WITH( |
---|
60 | [statsdir], |
---|
61 | [AS_HELP_STRING([--with-statsdir=DIR], |
---|
62 | [Write statistics in DIR])], |
---|
63 | [STATSDIR=$withval], |
---|
64 | [STATSDIR="/var/tmp/visservers"]) |
---|
65 | |
---|
66 | |
---|
67 | AC_CHECK_FUNCS(sysinfo) |
---|
68 | AC_CHECK_FUNCS(gettimeofday) |
---|
69 | AC_CHECK_FUNC(localtime,,AC_MSG_ERROR(oops! no localtime ?!?)) |
---|
70 | AC_CHECK_FUNC(getenv,,AC_MSG_ERROR(oops! no getenv ?!?)) |
---|
71 | |
---|
72 | AC_CHECK_HEADERS(sys/sysinfo.h) |
---|
73 | |
---|
74 | AC_CHECK_LIB(ncurses, clrtoeol,,AC_MSG_ERROR([ncurses library missing?])) |
---|
75 | AC_CHECK_HEADERS(ncurses.h,,AC_MSG_WARN(ncurses headers missing ?)) |
---|
76 | |
---|
77 | AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++)) |
---|
78 | AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?)) |
---|
79 | AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?)) |
---|
80 | AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?)) |
---|
81 | AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?)) |
---|
82 | AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?)) |
---|
83 | AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?)) |
---|
84 | AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?)) |
---|
85 | AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
86 | AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?)) |
---|
87 | AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?)) |
---|
88 | AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?)) |
---|
89 | AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
90 | AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?)) |
---|
91 | AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?)) |
---|
92 | AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?)) |
---|
93 | |
---|
94 | AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?)) |
---|
95 | AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?)) |
---|
96 | AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?)) |
---|
97 | AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?)) |
---|
98 | AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?)) |
---|
99 | AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?)) |
---|
100 | AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?)) |
---|
101 | AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?)) |
---|
102 | AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?)) |
---|
103 | dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?)) |
---|
104 | AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?)) |
---|
105 | AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?)) |
---|
106 | AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?)) |
---|
107 | |
---|
108 | AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?)) |
---|
109 | if test "${ac_cv_header_inttypes_h}" = "yes" ; then |
---|
110 | HAVE_INTTYPES_H=1 |
---|
111 | else |
---|
112 | HAVE_INTTYPES_H=0 |
---|
113 | fi |
---|
114 | |
---|
115 | |
---|
116 | SC_CONFIG_CFLAGS |
---|
117 | |
---|
118 | SVN_VERSION=`svnversion $srcdir` |
---|
119 | |
---|
120 | make_command="" |
---|
121 | for m in "$MAKE" make gmake gnumake ; do |
---|
122 | if test "x${m}" != "x" ; then |
---|
123 | if ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then |
---|
124 | make_command=$m; break; |
---|
125 | fi |
---|
126 | fi |
---|
127 | done |
---|
128 | if test "x${make_command}" = "x" ; then |
---|
129 | AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) |
---|
130 | fi |
---|
131 | |
---|
132 | AC_ARG_ENABLE( |
---|
133 | [lang], |
---|
134 | [AS_HELP_STRING([--enable-lang], [build language bindings @<:@default=yes@:>@])], |
---|
135 | [], |
---|
136 | [enable_lang=yes]) |
---|
137 | |
---|
138 | ENABLE_LANG= |
---|
139 | if test "$enable_lang" != "no" ; then |
---|
140 | ENABLE_LANG="yes" |
---|
141 | fi |
---|
142 | |
---|
143 | AC_ARG_ENABLE( |
---|
144 | [gui], |
---|
145 | [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])], |
---|
146 | [], |
---|
147 | [enable_gui=yes]) |
---|
148 | |
---|
149 | ENABLE_GUI= |
---|
150 | if test "$enable_gui" != "no" ; then |
---|
151 | ENABLE_GUI="yes" |
---|
152 | fi |
---|
153 | |
---|
154 | TCL_VERSION="8.5" |
---|
155 | TK_VERSION="8.5" |
---|
156 | |
---|
157 | for dir in \ |
---|
158 | ${exec_prefix} \ |
---|
159 | ${exec_prefix}/lib ; do |
---|
160 | tclconfig="${dir}/tclConfig.sh" |
---|
161 | if test -f "$tclconfig" ; then |
---|
162 | . $tclconfig |
---|
163 | break |
---|
164 | fi |
---|
165 | done |
---|
166 | |
---|
167 | AC_ARG_WITH( |
---|
168 | [ffmpeg], |
---|
169 | [AS_HELP_STRING([--with-ffmpeg[=DIR]], |
---|
170 | [location of ffmpeg @<:@default=yes@:>@])], |
---|
171 | [], |
---|
172 | [with_ffmpeg=yes]) |
---|
173 | |
---|
174 | TCL_INC_SPEC="$TCL_INCLUDE_SPEC" |
---|
175 | |
---|
176 | AC_ARG_WITH( |
---|
177 | [vtk], |
---|
178 | [AS_HELP_STRING([--with-vtk[=version]], |
---|
179 | [VTK library version @<:@default=6.1@:>@])], |
---|
180 | [], |
---|
181 | [with_vtk=yes]) |
---|
182 | |
---|
183 | AC_MSG_CHECKING([for vtk]) |
---|
184 | VTK_VERSION=6.1 |
---|
185 | VTK_TCL_DIR="" |
---|
186 | |
---|
187 | ENABLE_VTK= |
---|
188 | if test "$with_vtk" != "no" ; then |
---|
189 | if test "$with_vtk" != "yes" ; then |
---|
190 | VTK_VERSION=$with_vtk |
---|
191 | fi |
---|
192 | if test "x$with_vtk" != "x" ; then |
---|
193 | ENABLE_VTK=yes |
---|
194 | for path in \ |
---|
195 | $libdir/tcltk \ |
---|
196 | $exec_prefix/lib/tcltk \ |
---|
197 | $prefix/lib/tcltk \ |
---|
198 | $libdir \ |
---|
199 | $prefix/lib \ |
---|
200 | $exec_prefix/lib \ |
---|
201 | /usr/lib |
---|
202 | do |
---|
203 | if test -d "$path/vtk-$VTK_VERSION" ; then |
---|
204 | VTK_TCL_DIR="$path/vtk-$VTK_VERSION" |
---|
205 | fi |
---|
206 | if test "x${VTK_TCL_DIR}" != "x" ; then |
---|
207 | break |
---|
208 | fi |
---|
209 | done |
---|
210 | fi |
---|
211 | else |
---|
212 | if test "${ENABLE_GUI}" = "yes" ; then |
---|
213 | AC_MSG_WARN([VTK missing: Rappture GUI requires VTK for some features]) |
---|
214 | fi |
---|
215 | fi |
---|
216 | AC_MSG_RESULT([$VTK_TCL_DIR]) |
---|
217 | |
---|
218 | AC_ARG_ENABLE( |
---|
219 | [vtkdicom], |
---|
220 | [AS_HELP_STRING([--enable-vtkdicom], |
---|
221 | [Use vtkDICOM package @<:@default=no@:>@])], |
---|
222 | [], |
---|
223 | [enable_vtkdicom=no]) |
---|
224 | |
---|
225 | AC_MSG_CHECKING([for vtkDICOM]) |
---|
226 | ENABLE_VTK_DICOM= |
---|
227 | if test "$enable_vtkdicom" != "no" ; then |
---|
228 | ENABLE_VTK_DICOM="yes" |
---|
229 | fi |
---|
230 | AC_MSG_RESULT([$enable_vtkdicom]) |
---|
231 | |
---|
232 | RP_BASE=`pwd` |
---|
233 | |
---|
234 | SC_ENABLE_SHARED |
---|
235 | |
---|
236 | #-------------------------------------------------------------------- |
---|
237 | # This macro figures out what flags to use with the compiler/linker |
---|
238 | # when building shared/static debug/optimized objects. This information |
---|
239 | # is all taken from the tclConfig.sh file. |
---|
240 | #-------------------------------------------------------------------- |
---|
241 | |
---|
242 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
243 | . ${exec_prefix}/lib/tclConfig.sh |
---|
244 | fi |
---|
245 | if test -f "${exec_prefix}/lib/tkConfig.sh" ; then |
---|
246 | . ${exec_prefix}/lib/tkConfig.sh |
---|
247 | fi |
---|
248 | |
---|
249 | # ----------------------------------------------------------------------- |
---|
250 | # |
---|
251 | # Compiler characteristics: |
---|
252 | # Check for existence of types of size_t and pid_t |
---|
253 | # |
---|
254 | # ----------------------------------------------------------------------- |
---|
255 | |
---|
256 | AC_C_BIGENDIAN |
---|
257 | AC_CHECK_SIZEOF(int) |
---|
258 | AC_CHECK_SIZEOF(long) |
---|
259 | AC_CHECK_SIZEOF(long long) |
---|
260 | AC_CHECK_SIZEOF(void *) |
---|
261 | |
---|
262 | SIZEOF_LONG="${ac_cv_sizeof_long}" |
---|
263 | SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" |
---|
264 | SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" |
---|
265 | SIZEOF_INT="${ac_cv_sizeof_int}" |
---|
266 | |
---|
267 | |
---|
268 | #-------------------------------------------------------------------- |
---|
269 | # Set the default compiler switches based on the --enable-symbols |
---|
270 | # option. |
---|
271 | #-------------------------------------------------------------------- |
---|
272 | |
---|
273 | SC_ENABLE_SYMBOLS |
---|
274 | |
---|
275 | AC_SUBST(CFLAGS_DEBUG) |
---|
276 | AC_SUBST(CFLAGS_OPTIMIZE) |
---|
277 | AC_SUBST(ENABLE_LANG) |
---|
278 | AC_SUBST(ENABLE_GUI) |
---|
279 | AC_SUBST(ENABLE_VTK) |
---|
280 | AC_SUBST(ENABLE_VTK_DICOM) |
---|
281 | AC_SUBST(HAVE_INTTYPES_H) |
---|
282 | AC_SUBST(INSTALL_PREFIX) |
---|
283 | AC_SUBST(LIB_SEARCH_DIRS) |
---|
284 | AC_SUBST(MAKE, ${make_command}) |
---|
285 | AC_SUBST(SVN_VERSION) |
---|
286 | AC_SUBST(RP_BASE) |
---|
287 | AC_SUBST(SHLIB_CFLAGS) |
---|
288 | AC_SUBST(SHLIB_LD) |
---|
289 | AC_SUBST(SHLIB_LDFLAGS) |
---|
290 | AC_SUBST(SHLIB_SUFFIX) |
---|
291 | AC_SUBST(SIZEOF_INT) |
---|
292 | AC_SUBST(SIZEOF_LONG) |
---|
293 | AC_SUBST(SIZEOF_LONG_LONG) |
---|
294 | AC_SUBST(SIZEOF_VOID_P) |
---|
295 | AC_SUBST(STLIB_LD) |
---|
296 | AC_SUBST(TCL_INC_SPEC) |
---|
297 | AC_SUBST(TCL_LIB_SPEC) |
---|
298 | AC_SUBST(TCL_CFLAGS_DEBUG) |
---|
299 | AC_SUBST(TCL_CFLAGS_OPTIMIZE) |
---|
300 | AC_SUBST(TCL_SHLIB_CFLAGS) |
---|
301 | AC_SUBST(TCL_SHLIB_LD) |
---|
302 | AC_SUBST(TCL_SHLIB_LDFLAGS) |
---|
303 | AC_SUBST(TCL_SHLIB_SUFFIX) |
---|
304 | AC_SUBST(TCL_VERSION) |
---|
305 | AC_SUBST(TCL_VERSION) |
---|
306 | AC_SUBST(TK_INC_SPEC) |
---|
307 | AC_SUBST(TK_LIB_SPEC) |
---|
308 | AC_SUBST(TCL_CFLAGS_DEBUG) |
---|
309 | AC_SUBST(TCL_SHLIB_CFLAGS) |
---|
310 | AC_SUBST(TCL_SHLIB_SUFFIX) |
---|
311 | AC_SUBST(TCL_SHLIB_LD) |
---|
312 | AC_SUBST(TCL_SHLIB_LDFLAGS) |
---|
313 | AC_SUBST(TK_XLIBSW) |
---|
314 | AC_SUBST(TK_VERSION) |
---|
315 | AC_SUBST(VTK_TCL_DIR) |
---|
316 | AC_SUBST(VTK_VERSION) |
---|
317 | AC_SUBST(XSUBPP) |
---|
318 | AC_SUBST(STATSDIR) |
---|
319 | AC_SUBST(X_INCLUDES) |
---|
320 | AC_SUBST(X_LIBRARIES) |
---|
321 | AC_SUBST(WORDSIZE) |
---|
322 | AC_SUBST(RAPPTURE_MAJOR_VERSION) |
---|
323 | AC_SUBST(RAPPTURE_MINOR_VERSION) |
---|
324 | AC_SUBST(RAPPTURE_RELEASE_SERIAL) |
---|
325 | |
---|
326 | dnl read Makefile.in and write Makefile |
---|
327 | AC_CONFIG_FILES([ |
---|
328 | Makefile |
---|
329 | fixrunpaths.tcl |
---|
330 | apps/Makefile |
---|
331 | apps/about |
---|
332 | apps/copy_rappture_examples |
---|
333 | apps/encodedata |
---|
334 | apps/rappture |
---|
335 | apps/rappture-csh.env |
---|
336 | apps/rappture.env |
---|
337 | apps/rappture.use |
---|
338 | apps/rerun |
---|
339 | apps/simsim |
---|
340 | apps/xmldiff |
---|
341 | pkgs/DicomToVtk/Makefile |
---|
342 | pkgs/DicomToVtk/pkgIndex.tcl |
---|
343 | pkgs/DxToVtk/Makefile |
---|
344 | pkgs/DxToVtk/pkgIndex.tcl |
---|
345 | pkgs/Makefile |
---|
346 | pkgs/PdbToVtk/Makefile |
---|
347 | pkgs/PdbToVtk/pkgIndex.tcl |
---|
348 | pkgs/builder/Makefile |
---|
349 | pkgs/builder/pkgIndex.tcl |
---|
350 | pkgs/builder/scripts/Makefile |
---|
351 | pkgs/diffview/Makefile |
---|
352 | pkgs/diffview/pkgIndex.tcl |
---|
353 | pkgs/hotspot/Makefile |
---|
354 | pkgs/hotspot/pkgIndex.tcl |
---|
355 | pkgs/listbox/Makefile |
---|
356 | pkgs/listbox/pkgIndex.tcl |
---|
357 | pkgs/objects/Makefile |
---|
358 | pkgs/p2p/Makefile |
---|
359 | pkgs/placard/Makefile |
---|
360 | pkgs/placard/pkgIndex.tcl |
---|
361 | pkgs/readpoints/Makefile |
---|
362 | pkgs/readpoints/pkgIndex.tcl |
---|
363 | pkgs/runner/Makefile |
---|
364 | pkgs/runner/pkgIndex.tcl |
---|
365 | pkgs/runner/scripts/Makefile |
---|
366 | pkgs/squeezer/Makefile |
---|
367 | pkgs/squeezer/pkgIndex.tcl |
---|
368 | pkgs/system/Makefile |
---|
369 | pkgs/system/pkgIndex.tcl |
---|
370 | pkgs/tester/Makefile |
---|
371 | pkgs/tester/pkgIndex.tcl |
---|
372 | pkgs/tester/scripts/Makefile |
---|
373 | ]) |
---|
374 | AC_OUTPUT |
---|
375 | |
---|