Changeset 15674
- Timestamp:
- 08/01/13 14:15:55 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/m4/issm_options.m4
r15673 r15674 98 98 99 99 dnl 1. See if matlab has been provided 100 AC_ARG_WITH([matlab-dir], 101 AS_HELP_STRING([--with-matlab-dir=DIR],[matlab root directory. necessary for serial build.]), dnl help string102 [MATLAB_ROOT=$withval], 103 [MATLAB_ROOT="no"]) 100 AC_ARG_WITH([matlab-dir], dnl feature 101 AS_HELP_STRING([--with-matlab-dir=DIR],[matlab root directory.]), dnl help string 102 [MATLAB_ROOT=$withval], dnl action if given 103 [MATLAB_ROOT="no"]) dnl action if not given 104 104 105 105 AC_MSG_CHECKING([whether matlab is enabled]) … … 111 111 AC_MSG_ERROR([matlab directory provided ($MATLAB_ROOT) does not exist]); 112 112 fi 113 AC_DEFINE([_HAVE_MATLAB_],[1],[with matlab in ISSM src])114 113 fi 115 114 AC_MSG_RESULT($HAVE_MATLAB) … … 119 118 if test "x$HAVE_MATLAB" = "xyes"; then 120 119 120 AC_DEFINE([_HAVE_MATLAB_],[1],[with matlab in ISSM src]) 121 121 AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT) 122 122 MATLABINCL="-I$MATLAB_ROOT/extern/include/" … … 152 152 dnl triangle {{{ 153 153 AC_ARG_WITH([triangle-dir], 154 AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory. necessary for serial build]),154 AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory.]), 155 155 [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT="no"]) 156 156 … … 164 164 AC_MSG_ERROR([triangle directory provided ($TRIANGLE_ROOT) does not exist]); 165 165 fi 166 AC_DEFINE([_HAVE_TRIANGLE_],[1],[with triangle in ISSM src])167 166 fi 168 167 AC_MSG_RESULT($HAVE_TRIANGLE) … … 202 201 AC_MSG_ERROR([boost directory provided ($BOOST_ROOT) does not exist]); 203 202 fi 204 AC_DEFINE([_HAVE_BOOST_],[1],[with boost in ISSM src])205 203 fi 206 204 AC_MSG_RESULT($HAVE_BOOST) … … 218 216 dnl dakota{{{ 219 217 AC_ARG_WITH([dakota-dir], 220 AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory. necessary for serial build]),218 AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory.]), 221 219 [DAKOTA_ROOT=$withval],[DAKOTA_ROOT="no"]) 222 220 … … 230 228 AC_MSG_ERROR([dakota directory provided ($DAKOTA_ROOT) does not exist]); 231 229 fi 232 AC_DEFINE([_HAVE_DAKOTA_],[1],[with dakota in ISSM src])233 230 fi 234 231 AC_MSG_RESULT($HAVE_DAKOTA) … … 290 287 ;; 291 288 esac 292 AC_DEFINE([_HAVE_DAKOTA_],[1],[with Dakota in ISSM src])293 289 294 290 case $DAKOTA_VERSION in … … 322 318 AC_DEFINE_UNQUOTED([_DAKOTA_BUILD_],$DAKOTA_BUILD,[Dakota build version number]) 323 319 320 AC_DEFINE([_HAVE_DAKOTA_],[1],[with Dakota in ISSM src]) 324 321 AC_SUBST([DAKOTAINCL]) 325 322 AC_SUBST([DAKOTAFLAGS]) … … 330 327 AC_ARG_WITH([python-dir], 331 328 AS_HELP_STRING([--with-python-dir=DIR], [python root directory.]), 332 [PYTHON_ROOT=$withval],[PYTHON_ROOT=""]) 333 334 AC_MSG_CHECKING(for python) 335 if test -d "$PYTHON_ROOT"; then 336 HAVE_PYTHON="yes" 337 AC_DEFINE([_HAVE_PYTHON_],[1],[with Python in ISSM src]) 338 else 329 [PYTHON_ROOT=$withval],[PYTHON_ROOT="no"]) 330 331 dnl Check whether python is enabled 332 AC_MSG_CHECKING([for python]) 333 if test "x$PYTHON_ROOT" = "xno" ; then 339 334 HAVE_PYTHON=no 335 else 336 HAVE_PYTHON=yes 337 if ! test -d "$PYTHON_ROOT"; then 338 AC_MSG_ERROR([python directory provided ($PYTHON_ROOT) does not exist]); 339 fi 340 340 fi 341 341 AC_MSG_RESULT($HAVE_PYTHON) 342 343 dnl get python version 344 if test x$HAVE_PYTHON = xyes; then 342 AM_CONDITIONAL([PYTHON],[test x$HAVE_PYTHON = xyes]) 343 344 dnl python specifics 345 if test "x$HAVE_PYTHON" = "xyes"; then 345 346 AC_MSG_CHECKING(for python version) 346 dnl Query Python for its version number. Getting [:3] seems to be 347 dnl the best way to do this; it's what "site.py" does in the standard 348 dnl library. 347 dnl Query Python for its version number. Getting [:3] seems to be the 348 dnl best way to do this; it's what "site.py" does in the standard library. 349 349 PYTHON_VERSION=$($PYTHON_ROOT/bin/python -c "import sys; print sys.version[[:3]]") 350 350 AC_MSG_RESULT($PYTHON_VERSION) 351 351 352 dnl recover major :352 dnl recover major 353 353 PYTHON_MAJOR=${PYTHON_VERSION%.*} 354 if test x$PYTHON_MAJOR = x3; then355 dnl are we running python 3?354 AC_DEFINE_UNQUOTED([_PYTHON_MAJOR_],$PYTHON_MAJOR,[python version major]) 355 if test "x$PYTHON_MAJOR" = "x3"; then 356 356 HAVE_PYTHON3="yes" 357 357 else 358 358 HAVE_PYTHON3="no" 359 359 fi 360 A C_DEFINE_UNQUOTED([_PYTHON_MAJOR_],$PYTHON_MAJOR,[python version major])360 AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes]) 361 361 362 362 PYTHONINCL=-I$PYTHON_ROOT/include 363 363 PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHON_VERSION" 364 364 PYTHONEXT=.so 365 366 365 case "${host_os}" in 367 366 *cygwin*) … … 375 374 ;; 376 375 esac 377 376 AC_DEFINE([_HAVE_PYTHON_],[1],[with python in ISSM src]) 378 377 AC_SUBST([PYTHONINCL]) 379 378 AC_SUBST([PYTHONLIB]) … … 382 381 AC_SUBST([PYTHONLINK]) 383 382 fi 384 AM_CONDITIONAL([PYTHON], [test x$HAVE_PYTHON = xyes])385 AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes])386 383 dnl }}} 387 384 dnl python-numpy{{{ 388 385 AC_ARG_WITH([python-numpy-dir], 389 386 AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]), 390 [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT=""]) 387 [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT="no"]) 388 389 dnl Check whether numpy is enabled 391 390 AC_MSG_CHECKING(for python-numpy) 392 393 if test -d "$PYTHON_NUMPY_ROOT"; then394 dnl defaults391 if test "x$PYTHON_NUMPY_ROOT" = "xno" ; then 392 HAVE_PYTHON_NUMPY=no 393 else 395 394 HAVE_PYTHON_NUMPY=yes 395 if ! test -d "$PYTHON_NUMPY_ROOT"; then 396 AC_MSG_ERROR([numpy directory provided ($PYTHON_NUMPY_ROOT) does not exist]); 397 fi 398 fi 399 AC_MSG_RESULT($HAVE_PYTHON_NUMPY) 400 401 dnl numpy lib 402 if test "x$HAVE_PYTHON_NUMPY" = "xyes"; then 396 403 PYTHON_NUMPYINCL="-I$PYTHON_NUMPY_ROOT -I$PYTHON_NUMPY_ROOT/core/include/numpy" 397 398 404 AC_DEFINE([_HAVE_PYTHON_NUMPY_],[1],[with Python-Numpy in ISSM src]) 399 405 AC_SUBST([PYTHON_NUMPYINCL]) 400 else 401 HAVE_PYTHON_NUMPY=no 402 fi 403 AC_MSG_RESULT($HAVE_PYTHON_NUMPY) 406 fi 404 407 dnl }}} 405 408 dnl chaco{{{ 406 409 AC_ARG_WITH([chaco-dir], 407 410 AS_HELP_STRING([--with-chaco-dir=DIR], [chaco root directory.]), 408 [CHACO_ROOT=$withval],[CHACO_ROOT=""]) 409 AC_MSG_CHECKING(for chaco) 411 [CHACO_ROOT=$withval],[CHACO_ROOT="no"]) 410 412 411 if test -d "$CHACO_ROOT"; then 412 413 dnl defaults 413 dnl Check whether chaco is enabled 414 AC_MSG_CHECKING([for chaco]) 415 if test "x$CHACO_ROOT" = "xno" ; then 416 HAVE_CHACO=no 417 else 414 418 HAVE_CHACO=yes 419 if ! test -d "$CHACO_ROOT"; then 420 AC_MSG_ERROR([chaco directory provided ($CHACO_ROOT) does not exist]); 421 fi 422 fi 423 AC_MSG_RESULT($HAVE_CHACO) 424 AM_CONDITIONAL([CHACO],[test x$HAVE_CHACO = xyes]) 425 426 dnl library and header files 427 if test "x$HAVE_CHACO" = "xyes"; then 415 428 CHACOINCL=-I$CHACO_ROOT/include 416 429 CHACOLIB="-L$CHACO_ROOT/lib -lchacominusblas" 417 418 430 AC_DEFINE([_HAVE_CHACO_],[1],[with Chaco in ISSM src]) 419 431 AC_SUBST([CHACOINCL]) 420 432 AC_SUBST([CHACOLIB]) 421 422 else 423 HAVE_CHACO=no 424 fi 425 AC_MSG_RESULT($HAVE_CHACO) 433 fi 426 434 dnl }}} 427 435 dnl scotch{{{
Note:
See TracChangeset
for help on using the changeset viewer.