source: trunk/configure.in @ 533

Last change on this file since 533 was 529, checked in by dkearney, 18 years ago

adjustments to configure and makefiles to include the new tcl units bindings.
few more adjustments to rappture queues for condor

File size: 6.0 KB
Line 
1AC_INIT(rappture, 1.1, rappture@nanohub.org)
2
3VERSION=0.0.1
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
15
16# AC_PROG_INSTALL
17AC_PROG_MAKE_SET
18
19dnl find and test the C compiler
20AC_PROG_CC
21AC_LANG_C
22
23AC_HEADER_STDC
24AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?))
25
26AC_PROG_CXX
27AC_LANG_CPLUSPLUS
28
29AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++))
30AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?))
31AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?))
32AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?))
33AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
34
35AC_PROG_F77([f77 fort77 g77 f90 xlf xlf90 fl32])
36
37AC_ARG_WITH(matlab, [  --with-matlab[=DIR]         Build Matlab bindings if MEX compiler is found])
38dnl AC_CHECK_PROG(MEX, mex, mex, false)
39MEX=
40if test "$with_matlab" != "no" ; then
41    dnl WITH_MATLAB = "yes"
42    if test -x "$with_matlab/bin/mex"
43    then
44        echo Found matlab in $with_matlab/bin/mex
45        MEX="$with_matlab/bin/mex"
46    else
47        if test -x "$with_matlab"
48        then
49            echo Found mex in $with_matlab
50            MEX="$with_matlab"
51        else
52            AC_PATH_PROG(MEX, mex)
53        fi
54    fi
55fi
56dnl AM_CONDITIONAL(WITH_MATLAB, test x$MEX != x)
57
58AC_ARG_WITH(octave, [  --with-octave[=DIR]         Build Octave bindings if MKOCTFILE compiler is found])
59dnl AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile, false)
60MKOCTFILE=
61if test "$with_octave" != "no" ; then
62    if test -x "$with_octave/bin/mkoctfile"
63    then
64        echo Found octave in $with_octave/bin/mkoctfile
65        MKOCTFILE="$with_octave/bin/mkoctfile"
66    else
67        if test -x "$with_octave"
68        then
69            echo Found mkoctfile in $with_octave
70            MKOCTFILE="$with_octave"
71        else
72            AC_PATH_PROG(MKOCTFILE, mkoctfile)
73        fi
74    fi
75fi
76dnl AM_CONDITIONAL(WITH_OCTAVE, test x$MKOCTFILE != x)
77
78
79dnl perl and python check borrowed from
80dnl http://www.opensource.apple.com/darwinsource/Current/libxslt-8.1/libxslt/configure.in
81dnl
82dnl Perl is just needed for generating some data for XSLtmark
83dnl
84
85AC_ARG_WITH(perl, [  --with-perl[=DIR]         Build Perl bindings if found])
86dnl AC_CHECK_PROG(PERL, perl, perl, false)
87dnl AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
88PERL=
89PERL_INCLUDES=
90if test "$with_perl" != "no" ; then
91    if test -x "$with_perl/bin/perl"
92    then
93        echo Found perl in $with_perl/bin/perl
94        PERL="$with_perl/bin/perl"
95    else
96        if test -x "$with_perl"
97        then
98            echo Found perl in $with_perl
99            PERL="$with_perl"
100        else
101            AC_PATH_PROG(PERL, perl)
102        fi
103    fi
104fi
105dnl AM_CONDITIONAL(WITH_PERL, test x$PERL != x)
106
107dnl
108dnl check for python
109dnl
110
111PYTHON=
112PYTHON_VERSION=
113PYTHON_INCLUDES=
114PYTHON_SITE_PACKAGES=
115pythondir=
116AC_ARG_WITH(python, [  --with-python[=DIR]       Build Python bindings if found])
117if test "$with_python" != "no" ; then
118    if test -x "$with_python/bin/python"
119    then
120        echo Found python in $with_python/bin/python
121        PYTHON="$with_python/bin/python"
122    else
123        if test -x "$with_python"
124        then
125            echo Found python in $with_python
126            PYTHON="$with_python"
127        else
128            AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
129        fi
130    fi
131    if test "$PYTHON" != ""
132    then
133        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
134        echo Using python version $PYTHON_VERSION
135    fi
136    if test "$PYTHON_VERSION" != ""
137    then
138    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
139       -d $with_python/lib/python$PYTHON_VERSION/site-packages
140    then
141        PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
142        PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
143    else
144        if test -r $prefix/include/python$PYTHON_VERSION/Python.h
145        then
146            PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
147            PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
148        else
149            if test -r /usr/include/python$PYTHON_VERSION/Python.h
150            then
151                PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
152                PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
153            else
154                echo could not find python$PYTHON_VERSION/Python.h
155            fi
156        fi
157        if test ! -d "$PYTHON_SITE_PACKAGES"
158        then
159            PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
160        fi
161    fi
162    fi
163    if test "$with_python" != ""
164    then
165        pythondir='$(PYTHON_SITE_PACKAGES)'
166    else
167        pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
168    fi
169fi
170dnl AM_CONDITIONAL(WITH_PYTHON, test x$PYTHON != x)
171
172dnl AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
173dnl if test "$PYTHON_INCLUDES" != ""
174dnl then
175dnl     PYTHON_SUBDIR=python
176dnl else
177dnl     PYTHON_SUBDIR=
178dnl fi
179
180AC_SUBST(pythondir)
181dnl AC_SUBST(PYTHON_SUBDIR)
182
183AC_SUBST(MEX)
184AC_SUBST(MKOCTFILE)
185AC_SUBST(PERL)
186AC_SUBST(PERL_INCLUDES)
187AC_SUBST(PYTHON)
188AC_SUBST(PYTHON_VERSION)
189AC_SUBST(PYTHON_INCLUDES)
190AC_SUBST(PYTHON_SITE_PACKAGES)
191
192AC_SUBST(VERSION)
193
194RP_BASE=`pwd`
195AC_SUBST(RP_BASE)
196
197AC_CONFIG_SUBDIRS( gui )
198AC_CONFIG_SUBDIRS( src/tcl )
199
200dnl read Makefile.in and write Makefile
201AC_OUTPUT(  Makefile \
202            examples/demo.bash
203            examples/app-fermi/cee/Makefile \
204            examples/app-fermi/fortran/Makefile \
205            examples/c-example/Makefile \
206            perl/Makefile.PL \
207            python/setup.py \
208            src/Makefile \
209            src/matlab/Makefile \
210            src/octave/Makefile \
211            test/Makefile \
212            gui/apps/rappture   )
Note: See TracBrowser for help on using the repository browser.