source: branches/r9/configure.in @ 4909

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