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