Changeset 15680


Ignore:
Timestamp:
08/01/13 19:44:23 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added checks on all other options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/m4/issm_options.m4

    r15678 r15680  
    10661066        AC_ARG_WITH([blacs-dir],
    10671067                AS_HELP_STRING([--with-blacs-dir=DIR],[blacs root directory]),
    1068                           [BLACS_ROOT=$withval],[BLACS_ROOT=""])
     1068                          [BLACS_ROOT=$withval],[BLACS_ROOT="no"])
    10691069                         
    1070         AC_MSG_CHECKING(for blacs headers and libraries in $BLACS_ROOT)
    1071         if test -d "$BLACS_ROOT"; then
    1072 
    1073                 dnl defaults
     1070        dnl Check whether blacs is enabled
     1071        AC_MSG_CHECKING([for blacs])
     1072        if test "x$BLACS_ROOT" = "xno" ; then
     1073                HAVE_BLACS=no
     1074        else
    10741075                HAVE_BLACS=yes
     1076                if ! test -d "$BLACS_ROOT"; then
     1077                        AC_MSG_ERROR([blacs directory provided ($BLACS_ROOT) does not exist]);
     1078                fi
     1079        fi
     1080        AC_MSG_RESULT($HAVE_BLACS)
     1081       
     1082        dnl blacs headers and libraries
     1083        if test "x$HAVE_BLACS" == "xyes"; then
    10751084                BLACSINCL=""
    10761085                if test x$VENDOR = xintel-discover; then
     
    10791088                 BLACSLIB=-L"$BLACS_ROOT/ -lblacs"
    10801089                fi
    1081        
    10821090                AC_DEFINE([_HAVE_BLACS_],[1],[with Blacs in ISSM src])
    10831091                AC_SUBST([BLACSINCL])
    10841092                AC_SUBST([BLACSLIB])
    1085         else
    1086                 HAVE_BLACS=no
    1087         fi
    1088         AC_MSG_RESULT($HAVE_BLACS)
     1093        fi
    10891094        dnl }}}
    10901095        dnl hypre{{{
    10911096        AC_ARG_WITH([hypre-dir],
    10921097          AS_HELP_STRING([--with-hypre-dir=DIR],[hypre root directory]),
    1093                           [HYPRE_ROOT=$withval],[HYPRE_ROOT=""])
     1098                          [HYPRE_ROOT=$withval],[HYPRE_ROOT="no"])
    10941099                         
    1095         AC_MSG_CHECKING(for hypre headers and libraries in $HYPRE_ROOT)
    1096         if test -d "$HYPRE_ROOT"; then
    1097 
    1098                 dnl defaults
     1100        dnl Check whether hypre is enabled
     1101        AC_MSG_CHECKING([for hypre])
     1102        if test "x$HYPRE_ROOT" = "xno" ; then
     1103                HAVE_HYPRE=no
     1104        else
    10991105                HAVE_HYPRE=yes
     1106                if ! test -d "$HYPRE_ROOT"; then
     1107                        AC_MSG_ERROR([hypre directory provided ($HYPRE_ROOT) does not exist]);
     1108                fi
     1109        fi
     1110        AC_MSG_RESULT($HAVE_HYPRE)
     1111
     1112        dnl hypre headers and libraries
     1113        if test "x$HAVE_HYPRE" == "xyes"; then
    11001114                HYPREINCL=""
    11011115                HYPRELIB=-L"$HYPRE_ROOT/lib -lHYPRE"
    1102        
    1103                 AC_DEFINE([_HAVE_HYPRE_],[1],[with Blacs in ISSM src])
     1116                AC_DEFINE([_HAVE_HYPRE_],[1],[with Hypre in ISSM src])
    11041117                AC_SUBST([HYPREINCL])
    11051118                AC_SUBST([HYPRELIB])
    1106         else
    1107                 HAVE_HYPRE=no
    1108         fi
    1109         AC_MSG_RESULT($HAVE_HYPRE)
     1119        fi
    11101120        dnl }}}
    11111121        dnl prometheus{{{
    1112                 AC_ARG_WITH([prometheus-dir],
    1113                                         AS_HELP_STRING([--with-prometheus-dir=DIR],[prometheus root directory]),
    1114                                         [PROMETHEUS_ROOT=$withval],[PROMETHEUS_ROOT=""])
    1115 
    1116                   AC_MSG_CHECKING(for prometheus headers and libraries in $PROMETHEUS_ROOT)
    1117                   if test -d "$PROMETHEUS_ROOT"; then
    1118 
    1119                         dnl defaults
    1120                           HAVE_PROMETHEUS=yes
    1121                           PROMETHEUSINCL=-I"$PROMETHEUS_ROOT/include"
    1122                           PROMETHEUSLIB=-L"$PROMETHEUS_ROOT/lib -lpromfei -lprometheus -lparmetis"
    1123 
    1124                           AC_DEFINE([_HAVE_PROMETHEUS_],[1],[with Prometheus in ISSM src])
    1125                           AC_SUBST([PROMETHEUSINCL])
    1126                           AC_SUBST([PROMETHEUSLIB])
    1127                   else
    1128                                 HAVE_PROMETHEUS=no
     1122        AC_ARG_WITH([prometheus-dir],
     1123                                AS_HELP_STRING([--with-prometheus-dir=DIR],[prometheus root directory]),
     1124                                [PROMETHEUS_ROOT=$withval],[PROMETHEUS_ROOT="no"])
     1125
     1126                dnl Check whether prometheus is enabled
     1127                AC_MSG_CHECKING([for prometheus])
     1128                if test "x$PROMETHEUS_ROOT" = "xno" ; then
     1129                        HAVE_PROMETHEUS=no
     1130                else
     1131                        HAVE_PROMETHEUS=yes
     1132                        if ! test -d "$PROMETHEUS_ROOT"; then
     1133                                AC_MSG_ERROR([prometheus directory provided ($PROMETHEUS_ROOT) does not exist]);
    11291134                        fi
    1130                         AC_MSG_RESULT($HAVE_PROMETHEUS)
     1135                fi
     1136                AC_MSG_RESULT($HAVE_PROMETHEUS)
     1137
     1138                dnl prometheus headers and libraries
     1139                if test "x$HAVE_PROMETHEUS" == "xyes"; then
     1140                         PROMETHEUSINCL=-I"$PROMETHEUS_ROOT/include"
     1141                         PROMETHEUSLIB=-L"$PROMETHEUS_ROOT/lib -lpromfei -lprometheus -lparmetis"
     1142                         AC_DEFINE([_HAVE_PROMETHEUS_],[1],[with Prometheus in ISSM src])
     1143                         AC_SUBST([PROMETHEUSINCL])
     1144                         AC_SUBST([PROMETHEUSLIB])
     1145           fi
    11311146                dnl }}}
    11321147dnl spai{{{
    11331148        AC_ARG_WITH([spai-dir],
    11341149                                AS_HELP_STRING([--with-spai-dir=DIR],[spai root directory]),
    1135                                 [SPAI_ROOT=$withval],[SPAI_ROOT=""])
    1136 
    1137           AC_MSG_CHECKING(for spai headers and libraries in $SPAI_ROOT)
    1138           if test -d "$SPAI_ROOT"; then
    1139 
    1140                 dnl defaults
    1141                   HAVE_SPAI=yes
    1142                   SPAIINCL=-I"$SPAI_ROOT/include"
    1143                   SPAILIB=-L"$SPAI_ROOT/lib -lspai"
    1144 
    1145                   AC_DEFINE([_HAVE_SPAI_],[1],[with Spai in ISSM src])
    1146                   AC_SUBST([SPAIINCL])
    1147                   AC_SUBST([SPAILIB])
    1148           else
    1149                 HAVE_SPAI=no
    1150                   fi
    1151                   AC_MSG_RESULT($HAVE_SPAI)
    1152                   dnl }}}
     1150                                [SPAI_ROOT=$withval],[SPAI_ROOT="no"])
     1151
     1152                dnl Check whether spai is enabled
     1153                AC_MSG_CHECKING([for spai])
     1154                if test "x$SPAI_ROOT" = "xno" ; then
     1155                        HAVE_SPAI=no
     1156                else
     1157                        HAVE_SPAI=yes
     1158                        if ! test -d "$SPAI_ROOT"; then
     1159                                AC_MSG_ERROR([spai directory provided ($SPAI_ROOT) does not exist]);
     1160                        fi
     1161                fi
     1162                AC_MSG_RESULT($HAVE_SPAI)
     1163
     1164                dnl spai headers and libraries
     1165                if test "x$HAVE_SPAI" == "xyes"; then
     1166                        SPAIINCL=-I"$SPAI_ROOT/include"
     1167                        SPAILIB=-L"$SPAI_ROOT/lib -lspai"
     1168                        AC_DEFINE([_HAVE_SPAI_],[1],[with Spai in ISSM src])
     1169                        AC_SUBST([SPAIINCL])
     1170                        AC_SUBST([SPAILIB])
     1171                fi
     1172          dnl }}}
    11531173dnl superlu{{{
    11541174        AC_ARG_WITH([superlu-dir],
    11551175                                AS_HELP_STRING([--with-superlu-dir=DIR],[superlu root directory]),
    1156                                 [SUPERLU_ROOT=$withval],[SUPERLU_ROOT=""])
    1157 
    1158           AC_MSG_CHECKING(for superlu headers and libraries in $SUPERLU_ROOT)
    1159           if test -d "$SUPERLU_ROOT"; then
    1160 
    1161                 dnl defaults
    1162                   HAVE_SUPERLU=yes
     1176                                [SUPERLU_ROOT=$withval],[SUPERLU_ROOT="no"])
     1177
     1178        dnl Check whether superlu is enabled
     1179        AC_MSG_CHECKING([for superlu])
     1180        if test "x$SUPERLU_ROOT" = "xno" ; then
     1181                HAVE_SUPERLU=no
     1182        else
     1183                HAVE_SUPERLU=yes
     1184                if ! test -d "$SUPERLU_ROOT"; then
     1185                        AC_MSG_ERROR([superlu directory provided ($SUPERLU_ROOT) does not exist]);
     1186                fi
     1187        fi
     1188        AC_MSG_RESULT($HAVE_SUPERLU)
     1189       
     1190        dnl superlu headers and libraries
     1191        if test "x$HAVE_SUPERLU" == "xyes"; then
    11631192                  SUPERLUINCL=-I"$SUPERLU_ROOT/include"
    11641193                  SUPERLULIB=-L"$SUPERLU_ROOT/lib -lsuperlu_4.3"
    1165 
    11661194                  AC_DEFINE([_HAVE_SUPERLU_],[1],[with Superlu in ISSM src])
    11671195                  AC_SUBST([SUPERLUINCL])
    11681196                  AC_SUBST([SUPERLULIB])
    1169           else
    1170                 HAVE_SUPERLU=no
    1171                   fi
    1172                   AC_MSG_RESULT($HAVE_SUPERLU)
    1173                   dnl }}}
     1197         fi
     1198         dnl }}}
    11741199dnl spooles{{{
    11751200        AC_ARG_WITH([spooles-dir],
    11761201                                AS_HELP_STRING([--with-spooles-dir=DIR],[spooles root directory]),
    1177                                 [SPOOLES_ROOT=$withval],[SPOOLES_ROOT=""])
    1178 
    1179           AC_MSG_CHECKING(for spooles headers and libraries in $SPOOLES_ROOT)
    1180           if test -d "$SPOOLES_ROOT"; then
    1181 
    1182                 dnl defaults
    1183                   HAVE_SPOOLES=yes
     1202                                [SPOOLES_ROOT=$withval],[SPOOLES_ROOT="no"])
     1203
     1204        dnl Check whether spooles is enabled
     1205        AC_MSG_CHECKING([for spooles])
     1206        if test "x$SPOOLES_ROOT" = "xno" ; then
     1207                HAVE_SPOOLES=no
     1208        else
     1209                HAVE_SPOOLES=yes
     1210                if ! test -d "$SPOOLES_ROOT"; then
     1211                        AC_MSG_ERROR([spooles directory provided ($SPOOLES_ROOT) does not exist]);
     1212                fi
     1213        fi
     1214        AC_MSG_RESULT($HAVE_SPOOLES)
     1215       
     1216        dnl spooles headers and libraries
     1217        if test "x$HAVE_SPOOLES" == "xyes"; then
    11841218                  SPOOLESINCL=-I"$SPOOLES_ROOT/include"
    11851219                  SPOOLESLIB=-L"$SPOOLES_ROOT/lib -lspooles"
    1186 
    11871220                  AC_DEFINE([_HAVE_SPOOLES_],[1],[with Spooles in ISSM src])
    11881221                  AC_SUBST([SPOOLESINCL])
    11891222                  AC_SUBST([SPOOLESLIB])
    1190           else
    1191                 HAVE_SPOOLES=no
    1192                   fi
    1193                   AC_MSG_RESULT($HAVE_SPOOLES)
    1194                   dnl }}}
     1223         fi
     1224         dnl }}}
    11951225dnl pastix{{{
    11961226        AC_ARG_WITH([pastix-dir],
    11971227                                AS_HELP_STRING([--with-pastix-dir=DIR],[pastix root directory]),
    1198                                 [PASTIX_ROOT=$withval],[PASTIX_ROOT=""])
    1199 
    1200           AC_MSG_CHECKING(for pastix headers and libraries in $PASTIX_ROOT)
    1201           if test -d "$PASTIX_ROOT"; then
    1202 
    1203                 dnl defaults
    1204                   HAVE_PASTIX=yes
     1228                                [PASTIX_ROOT=$withval],[PASTIX_ROOT="no"])
     1229
     1230        dnl Check whether pastix is enabled
     1231        AC_MSG_CHECKING([for pastix])
     1232        if test "x$PASTIX_ROOT" = "xno" ; then
     1233                HAVE_PASTIX=no
     1234        else
     1235                HAVE_PASTIX=yes
     1236                if ! test -d "$PASTIX_ROOT"; then
     1237                        AC_MSG_ERROR([pastix directory provided ($PASTIX_ROOT) does not exist]);
     1238                fi
     1239        fi
     1240        AC_MSG_RESULT($HAVE_PASTIX)
     1241       
     1242        dnl pastix headers and libraries
     1243        if test "x$HAVE_PASTIX" == "xyes"; then
    12051244                  PASTIXINCL=-I"$PASTIX_ROOT/include"
    12061245                  PASTIXLIB=-L"$PASTIX_ROOT/lib -lpastix_XXbit_mpi_smp_nobubble_int32_simple_real_scotch_i686_pc_linux -lptscotch -lptscotcherr -lpastix"
    1207 
    12081246                  AC_DEFINE([_HAVE_PASTIX_],[1],[with Pastix in ISSM src])
    12091247                  AC_SUBST([PASTIXINCL])
    12101248                  AC_SUBST([PASTIXLIB])
    1211           else
    1212                 HAVE_PASTIX=no
    1213                   fi
    1214                   AC_MSG_RESULT($HAVE_PASTIX)
    1215                   dnl }}}
     1249  fi
     1250  dnl }}}
    12161251        dnl ml{{{
    12171252        AC_ARG_WITH([ml-dir],
    12181253          AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]),
    1219                           [ML_ROOT=$withval],[ML_ROOT=""])
     1254                          [ML_ROOT=$withval],[ML_ROOT="no"])
    12201255                         
    1221         AC_MSG_CHECKING(for ml headers and libraries in $ML_ROOT)
    1222         if test -d "$ML_ROOT"; then
    1223 
    1224                 dnl defaults
     1256        dnl Check whether ml is enabled
     1257        AC_MSG_CHECKING([for ml])
     1258        if test "x$ML_ROOT" = "xno" ; then
     1259                HAVE_ML=no
     1260        else
    12251261                HAVE_ML=yes
     1262                if ! test -d "$ML_ROOT"; then
     1263                        AC_MSG_ERROR([ml directory provided ($ML_ROOT) does not exist]);
     1264                fi
     1265        fi
     1266        AC_MSG_RESULT($HAVE_ML)
     1267       
     1268        dnl ml headers and libraries
     1269        if test "x$HAVE_ML" == "xyes"; then
    12261270                MLINCL=-I"$ML_ROOT/include"
    12271271                MLLIB=-L"$ML_ROOT/lib -lml"
    1228        
    12291272                AC_DEFINE([_HAVE_ML_],[1],[with Blacs in ISSM src])
    12301273                AC_SUBST([MLINCL])
    12311274                AC_SUBST([MLLIB])
    1232         else
    1233                 HAVE_ML=no
    1234         fi
    1235         AC_MSG_RESULT($HAVE_ML)
     1275        fi
    12361276        dnl }}}
    12371277        dnl umfpack{{{
    12381278                AC_ARG_WITH([umfpack-dir],
    12391279                  AS_HELP_STRING([--with-umfpack-dir=DIR],[UMFPACK root directory]),
    1240                                         [UMFPACK_ROOT=$withval],[UMFPACK_ROOT=""])
    1241 
    1242                 AC_MSG_CHECKING(for UMFPACK headers and libraries in $UMFPACK_ROOT)
    1243                 if test -d "$UMFPACK_ROOT"; then
    1244 
    1245                         dnl defaults
    1246                         HAVE_UMFPACK=yes
    1247                         UMFPACKINCL=""
    1248                         UMFPACKLIB=-L"$UMFPACK_ROOT/lib -lumfpack -lumfpack.5.5.1"
    1249 
    1250                         AC_DEFINE([_HAVE_UMFPACK_],[1],[with UMFPACK in ISSM src])
    1251                         AC_SUBST([UMFPACKINCL])
    1252                         AC_SUBST([UMFPACKLIB])
    1253                 else
    1254                         HAVE_UMFPACK=no
    1255                 fi
    1256                 AC_MSG_RESULT($HAVE_UMFPACK)
     1280                                        [UMFPACK_ROOT=$withval],[UMFPACK_ROOT="no"])
     1281                         
     1282        dnl Check whether umfpack is enabled
     1283        AC_MSG_CHECKING([for umfpack])
     1284        if test "x$UMFPACK_ROOT" = "xno" ; then
     1285                HAVE_UMFPACK=no
     1286        else
     1287                HAVE_UMFPACK=yes
     1288                if ! test -d "$UMFPACK_ROOT"; then
     1289                        AC_MSG_ERROR([umfpack directory provided ($UMFPACK_ROOT) does not exist]);
     1290                fi
     1291        fi
     1292        AC_MSG_RESULT($HAVE_UMFPACK)
     1293       
     1294        dnl umfpack headers and libraries
     1295        if test "x$HAVE_UMFPACK" == "xyes"; then
     1296                UMFPACKINCL=""
     1297                UMFPACKLIB=-L"$UMFPACK_ROOT/lib -lumfpack -lumfpack.5.5.1"
     1298                AC_DEFINE([_HAVE_UMFPACK_],[1],[with UMFPACK in ISSM src])
     1299                AC_SUBST([UMFPACKINCL])
     1300                AC_SUBST([UMFPACKLIB])
     1301        fi
    12571302        dnl }}}
    12581303dnl math{{{
     
    12661311                HAVE_MATH=yes
    12671312                MATHLIB="$MATH_LIB"
    1268 
    12691313                AC_DEFINE([_HAVE_MATH_],[1],[with MATH in ISSM src])
    12701314                AC_SUBST([MATHLIB])
     
    12751319                AC_ARG_WITH([math77-dir],
    12761320                                        AS_HELP_STRING([--with-math77-dir=DIR], [math77 root directory.]),
    1277                                         [MATH77_ROOT=$withval],[MATH77_ROOT=""])
    1278                   AC_MSG_CHECKING(for math77)
    1279 
    1280                   if test -d "$MATH77_ROOT"; then
    1281 
    1282                         HAVE_MATH77=yes
    1283                           MATH77LIB="-L$MATH77_ROOT/ -lmath77"
    1284 
    1285                           AC_DEFINE([_HAVE_MATH77_],[1],[with math77 in ISSM src])
    1286                           AC_SUBST([MATH77LIB])
    1287                   else
    1288                         HAVE_MATH77=no
    1289                           fi
    1290                           AC_MSG_RESULT($HAVE_MATH77)
    1291                           dnl }}}
     1321                                        [MATH77_ROOT=$withval],[MATH77_ROOT="no"])
     1322                 
     1323        dnl Check whether math77 is enabled
     1324        AC_MSG_CHECKING([for math77])
     1325        if test "x$MATH77_ROOT" = "xno" ; then
     1326                HAVE_MATH77=no
     1327        else
     1328                HAVE_MATH77=yes
     1329                if ! test -d "$MATH77_ROOT"; then
     1330                        AC_MSG_ERROR([math77 directory provided ($MATH77_ROOT) does not exist]);
     1331                fi
     1332        fi
     1333        AC_MSG_RESULT($HAVE_MATH77)
     1334       
     1335        dnl math77 headers and libraries
     1336        if test "x$HAVE_MATH77" == "xyes"; then
     1337                MATH77LIB="-L$MATH77_ROOT/ -lmath77"
     1338                AC_DEFINE([_HAVE_MATH77_],[1],[with math77 in ISSM src])
     1339                AC_SUBST([MATH77LIB])
     1340   fi
     1341        dnl }}}
    12921342        dnl fortran{{{
    12931343        AC_ARG_WITH([fortran],
     
    12981348                dnl defaults
    12991349                HAVE_FORTRAN=yes
    1300 
    13011350                AC_DEFINE([_HAVE_FORTRAN_],[1],[with fortran capability])
    13021351        else
     
    13411390
    13421391        dnl check that --with-graphics-lib may have been provided
    1343        
    13441392        if test -n "$GRAPHICS_LIB" ; then
    13451393                dnl check that library provided EXISTS!
Note: See TracChangeset for help on using the changeset viewer.