[1270] | 1 | AC_INIT([Rappture],[1.1],[rappture@nanohub.org]) |
---|
| 2 | dnl AC_CONFIG_HEADER(src/core/RpConfig.h) |
---|
[1081] | 3 | AC_CONFIG_AUX_DIR(cf) |
---|
[1403] | 4 | AC_CONFIG_HEADER(src/core/config.h) |
---|
[489] | 5 | |
---|
| 6 | #------------------------------------------------------------------------ |
---|
| 7 | # Handle the --prefix=... option |
---|
| 8 | #------------------------------------------------------------------------ |
---|
| 9 | |
---|
| 10 | if test "${prefix}" = "NONE"; then |
---|
| 11 | prefix=/usr/local |
---|
| 12 | fi |
---|
| 13 | if test "${exec_prefix}" = "NONE"; then |
---|
| 14 | exec_prefix=$prefix |
---|
| 15 | fi |
---|
| 16 | |
---|
[708] | 17 | if test "${libdir}" != "${prefix}/lib"; then |
---|
[872] | 18 | LIB_SEARCH_DIRS="-L${prefix}/lib -L${libdir}" |
---|
[708] | 19 | else |
---|
[872] | 20 | LIB_SEARCH_DIRS="-L${libdir}" |
---|
[708] | 21 | fi |
---|
| 22 | |
---|
[718] | 23 | AC_SUBST(LIB_SEARCH_DIRS) |
---|
| 24 | |
---|
[708] | 25 | AC_PROG_INSTALL |
---|
[489] | 26 | AC_PROG_MAKE_SET |
---|
| 27 | |
---|
[1132] | 28 | # Check for C, C++, and FORTRAN |
---|
[489] | 29 | AC_PROG_CC |
---|
[1132] | 30 | AC_PROG_CXX |
---|
| 31 | # Avoid g95 |
---|
[1018] | 32 | AC_PROG_INSTALL |
---|
| 33 | AC_PROG_RANLIB |
---|
| 34 | AC_PROG_LN_S |
---|
[1082] | 35 | AC_PROG_MKDIR_P |
---|
[1018] | 36 | |
---|
[1132] | 37 | AC_PROG_F77([g77 gfortran f77 fort77 f90 xlf xlf90 fl32]) |
---|
| 38 | |
---|
[1270] | 39 | AC_LANG([C]) |
---|
[1132] | 40 | |
---|
[489] | 41 | AC_HEADER_STDC |
---|
| 42 | AC_CHECK_FUNC(atol,,AC_MSG_ERROR(oops! no atol ?!?)) |
---|
| 43 | |
---|
[1270] | 44 | AC_LANG([C++]) |
---|
[489] | 45 | |
---|
[1403] | 46 | AC_CHECK_FUNCS([sysinfo]) |
---|
| 47 | AC_CHECK_HEADERS(sys/sysinfo.h) |
---|
| 48 | |
---|
[1262] | 49 | AC_CHECK_LIB(m, main,,AC_MSG_ERROR(librappture requires libm)) |
---|
[489] | 50 | AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(librappture requires libstdc++)) |
---|
[1262] | 51 | AC_CHECK_HEADERS(algorithm,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 52 | AC_CHECK_HEADERS(cctype,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 53 | AC_CHECK_HEADERS(cfloat,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 54 | AC_CHECK_HEADERS(cmath,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 55 | AC_CHECK_HEADERS(cstdio,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 56 | AC_CHECK_HEADERS(cstdlib,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 57 | AC_CHECK_HEADERS(cstring,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 58 | AC_CHECK_HEADERS(fstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 59 | AC_CHECK_HEADERS(list,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 60 | AC_CHECK_HEADERS(iostream,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 61 | AC_CHECK_HEADERS(iterator,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 62 | AC_CHECK_HEADERS(sstream,,AC_MSG_WARN(STL classes missing ?)) |
---|
[489] | 63 | AC_CHECK_HEADERS(stack,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 64 | AC_CHECK_HEADERS(string,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 65 | AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?)) |
---|
| 66 | |
---|
[1262] | 67 | AC_CHECK_HEADERS(assert.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 68 | AC_CHECK_HEADERS(ctype.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 69 | AC_CHECK_HEADERS(errno.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 70 | AC_CHECK_HEADERS(limits.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 71 | AC_CHECK_HEADERS(string.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 72 | AC_CHECK_HEADERS(stdlib.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 73 | AC_CHECK_HEADERS(stddef.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 74 | AC_CHECK_HEADERS(float.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 75 | AC_CHECK_HEADERS(math.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 76 | dnl AC_CHECK_HEADERS(ieeefp.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 77 | AC_CHECK_HEADERS(malloc.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 78 | AC_CHECK_HEADERS(memory.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 79 | AC_CHECK_HEADERS(unistd.h,,AC_MSG_WARN(C headers missing ?)) |
---|
[489] | 80 | |
---|
[1262] | 81 | AC_CHECK_HEADERS(inttypes.h,,AC_MSG_WARN(C headers missing ?)) |
---|
| 82 | if test "${ac_cv_header_inttypes_h}" = "yes" ; then |
---|
| 83 | HAVE_INTTYPES_H=1 |
---|
| 84 | else |
---|
| 85 | HAVE_INTTYPES_H=0 |
---|
| 86 | fi |
---|
| 87 | AC_SUBST(HAVE_INTTYPES_H) |
---|
| 88 | |
---|
| 89 | |
---|
[1018] | 90 | SC_CONFIG_CFLAGS |
---|
[718] | 91 | |
---|
[1058] | 92 | make_command="" |
---|
[1087] | 93 | for m in "$MAKE" make gmake gnumake ; do |
---|
| 94 | if test "x${m}" != "x" ; then |
---|
| 95 | if ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then |
---|
[1058] | 96 | make_command=$m; break; |
---|
| 97 | fi |
---|
| 98 | fi |
---|
| 99 | done |
---|
| 100 | if test "x${make_command}" = "x" ; then |
---|
[1270] | 101 | AC_MSG_ERROR([Requires GNU make. You can specify a version with \$MAKE]) |
---|
[1058] | 102 | fi |
---|
| 103 | AC_SUBST(MAKE, ${make_command}) |
---|
| 104 | |
---|
[905] | 105 | AC_ARG_ENABLE( |
---|
| 106 | [gui], |
---|
| 107 | [AS_HELP_STRING([--enable-gui], [build code related to the graphical user interface @<:@default=yes@:>@])], |
---|
| 108 | [], |
---|
| 109 | [enable_gui=yes]) |
---|
| 110 | |
---|
| 111 | ENABLE_GUI= |
---|
| 112 | if test "$enable_gui" != "no" ; then |
---|
| 113 | ENABLE_GUI="yes" |
---|
| 114 | fi |
---|
| 115 | AC_SUBST(ENABLE_GUI) |
---|
| 116 | |
---|
[1588] | 117 | with_tclsh="yes" |
---|
[905] | 118 | AC_ARG_WITH( |
---|
| 119 | [tclsh], |
---|
| 120 | [AS_HELP_STRING([--with-tclsh[=DIR]], |
---|
[1588] | 121 | [location of tclsh @<:@default=yes@:>@])], |
---|
[905] | 122 | [], |
---|
[1588] | 123 | [with_tclsh=yes]) |
---|
[718] | 124 | |
---|
[905] | 125 | TCLSH= |
---|
| 126 | if test "$with_tclsh" != "no" ; then |
---|
| 127 | AC_MSG_CHECKING([for tclsh]) |
---|
| 128 | if test -x "$with_tclsh/bin/tclsh" |
---|
| 129 | then |
---|
| 130 | echo Found tclsh in $with_tclsh/bin/tclsh |
---|
| 131 | TCLSH="$with_tclsh/bin/tclsh" |
---|
| 132 | else |
---|
| 133 | if test -x "$with_tclsh" |
---|
| 134 | then |
---|
| 135 | echo Found tclsh in $with_tclsh |
---|
| 136 | TCLSH="$with_tclsh" |
---|
| 137 | else |
---|
| 138 | AC_PATH_PROG(TCLSH, tclsh) |
---|
| 139 | fi |
---|
| 140 | fi |
---|
| 141 | fi |
---|
| 142 | AC_MSG_RESULT([${TCLSH}]) |
---|
| 143 | AC_SUBST(TCLSH) |
---|
| 144 | |
---|
| 145 | |
---|
[718] | 146 | AC_ARG_WITH( |
---|
[1678] | 147 | [vtk], |
---|
| 148 | [AS_HELP_STRING([--with-vtk[=DIR]], |
---|
| 149 | [location of vtk library @<:@default=yes@:>@])], |
---|
| 150 | [with_vtk=$withval], [with_vtk=yes]) |
---|
| 151 | |
---|
| 152 | AC_MSG_CHECKING([for vtk]) |
---|
| 153 | VTKDIR="" |
---|
| 154 | |
---|
| 155 | if test "$with_vtk" != "no" ; then |
---|
| 156 | if test "$with_vtk" = "yes" ; then |
---|
| 157 | for path in \ |
---|
| 158 | $libdir \ |
---|
| 159 | $prefix/lib \ |
---|
| 160 | $exec_prefix/lib \ |
---|
| 161 | /usr/lib |
---|
| 162 | do |
---|
| 163 | for vtk in $path/vtk-* ; do |
---|
| 164 | if test -d "${vtk}" ; then |
---|
| 165 | VTKDIR=${vtk} |
---|
| 166 | fi |
---|
| 167 | done |
---|
| 168 | if test "x${VTKDIR}" != "x" ; then |
---|
| 169 | break |
---|
| 170 | fi |
---|
| 171 | done |
---|
| 172 | fi |
---|
| 173 | fi |
---|
| 174 | AC_SUBST(VTKDIR) |
---|
| 175 | AC_MSG_RESULT([$VTKDIR]) |
---|
| 176 | |
---|
| 177 | |
---|
| 178 | AC_ARG_WITH( |
---|
[718] | 179 | [matlab], |
---|
| 180 | [AS_HELP_STRING([--with-matlab[=DIR]], |
---|
[1588] | 181 | [location of matlab and mex compiler @<:@default=yes@:>@])], |
---|
[1058] | 182 | [with_matlab=$withval], |
---|
| 183 | [with_matlab=yes]) |
---|
[718] | 184 | |
---|
[1678] | 185 | |
---|
[1159] | 186 | MCC="" |
---|
[1049] | 187 | MEX="" |
---|
| 188 | MEX_ARCH="" |
---|
| 189 | MEXEXT="" |
---|
[1101] | 190 | MATLAB= |
---|
[833] | 191 | if test "$with_matlab" != "no" ; then |
---|
[1057] | 192 | if test "$with_matlab" = "yes" ; then |
---|
[1101] | 193 | AC_PATH_PROG(MATLAB, matlab) |
---|
[1057] | 194 | else |
---|
[1579] | 195 | AC_PATH_PROG(MATLAB, matlab, [], [${with_matlab}/bin:${with_matlab}]) |
---|
[1057] | 196 | fi |
---|
[833] | 197 | fi |
---|
[1121] | 198 | |
---|
| 199 | if test "x$MATLAB" != "x" ; then |
---|
[1148] | 200 | # Found matlab. May be a symlink to the real binary. Run "matlab -e" |
---|
| 201 | # to tell where matlab is installed. |
---|
| 202 | |
---|
| 203 | matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin |
---|
| 204 | |
---|
| 205 | # Now see if we can find "mex" or "mexext" there. |
---|
[1579] | 206 | AC_PATH_PROG(MEX, mex, [], [${matlab_bindir}]) |
---|
| 207 | AC_PATH_PROG(MEXEXT, mexext, [], [${matlab_bindir}]) |
---|
[1148] | 208 | |
---|
| 209 | # Run "mexext" to get the expected module extension for this platform. |
---|
[1121] | 210 | AC_MSG_CHECKING([for mex extension]) |
---|
[1159] | 211 | if test "x$MEXEXT" != "x" ; then |
---|
[1148] | 212 | MEXEXT=`$MEXEXT` |
---|
[1159] | 213 | else |
---|
[1148] | 214 | MEXEXT="mexglx" |
---|
[1121] | 215 | fi |
---|
[1148] | 216 | AC_MSG_RESULT([$MEXEXT]) |
---|
[1579] | 217 | AC_PATH_PROG(MCC, mcc, [], [${matlab_bindir}]) |
---|
[1159] | 218 | AC_MSG_CHECKING([for mcc extension]) |
---|
[1101] | 219 | fi |
---|
[1121] | 220 | |
---|
[1159] | 221 | AC_SUBST(MCC) |
---|
[718] | 222 | AC_SUBST(MEX) |
---|
[1101] | 223 | AC_SUBST(MATLAB) |
---|
[718] | 224 | AC_SUBST(MEX_ARCH) |
---|
| 225 | AC_SUBST(MEXEXT) |
---|
[708] | 226 | |
---|
[718] | 227 | AC_ARG_WITH( |
---|
| 228 | [octave], |
---|
| 229 | [AS_HELP_STRING([--with-octave[=DIR]], |
---|
[1588] | 230 | [location of octave compiler MKOCTFILE @<:@default=yes@:>@])], |
---|
[1058] | 231 | [with_octave=$withval], |
---|
| 232 | [with_octave=yes]) |
---|
[718] | 233 | |
---|
[1262] | 234 | OCTAVE= |
---|
| 235 | OCTAVE_VERSION= |
---|
| 236 | OCTAVE_VERSION_MAJOR= |
---|
[508] | 237 | MKOCTFILE= |
---|
[833] | 238 | if test "$with_octave" != "no" ; then |
---|
[1262] | 239 | AC_MSG_CHECKING([for octave and mkoctfile]) |
---|
[1057] | 240 | if test "$with_octave" = "yes" ; then |
---|
[1262] | 241 | AC_PATH_PROG(OCTAVE, octave) |
---|
[1057] | 242 | AC_PATH_PROG(MKOCTFILE, mkoctfile) |
---|
| 243 | else |
---|
[1579] | 244 | AC_PATH_PROG(OCTAVE, octave, [], [$with_octave/bin:$with_octave]) |
---|
| 245 | AC_PATH_PROG(MKOCTFILE, mkoctfile, [], |
---|
[1159] | 246 | [${with_octave}/bin/mkoctfile:${with_octave}]) |
---|
[1057] | 247 | fi |
---|
[1262] | 248 | if test "x${OCTAVE}" != "x" ; then |
---|
| 249 | OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4` |
---|
| 250 | OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1` |
---|
| 251 | fi |
---|
[833] | 252 | fi |
---|
[1262] | 253 | AC_SUBST(OCTAVE) |
---|
| 254 | AC_SUBST(OCTAVE_VERSION) |
---|
| 255 | AC_SUBST(OCTAVE_VERSION_MAJOR) |
---|
[718] | 256 | AC_SUBST(MKOCTFILE) |
---|
[498] | 257 | |
---|
[718] | 258 | AC_ARG_WITH( |
---|
| 259 | [perl], |
---|
[1588] | 260 | [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])], |
---|
[718] | 261 | [], |
---|
[1588] | 262 | [with_perl=yes]) |
---|
[718] | 263 | |
---|
[508] | 264 | PERL= |
---|
| 265 | PERL_INCLUDES= |
---|
[1082] | 266 | PERL_ARCHLIB= |
---|
[1097] | 267 | PERL_ARCHLIBEXP= |
---|
[1087] | 268 | PERL_VERSION= |
---|
[1092] | 269 | PERL_VENDORLIB= |
---|
| 270 | PERL_PRIVLIB= |
---|
| 271 | PERL_CPPFLAGS= |
---|
| 272 | PERL_CCFlAGS= |
---|
[1087] | 273 | PERL_VERSION_RV= |
---|
[1148] | 274 | PERL_LIBSPEC= |
---|
[498] | 275 | if test "$with_perl" != "no" ; then |
---|
[1148] | 276 | AC_MSG_CHECKING([for perl]) |
---|
[1588] | 277 | if test "$with_perl" != "yes" ; then |
---|
[1579] | 278 | AC_PATH_PROG(PERL, perl, [], [$with_perl/bin:$with_perl]) |
---|
[1148] | 279 | else |
---|
| 280 | AC_PATH_PROG(PERL, perl) |
---|
| 281 | fi |
---|
| 282 | if test "x${PERL}" != "x" ; then |
---|
| 283 | PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'` |
---|
| 284 | PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'` |
---|
| 285 | PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'` |
---|
| 286 | PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'` |
---|
| 287 | PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'` |
---|
| 288 | PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'` |
---|
| 289 | PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'` |
---|
| 290 | PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'` |
---|
| 291 | PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2` |
---|
| 292 | echo perllib="${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" |
---|
| 293 | |
---|
| 294 | # libperl may or may not be installed. Check for its existence. |
---|
| 295 | if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then |
---|
[1149] | 296 | PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl" |
---|
[498] | 297 | fi |
---|
[1148] | 298 | fi |
---|
[498] | 299 | fi |
---|
[718] | 300 | AC_MSG_RESULT([${PERL}]) |
---|
| 301 | AC_SUBST(PERL) |
---|
| 302 | AC_SUBST(PERL_INCLUDES) |
---|
[1082] | 303 | AC_SUBST(PERL_ARCHLIB) |
---|
[1097] | 304 | AC_SUBST(PERL_ARCHLIBEXP) |
---|
[1087] | 305 | AC_SUBST(PERL_VERSION) |
---|
[1092] | 306 | AC_SUBST(PERL_CCFLAGS) |
---|
| 307 | AC_SUBST(PERL_CPPFLAGS) |
---|
| 308 | AC_SUBST(PERL_VENDORLIB) |
---|
| 309 | AC_SUBST(PERL_PRIVLIB) |
---|
[1093] | 310 | AC_SUBST(PERL_INSTALLARCHLIB) |
---|
[1087] | 311 | AC_SUBST(PERL_VERSION_RV) |
---|
[1148] | 312 | AC_SUBST(PERL_LIBSPEC) |
---|
[497] | 313 | |
---|
[1049] | 314 | PYTHON="" |
---|
| 315 | PYTHON_CFLAGS="" |
---|
| 316 | PYTHON_CPPFLAGS="" |
---|
[1081] | 317 | HAVE_PYTHON_DISTUTILS="" |
---|
[1049] | 318 | PYTHON_INCLUDES="" |
---|
| 319 | PYTHON_LDFLAGS="" |
---|
| 320 | PYTHON_LIB="" |
---|
| 321 | PYTHON_LIBDIR="" |
---|
[1055] | 322 | PYTHON_SITE_DIR="" |
---|
[1049] | 323 | PYTHON_SITE_PACKAGES="" |
---|
| 324 | PYTHON_VERSION="" |
---|
| 325 | pythondir="" |
---|
| 326 | |
---|
| 327 | AC_ARG_WITH([python], |
---|
[1588] | 328 | [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=yes@:>@])], |
---|
[718] | 329 | [], |
---|
[1588] | 330 | [with_python=yes]) |
---|
[718] | 331 | |
---|
[497] | 332 | if test "$with_python" != "no" ; then |
---|
[1047] | 333 | AC_MSG_CHECKING([for python]) |
---|
[1049] | 334 | if test -x "$with_python/bin/python"; then |
---|
[1047] | 335 | echo Found python in $with_python/bin/python |
---|
| 336 | PYTHON="$with_python/bin/python" |
---|
[1049] | 337 | elif test -x "$with_python"; then |
---|
| 338 | echo Found python in $with_python |
---|
| 339 | PYTHON="$with_python" |
---|
[1047] | 340 | else |
---|
[1049] | 341 | AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) |
---|
[1047] | 342 | fi |
---|
[1049] | 343 | if test "x${PYTHON}" != "x"; then |
---|
[1047] | 344 | PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
---|
| 345 | echo Using python version $PYTHON_VERSION |
---|
| 346 | fi |
---|
[1049] | 347 | if test "x${PYTHON_VERSION}" != "x"; then |
---|
[497] | 348 | if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ |
---|
[1049] | 349 | -d $with_python/lib/python$PYTHON_VERSION/site-packages; then |
---|
[1047] | 350 | PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION |
---|
| 351 | PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages |
---|
[497] | 352 | else |
---|
[1049] | 353 | if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then |
---|
[1087] | 354 | PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' |
---|
| 355 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
---|
[1047] | 356 | else |
---|
[1087] | 357 | if test -r /usr/include/python$PYTHON_VERSION/Python.h; then |
---|
| 358 | PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION |
---|
| 359 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
---|
| 360 | else |
---|
| 361 | echo could not find python$PYTHON_VERSION/Python.h |
---|
| 362 | fi |
---|
[1047] | 363 | fi |
---|
[1049] | 364 | if test ! -d "$PYTHON_SITE_PACKAGES"; then |
---|
[1087] | 365 | PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` |
---|
[1047] | 366 | fi |
---|
[497] | 367 | fi |
---|
[1047] | 368 | fi |
---|
| 369 | if test "x$with_python" != "x" ; then |
---|
| 370 | pythondir='$(PYTHON_SITE_PACKAGES)' |
---|
| 371 | else |
---|
| 372 | pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages' |
---|
| 373 | fi |
---|
[1049] | 374 | |
---|
[1047] | 375 | AC_MSG_CHECKING([for python distutils]) |
---|
[1055] | 376 | ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \ |
---|
[1087] | 377 | build build_ext 2>&1 > /dev/null |
---|
[1055] | 378 | if test $? = 0 ; then |
---|
[1081] | 379 | HAVE_PYTHON_DISTUTILS="yes" |
---|
[1047] | 380 | else |
---|
[1588] | 381 | HAVE_PYTHON_DISTUTILS="no" |
---|
[1047] | 382 | fi |
---|
[1081] | 383 | AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS]) |
---|
[1087] | 384 | |
---|
[1081] | 385 | if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then |
---|
[1049] | 386 | # |
---|
| 387 | # Check for Python include path |
---|
| 388 | # |
---|
| 389 | AC_MSG_CHECKING([for Python include path]) |
---|
| 390 | if test "x${PYTHON_CPPFLAGS}" = "x"; then |
---|
[1055] | 391 | incdir_path=`${PYTHON} -c "import distutils.sysconfig; \ |
---|
[1049] | 392 | print distutils.sysconfig.get_python_inc();"` |
---|
[1055] | 393 | if test -n "${incdir}"; then |
---|
[1087] | 394 | python_path="-I${incdir}" |
---|
[1049] | 395 | fi |
---|
| 396 | PYTHON_CPPFLAGS=$python_path |
---|
| 397 | fi |
---|
| 398 | AC_MSG_RESULT([$PYTHON_CPPFLAGS]) |
---|
| 399 | AC_SUBST([PYTHON_CPPFLAGS]) |
---|
| 400 | # |
---|
| 401 | # python distutils found, get settings from python directly |
---|
| 402 | # |
---|
| 403 | AC_MSG_CHECKING([location of site-packages]) |
---|
| 404 | PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`" |
---|
[1087] | 405 | |
---|
[1049] | 406 | PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`" |
---|
| 407 | PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`" |
---|
| 408 | PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`" |
---|
| 409 | PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`" |
---|
| 410 | fi |
---|
| 411 | fi |
---|
[497] | 412 | AC_SUBST(pythondir) |
---|
| 413 | |
---|
| 414 | AC_SUBST(PYTHON) |
---|
| 415 | AC_SUBST(PYTHON_VERSION) |
---|
| 416 | AC_SUBST(PYTHON_INCLUDES) |
---|
| 417 | AC_SUBST(PYTHON_SITE_PACKAGES) |
---|
[1081] | 418 | AC_SUBST(HAVE_PYTHON_DISTUTILS) |
---|
[497] | 419 | |
---|
[1081] | 420 | rappture_with_ruby="yes" |
---|
[489] | 421 | |
---|
[1018] | 422 | RUBY="" |
---|
[1081] | 423 | RUBY_DEV_PKG="no" |
---|
| 424 | |
---|
[1087] | 425 | AC_ARG_WITH(ruby, |
---|
| 426 | AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]), |
---|
[1081] | 427 | [rappture_with_ruby=$with_val]) |
---|
[1087] | 428 | if test "${rappture_with_ruby}" != "no" ; then |
---|
[1081] | 429 | if test "${rappture_with_ruby}" = "yes" ; then |
---|
| 430 | AC_PATH_PROG(RUBY, ruby) |
---|
| 431 | else |
---|
[1579] | 432 | AC_PATH_PROG(RUBY, ruby, [], |
---|
[1081] | 433 | [${rappture_with_ruby}/bin/ruby:${rappture_with_ruby}]) |
---|
| 434 | fi |
---|
[1018] | 435 | fi |
---|
| 436 | AC_SUBST(RUBY) |
---|
| 437 | |
---|
[1087] | 438 | RUBY_VERSION_RV= |
---|
| 439 | RUBY_PLATFORM= |
---|
[1081] | 440 | if test "x${RUBY}" != "x" ; then |
---|
| 441 | AX_PROG_RUBY_VERSION |
---|
[1087] | 442 | RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2` |
---|
| 443 | RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'` |
---|
[1081] | 444 | ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1` |
---|
| 445 | if test -z "$ac_mkmf_result"; then |
---|
| 446 | HAVE_RUBY_DEVEL="yes" |
---|
| 447 | AX_RUBY_DEV_FLAGS([${RUBY}]) |
---|
| 448 | fi |
---|
| 449 | fi |
---|
| 450 | AC_SUBST(HAVE_RUBY_DEVEL) |
---|
[1087] | 451 | AC_SUBST(RUBY_VERSION_RV) |
---|
| 452 | AC_SUBST(RUBY_PLATFORM) |
---|
[1081] | 453 | |
---|
[1722] | 454 | # TODO: Check that these actually exist. |
---|
| 455 | JAVA=java |
---|
| 456 | JAVAC=javac |
---|
| 457 | JAVAH=javah |
---|
| 458 | |
---|
| 459 | # TODO: Find the java install from path to java exectuable. |
---|
| 460 | JAVA_HOME=/usr/lib/jvm/java-6-sun |
---|
| 461 | |
---|
| 462 | # TODO: find the location of jni.h and jni_md.h. |
---|
| 463 | # Obviously the linux subdir won't exist on all platforms. |
---|
| 464 | JAVA_INCLUDES="-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/linux" |
---|
| 465 | |
---|
| 466 | AC_SUBST(JAVA) |
---|
| 467 | AC_SUBST(JAVAC) |
---|
| 468 | AC_SUBST(JAVAH) |
---|
| 469 | AC_SUBST(JAVA_HOME) |
---|
| 470 | AC_SUBST(JAVA_INCLUDES) |
---|
| 471 | |
---|
[489] | 472 | RP_BASE=`pwd` |
---|
| 473 | AC_SUBST(RP_BASE) |
---|
| 474 | |
---|
[1018] | 475 | SC_ENABLE_SHARED |
---|
[512] | 476 | |
---|
[1018] | 477 | #-------------------------------------------------------------------- |
---|
| 478 | # This macro figures out what flags to use with the compiler/linker |
---|
| 479 | # when building shared/static debug/optimized objects. This information |
---|
| 480 | # is all taken from the tclConfig.sh file. |
---|
| 481 | #-------------------------------------------------------------------- |
---|
| 482 | |
---|
| 483 | AC_SUBST(CFLAGS_DEBUG) |
---|
| 484 | AC_SUBST(CFLAGS_OPTIMIZE) |
---|
| 485 | AC_SUBST(STLIB_LD) |
---|
| 486 | AC_SUBST(SHLIB_LD) |
---|
| 487 | AC_SUBST(SHLIB_CFLAGS) |
---|
| 488 | AC_SUBST(SHLIB_LDFLAGS) |
---|
| 489 | AC_SUBST(SHLIB_SUFFIX) |
---|
| 490 | |
---|
[1132] | 491 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
| 492 | . ${exec_prefix}/lib/tclConfig.sh |
---|
| 493 | fi |
---|
| 494 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
| 495 | . ${exec_prefix}/lib/tkConfig.sh |
---|
| 496 | fi |
---|
[1082] | 497 | AC_SUBST(TCL_VERSION) |
---|
| 498 | AC_SUBST(TK_VERSION) |
---|
| 499 | |
---|
[1262] | 500 | # ----------------------------------------------------------------------- |
---|
| 501 | # |
---|
| 502 | # Compiler characteristics: |
---|
| 503 | # Check for existence of types of size_t and pid_t |
---|
| 504 | # |
---|
| 505 | # ----------------------------------------------------------------------- |
---|
| 506 | |
---|
| 507 | AC_C_BIGENDIAN |
---|
| 508 | AC_CHECK_SIZEOF(int) |
---|
| 509 | AC_CHECK_SIZEOF(long) |
---|
| 510 | AC_CHECK_SIZEOF(long long) |
---|
| 511 | AC_CHECK_SIZEOF(void *) |
---|
| 512 | |
---|
| 513 | SIZEOF_LONG="${ac_cv_sizeof_long}" |
---|
| 514 | SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" |
---|
| 515 | SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" |
---|
| 516 | SIZEOF_INT="${ac_cv_sizeof_int}" |
---|
| 517 | AC_SUBST(SIZEOF_INT) |
---|
| 518 | AC_SUBST(SIZEOF_LONG) |
---|
| 519 | AC_SUBST(SIZEOF_LONG_LONG) |
---|
| 520 | AC_SUBST(SIZEOF_VOID_P) |
---|
| 521 | |
---|
| 522 | |
---|
[1018] | 523 | #-------------------------------------------------------------------- |
---|
| 524 | # Set the default compiler switches based on the --enable-symbols |
---|
| 525 | # option. |
---|
| 526 | #-------------------------------------------------------------------- |
---|
| 527 | |
---|
| 528 | SC_ENABLE_SYMBOLS |
---|
| 529 | |
---|
| 530 | if test "${SHARED_BUILD}" = "1" ; then |
---|
| 531 | CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' |
---|
| 532 | else |
---|
| 533 | CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' |
---|
[905] | 534 | fi |
---|
| 535 | |
---|
[1055] | 536 | ac_configure_args="--disable-threads --enable-shared" |
---|
[1018] | 537 | AC_CONFIG_SUBDIRS( [packages/optimizer/src] ) |
---|
[942] | 538 | |
---|
[489] | 539 | dnl read Makefile.in and write Makefile |
---|
[1270] | 540 | AC_CONFIG_FILES([ |
---|
[1159] | 541 | Makefile |
---|
[1087] | 542 | packages/Makefile |
---|
| 543 | src/Makefile |
---|
| 544 | src/core/Makefile |
---|
| 545 | src/core2/Makefile |
---|
| 546 | src/objects/Makefile |
---|
[1270] | 547 | src/objects/RpHash.h |
---|
[1087] | 548 | gui/Makefile |
---|
| 549 | gui/apps/Makefile |
---|
[1111] | 550 | gui/apps/about |
---|
[1280] | 551 | gui/apps/encodedata |
---|
[1087] | 552 | gui/apps/rappture |
---|
[1175] | 553 | gui/apps/rappture-csh.env |
---|
[1087] | 554 | gui/apps/rappture.env |
---|
[1633] | 555 | gui/apps/rappture.use |
---|
[1159] | 556 | gui/apps/rerun |
---|
[1087] | 557 | gui/apps/simsim |
---|
[1206] | 558 | gui/apps/xmldiff |
---|
[1087] | 559 | gui/pkgIndex.tcl |
---|
| 560 | gui/scripts/Makefile |
---|
| 561 | lang/Makefile |
---|
[1722] | 562 | lang/java/Makefile |
---|
[1087] | 563 | lang/perl/Makefile |
---|
| 564 | lang/perl/Makefile.PL |
---|
| 565 | lang/python/Makefile |
---|
| 566 | lang/python/setup.py |
---|
| 567 | lang/matlab/Makefile |
---|
| 568 | lang/octave/Makefile |
---|
[1262] | 569 | lang/octave/RpOctaveInterface.h |
---|
[1087] | 570 | lang/ruby/Makefile |
---|
| 571 | lang/ruby/build.rb |
---|
| 572 | lang/tcl/Makefile |
---|
| 573 | lang/tcl/pkgIndex.tcl |
---|
| 574 | lang/tcl/src/Makefile |
---|
| 575 | lang/tcl/scripts/Makefile |
---|
| 576 | lang/tcl/tests/Makefile |
---|
| 577 | lib/Makefile |
---|
[1096] | 578 | examples/3D/Makefile |
---|
[1087] | 579 | examples/Makefile |
---|
[1096] | 580 | examples/app-fermi/2.0/Makefile |
---|
[1087] | 581 | examples/app-fermi/Makefile |
---|
| 582 | examples/app-fermi/cee/Makefile |
---|
| 583 | examples/app-fermi/fortran/Makefile |
---|
[1722] | 584 | examples/app-fermi/java/Makefile |
---|
[1087] | 585 | examples/app-fermi/matlab/Makefile |
---|
[1222] | 586 | examples/app-fermi/matlab/compiled/Makefile |
---|
| 587 | examples/app-fermi/matlab/uncompiled/Makefile |
---|
[1087] | 588 | examples/app-fermi/octave/Makefile |
---|
[1593] | 589 | examples/app-fermi/octave/2/Makefile |
---|
| 590 | examples/app-fermi/octave/3/Makefile |
---|
[1087] | 591 | examples/app-fermi/perl/Makefile |
---|
| 592 | examples/app-fermi/python/Makefile |
---|
| 593 | examples/app-fermi/ruby/Makefile |
---|
| 594 | examples/app-fermi/tcl/Makefile |
---|
| 595 | examples/app-fermi/wrapper/Makefile |
---|
| 596 | examples/app-fermi/wrapper/cee/Makefile |
---|
| 597 | examples/app-fermi/wrapper/python/Makefile |
---|
| 598 | examples/app-fermi/wrapper/tcl/Makefile |
---|
| 599 | examples/c-example/Makefile |
---|
| 600 | examples/canvas/Makefile |
---|
| 601 | examples/demo.bash |
---|
[1466] | 602 | examples/flow/Makefile |
---|
| 603 | examples/flow/demo1/Makefile |
---|
| 604 | examples/flow/demo2/Makefile |
---|
| 605 | examples/flow/demo3/Makefile |
---|
[1087] | 606 | examples/graph/Makefile |
---|
[1096] | 607 | examples/objects/Makefile |
---|
[1386] | 608 | examples/objects/axis/Makefile |
---|
[1528] | 609 | examples/objects/contour/Makefile |
---|
[1386] | 610 | examples/objects/curve/Makefile |
---|
[1096] | 611 | examples/objects/dxWriter/Makefile |
---|
| 612 | examples/objects/floatBuffer/Makefile |
---|
[1528] | 613 | examples/objects/histogram/Makefile |
---|
[1566] | 614 | examples/objects/library/Makefile |
---|
[1386] | 615 | examples/objects/number/Makefile |
---|
[1528] | 616 | examples/objects/path/Makefile |
---|
[1386] | 617 | examples/objects/plot/Makefile |
---|
[1528] | 618 | examples/objects/scatter/Makefile |
---|
[1386] | 619 | examples/objects/string/Makefile |
---|
[1528] | 620 | examples/objects/tree/Makefile |
---|
| 621 | examples/objects/xmlparser/Makefile |
---|
[1087] | 622 | examples/zoo/Makefile |
---|
| 623 | examples/zoo/binary/Makefile |
---|
| 624 | examples/zoo/boolean/Makefile |
---|
| 625 | examples/zoo/choice/Makefile |
---|
| 626 | examples/zoo/cloud/Makefile |
---|
| 627 | examples/zoo/cloud/matlab/Makefile |
---|
| 628 | examples/zoo/curve/Makefile |
---|
| 629 | examples/zoo/enable/Makefile |
---|
| 630 | examples/zoo/field/Makefile |
---|
| 631 | examples/zoo/group/Makefile |
---|
| 632 | examples/zoo/image/Makefile |
---|
| 633 | examples/zoo/image/docs/Makefile |
---|
| 634 | examples/zoo/image/examples/Makefile |
---|
| 635 | examples/zoo/integer/Makefile |
---|
| 636 | examples/zoo/integer2/Makefile |
---|
| 637 | examples/zoo/loader/Makefile |
---|
| 638 | examples/zoo/loader/examples/Makefile |
---|
[1218] | 639 | examples/zoo/loadrun/Makefile |
---|
[1087] | 640 | examples/zoo/log/Makefile |
---|
| 641 | examples/zoo/note/Makefile |
---|
| 642 | examples/zoo/note/docs/Makefile |
---|
| 643 | examples/zoo/number/Makefile |
---|
| 644 | examples/zoo/number2/Makefile |
---|
[1631] | 645 | examples/zoo/periodicelement/Makefile |
---|
[1087] | 646 | examples/zoo/phase/Makefile |
---|
| 647 | examples/zoo/sequence/Makefile |
---|
| 648 | examples/zoo/sequence/examples/Makefile |
---|
| 649 | examples/zoo/string/Makefile |
---|
| 650 | examples/zoo/structure/Makefile |
---|
| 651 | examples/zoo/structure/examples/Makefile |
---|
| 652 | examples/zoo/table/Makefile |
---|
[1262] | 653 | examples/zoo/unirect2d/Makefile |
---|
[1087] | 654 | test/Makefile |
---|
| 655 | test/src/Makefile |
---|
[1018] | 656 | ]) |
---|
[1270] | 657 | AC_OUTPUT |
---|