1 | |
---|
2 | AC_INIT([Rappture],[1.1],[rappture@nanohub.org]) |
---|
3 | dnl AC_CONFIG_HEADER(src/core/RpConfig.h) |
---|
4 | AC_CONFIG_AUX_DIR(cf) |
---|
5 | AC_CONFIG_HEADER(src/core/config.h) |
---|
6 | |
---|
7 | with_tclsh=yes |
---|
8 | |
---|
9 | #------------------------------------------------------------------------ |
---|
10 | # Handle the --prefix=... option |
---|
11 | #------------------------------------------------------------------------ |
---|
12 | |
---|
13 | if test "${prefix}" = "NONE"; then |
---|
14 | prefix=/usr/local |
---|
15 | fi |
---|
16 | if test "${exec_prefix}" = "NONE"; then |
---|
17 | exec_prefix=$prefix |
---|
18 | fi |
---|
19 | |
---|
20 | AC_ARG_WITH( |
---|
21 | [install], |
---|
22 | [AS_HELP_STRING([--with-install[=DIR]], |
---|
23 | [location of installation @<:@default=yes@:>@])], |
---|
24 | [], |
---|
25 | [with_install=yes]) |
---|
26 | if test "$with_install" != "yes"; then |
---|
27 | INSTALL_PREFIX=$with_install |
---|
28 | else |
---|
29 | INSTALL_PREFIX=$prefix |
---|
30 | fi |
---|
31 | AC_SUBST(INSTALL_PREFIX) |
---|
32 | |
---|
33 | |
---|
34 | if test "${libdir}" != "${prefix}/lib"; then |
---|
35 | LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}" |
---|
36 | else |
---|
37 | LIB_SEARCH_DIRS="-L${libdir}" |
---|
38 | fi |
---|
39 | |
---|
40 | AC_SUBST(LIB_SEARCH_DIRS) |
---|
41 | |
---|
42 | AC_PROG_INSTALL |
---|
43 | AC_PROG_INSTALL |
---|
44 | AC_PROG_RANLIB |
---|
45 | AC_PROG_LN_S |
---|
46 | AC_PROG_MKDIR_P |
---|
47 | AC_PROG_MAKE_SET |
---|
48 | |
---|
49 | # Check for C, C++, and FORTRAN |
---|
50 | AC_PROG_CC |
---|
51 | AC_PROG_CXX |
---|
52 | # Avoid g95 |
---|
53 | AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32]) |
---|
54 | |
---|
55 | AC_LANG([C]) |
---|
56 | |
---|
57 | AC_HEADER_STDC |
---|
58 | AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?)) |
---|
59 | |
---|
60 | AC_LANG([C++]) |
---|
61 | |
---|
62 | AC_CHECK_FUNCS([sysinfo]) |
---|
63 | AC_CHECK_HEADERS(sys/sysinfo.h) |
---|
64 | |
---|
65 | AC_CHECK_LIB(m, main,,AC_MSG_ERROR(librappture requires libm)) |
---|
66 | AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++)) |
---|
67 | AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?)) |
---|
68 | AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?)) |
---|
69 | AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?)) |
---|
70 | AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?)) |
---|
71 | AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?)) |
---|
72 | AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?)) |
---|
73 | AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?)) |
---|
74 | AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
75 | AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?)) |
---|
76 | AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?)) |
---|
77 | AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?)) |
---|
78 | AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
79 | AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?)) |
---|
80 | AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?)) |
---|
81 | AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?)) |
---|
82 | |
---|
83 | AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?)) |
---|
84 | AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?)) |
---|
85 | AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?)) |
---|
86 | AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?)) |
---|
87 | AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?)) |
---|
88 | AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?)) |
---|
89 | AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?)) |
---|
90 | AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?)) |
---|
91 | AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?)) |
---|
92 | dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?)) |
---|
93 | AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?)) |
---|
94 | AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?)) |
---|
95 | AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?)) |
---|
96 | |
---|
97 | AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?)) |
---|
98 | if test "${ac_cv_header_inttypes_h}" = "yes" ; then |
---|
99 | HAVE_INTTYPES_H=1 |
---|
100 | else |
---|
101 | HAVE_INTTYPES_H=0 |
---|
102 | fi |
---|
103 | AC_SUBST(HAVE_INTTYPES_H) |
---|
104 | |
---|
105 | |
---|
106 | SC_CONFIG_CFLAGS |
---|
107 | |
---|
108 | make_command="" |
---|
109 | for m in "$MAKE" make gmake gnumake ; do |
---|
110 | if test "x${m}" != "x" ; then |
---|
111 | if ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then |
---|
112 | make_command=$m; break; |
---|
113 | fi |
---|
114 | fi |
---|
115 | done |
---|
116 | if test "x${make_command}" = "x" ; then |
---|
117 | AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) |
---|
118 | fi |
---|
119 | AC_SUBST(MAKE, ${make_command}) |
---|
120 | |
---|
121 | AC_ARG_ENABLE( |
---|
122 | [gui], |
---|
123 | [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])], |
---|
124 | [], |
---|
125 | [enable_gui=yes]) |
---|
126 | |
---|
127 | ENABLE_GUI= |
---|
128 | if test "$enable_gui" != "no" ; then |
---|
129 | ENABLE_GUI="yes" |
---|
130 | fi |
---|
131 | AC_SUBST(ENABLE_GUI) |
---|
132 | |
---|
133 | TCL_VERSION="8.4" |
---|
134 | for dir in \ |
---|
135 | ${exec_prefix} \ |
---|
136 | ${exec_prefix}/lib ; do |
---|
137 | tclconfig="${dir}/tclConfig.sh" |
---|
138 | if test -f "$tclconfig" ; then |
---|
139 | . $tclconfig |
---|
140 | break |
---|
141 | fi |
---|
142 | done |
---|
143 | |
---|
144 | |
---|
145 | rp_with_tclsh="yes" |
---|
146 | AC_ARG_WITH( |
---|
147 | [tclsh], |
---|
148 | [AS_HELP_STRING([--with-tclsh[=DIR]], |
---|
149 | [location of tclsh @<:@default=yes@:>@])], |
---|
150 | [rp_with_tclsh=$withval], |
---|
151 | [rp_with_tclsh=yes]) |
---|
152 | |
---|
153 | TCLSH="" |
---|
154 | if test "${rp_with_tclsh}" != "no" ; then |
---|
155 | tclsh="tclsh${TCL_VERSION}" |
---|
156 | if test "${rp_with_tclsh}" = "yes" ; then |
---|
157 | AC_PATH_PROG(TCLSH, ${tclsh}, [], [${exec_prefix}/bin:${PATH}]) |
---|
158 | else |
---|
159 | AC_PATH_PROG(TCLSH, ${tclsh}, [], [${rp_with_tclsh}/bin:${rp_with_tclsh}]) |
---|
160 | fi |
---|
161 | if test "x${TCLSH}" = "x" ; then |
---|
162 | AC_ERROR([can't find tclsh]) |
---|
163 | fi |
---|
164 | fi |
---|
165 | AC_SUBST(TCLSH) |
---|
166 | |
---|
167 | |
---|
168 | TCL_INC_SPEC="$TCL_INCLUDE_SPEC" |
---|
169 | |
---|
170 | AC_SUBST(TCL_VERSION) |
---|
171 | AC_SUBST(TCL_INC_SPEC) |
---|
172 | AC_SUBST(TCL_LIB_SPEC) |
---|
173 | |
---|
174 | AC_ARG_WITH( |
---|
175 | [vtk], |
---|
176 | [AS_HELP_STRING([--with-vtk[=DIR]], |
---|
177 | [location of vtk library @<:@default=yes@:>@])], |
---|
178 | [rp_with_vtk=$withval], [rp_with_vtk=yes]) |
---|
179 | |
---|
180 | AC_MSG_CHECKING([for vtk]) |
---|
181 | VTKDIR="" |
---|
182 | |
---|
183 | if test "$rp_with_vtk" != "no" ; then |
---|
184 | if test "$rp_with_vtk" = "yes" ; then |
---|
185 | for path in \ |
---|
186 | $libdir \ |
---|
187 | $prefix/lib \ |
---|
188 | $exec_prefix/lib \ |
---|
189 | /usr/lib |
---|
190 | do |
---|
191 | for vtk in $path/vtk-* ; do |
---|
192 | if test -d "${vtk}" ; then |
---|
193 | VTKDIR=${vtk} |
---|
194 | fi |
---|
195 | done |
---|
196 | if test "x${VTKDIR}" != "x" ; then |
---|
197 | break |
---|
198 | fi |
---|
199 | done |
---|
200 | fi |
---|
201 | fi |
---|
202 | AC_SUBST(VTKDIR) |
---|
203 | AC_MSG_RESULT([$VTKDIR]) |
---|
204 | |
---|
205 | |
---|
206 | AC_ARG_WITH( |
---|
207 | [matlab], |
---|
208 | [AS_HELP_STRING([--with-matlab[=DIR]], |
---|
209 | [location of matlab and mex compiler @<:@default=yes@:>@])], |
---|
210 | [rp_with_matlab=$withval], |
---|
211 | [rp_with_matlab=yes]) |
---|
212 | |
---|
213 | MCC="" |
---|
214 | MEX="" |
---|
215 | MEX_ARCH="" |
---|
216 | MEXEXT="" |
---|
217 | MATLAB= |
---|
218 | if test "$rp_with_matlab" != "no" ; then |
---|
219 | if test "$rp_with_matlab" = "yes" ; then |
---|
220 | AC_PATH_PROG(MATLAB, matlab) |
---|
221 | else |
---|
222 | AC_PATH_PROG(MATLAB, matlab, [], [${rp_with_matlab}/bin:${rp_with_matlab}]) |
---|
223 | fi |
---|
224 | fi |
---|
225 | |
---|
226 | if test "x$MATLAB" != "x" ; then |
---|
227 | # Found matlab. May be a symlink to the real binary. Run "matlab -e" |
---|
228 | # to tell where matlab is installed. |
---|
229 | |
---|
230 | matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin |
---|
231 | |
---|
232 | # Now see if we can find "mex" or "mexext" there. |
---|
233 | AC_PATH_PROG(MEX, mex, [], [${matlab_bindir}]) |
---|
234 | AC_PATH_PROG(MEXEXT, mexext, [], [${matlab_bindir}]) |
---|
235 | |
---|
236 | # Run "mexext" to get the expected module extension for this platform. |
---|
237 | AC_MSG_CHECKING([for mex extension]) |
---|
238 | if test "x$MEXEXT" != "x" ; then |
---|
239 | MEXEXT=`$MEXEXT` |
---|
240 | else |
---|
241 | MEXEXT="mexglx" |
---|
242 | fi |
---|
243 | AC_MSG_RESULT([$MEXEXT]) |
---|
244 | AC_PATH_PROG(MCC, mcc, [], [${matlab_bindir}]) |
---|
245 | AC_MSG_CHECKING([for mcc extension]) |
---|
246 | fi |
---|
247 | |
---|
248 | AC_SUBST(MCC) |
---|
249 | AC_SUBST(MEX) |
---|
250 | AC_SUBST(MATLAB) |
---|
251 | AC_SUBST(MEX_ARCH) |
---|
252 | AC_SUBST(MEXEXT) |
---|
253 | |
---|
254 | # Standard octave search (use the installed version of octave) |
---|
255 | AC_ARG_WITH( |
---|
256 | [octave], |
---|
257 | [AS_HELP_STRING([--with-octave[=DIR]], |
---|
258 | [location of octave compiler MKOCTFILE @<:@default=yes@:>@])], |
---|
259 | [rp_with_octave=$withval], |
---|
260 | [rp_with_octave=yes]) |
---|
261 | |
---|
262 | OCTAVE= |
---|
263 | OCTAVE2= |
---|
264 | OCTAVE3= |
---|
265 | OCTAVE_VERSION= |
---|
266 | OCTAVE_VERSION_MAJOR= |
---|
267 | MKOCTFILE= |
---|
268 | MKOCTFILE2= |
---|
269 | MKOCTFILE3= |
---|
270 | if test "$rp_with_octave" != "no" ; then |
---|
271 | if test "$rp_with_octave" = "yes" ; then |
---|
272 | AC_PATH_PROG(OCTAVE, octave) |
---|
273 | AC_PATH_PROG(MKOCTFILE, mkoctfile) |
---|
274 | else |
---|
275 | MKOCTFILE=$rp_with_octave |
---|
276 | OCTAVE=$rp_with_octave |
---|
277 | fi |
---|
278 | fi |
---|
279 | if test "x${OCTAVE}" != "x" ; then |
---|
280 | OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4` |
---|
281 | OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1` |
---|
282 | if test "${OCTAVE_VERSION_MAJOR}" == "3" ; then |
---|
283 | OCTAVE3=$OCTAVE |
---|
284 | MKOCTFILE3=$MKOCTFILE |
---|
285 | fi |
---|
286 | if test "${OCTAVE_VERSION_MAJOR}" == "2" ; then |
---|
287 | OCTAVE2=$OCTAVE |
---|
288 | MKOCTFILE2=$MKOCTFILE |
---|
289 | fi |
---|
290 | fi |
---|
291 | |
---|
292 | # Check if octave2 was designated *in addition* to the installed version. |
---|
293 | AC_ARG_WITH( |
---|
294 | [octave2], |
---|
295 | [AS_HELP_STRING([--with-octave2[=DIR]], |
---|
296 | [location of octave compiler MKOCTFILE @<:@default=no@:>@])], |
---|
297 | [rp_with_octave2=$withval], |
---|
298 | [rp_with_octave2=no]) |
---|
299 | |
---|
300 | if test "$rp_with_octave2" != "no" ; then |
---|
301 | if test "$rp_with_octave2" = "yes" ; then |
---|
302 | AC_PATH_PROG(octave2, octave) |
---|
303 | AC_PATH_PROG(mkoctfile2, mkoctfile) |
---|
304 | else |
---|
305 | octave2=$rp_with_octave2 |
---|
306 | mkoctfile2=`dirname $rp_with_octave2`/mkoctfile |
---|
307 | fi |
---|
308 | fi |
---|
309 | if test "x${octave2}" != "x" ; then |
---|
310 | version=`${octave2} -v | grep version | cut -d' ' -f4` |
---|
311 | version_major=`echo ${version} | cut -d'.' -f1` |
---|
312 | if test "$version_major" = "2" ; then |
---|
313 | OCTAVE2=$octave2 |
---|
314 | MKOCTFILE2=$mkoctfile2 |
---|
315 | fi |
---|
316 | fi |
---|
317 | |
---|
318 | # Check if octave3 was designated *in addition* to the installed version. |
---|
319 | |
---|
320 | AC_ARG_WITH( |
---|
321 | [octave3], |
---|
322 | [AS_HELP_STRING([--with-octave3[=DIR]], |
---|
323 | [location of octave compiler MKOCTFILE @<:@default=no@:>@])], |
---|
324 | [rp_with_octave3=$withval], |
---|
325 | [rp_with_octave3=no]) |
---|
326 | |
---|
327 | if test "$rp_with_octave3" != "no" ; then |
---|
328 | if test "$rp_with_octave3" = "yes" ; then |
---|
329 | AC_PATH_PROG(octave3, octave) |
---|
330 | AC_PATH_PROG(mkoctfile3, mkoctfile) |
---|
331 | else |
---|
332 | octave3=$rp_with_octave3 |
---|
333 | mkoctfile3=`dirname $rp_with_octave3`/mkoctfile |
---|
334 | fi |
---|
335 | fi |
---|
336 | |
---|
337 | if test "x${octave3}" != "x" ; then |
---|
338 | version=`${octave3} -v | grep version | cut -d' ' -f4` |
---|
339 | version_major=`echo ${version} | cut -d'.' -f1` |
---|
340 | if test "$version_major" = "3" ; then |
---|
341 | OCTAVE3=$rp_with_octave3 |
---|
342 | MKOCTFILE3=$mkoctfile3 |
---|
343 | fi |
---|
344 | fi |
---|
345 | |
---|
346 | AC_SUBST(OCTAVE2) |
---|
347 | AC_SUBST(OCTAVE3) |
---|
348 | AC_SUBST(OCTAVE) |
---|
349 | AC_SUBST(OCTAVE_VERSION) |
---|
350 | AC_SUBST(OCTAVE_VERSION_MAJOR) |
---|
351 | AC_SUBST(MKOCTFILE) |
---|
352 | AC_SUBST(MKOCTFILE2) |
---|
353 | AC_SUBST(MKOCTFILE3) |
---|
354 | |
---|
355 | AC_ARG_WITH( |
---|
356 | [perl], |
---|
357 | [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])], |
---|
358 | [], |
---|
359 | [rp_with_perl=yes]) |
---|
360 | |
---|
361 | PERL= |
---|
362 | PERL_INCLUDES= |
---|
363 | PERL_ARCHLIB= |
---|
364 | PERL_ARCHLIBEXP= |
---|
365 | PERL_VERSION= |
---|
366 | PERL_VENDORLIB= |
---|
367 | PERL_PRIVLIB= |
---|
368 | PERL_CPPFLAGS= |
---|
369 | PERL_CCFlAGS= |
---|
370 | PERL_VERSION_RV= |
---|
371 | PERL_LIBSPEC= |
---|
372 | if test "$rp_with_perl" != "no" ; then |
---|
373 | if test "$rp_with_perl" != "yes" ; then |
---|
374 | AC_PATH_PROG(PERL, perl, [], [$rp_with_perl/bin:$rp_with_perl]) |
---|
375 | else |
---|
376 | AC_PATH_PROG(PERL, perl) |
---|
377 | fi |
---|
378 | if test "x${PERL}" != "x" ; then |
---|
379 | PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'` |
---|
380 | PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'` |
---|
381 | PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'` |
---|
382 | PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'` |
---|
383 | PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'` |
---|
384 | PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'` |
---|
385 | PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'` |
---|
386 | PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'` |
---|
387 | PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2` |
---|
388 | # libperl may or may not be installed. Check for its existence. |
---|
389 | if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then |
---|
390 | PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl" |
---|
391 | fi |
---|
392 | fi |
---|
393 | fi |
---|
394 | AC_SUBST(PERL) |
---|
395 | AC_SUBST(PERL_INCLUDES) |
---|
396 | AC_SUBST(PERL_ARCHLIB) |
---|
397 | AC_SUBST(PERL_ARCHLIBEXP) |
---|
398 | AC_SUBST(PERL_VERSION) |
---|
399 | AC_SUBST(PERL_CCFLAGS) |
---|
400 | AC_SUBST(PERL_CPPFLAGS) |
---|
401 | AC_SUBST(PERL_VENDORLIB) |
---|
402 | AC_SUBST(PERL_PRIVLIB) |
---|
403 | AC_SUBST(PERL_INSTALLARCHLIB) |
---|
404 | AC_SUBST(PERL_VERSION_RV) |
---|
405 | AC_SUBST(PERL_LIBSPEC) |
---|
406 | |
---|
407 | PYTHON="" |
---|
408 | PYTHON_CFLAGS="" |
---|
409 | PYTHON_CPPFLAGS="" |
---|
410 | PYTHON_DISTUTILS="" |
---|
411 | PYTHON_INCLUDES="" |
---|
412 | PYTHON_LDFLAGS="" |
---|
413 | PYTHON_LIB="" |
---|
414 | PYTHON_LIBDIR="" |
---|
415 | PYTHON_SITE_DIR="" |
---|
416 | PYTHON_SITE_PACKAGES="" |
---|
417 | PYTHON_VERSION="" |
---|
418 | pythondir="" |
---|
419 | |
---|
420 | AC_ARG_WITH([python], |
---|
421 | [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=yes@:>@])], |
---|
422 | [], |
---|
423 | [rp_with_python=yes]) |
---|
424 | |
---|
425 | if test "$rp_with_python" != "no" ; then |
---|
426 | if test "$rp_with_python" = "yes" ; then |
---|
427 | AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) |
---|
428 | else |
---|
429 | AC_PATH_PROG(PYTHON, python, [], [${rp_with_python}/bin:${rp_with_python}]) |
---|
430 | fi |
---|
431 | AC_MSG_CHECKING([for Python version]) |
---|
432 | if test "x${PYTHON}" != "x"; then |
---|
433 | PYTHON_VERSION=`${PYTHON} -c "import sys; print sys.version[[0:3]]"` |
---|
434 | fi |
---|
435 | AC_MSG_RESULT([$PYTHON_VERSION]) |
---|
436 | fi |
---|
437 | |
---|
438 | if test "x${PYTHON_VERSION}" != "x"; then |
---|
439 | PYTHON_INCLUDES=$incdir |
---|
440 | AC_MSG_CHECKING([for Python distutils]) |
---|
441 | PYTHON_DISTUTILS="" |
---|
442 | ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \ |
---|
443 | build build_ext 2>&1 > /dev/null |
---|
444 | if test $? = 0 ; then |
---|
445 | PYTHON_DISTUTILS="yes" |
---|
446 | fi |
---|
447 | AC_MSG_RESULT([$PYTHON_DISTUTILS]) |
---|
448 | if test "${PYTHON_DISTUTILS}" = "yes" ; then |
---|
449 | PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` |
---|
450 | # |
---|
451 | # Check for Python include path |
---|
452 | # |
---|
453 | AC_MSG_CHECKING([path to Python headers]) |
---|
454 | PYTHON_INCDIR=`${PYTHON} -c "import distutils.sysconfig; \ |
---|
455 | print distutils.sysconfig.get_python_inc();"` |
---|
456 | AC_MSG_RESULT([$PYTHON_INCDIR]) |
---|
457 | # |
---|
458 | # Python distutils found, get settings from python directly |
---|
459 | # |
---|
460 | PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`" |
---|
461 | |
---|
462 | PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`" |
---|
463 | PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`" |
---|
464 | PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`" |
---|
465 | PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`" |
---|
466 | save_CPPFLAGS=$CPPFLAGS |
---|
467 | CPPFLAGS="$CPPFLAGS -I${PYTHON_INCDIR}" |
---|
468 | AC_CHECK_HEADERS([Python.h], [found=yes], [found=no]) |
---|
469 | CPPFLAGS=$save_CPPFLAGS |
---|
470 | if test "$found" = "no" ; then |
---|
471 | PYTHON_DISTUTILS="" |
---|
472 | fi |
---|
473 | fi |
---|
474 | fi |
---|
475 | |
---|
476 | AC_SUBST(PYTHON) |
---|
477 | AC_SUBST(PYTHON_VERSION) |
---|
478 | AC_SUBST(PYTHON_INCLUDES) |
---|
479 | AC_SUBST(PYTHON_CFLAGS) |
---|
480 | AC_SUBST(PYTHON_INCDIR) |
---|
481 | AC_SUBST(PYTHON_LDFLAGS) |
---|
482 | AC_SUBST(PYTHON_LIB) |
---|
483 | AC_SUBST(PYTHON_SITE_DIR) |
---|
484 | AC_SUBST(PYTHON_LIBDIR) |
---|
485 | AC_SUBST(PYTHON_SITE_PACKAGES) |
---|
486 | AC_SUBST(PYTHON_DISTUTILS) |
---|
487 | |
---|
488 | rp_with_ruby="yes" |
---|
489 | |
---|
490 | RUBY="" |
---|
491 | RUBY_DEV_PKG="no" |
---|
492 | |
---|
493 | AC_ARG_WITH( |
---|
494 | [ruby], |
---|
495 | [AS_HELP_STRING([--with-ruby=DIR], [location of ruby @<:@default=yes@:>@])], |
---|
496 | [rp_with_ruby=$withval]) |
---|
497 | |
---|
498 | if test "${rp_with_ruby}" != "no" ; then |
---|
499 | if test "${rp_with_ruby}" = "yes" ; then |
---|
500 | AC_PATH_PROG(RUBY, ruby) |
---|
501 | else |
---|
502 | AC_PATH_PROG(RUBY, ruby, [], [${rp_with_ruby}/bin:${rp_with_ruby}]) |
---|
503 | fi |
---|
504 | fi |
---|
505 | AC_SUBST(RUBY) |
---|
506 | |
---|
507 | RUBY_VERSION_RV= |
---|
508 | RUBY_PLATFORM= |
---|
509 | if test "x${RUBY}" != "x" ; then |
---|
510 | AX_PROG_RUBY_VERSION |
---|
511 | RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2` |
---|
512 | RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'` |
---|
513 | ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1` |
---|
514 | if test -z "$ac_mkmf_result"; then |
---|
515 | HAVE_RUBY_DEVEL="yes" |
---|
516 | AX_RUBY_DEV_FLAGS([${RUBY}]) |
---|
517 | fi |
---|
518 | fi |
---|
519 | AC_SUBST(HAVE_RUBY_DEVEL) |
---|
520 | AC_SUBST(RUBY_VERSION_RV) |
---|
521 | AC_SUBST(RUBY_PLATFORM) |
---|
522 | |
---|
523 | rp_with_java="yes" |
---|
524 | JAVA="" |
---|
525 | JAVAH="" |
---|
526 | JAVAC="" |
---|
527 | JAVA_DEV_PKG="no" |
---|
528 | AC_ARG_WITH( |
---|
529 | [java], |
---|
530 | [AS_HELP_STRING([--with-java=DIR], [location of java @<:@default=yes@:>@])], |
---|
531 | [rp_with_java=$withval]) |
---|
532 | |
---|
533 | if test "${rp_with_java}" != "no" ; then |
---|
534 | if test "${rp_with_java}" = "yes" ; then |
---|
535 | AC_PATH_PROG(JAVA, java) |
---|
536 | AC_PATH_PROG(JAVAC, javac) |
---|
537 | AC_PATH_PROG(JAVAH, javah) |
---|
538 | else |
---|
539 | AC_PATH_PROG(JAVA, java, [], [${rp_with_java}/bin:${rp_with_java}]) |
---|
540 | AC_PATH_PROG(JAVAC, javac, [], [${rp_with_java}/bin:${rp_with_java}]) |
---|
541 | AC_PATH_PROG(JAVAH, javah, [], [${rp_with_java}/bin:${rp_with_java}]) |
---|
542 | fi |
---|
543 | fi |
---|
544 | JDK= |
---|
545 | JAVA_HOME= |
---|
546 | JAVA_INC_DIR= |
---|
547 | JAVA_INC_SPEC= |
---|
548 | |
---|
549 | # If java exists, let's look for the jni.h file. |
---|
550 | if test "x${JAVA}" != "x" ; then |
---|
551 | for d in \ |
---|
552 | /apps/java/jdk1.6.0_01 \ |
---|
553 | /usr/lib/jvm/*sun-1.6* \ |
---|
554 | /opt/sun-jdk-1.6* \ |
---|
555 | /opt/icedtea6-* \ |
---|
556 | /opt/sun-jdk-1.5* \ |
---|
557 | /usr/lib/jvm/*sun-1.5* |
---|
558 | do |
---|
559 | if test -r "${d}/include/jni.h" ; then |
---|
560 | JDK=${d} |
---|
561 | break; |
---|
562 | fi |
---|
563 | done |
---|
564 | JAVA_HOME=$JDK |
---|
565 | JAVA_INC_DIR=${JDK}/include |
---|
566 | JAVA_INC_SPEC="-I${JDK}/include -I${JDK}/include/linux" |
---|
567 | fi |
---|
568 | |
---|
569 | AC_SUBST(JAVA) |
---|
570 | AC_SUBST(JAVAC) |
---|
571 | AC_SUBST(JAVAH) |
---|
572 | AC_SUBST(JAVA_HOME) |
---|
573 | AC_SUBST(JAVA_INC_DIR) |
---|
574 | AC_SUBST(JAVA_INC_SPEC) |
---|
575 | |
---|
576 | RP_BASE=`pwd` |
---|
577 | AC_SUBST(RP_BASE) |
---|
578 | |
---|
579 | SC_ENABLE_SHARED |
---|
580 | |
---|
581 | #-------------------------------------------------------------------- |
---|
582 | # This macro figures out what flags to use with the compiler/linker |
---|
583 | # when building shared/static debug/optimized objects. This information |
---|
584 | # is all taken from the tclConfig.sh file. |
---|
585 | #-------------------------------------------------------------------- |
---|
586 | |
---|
587 | AC_SUBST(CFLAGS_DEBUG) |
---|
588 | AC_SUBST(CFLAGS_OPTIMIZE) |
---|
589 | AC_SUBST(STLIB_LD) |
---|
590 | AC_SUBST(SHLIB_LD) |
---|
591 | AC_SUBST(SHLIB_CFLAGS) |
---|
592 | AC_SUBST(SHLIB_LDFLAGS) |
---|
593 | AC_SUBST(SHLIB_SUFFIX) |
---|
594 | |
---|
595 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
596 | . ${exec_prefix}/lib/tclConfig.sh |
---|
597 | fi |
---|
598 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
599 | . ${exec_prefix}/lib/tkConfig.sh |
---|
600 | fi |
---|
601 | AC_SUBST(TCL_VERSION) |
---|
602 | AC_SUBST(TK_VERSION) |
---|
603 | |
---|
604 | # ----------------------------------------------------------------------- |
---|
605 | # |
---|
606 | # Compiler characteristics: |
---|
607 | # Check for existence of types of size_t and pid_t |
---|
608 | # |
---|
609 | # ----------------------------------------------------------------------- |
---|
610 | |
---|
611 | AC_C_BIGENDIAN |
---|
612 | AC_CHECK_SIZEOF(int) |
---|
613 | AC_CHECK_SIZEOF(long) |
---|
614 | AC_CHECK_SIZEOF(long long) |
---|
615 | AC_CHECK_SIZEOF(void *) |
---|
616 | |
---|
617 | SIZEOF_LONG="${ac_cv_sizeof_long}" |
---|
618 | SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" |
---|
619 | SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" |
---|
620 | SIZEOF_INT="${ac_cv_sizeof_int}" |
---|
621 | AC_SUBST(SIZEOF_INT) |
---|
622 | AC_SUBST(SIZEOF_LONG) |
---|
623 | AC_SUBST(SIZEOF_LONG_LONG) |
---|
624 | AC_SUBST(SIZEOF_VOID_P) |
---|
625 | |
---|
626 | |
---|
627 | #-------------------------------------------------------------------- |
---|
628 | # Set the default compiler switches based on the --enable-symbols |
---|
629 | # option. |
---|
630 | #-------------------------------------------------------------------- |
---|
631 | |
---|
632 | SC_ENABLE_SYMBOLS |
---|
633 | |
---|
634 | |
---|
635 | #-------------------------------------------------------------------- |
---|
636 | # search for ffmpeg libraries libavcodec, libavformat, libswscale |
---|
637 | #-------------------------------------------------------------------- |
---|
638 | |
---|
639 | AC_CHECK_HEADERS(ffmpeg/avcodec.h,[],[], |
---|
640 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
641 | #ifdef HAVE_FFMPEG_AVCODEC_H |
---|
642 | # include <ffmpeg/avcodec.h> |
---|
643 | #endif |
---|
644 | ]]) |
---|
645 | |
---|
646 | AC_CHECK_HEADERS(libavcodec/avcodec.h,[],[], |
---|
647 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
648 | #ifdef HAVE_LIBAVCODEC_AVCODEC_H |
---|
649 | # include <libavcodec/avcodec.h> |
---|
650 | #endif |
---|
651 | ]]) |
---|
652 | |
---|
653 | AC_CHECK_HEADERS([ffmpeg/avformat.h],[],[], |
---|
654 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
655 | #ifdef HAVE_FFMPEG_AVFORMAT_H |
---|
656 | # include <ffmpeg/avformat.h> |
---|
657 | #endif |
---|
658 | ]]) |
---|
659 | |
---|
660 | AC_CHECK_HEADERS([libavformat/avformat.h],[],[], |
---|
661 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
662 | #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H |
---|
663 | # include <libavformat/avformat.h> |
---|
664 | #endif |
---|
665 | ]]) |
---|
666 | |
---|
667 | AC_CHECK_HEADERS([ffmpeg/avutil.h],[],[], |
---|
668 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
669 | #ifdef HAVE_FFMPEG_AVUTIL_H |
---|
670 | # include <ffmpeg/avutil.h> |
---|
671 | #endif |
---|
672 | ]]) |
---|
673 | |
---|
674 | AC_CHECK_HEADERS([libavutil/avutil.h],[],[], |
---|
675 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
676 | #ifdef HAVE_LIBAVUTIL_AVUTIL_H |
---|
677 | # include <libavutil/avutil.h> |
---|
678 | #endif |
---|
679 | ]]) |
---|
680 | |
---|
681 | AC_CHECK_HEADERS([ffmpeg/swscale.h],[],[], |
---|
682 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
683 | #ifdef HAVE_FFMPEG_SWSCALE_H |
---|
684 | # include <ffmpeg/swscale.h> |
---|
685 | #endif |
---|
686 | ]]) |
---|
687 | |
---|
688 | AC_CHECK_HEADERS([libswscale/swscale.h],[],[], |
---|
689 | [[#define __STDC_CONSTANT_MACROS 1 |
---|
690 | #ifdef HAVE_LIBSWSCALE_SWSCALE_H |
---|
691 | # include <libswscale/swscale.h> |
---|
692 | #endif |
---|
693 | ]]) |
---|
694 | |
---|
695 | HAVE_FFMPEG_LIBS="" |
---|
696 | if [[ \( "${ac_cv_header_ffmpeg_avcodec_h}" = "yes" -o \ |
---|
697 | "${ac_cv_header_libavcodec_avcodec_h}" = "yes" \) -a \ |
---|
698 | \( "${ac_cv_header_ffmpeg_avformat_h}" = "yes" -o \ |
---|
699 | "${ac_cv_header_libavformat_avformat_h}" = "yes" \) -a \ |
---|
700 | \( "${ac_cv_header_ffmpeg_avutil_h}" = "yes" -o \ |
---|
701 | "${ac_cv_header_libavutil_avutil_h}" = "yes" \) -a \ |
---|
702 | \( "${ac_cv_header_ffmpeg_swscale_h}" = "yes" -o \ |
---|
703 | "${ac_cv_header_libswscale_swscale_h}" = "yes" \) ]] ; then |
---|
704 | HAVE_FFMPEG_LIBS="yes" |
---|
705 | AC_DEFINE(BUILD_with_ffmpeg, 1, [Build rappture with ffmpeg widgets]) |
---|
706 | else |
---|
707 | HAVE_FFMPEG_LIBS="" |
---|
708 | fi |
---|
709 | |
---|
710 | AC_CHECK_FUNCS(img_convert) |
---|
711 | AC_CHECK_FUNCS(sws_scale) |
---|
712 | AC_SUBST(HAVE_FFMPEG_LIBS) |
---|
713 | |
---|
714 | ac_configure_args="--disable-threads --enable-shared" |
---|
715 | AC_CONFIG_SUBDIRS( [packages/optimizer/src] ) |
---|
716 | |
---|
717 | dnl read Makefile.in and write Makefile |
---|
718 | AC_CONFIG_FILES([ |
---|
719 | Makefile |
---|
720 | packages/Makefile |
---|
721 | src/Makefile |
---|
722 | src/core/Makefile |
---|
723 | src/core2/Makefile |
---|
724 | src/objects/Makefile |
---|
725 | src/objects/RpHash.h |
---|
726 | gui/Makefile |
---|
727 | gui/apps/Makefile |
---|
728 | gui/apps/about |
---|
729 | gui/apps/encodedata |
---|
730 | gui/apps/rappture |
---|
731 | gui/apps/rappture-csh.env |
---|
732 | gui/apps/rappture.env |
---|
733 | gui/apps/rappture.use |
---|
734 | gui/apps/rerun |
---|
735 | gui/apps/simsim |
---|
736 | gui/apps/xmldiff |
---|
737 | gui/pkgIndex.tcl |
---|
738 | gui/scripts/Makefile |
---|
739 | gui/src/Makefile |
---|
740 | builder/Makefile |
---|
741 | builder/pkgIndex.tcl |
---|
742 | builder/scripts/Makefile |
---|
743 | tester/Makefile |
---|
744 | tester/pkgIndex.tcl |
---|
745 | tester/scripts/Makefile |
---|
746 | lang/Makefile |
---|
747 | lang/java/Makefile |
---|
748 | lang/java/rappture/Makefile |
---|
749 | lang/perl/Makefile |
---|
750 | lang/perl/Makefile.PL |
---|
751 | lang/python/Makefile |
---|
752 | lang/python/setup.py |
---|
753 | lang/matlab/Makefile |
---|
754 | lang/octave/Makefile |
---|
755 | lang/octave/octave2/Makefile |
---|
756 | lang/octave/octave3/Makefile |
---|
757 | lang/ruby/Makefile |
---|
758 | lang/ruby/build.rb |
---|
759 | lang/tcl/Makefile |
---|
760 | lang/tcl/pkgIndex.tcl |
---|
761 | lang/tcl/src/Makefile |
---|
762 | lang/tcl/scripts/Makefile |
---|
763 | lang/tcl/tests/Makefile |
---|
764 | lib/Makefile |
---|
765 | examples/3D/Makefile |
---|
766 | examples/Makefile |
---|
767 | examples/app-fermi/2.0/Makefile |
---|
768 | examples/app-fermi/Makefile |
---|
769 | examples/app-fermi/cee/Makefile |
---|
770 | examples/app-fermi/fortran/Makefile |
---|
771 | examples/app-fermi/java/Makefile |
---|
772 | examples/app-fermi/matlab/Makefile |
---|
773 | examples/app-fermi/matlab/compiled/Makefile |
---|
774 | examples/app-fermi/matlab/uncompiled/Makefile |
---|
775 | examples/app-fermi/octave/2/Makefile |
---|
776 | examples/app-fermi/octave/3/Makefile |
---|
777 | examples/app-fermi/octave/Makefile |
---|
778 | examples/app-fermi/perl/Makefile |
---|
779 | examples/app-fermi/python/Makefile |
---|
780 | examples/app-fermi/ruby/Makefile |
---|
781 | examples/app-fermi/tcl/Makefile |
---|
782 | examples/app-fermi/wrapper/Makefile |
---|
783 | examples/app-fermi/wrapper/cee/Makefile |
---|
784 | examples/app-fermi/wrapper/perl/Makefile |
---|
785 | examples/app-fermi/wrapper/python/Makefile |
---|
786 | examples/app-fermi/wrapper/tcl/Makefile |
---|
787 | examples/c-example/Makefile |
---|
788 | examples/canvas/Makefile |
---|
789 | examples/demo.bash |
---|
790 | examples/flow/Makefile |
---|
791 | examples/flow/demo1/Makefile |
---|
792 | examples/flow/demo2/Makefile |
---|
793 | examples/flow/demo3/Makefile |
---|
794 | examples/graph/Makefile |
---|
795 | examples/objects/Makefile |
---|
796 | examples/objects/axis/Makefile |
---|
797 | examples/objects/contour/Makefile |
---|
798 | examples/objects/curve/Makefile |
---|
799 | examples/objects/dxWriter/Makefile |
---|
800 | examples/objects/floatBuffer/Makefile |
---|
801 | examples/objects/histogram/Makefile |
---|
802 | examples/objects/library/Makefile |
---|
803 | examples/objects/number/Makefile |
---|
804 | examples/objects/path/Makefile |
---|
805 | examples/objects/plot/Makefile |
---|
806 | examples/objects/scatter/Makefile |
---|
807 | examples/objects/string/Makefile |
---|
808 | examples/objects/tree/Makefile |
---|
809 | examples/objects/xmlparser/Makefile |
---|
810 | examples/zoo/Makefile |
---|
811 | examples/zoo/binary/Makefile |
---|
812 | examples/zoo/boolean/Makefile |
---|
813 | examples/zoo/choice/Makefile |
---|
814 | examples/zoo/cloud/Makefile |
---|
815 | examples/zoo/cloud/matlab/Makefile |
---|
816 | examples/zoo/curve/Makefile |
---|
817 | examples/zoo/enable/Makefile |
---|
818 | examples/zoo/field/Makefile |
---|
819 | examples/zoo/group/Makefile |
---|
820 | examples/zoo/image/Makefile |
---|
821 | examples/zoo/image/docs/Makefile |
---|
822 | examples/zoo/image/examples/Makefile |
---|
823 | examples/zoo/integer/Makefile |
---|
824 | examples/zoo/integer2/Makefile |
---|
825 | examples/zoo/loader/Makefile |
---|
826 | examples/zoo/loader/examples/Makefile |
---|
827 | examples/zoo/loadrun/Makefile |
---|
828 | examples/zoo/log/Makefile |
---|
829 | examples/zoo/note/Makefile |
---|
830 | examples/zoo/note/docs/Makefile |
---|
831 | examples/zoo/number/Makefile |
---|
832 | examples/zoo/number2/Makefile |
---|
833 | examples/zoo/parallelepiped/Makefile |
---|
834 | examples/zoo/periodicelement/Makefile |
---|
835 | examples/zoo/phase/Makefile |
---|
836 | examples/zoo/sequence/Makefile |
---|
837 | examples/zoo/sequence/examples/Makefile |
---|
838 | examples/zoo/string/Makefile |
---|
839 | examples/zoo/structure/Makefile |
---|
840 | examples/zoo/structure/examples/Makefile |
---|
841 | examples/zoo/table/Makefile |
---|
842 | examples/zoo/unirect2d/Makefile |
---|
843 | oldtest/Makefile |
---|
844 | oldtest/src/Makefile |
---|
845 | ]) |
---|
846 | AC_OUTPUT |
---|