source: branches/r9/lang/configure.in @ 4868

Last change on this file since 4868 was 4867, checked in by gah, 7 years ago
File size: 10.4 KB
Line 
1
2AC_INIT([Rappture],[1.4],[rappture@nanohub.org])
3AC_CONFIG_AUX_DIR(cf)
4
5#------------------------------------------------------------------------
6# Handle the --prefix=... option
7#------------------------------------------------------------------------
8
9if test "${prefix}" = "NONE"; then
10    prefix=/usr/local
11fi
12if test "${exec_prefix}" = "NONE"; then
13    exec_prefix=$prefix
14fi
15AC_PROG_INSTALL
16AC_PROG_INSTALL
17AC_PROG_RANLIB
18AC_PROG_LN_S
19AC_PROG_MKDIR_P
20AC_PROG_MAKE_SET
21
22# Check for C, C++, and FORTRAN
23AC_PROG_CC
24AC_PROG_CXX
25# Avoid g95
26AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32])
27
28AC_LANG([C])
29
30AC_HEADER_STDC
31AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
32
33AC_LANG([C++])
34AC_PATH_X
35
36AC_ARG_WITH(
37    [install],
38    [AS_HELP_STRING([--with-install[=DIR]],
39        [location of installation @<:@default=yes@:>@])],
40    [],
41    [with_install=yes])
42
43if test "$with_install" != "yes"; then
44    INSTALL_PREFIX=$with_install
45else
46    INSTALL_PREFIX=$prefix
47fi
48
49if test "${libdir}" != "${prefix}/lib"; then
50    LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}"
51else
52    LIB_SEARCH_DIRS="-L${libdir}"
53fi
54
55
56AC_CHECK_FUNCS(sysinfo)
57AC_CHECK_FUNCS(gettimeofday)
58AC_CHECK_FUNC(localtime,,AC_MSG_ERROR(oops! no localtime ?!?))
59AC_CHECK_FUNC(getenv,,AC_MSG_ERROR(oops! no getenv ?!?))
60
61AC_CHECK_HEADERS(sys/sysinfo.h)
62
63AC_CHECK_LIB(ncurses, clrtoeol,,AC_MSG_ERROR([ncurses library missing?]))
64AC_CHECK_HEADERS(ncurses.h,,AC_MSG_WARN(ncurses headers missing ?))
65
66AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++))
67AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?))
68AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?))
69AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?))
70AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?))
71AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?))
72AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?))
73AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?))
74AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?))
75AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?))
76AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?))
77AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?))
78AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?))
79AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?))
80AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
81AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
82
83AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?))
84AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?))
85AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?))
86AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?))
87AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?))
88AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?))
89AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?))
90AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?))
91AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?))
92dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?))
93AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?))
94AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?))
95AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?))
96
97AC_CHECK_HEADERS(inttypes.h)
98
99SC_CONFIG_CFLAGS
100
101SVN_VERSION=`svnversion $srcdir`
102
103make_command=""
104for m in "$MAKE" make gmake gnumake ; do
105  if test "x${m}" != "x" ; then
106    if  ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then
107      make_command=$m; break;
108    fi
109  fi
110done
111if test "x${make_command}" = "x" ; then
112  AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE])
113fi
114
115TCL_VERSION="8.4"
116for dir in \
117 ${exec_prefix} \
118 ${exec_prefix}/lib ; do
119  tclconfig="${dir}/tclConfig.sh"
120  if test -f "$tclconfig" ; then
121    . $tclconfig
122    break
123  fi
124done
125
126AC_ARG_WITH(
127    [tclsh],
128    [AS_HELP_STRING([--with-tclsh[=DIR]],
129        [location of tclsh @<:@default=yes@:>@])],
130    [],
131    [with_tclsh=yes])
132
133TCLSH=""
134if test "${with_tclsh}" != "no" ; then
135  tclsh="tclsh${TCL_VERSION}"
136  if test "${with_tclsh}" = "yes" ; then
137    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${exec_prefix}/bin:${PATH}])
138  else
139    AC_PATH_PROG(TCLSH, ${tclsh}, [], [${with_tclsh}/bin:${with_tclsh}])
140  fi
141  if test "x${TCLSH}" = "x" ; then
142    AC_ERROR([can't find tclsh])
143  fi
144fi
145
146TCL_INC_SPEC="$TCL_INCLUDE_SPEC"
147
148RP_LANG_MATLAB
149RP_LANG_OCTAVE
150RP_LANG_PERL
151RP_LANG_PYTHON
152RP_LANG_JAVA
153RP_LANG_R
154RP_LANG_RUBY
155
156RP_BASE=`pwd`
157
158SC_ENABLE_SHARED
159
160#--------------------------------------------------------------------
161# This macro figures out what flags to use with the compiler/linker
162# when building shared/static debug/optimized objects.  This information
163# is all taken from the tclConfig.sh file.
164#--------------------------------------------------------------------
165
166if test -f "${exec_prefix}/lib/tclConfig.sh" ; then
167  . ${exec_prefix}/lib/tclConfig.sh
168fi
169
170# -----------------------------------------------------------------------
171#
172# Compiler characteristics:
173#   Check for existence of types of size_t and pid_t
174#
175# -----------------------------------------------------------------------
176
177AC_C_BIGENDIAN
178AC_CHECK_SIZEOF(int)
179AC_CHECK_SIZEOF(long)
180AC_CHECK_SIZEOF(long long)
181AC_CHECK_SIZEOF(void *)
182
183SIZEOF_LONG="${ac_cv_sizeof_long}"
184SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}"
185SIZEOF_VOID_P="${ac_cv_sizeof_void_p}"
186SIZEOF_INT="${ac_cv_sizeof_int}"
187
188
189#--------------------------------------------------------------------
190# Set the default compiler switches based on the --enable-symbols
191# option.
192#--------------------------------------------------------------------
193
194SC_ENABLE_SYMBOLS
195
196AC_SUBST(CFLAGS_DEBUG)
197AC_SUBST(CFLAGS_OPTIMIZE)
198AC_SUBST(HAVE_RUBY_DEVEL)
199AC_SUBST(INSTALL_PREFIX)
200AC_SUBST(JAVA)
201AC_SUBST(JAVAC)
202AC_SUBST(JAVAH)
203AC_SUBST(JAVA_HOME)
204AC_SUBST(JAVA_INC_DIR)
205AC_SUBST(JAVA_INC_SPEC)
206AC_SUBST(LIB_SEARCH_DIRS)
207AC_SUBST(MAKE, ${make_command})
208AC_SUBST(MATLAB)
209AC_SUBST(MCC)
210AC_SUBST(MEX)
211AC_SUBST(MEXEXT)
212AC_SUBST(MEX_ARCH)
213AC_SUBST(MKOCTFILE2)
214AC_SUBST(MKOCTFILE3)
215AC_SUBST(SVN_VERSION)
216AC_SUBST(OCTAVE_VERSION)
217AC_SUBST(OCTAVE_VERSION_MAJOR)
218AC_SUBST(PERL)
219AC_SUBST(PERL_ARCHLIB)
220AC_SUBST(PERL_ARCHLIBEXP)
221AC_SUBST(PERL_CCFLAGS)
222AC_SUBST(PERL_CPPFLAGS)
223AC_SUBST(PERL_INCLUDES)
224AC_SUBST(PERL_INSTALLARCHLIB)
225AC_SUBST(PERL_LIBSPEC)
226AC_SUBST(PERL_PRIVLIB)
227AC_SUBST(PERL_VENDORLIB)
228AC_SUBST(PERL_VERSION)
229AC_SUBST(PERL_VERSION_RV)
230AC_SUBST(PYTHON)
231AC_SUBST(PYTHON_CFLAGS)
232AC_SUBST(PYTHON_DISTUTILS)
233AC_SUBST(PYTHON_INCDIR)
234AC_SUBST(PYTHON_INCLUDES)
235AC_SUBST(PYTHON_LDFLAGS)
236AC_SUBST(PYTHON_LIB)
237AC_SUBST(PYTHON_LIBDIR)
238AC_SUBST(PYTHON_SITE_DIR)
239AC_SUBST(PYTHON_SITE_PACKAGES)
240AC_SUBST(PYTHON_VERSION)
241AC_SUBST(R)
242AC_SUBST(RP_BASE)
243AC_SUBST(RUBY)
244AC_SUBST(RUBY_PLATFORM)
245AC_SUBST(RUBY_VERSION_RV)
246AC_SUBST(SHLIB_CFLAGS)
247AC_SUBST(SHLIB_LD)
248AC_SUBST(SHLIB_LDFLAGS)
249AC_SUBST(SHLIB_SUFFIX)
250AC_SUBST(SIZEOF_INT)
251AC_SUBST(SIZEOF_LONG)
252AC_SUBST(SIZEOF_LONG_LONG)
253AC_SUBST(SIZEOF_VOID_P)
254AC_SUBST(STLIB_LD)
255AC_SUBST(TCLSH)
256AC_SUBST(TCL_INC_SPEC)
257AC_SUBST(TCL_LIB_SPEC)
258AC_SUBST(TCL_CFLAGS_DEBUG)
259AC_SUBST(TCL_CFLAGS_OPTIMIZE)
260AC_SUBST(TCL_SHLIB_CFLAGS)
261AC_SUBST(TCL_SHLIB_LD)
262AC_SUBST(TCL_SHLIB_LDFLAGS)
263AC_SUBST(TCL_SHLIB_SUFFIX)
264AC_SUBST(TCL_VERSION)
265AC_SUBST(TCL_VERSION)
266AC_SUBST(TCL_CFLAGS_DEBUG)
267AC_SUBST(TCL_SHLIB_CFLAGS)
268AC_SUBST(TCL_SHLIB_SUFFIX)
269AC_SUBST(TCL_SHLIB_LD)
270AC_SUBST(TCL_SHLIB_LDFLAGS)
271AC_SUBST(XSUBPP)
272
273dnl read Makefile.in and write Makefile
274AC_CONFIG_FILES([
275    Makefile
276    java/Makefile
277    java/rappture/Makefile
278    perl/Makefile
279    perl/Makefile.PL
280    python/Makefile
281    python/setup.py
282    matlab/Makefile
283    octave/Makefile
284    octave/octave2/Makefile
285    octave/octave3/Makefile
286    R/Makefile
287    ruby/Makefile
288    ruby/build.rb
289    tcl/Makefile
290    tcl/pkgIndex.tcl
291    tcl/scripts/Makefile
292    tcl/src/Makefile
293    tcl/tests/Makefile
294    examples/3D/Makefile
295    examples/Makefile
296    examples/app-fermi/2.0/Makefile
297    examples/app-fermi/Makefile
298    examples/app-fermi/R/Makefile
299    examples/app-fermi/cee/Makefile
300    examples/app-fermi/fortran/Makefile
301    examples/app-fermi/java/Makefile
302    examples/app-fermi/matlab/Makefile
303    examples/app-fermi/matlab/compiled/Makefile
304    examples/app-fermi/matlab/uncompiled/Makefile
305    examples/app-fermi/octave/Makefile
306    examples/app-fermi/octave/octave2/Makefile
307    examples/app-fermi/octave/octave3/Makefile
308    examples/app-fermi/perl/Makefile
309    examples/app-fermi/python/Makefile
310    examples/app-fermi/ruby/Makefile
311    examples/app-fermi/tcl/Makefile
312    examples/app-fermi/wrapper/Makefile
313    examples/app-fermi/wrapper/cee/Makefile
314    examples/app-fermi/wrapper/perl/Makefile
315    examples/app-fermi/wrapper/python/Makefile
316    examples/app-fermi/wrapper/tcl/Makefile
317    examples/c-example/Makefile
318    examples/canvas/Makefile
319    examples/demo.bash
320    examples/flow/Makefile
321    examples/flow/demo1/Makefile
322    examples/flow/demo2/Makefile
323    examples/flow/demo3/Makefile
324    examples/graph/Makefile
325    examples/objects/Makefile
326    examples/objects/axis/Makefile
327    examples/objects/curve/Makefile
328    examples/objects/dxWriter/Makefile
329    examples/objects/floatBuffer/Makefile
330    examples/objects/histogram/Makefile
331    examples/objects/library/Makefile
332    examples/objects/number/Makefile
333    examples/objects/path/Makefile
334    examples/objects/plot/Makefile
335    examples/objects/scatter/Makefile
336    examples/objects/string/Makefile
337    examples/objects/tree/Makefile
338    examples/objects/xmlparser/Makefile
339    examples/zoo/Makefile
340    examples/zoo/binary/Makefile
341    examples/zoo/boolean/Makefile
342    examples/zoo/choice/Makefile
343    examples/zoo/curve/Makefile
344    examples/zoo/drawing/Makefile
345    examples/zoo/enable/Makefile
346    examples/zoo/field/Makefile
347    examples/zoo/group/Makefile
348    examples/zoo/histogram/Makefile
349    examples/zoo/image/Makefile
350    examples/zoo/image/docs/Makefile
351    examples/zoo/image/examples/Makefile
352    examples/zoo/integer/Makefile
353    examples/zoo/integer2/Makefile
354    examples/zoo/loader/Makefile
355    examples/zoo/loader/examples/Makefile
356    examples/zoo/log/Makefile
357    examples/zoo/mesh/Makefile
358    examples/zoo/note/Makefile
359    examples/zoo/note/docs/Makefile
360    examples/zoo/number/Makefile
361    examples/zoo/number2/Makefile
362    examples/zoo/parallelepiped/Makefile
363    examples/zoo/periodicelement/Makefile
364    examples/zoo/phase/Makefile
365    examples/zoo/sequence/Makefile
366    examples/zoo/sequence/examples/Makefile
367    examples/zoo/string/Makefile
368    examples/zoo/structure/Makefile
369    examples/zoo/structure/examples/Makefile
370    examples/zoo/table/Makefile
371])
372AC_OUTPUT
373       
Note: See TracBrowser for help on using the repository browser.