source: branches/r9/configure.in @ 5899

Last change on this file since 5899 was 5899, checked in by gah, 9 years ago

rename lib directory

File size: 8.8 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(libs/rappture/config.h)
9
10RAPPTURE_MAJOR_VERSION=Major_Version
11RAPPTURE_MINOR_VERSION=Minor_Version
12RAPPTURE_RELEASE_SERIAL=Release_Serial
13RAPPTURE_VERSION=Version
14
15WITH_R=yes
16WITH_JAVA=yes
17WITH_MATLAB=yes
18WITH_MKOCTFILE2=yes
19WITH_MKOCTFILE3=yes
20WITH_OCTAVE=yes
21WITH_PERL=yes
22WITH_PYTHON=yes
23WITH_RUBY=yes
24WITH_RUBY_SITELIBDIR=yes
25WITH_TCL=yes
26
27AC_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
34AC_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
41AC_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
48AC_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
55AC_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
62AC_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
69AC_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
76AC_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
83AC_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
91AC_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
99AC_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
106AC_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
113AC_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
124if test "${prefix}" = "NONE"; then
125    prefix=/usr/local
126fi
127if test "${exec_prefix}" = "NONE"; then
128    exec_prefix=$prefix
129fi
130
131AC_PROG_INSTALL
132AC_PROG_RANLIB
133AC_PROG_LN_S
134AC_PROG_MKDIR_P
135AC_PROG_MAKE_SET
136
137# Check for C, C++, and FORTRAN
138AC_PROG_CC
139AC_PROG_CXX
140# Avoid g95
141AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
142
143AC_LANG([C])
144
145AC_HEADER_STDC
146AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
147
148AC_LANG([C++])
149AC_PATH_X
150
151# -----------------------------------------------------------------------
152#
153# Compiler characteristics:
154#   Check for existence of types of size_t and pid_t
155#
156# -----------------------------------------------------------------------
157
158AC_C_BIGENDIAN
159AC_CHECK_SIZEOF(int)
160AC_CHECK_SIZEOF(long)
161AC_CHECK_SIZEOF(long long)
162AC_CHECK_SIZEOF(void *)
163
164SIZEOF_LONG="${ac_cv_sizeof_long}"
165SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}"
166SIZEOF_VOID_P="${ac_cv_sizeof_void_p}"
167SIZEOF_INT="${ac_cv_sizeof_int}"
168
169
170AC_CHECK_FUNCS(sysinfo)
171AC_CHECK_FUNCS(gettimeofday)
172AC_CHECK_FUNC(localtime,,AC_MSG_ERROR(oops! no localtime ?!?))
173AC_CHECK_FUNC(getenv,,AC_MSG_ERROR(oops! no getenv ?!?))
174
175AC_CHECK_HEADERS(sys/sysinfo.h)
176
177AC_CHECK_LIB(ncurses, clrtoeol,,AC_MSG_ERROR([ncurses library missing?]))
178AC_CHECK_HEADERS(ncurses.h,,AC_MSG_WARN(ncurses headers missing ?))
179
180AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++))
181AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?))
182AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?))
183AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?))
184AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?))
185AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?))
186AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?))
187AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?))
188AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?))
189AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?))
190AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?))
191AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?))
192AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?))
193AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?))
194AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
195AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
196
197AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?))
198AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?))
199AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?))
200AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?))
201AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?))
202AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?))
203AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?))
204AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?))
205AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?))
206dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?))
207AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?))
208AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?))
209AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?))
210
211AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?))
212if test "${ac_cv_header_inttypes_h}" = "yes" ; then
213  HAVE_INTTYPES_H=1
214else
215  HAVE_INTTYPES_H=0
216fi
217
218
219if test "$with_install" != "yes"; then
220    INSTALL_PREFIX=$with_install
221else
222    INSTALL_PREFIX=$prefix
223fi
224
225if test "${libdir}" != "${prefix}/lib"; then
226    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
227else
228    LIB_SEARCH_DIRS="-L${libdir}"
229fi
230
231SVN_VERSION=`svnversion $srcdir`
232
233make_command=""
234for 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
240done
241if test "x${make_command}" = "x" ; then
242  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
243fi
244
245#--------------------------------------------------------------------
246# Set the default compiler switches based on the --enable-symbols
247# option.
248#--------------------------------------------------------------------
249
250SC_CONFIG_CFLAGS
251SC_ENABLE_SYMBOLS
252
253AC_SUBST(CFLAGS_DEBUG)
254AC_SUBST(CFLAGS_OPTIMIZE)
255AC_SUBST(HAVE_INTTYPES_H)
256AC_SUBST(INSTALL_PREFIX)
257AC_SUBST(LIB_SEARCH_DIRS)
258AC_SUBST(MAKE, ${make_command})
259AC_SUBST(SVN_VERSION)
260AC_SUBST(SHLIB_CFLAGS)
261AC_SUBST(SHLIB_LD)
262AC_SUBST(SHLIB_LDFLAGS)
263AC_SUBST(SHLIB_SUFFIX)
264AC_SUBST(SIZEOF_INT)
265AC_SUBST(SIZEOF_LONG)
266AC_SUBST(SIZEOF_LONG_LONG)
267AC_SUBST(SIZEOF_VOID_P)
268AC_SUBST(STLIB_LD)
269AC_SUBST(TCL_INC_SPEC)
270AC_SUBST(TCL_LIB_SPEC)
271AC_SUBST(TCL_CFLAGS_DEBUG)
272AC_SUBST(TCL_CFLAGS_OPTIMIZE)
273AC_SUBST(TCL_SHLIB_CFLAGS)
274AC_SUBST(TCL_SHLIB_LD)
275AC_SUBST(TCL_SHLIB_LDFLAGS)
276AC_SUBST(TCL_SHLIB_SUFFIX)
277AC_SUBST(TK_INC_SPEC)
278AC_SUBST(TK_LIB_SPEC)
279AC_SUBST(TCL_CFLAGS_DEBUG)
280AC_SUBST(TCL_SHLIB_CFLAGS)
281AC_SUBST(TCL_SHLIB_SUFFIX)
282AC_SUBST(TCL_SHLIB_LD)
283AC_SUBST(TCL_SHLIB_LDFLAGS)
284AC_SUBST(TK_XLIBSW)
285AC_SUBST(TK_VERSION)
286AC_SUBST(X_INCLUDES)
287AC_SUBST(X_LIBRARIES)
288AC_SUBST(WORDSIZE)
289AC_SUBST(RAPPTURE_MAJOR_VERSION)
290AC_SUBST(RAPPTURE_MINOR_VERSION)
291AC_SUBST(RAPPTURE_RELEASE_SERIAL)
292AC_SUBST(RAPPTURE_VERSION)
293AC_SUBST(WITH_VTK)
294AC_SUBST(WITH_R)
295AC_SUBST(WITH_JAVA)
296AC_SUBST(WITH_MATLAB)
297AC_SUBST(WITH_MKOCTFILE2)
298AC_SUBST(WITH_MKOCTFILE3)
299AC_SUBST(WITH_OCTAVE)
300AC_SUBST(WITH_PERL)
301AC_SUBST(WITH_PYTHON)
302AC_SUBST(WITH_RUBY)
303AC_SUBST(WITH_RUBY_SITELIBDIR)
304AC_SUBST(WITH_TCL)
305AC_SUBST(WITH_VTK)
306
307dnl read Makefile.in and write Makefile
308AC_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])
329AC_OUTPUT
330       
Note: See TracBrowser for help on using the repository browser.