source: branches/r9/configure.in @ 4916

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