[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 | |
---|
[1018] | 117 | with_tclsh="check" |
---|
[905] | 118 | AC_ARG_WITH( |
---|
| 119 | [tclsh], |
---|
| 120 | [AS_HELP_STRING([--with-tclsh[=DIR]], |
---|
| 121 | [location of tclsh @<:@default=check@:>@])], |
---|
| 122 | [], |
---|
| 123 | [with_tclsh=check]) |
---|
[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( |
---|
| 147 | [matlab], |
---|
| 148 | [AS_HELP_STRING([--with-matlab[=DIR]], |
---|
| 149 | [location of matlab and mex compiler @<:@default=check@:>@])], |
---|
[1058] | 150 | [with_matlab=$withval], |
---|
| 151 | [with_matlab=yes]) |
---|
[718] | 152 | |
---|
[1159] | 153 | MCC="" |
---|
[1049] | 154 | MEX="" |
---|
| 155 | MEX_ARCH="" |
---|
| 156 | MEXEXT="" |
---|
[1101] | 157 | MATLAB= |
---|
[833] | 158 | if test "$with_matlab" != "no" ; then |
---|
[1057] | 159 | if test "$with_matlab" = "yes" ; then |
---|
[1101] | 160 | AC_PATH_PROG(MATLAB, matlab) |
---|
[1057] | 161 | else |
---|
[1121] | 162 | AC_PATH_PROG(MATLAB, matlab, [${with_matlab}/bin:${with_matlab}]) |
---|
[1057] | 163 | fi |
---|
[833] | 164 | fi |
---|
[1121] | 165 | |
---|
| 166 | if test "x$MATLAB" != "x" ; then |
---|
[1148] | 167 | # Found matlab. May be a symlink to the real binary. Run "matlab -e" |
---|
| 168 | # to tell where matlab is installed. |
---|
| 169 | |
---|
| 170 | matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin |
---|
| 171 | |
---|
| 172 | # Now see if we can find "mex" or "mexext" there. |
---|
| 173 | AC_PATH_PROG(MEX, mex, [${matlab_bindir}/mex]) |
---|
| 174 | AC_PATH_PROG(MEXEXT, mexext, [${matlab_bindir}/mexext]) |
---|
| 175 | |
---|
| 176 | # Run "mexext" to get the expected module extension for this platform. |
---|
[1121] | 177 | AC_MSG_CHECKING([for mex extension]) |
---|
[1159] | 178 | if test "x$MEXEXT" != "x" ; then |
---|
[1148] | 179 | MEXEXT=`$MEXEXT` |
---|
[1159] | 180 | else |
---|
[1148] | 181 | MEXEXT="mexglx" |
---|
[1121] | 182 | fi |
---|
[1148] | 183 | AC_MSG_RESULT([$MEXEXT]) |
---|
[1159] | 184 | AC_PATH_PROG(MCC, mcc, [${matlab_bindir}]) |
---|
| 185 | AC_MSG_CHECKING([for mcc extension]) |
---|
[1101] | 186 | fi |
---|
[1121] | 187 | |
---|
[1159] | 188 | AC_SUBST(MCC) |
---|
[718] | 189 | AC_SUBST(MEX) |
---|
[1101] | 190 | AC_SUBST(MATLAB) |
---|
[718] | 191 | AC_SUBST(MEX_ARCH) |
---|
| 192 | AC_SUBST(MEXEXT) |
---|
[708] | 193 | |
---|
[718] | 194 | AC_ARG_WITH( |
---|
| 195 | [octave], |
---|
| 196 | [AS_HELP_STRING([--with-octave[=DIR]], |
---|
| 197 | [location of octave compiler MKOCTFILE @<:@default=check@:>@])], |
---|
[1058] | 198 | [with_octave=$withval], |
---|
| 199 | [with_octave=yes]) |
---|
[718] | 200 | |
---|
[1262] | 201 | OCTAVE= |
---|
| 202 | OCTAVE_VERSION= |
---|
| 203 | OCTAVE_VERSION_MAJOR= |
---|
[508] | 204 | MKOCTFILE= |
---|
[833] | 205 | if test "$with_octave" != "no" ; then |
---|
[1262] | 206 | AC_MSG_CHECKING([for octave and mkoctfile]) |
---|
[1057] | 207 | if test "$with_octave" = "yes" ; then |
---|
[1262] | 208 | AC_PATH_PROG(OCTAVE, octave) |
---|
[1057] | 209 | AC_PATH_PROG(MKOCTFILE, mkoctfile) |
---|
| 210 | else |
---|
[1262] | 211 | AC_PATH_PROG(OCTAVE, octave, [$with_octave/bin:$with_octave]) |
---|
[1159] | 212 | AC_PATH_PROG(MKOCTFILE, mkoctfile, |
---|
| 213 | [${with_octave}/bin/mkoctfile:${with_octave}]) |
---|
[1057] | 214 | fi |
---|
[1262] | 215 | if test "x${OCTAVE}" != "x" ; then |
---|
| 216 | OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4` |
---|
| 217 | OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1` |
---|
| 218 | fi |
---|
[833] | 219 | fi |
---|
[1262] | 220 | AC_SUBST(OCTAVE) |
---|
| 221 | AC_SUBST(OCTAVE_VERSION) |
---|
| 222 | AC_SUBST(OCTAVE_VERSION_MAJOR) |
---|
[718] | 223 | AC_SUBST(MKOCTFILE) |
---|
[498] | 224 | |
---|
| 225 | |
---|
[718] | 226 | AC_ARG_WITH( |
---|
| 227 | [perl], |
---|
| 228 | [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=check@:>@])], |
---|
| 229 | [], |
---|
| 230 | [with_perl=check]) |
---|
| 231 | |
---|
[508] | 232 | PERL= |
---|
| 233 | PERL_INCLUDES= |
---|
[1082] | 234 | PERL_ARCHLIB= |
---|
[1097] | 235 | PERL_ARCHLIBEXP= |
---|
[1087] | 236 | PERL_VERSION= |
---|
[1092] | 237 | PERL_VENDORLIB= |
---|
| 238 | PERL_PRIVLIB= |
---|
| 239 | PERL_CPPFLAGS= |
---|
| 240 | PERL_CCFlAGS= |
---|
[1087] | 241 | PERL_VERSION_RV= |
---|
[1148] | 242 | PERL_LIBSPEC= |
---|
[498] | 243 | if test "$with_perl" != "no" ; then |
---|
[1148] | 244 | AC_MSG_CHECKING([for perl]) |
---|
| 245 | if test "$with_perl" != "yes" ; then |
---|
| 246 | AC_PATH_PROG(PERL, perl, [$with_perl/bin:$with_perl]) |
---|
| 247 | else |
---|
| 248 | AC_PATH_PROG(PERL, perl) |
---|
| 249 | fi |
---|
| 250 | if test "x${PERL}" != "x" ; then |
---|
| 251 | PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'` |
---|
| 252 | PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'` |
---|
| 253 | PERL_CCFLAGS=`${PERL} -MConfig -e 'print $Config{ccflags}'` |
---|
| 254 | PERL_CPPFLAGS=`${PERL} -MConfig -e 'print $Config{cppflags}'` |
---|
| 255 | PERL_VENDORLIB=`${PERL} -MConfig -e 'print $Config{vendorlib}'` |
---|
| 256 | PERL_PRIVLIB=`${PERL} -MConfig -e 'print $Config{privlib}'` |
---|
| 257 | PERL_INSTALLARCHLIB=`${PERL} -MConfig -e 'print $Config{installarchlib}'` |
---|
| 258 | PERL_ARCHLIBEXP=`${PERL} -MConfig -e 'print $Config{archlibexp}'` |
---|
| 259 | PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2` |
---|
| 260 | echo perllib="${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" |
---|
| 261 | |
---|
| 262 | # libperl may or may not be installed. Check for its existence. |
---|
| 263 | if test -f "${PERL_ARCHLIBEXP}/CORE/libperl${SHLIB_SUFFIX}" ; then |
---|
[1149] | 264 | PERL_LIBSPEC="-L${PERL_ARCHLIBEXP}/CORE -lperl" |
---|
[498] | 265 | fi |
---|
[1148] | 266 | fi |
---|
[498] | 267 | fi |
---|
[718] | 268 | AC_MSG_RESULT([${PERL}]) |
---|
| 269 | AC_SUBST(PERL) |
---|
| 270 | AC_SUBST(PERL_INCLUDES) |
---|
[1082] | 271 | AC_SUBST(PERL_ARCHLIB) |
---|
[1097] | 272 | AC_SUBST(PERL_ARCHLIBEXP) |
---|
[1087] | 273 | AC_SUBST(PERL_VERSION) |
---|
[1092] | 274 | AC_SUBST(PERL_CCFLAGS) |
---|
| 275 | AC_SUBST(PERL_CPPFLAGS) |
---|
| 276 | AC_SUBST(PERL_VENDORLIB) |
---|
| 277 | AC_SUBST(PERL_PRIVLIB) |
---|
[1093] | 278 | AC_SUBST(PERL_INSTALLARCHLIB) |
---|
[1087] | 279 | AC_SUBST(PERL_VERSION_RV) |
---|
[1148] | 280 | AC_SUBST(PERL_LIBSPEC) |
---|
[497] | 281 | |
---|
[1049] | 282 | PYTHON="" |
---|
| 283 | PYTHON_CFLAGS="" |
---|
| 284 | PYTHON_CPPFLAGS="" |
---|
[1081] | 285 | HAVE_PYTHON_DISTUTILS="" |
---|
[1049] | 286 | PYTHON_INCLUDES="" |
---|
| 287 | PYTHON_LDFLAGS="" |
---|
| 288 | PYTHON_LIB="" |
---|
| 289 | PYTHON_LIBDIR="" |
---|
[1055] | 290 | PYTHON_SITE_DIR="" |
---|
[1049] | 291 | PYTHON_SITE_PACKAGES="" |
---|
| 292 | PYTHON_VERSION="" |
---|
| 293 | pythondir="" |
---|
| 294 | |
---|
| 295 | AC_ARG_WITH([python], |
---|
[718] | 296 | [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=check@:>@])], |
---|
| 297 | [], |
---|
| 298 | [with_python=check]) |
---|
| 299 | |
---|
[497] | 300 | if test "$with_python" != "no" ; then |
---|
[1047] | 301 | AC_MSG_CHECKING([for python]) |
---|
[1049] | 302 | if test -x "$with_python/bin/python"; then |
---|
[1047] | 303 | echo Found python in $with_python/bin/python |
---|
| 304 | PYTHON="$with_python/bin/python" |
---|
[1049] | 305 | elif test -x "$with_python"; then |
---|
| 306 | echo Found python in $with_python |
---|
| 307 | PYTHON="$with_python" |
---|
[1047] | 308 | else |
---|
[1049] | 309 | AC_PATH_PROG(PYTHON, python python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5) |
---|
[1047] | 310 | fi |
---|
[1049] | 311 | if test "x${PYTHON}" != "x"; then |
---|
[1047] | 312 | PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"` |
---|
| 313 | echo Using python version $PYTHON_VERSION |
---|
| 314 | fi |
---|
[1049] | 315 | if test "x${PYTHON_VERSION}" != "x"; then |
---|
[497] | 316 | if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \ |
---|
[1049] | 317 | -d $with_python/lib/python$PYTHON_VERSION/site-packages; then |
---|
[1047] | 318 | PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION |
---|
| 319 | PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages |
---|
[497] | 320 | else |
---|
[1049] | 321 | if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then |
---|
[1087] | 322 | PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)' |
---|
| 323 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
---|
[1047] | 324 | else |
---|
[1087] | 325 | if test -r /usr/include/python$PYTHON_VERSION/Python.h; then |
---|
| 326 | PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION |
---|
| 327 | PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages' |
---|
| 328 | else |
---|
| 329 | echo could not find python$PYTHON_VERSION/Python.h |
---|
| 330 | fi |
---|
[1047] | 331 | fi |
---|
[1049] | 332 | if test ! -d "$PYTHON_SITE_PACKAGES"; then |
---|
[1087] | 333 | PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"` |
---|
[1047] | 334 | fi |
---|
[497] | 335 | fi |
---|
[1047] | 336 | fi |
---|
| 337 | if test "x$with_python" != "x" ; then |
---|
| 338 | pythondir='$(PYTHON_SITE_PACKAGES)' |
---|
| 339 | else |
---|
| 340 | pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages' |
---|
| 341 | fi |
---|
[1049] | 342 | |
---|
[1047] | 343 | AC_MSG_CHECKING([for python distutils]) |
---|
[1055] | 344 | ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \ |
---|
[1087] | 345 | build build_ext 2>&1 > /dev/null |
---|
[1055] | 346 | if test $? = 0 ; then |
---|
[1081] | 347 | HAVE_PYTHON_DISTUTILS="yes" |
---|
[1047] | 348 | else |
---|
[1081] | 349 | HAVE_PYTHON_DISTUTILS="no" |
---|
[1047] | 350 | fi |
---|
[1081] | 351 | AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS]) |
---|
[1087] | 352 | |
---|
[1081] | 353 | if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then |
---|
[1049] | 354 | # |
---|
| 355 | # Check for Python include path |
---|
| 356 | # |
---|
| 357 | AC_MSG_CHECKING([for Python include path]) |
---|
| 358 | if test "x${PYTHON_CPPFLAGS}" = "x"; then |
---|
[1055] | 359 | incdir_path=`${PYTHON} -c "import distutils.sysconfig; \ |
---|
[1049] | 360 | print distutils.sysconfig.get_python_inc();"` |
---|
[1055] | 361 | if test -n "${incdir}"; then |
---|
[1087] | 362 | python_path="-I${incdir}" |
---|
[1049] | 363 | fi |
---|
| 364 | PYTHON_CPPFLAGS=$python_path |
---|
| 365 | fi |
---|
| 366 | AC_MSG_RESULT([$PYTHON_CPPFLAGS]) |
---|
| 367 | AC_SUBST([PYTHON_CPPFLAGS]) |
---|
| 368 | # |
---|
| 369 | # python distutils found, get settings from python directly |
---|
| 370 | # |
---|
| 371 | AC_MSG_CHECKING([location of site-packages]) |
---|
| 372 | PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`" |
---|
[1087] | 373 | |
---|
[1049] | 374 | 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);'`" |
---|
| 375 | 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);'`" |
---|
| 376 | PYTHON_LIB="`$PYTHON -c 'from distutils import sysconfig; print \"python\" + sysconfig.get_config_var(\"VERSION\");'`" |
---|
| 377 | PYTHON_LIBDIR="`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var(\"LIBDIR\");'`" |
---|
| 378 | fi |
---|
| 379 | fi |
---|
[497] | 380 | AC_SUBST(pythondir) |
---|
| 381 | |
---|
| 382 | AC_SUBST(PYTHON) |
---|
| 383 | AC_SUBST(PYTHON_VERSION) |
---|
| 384 | AC_SUBST(PYTHON_INCLUDES) |
---|
| 385 | AC_SUBST(PYTHON_SITE_PACKAGES) |
---|
[1081] | 386 | AC_SUBST(HAVE_PYTHON_DISTUTILS) |
---|
[497] | 387 | |
---|
[1081] | 388 | rappture_with_ruby="yes" |
---|
[489] | 389 | |
---|
[1018] | 390 | RUBY="" |
---|
[1081] | 391 | RUBY_DEV_PKG="no" |
---|
| 392 | |
---|
[1087] | 393 | AC_ARG_WITH(ruby, |
---|
| 394 | AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]), |
---|
[1081] | 395 | [rappture_with_ruby=$with_val]) |
---|
[1087] | 396 | if test "${rappture_with_ruby}" != "no" ; then |
---|
[1081] | 397 | if test "${rappture_with_ruby}" = "yes" ; then |
---|
| 398 | AC_PATH_PROG(RUBY, ruby) |
---|
| 399 | else |
---|
[1087] | 400 | AC_PATH_PROG(RUBY, ruby, |
---|
[1081] | 401 | [${rappture_with_ruby}/bin/ruby:${rappture_with_ruby}]) |
---|
| 402 | fi |
---|
[1018] | 403 | fi |
---|
| 404 | AC_SUBST(RUBY) |
---|
| 405 | |
---|
[1087] | 406 | RUBY_VERSION_RV= |
---|
| 407 | RUBY_PLATFORM= |
---|
[1081] | 408 | if test "x${RUBY}" != "x" ; then |
---|
| 409 | AX_PROG_RUBY_VERSION |
---|
[1087] | 410 | RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2` |
---|
| 411 | RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'` |
---|
[1081] | 412 | ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1` |
---|
| 413 | if test -z "$ac_mkmf_result"; then |
---|
| 414 | HAVE_RUBY_DEVEL="yes" |
---|
| 415 | AX_RUBY_DEV_FLAGS([${RUBY}]) |
---|
| 416 | fi |
---|
| 417 | fi |
---|
| 418 | AC_SUBST(HAVE_RUBY_DEVEL) |
---|
[1087] | 419 | AC_SUBST(RUBY_VERSION_RV) |
---|
| 420 | AC_SUBST(RUBY_PLATFORM) |
---|
[1081] | 421 | |
---|
[489] | 422 | RP_BASE=`pwd` |
---|
| 423 | AC_SUBST(RP_BASE) |
---|
| 424 | |
---|
[1018] | 425 | SC_ENABLE_SHARED |
---|
[512] | 426 | |
---|
[1018] | 427 | #-------------------------------------------------------------------- |
---|
| 428 | # This macro figures out what flags to use with the compiler/linker |
---|
| 429 | # when building shared/static debug/optimized objects. This information |
---|
| 430 | # is all taken from the tclConfig.sh file. |
---|
| 431 | #-------------------------------------------------------------------- |
---|
| 432 | |
---|
| 433 | AC_SUBST(CFLAGS_DEBUG) |
---|
| 434 | AC_SUBST(CFLAGS_OPTIMIZE) |
---|
| 435 | AC_SUBST(STLIB_LD) |
---|
| 436 | AC_SUBST(SHLIB_LD) |
---|
| 437 | AC_SUBST(SHLIB_CFLAGS) |
---|
| 438 | AC_SUBST(SHLIB_LDFLAGS) |
---|
| 439 | AC_SUBST(SHLIB_SUFFIX) |
---|
| 440 | |
---|
[1132] | 441 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
| 442 | . ${exec_prefix}/lib/tclConfig.sh |
---|
| 443 | fi |
---|
| 444 | if test -f "${exec_prefix}/lib/tclConfig.sh" ; then |
---|
| 445 | . ${exec_prefix}/lib/tkConfig.sh |
---|
| 446 | fi |
---|
[1082] | 447 | AC_SUBST(TCL_VERSION) |
---|
| 448 | AC_SUBST(TK_VERSION) |
---|
| 449 | |
---|
[1262] | 450 | # ----------------------------------------------------------------------- |
---|
| 451 | # |
---|
| 452 | # Compiler characteristics: |
---|
| 453 | # Check for existence of types of size_t and pid_t |
---|
| 454 | # |
---|
| 455 | # ----------------------------------------------------------------------- |
---|
| 456 | |
---|
| 457 | AC_C_BIGENDIAN |
---|
| 458 | AC_CHECK_SIZEOF(int) |
---|
| 459 | AC_CHECK_SIZEOF(long) |
---|
| 460 | AC_CHECK_SIZEOF(long long) |
---|
| 461 | AC_CHECK_SIZEOF(void *) |
---|
| 462 | |
---|
| 463 | SIZEOF_LONG="${ac_cv_sizeof_long}" |
---|
| 464 | SIZEOF_LONG_LONG="${ac_cv_sizeof_long_long}" |
---|
| 465 | SIZEOF_VOID_P="${ac_cv_sizeof_void_p}" |
---|
| 466 | SIZEOF_INT="${ac_cv_sizeof_int}" |
---|
| 467 | AC_SUBST(SIZEOF_INT) |
---|
| 468 | AC_SUBST(SIZEOF_LONG) |
---|
| 469 | AC_SUBST(SIZEOF_LONG_LONG) |
---|
| 470 | AC_SUBST(SIZEOF_VOID_P) |
---|
| 471 | |
---|
| 472 | |
---|
[1018] | 473 | #-------------------------------------------------------------------- |
---|
| 474 | # Set the default compiler switches based on the --enable-symbols |
---|
| 475 | # option. |
---|
| 476 | #-------------------------------------------------------------------- |
---|
| 477 | |
---|
| 478 | SC_ENABLE_SYMBOLS |
---|
| 479 | |
---|
| 480 | if test "${SHARED_BUILD}" = "1" ; then |
---|
| 481 | CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING} ${SHLIB_CFLAGS}' |
---|
| 482 | else |
---|
| 483 | CFLAGS='${CFLAGS_DEFAULT} ${CFLAGS_WARNING}' |
---|
[905] | 484 | fi |
---|
| 485 | |
---|
[1055] | 486 | ac_configure_args="--disable-threads --enable-shared" |
---|
[1018] | 487 | AC_CONFIG_SUBDIRS( [packages/optimizer/src] ) |
---|
[942] | 488 | |
---|
[489] | 489 | dnl read Makefile.in and write Makefile |
---|
[1270] | 490 | AC_CONFIG_FILES([ |
---|
[1159] | 491 | Makefile |
---|
[1087] | 492 | packages/Makefile |
---|
| 493 | src/Makefile |
---|
| 494 | src/core/Makefile |
---|
| 495 | src/core2/Makefile |
---|
| 496 | src/objects/Makefile |
---|
[1270] | 497 | src/objects/RpHash.h |
---|
[1087] | 498 | gui/Makefile |
---|
| 499 | gui/apps/Makefile |
---|
[1111] | 500 | gui/apps/about |
---|
[1280] | 501 | gui/apps/encodedata |
---|
[1087] | 502 | gui/apps/rappture |
---|
[1175] | 503 | gui/apps/rappture-csh.env |
---|
[1087] | 504 | gui/apps/rappture.env |
---|
[1159] | 505 | gui/apps/rerun |
---|
[1087] | 506 | gui/apps/simsim |
---|
[1206] | 507 | gui/apps/xmldiff |
---|
[1087] | 508 | gui/pkgIndex.tcl |
---|
| 509 | gui/scripts/Makefile |
---|
| 510 | lang/Makefile |
---|
| 511 | lang/perl/Makefile |
---|
| 512 | lang/perl/Makefile.PL |
---|
| 513 | lang/python/Makefile |
---|
| 514 | lang/python/setup.py |
---|
| 515 | lang/matlab/Makefile |
---|
| 516 | lang/octave/Makefile |
---|
[1262] | 517 | lang/octave/RpOctaveInterface.h |
---|
[1087] | 518 | lang/ruby/Makefile |
---|
| 519 | lang/ruby/build.rb |
---|
| 520 | lang/tcl/Makefile |
---|
| 521 | lang/tcl/pkgIndex.tcl |
---|
| 522 | lang/tcl/src/Makefile |
---|
| 523 | lang/tcl/scripts/Makefile |
---|
| 524 | lang/tcl/tests/Makefile |
---|
| 525 | lib/Makefile |
---|
[1096] | 526 | examples/3D/Makefile |
---|
[1087] | 527 | examples/Makefile |
---|
[1096] | 528 | examples/app-fermi/2.0/Makefile |
---|
[1087] | 529 | examples/app-fermi/Makefile |
---|
| 530 | examples/app-fermi/cee/Makefile |
---|
| 531 | examples/app-fermi/fortran/Makefile |
---|
| 532 | examples/app-fermi/matlab/Makefile |
---|
[1222] | 533 | examples/app-fermi/matlab/compiled/Makefile |
---|
| 534 | examples/app-fermi/matlab/uncompiled/Makefile |
---|
[1087] | 535 | examples/app-fermi/octave/Makefile |
---|
| 536 | examples/app-fermi/perl/Makefile |
---|
| 537 | examples/app-fermi/python/Makefile |
---|
| 538 | examples/app-fermi/ruby/Makefile |
---|
| 539 | examples/app-fermi/tcl/Makefile |
---|
| 540 | examples/app-fermi/wrapper/Makefile |
---|
| 541 | examples/app-fermi/wrapper/cee/Makefile |
---|
| 542 | examples/app-fermi/wrapper/python/Makefile |
---|
| 543 | examples/app-fermi/wrapper/tcl/Makefile |
---|
| 544 | examples/c-example/Makefile |
---|
| 545 | examples/canvas/Makefile |
---|
| 546 | examples/demo.bash |
---|
| 547 | examples/graph/Makefile |
---|
[1096] | 548 | examples/objects/Makefile |
---|
[1386] | 549 | examples/objects/axis/Makefile |
---|
| 550 | examples/objects/curve/Makefile |
---|
[1096] | 551 | examples/objects/dxWriter/Makefile |
---|
| 552 | examples/objects/floatBuffer/Makefile |
---|
[1386] | 553 | examples/objects/number/Makefile |
---|
| 554 | examples/objects/plot/Makefile |
---|
| 555 | examples/objects/string/Makefile |
---|
[1087] | 556 | examples/zoo/Makefile |
---|
| 557 | examples/zoo/binary/Makefile |
---|
| 558 | examples/zoo/boolean/Makefile |
---|
| 559 | examples/zoo/choice/Makefile |
---|
| 560 | examples/zoo/cloud/Makefile |
---|
| 561 | examples/zoo/cloud/matlab/Makefile |
---|
| 562 | examples/zoo/curve/Makefile |
---|
| 563 | examples/zoo/enable/Makefile |
---|
| 564 | examples/zoo/field/Makefile |
---|
| 565 | examples/zoo/group/Makefile |
---|
| 566 | examples/zoo/image/Makefile |
---|
| 567 | examples/zoo/image/docs/Makefile |
---|
| 568 | examples/zoo/image/examples/Makefile |
---|
| 569 | examples/zoo/integer/Makefile |
---|
| 570 | examples/zoo/integer2/Makefile |
---|
| 571 | examples/zoo/loader/Makefile |
---|
| 572 | examples/zoo/loader/examples/Makefile |
---|
[1218] | 573 | examples/zoo/loadrun/Makefile |
---|
[1087] | 574 | examples/zoo/log/Makefile |
---|
| 575 | examples/zoo/note/Makefile |
---|
| 576 | examples/zoo/note/docs/Makefile |
---|
| 577 | examples/zoo/number/Makefile |
---|
| 578 | examples/zoo/number2/Makefile |
---|
| 579 | examples/zoo/phase/Makefile |
---|
| 580 | examples/zoo/sequence/Makefile |
---|
| 581 | examples/zoo/sequence/examples/Makefile |
---|
| 582 | examples/zoo/string/Makefile |
---|
| 583 | examples/zoo/structure/Makefile |
---|
| 584 | examples/zoo/structure/examples/Makefile |
---|
| 585 | examples/zoo/table/Makefile |
---|
[1262] | 586 | examples/zoo/unirect2d/Makefile |
---|
[1087] | 587 | test/Makefile |
---|
| 588 | test/src/Makefile |
---|
[1018] | 589 | ]) |
---|
[1270] | 590 | AC_OUTPUT |
---|