Changeset 15672
- Timestamp:
- 08/01/13 13:40:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/m4/issm_options.m4 ¶
r15665 r15672 99 99 AC_ARG_WITH([matlab-dir], 100 100 AS_HELP_STRING([--with-matlab-dir=DIR], [matlab root directory. necessary for serial build.]), 101 [MATLAB_ROOT=$withval],[MATLAB_ROOT=" "])101 [MATLAB_ROOT=$withval],[MATLAB_ROOT="no"]) 102 102 103 103 AC_MSG_CHECKING([whether matlab is enabled]) 104 if test -d "$MATLAB_ROOT"; then 104 if test "x$MATLAB_ROOT" = "xno" ; then 105 HAVE_MATLAB=no 106 else 105 107 HAVE_MATLAB=yes 106 else 107 HAVE_MATLAB=no 108 fi 109 if test x$HAVE_MATLAB = xyes; then 110 AC_DEFINE([_HAVE_MATLAB_],[1],[with Matlab in ISSM src]) 108 if ! test -d "$MATLAB_ROOT"; then 109 AC_MSG_ERROR([matlab directory provided ($MATLAB_ROOT) does not exist]); 110 fi 111 AC_DEFINE([_HAVE_MATLAB_],[1],[with matlab in ISSM src]) 111 112 fi 112 113 AC_MSG_RESULT($HAVE_MATLAB) … … 114 115 115 116 dnl 2. Get Matlab libraries 116 if test x$HAVE_MATLAB = xyes; then117 if test "x$HAVE_MATLAB" = "xyes"; then 117 118 118 119 AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT) 119 120 MATLABINCL="-I$MATLAB_ROOT/extern/include/" 120 121 121 dnl 4. get MEXLIB MEXLINK and MEXEXT (experimental) 122 dnl OS-dependent variables and checks 122 dnl 4. get MEXLIB MEXLINK and MEXEXT (experimental) except for windows 123 123 case "${host_os}" in 124 124 *cygwin*) … … 140 140 esac 141 141 AC_MSG_RESULT(done) 142 143 142 AC_SUBST([MATLABINCL]) 144 143 AC_SUBST([MEX]) … … 152 151 AC_ARG_WITH([triangle-dir], 153 152 AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory. necessary for serial build]), 154 [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT=""]) 155 AC_MSG_CHECKING(for triangle headers and libraries) 156 157 if test -d "$TRIANGLE_ROOT"; then 158 159 dnl defaults 153 [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT="no"]) 154 155 dnl Check whether triangle is enabled 156 AC_MSG_CHECKING([for triangle]) 157 if test "x$TRIANGLE_ROOT" = "xno" ; then 158 HAVE_TRIANGLE=no 159 else 160 160 HAVE_TRIANGLE=yes 161 if ! test -d "$TRIANGLE_ROOT"; then 162 AC_MSG_ERROR([triangle directory provided ($TRIANGLE_ROOT) does not exist]); 163 fi 164 AC_DEFINE([_HAVE_TRIANGLE_],[1],[with triangle in ISSM src]) 165 fi 166 AC_MSG_RESULT($HAVE_TRIANGLE) 167 AM_CONDITIONAL([TRIANGLE],[test x$HAVE_TRIANGLE = xyes]) 168 169 dnl library and header files 170 if test "x$HAVE_TRIANGLE" = "xyes"; then 161 171 TRIANGLEINCL=-I$TRIANGLE_ROOT/ 162 163 172 case "${host_os}" in 164 173 *cygwin*) … … 172 181 ;; 173 182 esac 174 175 183 AC_DEFINE([_HAVE_TRIANGLE_],[1],[with Triangle in ISSM src]) 176 184 AC_SUBST([TRIANGLEINCL]) 177 185 AC_SUBST([TRIANGLELIB]) 178 179 else 180 HAVE_TRIANGLE=no 181 fi 182 AC_MSG_RESULT($HAVE_TRIANGLE) 186 fi 183 187 dnl }}} 184 188 dnl boost{{{ 185 189 AC_ARG_WITH([boost-dir], 186 190 AS_HELP_STRING([--with-boost-dir=DIR], [boost root directory.]), 187 [BOOST_ROOT=$withval],[BOOST_ROOT=""]) 188 AC_MSG_CHECKING(for boost) 189 190 if test -d "$BOOST_ROOT"; then 191 dnl defaults 191 [BOOST_ROOT=$withval],[BOOST_ROOT="no"]) 192 193 dnl Check whether boost is enabled 194 AC_MSG_CHECKING([for boost]) 195 if test "x$BOOST_ROOT" = "xno" ; then 196 HAVE_BOOST=no 197 else 192 198 HAVE_BOOST=yes 199 if ! test -d "$BOOST_ROOT"; then 200 AC_MSG_ERROR([boost directory provided ($BOOST_ROOT) does not exist]); 201 fi 202 AC_DEFINE([_HAVE_BOOST_],[1],[with boost in ISSM src]) 203 fi 204 AC_MSG_RESULT($HAVE_BOOST) 205 AM_CONDITIONAL([BOOST],[test x$HAVE_BOOST = xyes]) 206 207 dnl library and header files 208 if test "x$HAVE_BOOST" = "xyes"; then 193 209 BOOSTINCL=-I$BOOST_ROOT/include 194 210 BOOSTLIB="-L$BOOST_ROOT/lib -lboost_python" 195 196 211 AC_DEFINE([_HAVE_BOOST_],[1],[with Boost in ISSM src]) 197 212 AC_SUBST([BOOSTINCL]) 198 213 AC_SUBST([BOOSTLIB]) 199 else 200 HAVE_BOOST=no 201 fi 202 AM_CONDITIONAL([BOOST], [test x$HAVE_BOOST = xyes]) 203 AC_MSG_RESULT($HAVE_BOOST) 214 fi 204 215 dnl }}} 205 216 dnl dakota{{{ … … 207 218 AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory. necessary for serial build]), 208 219 [DAKOTA_ROOT=$withval],[DAKOTA_ROOT=""]) 209 AC_MSG_CHECKING(for dakota)210 220 211 if test -d "$DAKOTA_ROOT"; then 212 213 dnl defaults 221 dnl Check whether dakota is enabled 222 AC_MSG_CHECKING([for dakota]) 223 if test "x$DAKOTA_ROOT" = "xno" ; then 224 HAVE_DAKOTA=no 225 else 214 226 HAVE_DAKOTA=yes 215 AC_MSG_RESULT($HAVE_DAKOTA) 227 if ! test -d "$DAKOTA_ROOT"; then 228 AC_MSG_ERROR([dakota directory provided ($DAKOTA_ROOT) does not exist]); 229 fi 230 AC_DEFINE([_HAVE_DAKOTA_],[1],[with dakota in ISSM src]) 231 fi 232 AC_MSG_RESULT($HAVE_DAKOTA) 233 AM_CONDITIONAL([DAKOTA],[test x$HAVE_DAKOTA = xyes]) 234 235 dnl library and header files 236 if test "x$HAVE_DAKOTA" = "xyes"; then 216 237 DAKOTAINCL=-I$DAKOTA_ROOT/include 238 217 239 AC_MSG_CHECKING(for dakota version) 218 240 if test -f "$DAKOTA_ROOT/../src/src/CommandLineHandler.C"; then … … 224 246 fi 225 247 fi 226 227 248 AC_MSG_RESULT($DAKOTA_VERSION) 228 249 AC_DEFINE_UNQUOTED([_DAKOTA_VERSION_],"$DAKOTA_VERSION",[Dakota version number]) 250 229 251 DAKOTAFLAGS="" 230 252 case "${host_os}" in … … 301 323 AC_SUBST([DAKOTAFLAGS]) 302 324 AC_SUBST([DAKOTALIB]) 303 304 else 305 HAVE_DAKOTA=no 306 AC_MSG_RESULT($HAVE_DAKOTA) 307 fi 308 309 AM_CONDITIONAL([DAKOTA], [test x$HAVE_DAKOTA = xyes]) 325 fi 310 326 dnl }}} 311 327 dnl python{{{ … … 535 551 HAVE_GSL=no 536 552 else 537 if test -d "$GSL_ROOT"; then 538 539 dnl defaults 540 HAVE_GSL=yes 541 GSLINCL="-I$GSL_ROOT/include" 542 543 if test "x$HAVE_ATLAS" = "xyes" ; then 544 GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -L$ATLAS_ROOT/lib -lcblas -latlas -lm" 545 else 546 GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -lgslcblas -lm" 547 fi 548 549 AC_DEFINE([_HAVE_GSL_],[1],[with gsl in ISSM src]) 550 AC_SUBST([GSLINCL]) 551 AC_SUBST([GSLLIB]) 552 553 if ! test -d "$GSL_ROOT"; then 554 AC_MSG_ERROR([gsl directory provided ($GSL_ROOT) does not exist]); 555 fi 556 557 HAVE_GSL=yes 558 GSLINCL="-I$GSL_ROOT/include" 559 560 if test "x$HAVE_ATLAS" = "xyes" ; then 561 GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -L$ATLAS_ROOT/lib -lcblas -latlas -lm" 553 562 else 554 AC_MSG_ERROR([gsl directory provided ($GSL_ROOT) does not exist]); 555 fi 563 GSLLIB="-dy -L$GSL_ROOT/lib -lgsl -lgslcblas -lm" 564 fi 565 566 AC_DEFINE([_HAVE_GSL_],[1],[with gsl in ISSM src]) 567 AC_SUBST([GSLINCL]) 568 AC_SUBST([GSLLIB]) 556 569 fi 557 570 AM_CONDITIONAL([GSL], [test x$HAVE_GSL = xyes]) … … 1195 1208 AC_MSG_RESULT(done) 1196 1209 dnl }}} 1210 dnl math77{{{ 1211 AC_ARG_WITH([math77-dir], 1212 AS_HELP_STRING([--with-math77-dir=DIR], [math77 root directory.]), 1213 [MATH77_ROOT=$withval],[MATH77_ROOT=""]) 1214 AC_MSG_CHECKING(for math77) 1215 1216 if test -d "$MATH77_ROOT"; then 1217 1218 HAVE_MATH77=yes 1219 MATH77LIB="-L$MATH77_ROOT/ -lmath77" 1220 1221 AC_DEFINE([_HAVE_MATH77_],[1],[with math77 in ISSM src]) 1222 AC_SUBST([MATH77LIB]) 1223 else 1224 HAVE_MATH77=no 1225 fi 1226 AC_MSG_RESULT($HAVE_MATH77) 1227 dnl }}} 1197 1228 dnl fortran{{{ 1198 1229 AC_ARG_WITH([fortran], … … 1513 1544 AC_MSG_RESULT($HAVE_RIFTS) 1514 1545 dnl }}} 1515 dnl math77{{{1516 AC_ARG_WITH([math77-dir],1517 AS_HELP_STRING([--with-math77-dir=DIR], [math77 root directory.]),1518 [MATH77_ROOT=$withval],[MATH77_ROOT=""])1519 AC_MSG_CHECKING(for math77)1520 1521 if test -d "$MATH77_ROOT"; then1522 1523 HAVE_MATH77=yes1524 MATH77LIB="-L$MATH77_ROOT/ -lmath77"1525 1526 AC_DEFINE([_HAVE_MATH77_],[1],[with math77 in ISSM src])1527 AC_SUBST([MATH77LIB])1528 else1529 HAVE_MATH77=no1530 fi1531 AC_MSG_RESULT($HAVE_MATH77)1532 dnl }}}1533 1546 dnl with-gia{{{ 1534 1547 AC_ARG_WITH([gia], … … 1635 1648 AM_CONDITIONAL([THREED], [test x$HAVE_3D = xyes]) 1636 1649 AC_MSG_RESULT($HAVE_3D) 1637 dnl }}}1638 dnl checks{{{1639 AC_MSG_CHECKING(consistency between all libraries)1640 1641 dnl check that if petsc is requested , mpi should be specified1642 if test "$HAVE_PETSC" = "yes" ; then1643 if test "$HAVE_MPI" = "NO"; then1644 AC_MSG_ERROR([petsc requires mpi!]);1645 fi1646 fi1647 1648 dnl check that we have either python or matlab support if we compile the modules1649 if test "$MODULES_VALUE" = "yes" && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then1650 AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]);1651 fi1652 1653 dnl check that if we have MPI, we have metis1654 if test "$HAVE_METIS" = "yes" && test "$HAVE_MPI" = "no" ; then1655 AC_MSG_ERROR([need mpi if using the metis partitioner!]);1656 fi1657 1658 AC_MSG_RESULT(done)1659 1650 dnl }}} 1660 1651 … … 1712 1703 AC_MSG_RESULT($USE_64BIT_INDICES) 1713 1704 dnl }}} 1705 1706 dnl Checks 1707 dnl checks{{{ 1708 AC_MSG_CHECKING(consistency between all libraries) 1709 1710 dnl check that if petsc is requested , mpi should be specified 1711 if test "$HAVE_PETSC" = "yes" ; then 1712 if test "$HAVE_MPI" = "NO"; then 1713 AC_MSG_ERROR([petsc requires mpi!]); 1714 fi 1715 fi 1716 1717 dnl check that we have either python or matlab support if we compile the modules 1718 if test "$MODULES_VALUE" = "yes" && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then 1719 AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]); 1720 fi 1721 1722 dnl check that if we have MPI, we have metis 1723 if test "$HAVE_METIS" = "yes" && test "$HAVE_MPI" = "no" ; then 1724 AC_MSG_ERROR([need mpi if using the metis partitioner!]); 1725 fi 1726 1727 AC_MSG_RESULT(done) 1728 dnl }}} 1714 1729 ])
Note:
See TracChangeset
for help on using the changeset viewer.