Changeset 12064


Ignore:
Timestamp:
04/20/12 07:48:19 (13 years ago)
Author:
Eric.Larour
Message:

Added python version + better formatting of configure help

File:
1 edited

Legend:

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

    r12058 r12064  
    7676        dnl 1. See if matlab has been provided
    7777        AC_ARG_WITH([matlab-dir],
    78                 AS_HELP_STRING([--with-matlab-dir = DIR], [matlab root directory. necessary for serial build.]),
     78                AS_HELP_STRING([--with-matlab-dir=DIR], [matlab root directory. necessary for serial build.]),
    7979                [MATLAB_ROOT=$withval],[MATLAB_ROOT=""])
    8080
    81         AC_MSG_CHECKING([wether Matlab is enabled])
     81        AC_MSG_CHECKING([whether matlab is enabled])
    8282        if test -d "$MATLAB_ROOT"; then
    8383                HAVE_MATLAB=yes
     
    9393        dnl 2. if matlab is provided, get version number
    9494        if test x$HAVE_MATLAB = xyes; then
    95                 AC_MSG_CHECKING([for Matlab version])
     95                AC_MSG_CHECKING([for matlab version])
    9696                MATLAB_VERSION=""
    9797
     
    156156
    157157                dnl 3. Get Matlab libraries
    158                 AC_MSG_CHECKING(for Matlab headers and libraries in $MATLAB_ROOT)
     158                AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT)
    159159                MATLABINCL=-I"$MATLAB_ROOT/extern/include";
    160160               
     
    209209        dnl triangle {{{
    210210        AC_ARG_WITH([triangle-dir],
    211                           AS_HELP_STRING([--with-triangle-dir = DIR], [triangle root directory. necessary for serial build]),
     211                          AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory. necessary for serial build]),
    212212                         [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT=""])
    213         AC_MSG_CHECKING(for Triangle headers and libraries)
     213        AC_MSG_CHECKING(for triangle headers and libraries)
    214214
    215215        if test -d "$TRIANGLE_ROOT"; then
     
    250250        dnl dakota{{{
    251251        AC_ARG_WITH([dakota-dir],
    252           AS_HELP_STRING([--with-dakota-dir = DIR], [dakota root directory. necessary for serial build]),
     252          AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory. necessary for serial build]),
    253253          [DAKOTA_ROOT=$withval],[DAKOTA_ROOT=""])
    254         AC_MSG_CHECKING(for Dakota)
     254        AC_MSG_CHECKING(for dakota)
    255255       
    256256        if test -d "$DAKOTA_ROOT"; then
     
    283283        dnl boost{{{
    284284        AC_ARG_WITH([boost-dir],
    285           AS_HELP_STRING([--with-boost-dir = DIR], [boost root directory.]),
     285          AS_HELP_STRING([--with-boost-dir=DIR], [boost root directory.]),
    286286          [BOOST_ROOT=$withval],[BOOST_ROOT=""])
    287         AC_MSG_CHECKING(for Boost)
     287        AC_MSG_CHECKING(for boost)
    288288       
    289289        if test -d "$BOOST_ROOT"; then
     
    304304        dnl python{{{
    305305        AC_ARG_WITH([python-dir],
    306           AS_HELP_STRING([--with-python-dir = DIR], [python root directory.]),
     306          AS_HELP_STRING([--with-python-dir=DIR], [python root directory.]),
    307307          [PYTHON_ROOT=$withval],[PYTHON_ROOT=""])
    308         AC_MSG_CHECKING(for Python)
     308        AC_MSG_CHECKING(for python)
    309309       
    310310        if test -d "$PYTHON_ROOT"; then
     
    328328        AC_MSG_RESULT($HAVE_PYTHON)
    329329        dnl }}}
     330        dnl python-version{{{
     331        AC_ARG_WITH([python-version],
     332          AS_HELP_STRING([--with-python-version = PYTHONVERSION],[python version.]),
     333          [PYTHONVERSION=$withval],[PYTHONVERSION=""])
     334        AC_MSG_CHECKING(for python version)
     335
     336        HAVE_PYTHON3="no"
     337
     338        dnl recover major:
     339        PYTHON_MAJOR=${PYTHONVERSION%.*}
     340
     341        if test x$PYTHON_MAJOR = x3; then
     342                dnl are we running python 3?
     343                HAVE_PYTHON3="yes"
     344        fi
     345
     346        AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes])
     347        AC_MSG_RESULT($PYTHON_MAJOR)
     348        dnl }}}
    330349        dnl python-numpy{{{
    331350        AC_ARG_WITH([python-numpy-dir],
    332           AS_HELP_STRING([--with-python-numpy-dir = DIR], [python-numpy root directory.]),
     351          AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]),
    333352          [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT=""])
    334         AC_MSG_CHECKING(for Python-Numpy)
     353        AC_MSG_CHECKING(for python-numpy)
    335354       
    336355        if test -d "$PYTHON_NUMPY_ROOT"; then
     
    348367        dnl chaco{{{
    349368        AC_ARG_WITH([chaco-dir],
    350           AS_HELP_STRING([--with-chaco-dir = DIR], [chaco root directory.]),
     369          AS_HELP_STRING([--with-chaco-dir=DIR], [chaco root directory.]),
    351370          [CHACO_ROOT=$withval],[CHACO_ROOT=""])
    352         AC_MSG_CHECKING(for Chaco)
     371        AC_MSG_CHECKING(for chaco)
    353372       
    354373        if test -d "$CHACO_ROOT"; then
     
    370389        dnl scotch{{{
    371390        AC_ARG_WITH([scotch-dir],
    372           AS_HELP_STRING([--with-scotch-dir = DIR], [scotch root directory.]),
     391          AS_HELP_STRING([--with-scotch-dir=DIR], [scotch root directory.]),
    373392          [SCOTCH_ROOT=$withval],[SCOTCH_ROOT=""])
    374         AC_MSG_CHECKING(for Scotch)
     393        AC_MSG_CHECKING(for scotch)
    375394       
    376395        if test -d "$SCOTCH_ROOT"; then
     
    392411        dnl adolc{{{
    393412        AC_ARG_WITH([adolc-dir],
    394                 AS_HELP_STRING([--with-adolc-dir = DIR], [adolc root directory.]),
     413                AS_HELP_STRING([--with-adolc-dir=DIR], [adolc root directory.]),
    395414                [ADOLC_ROOT=$withval],[ADOLC_ROOT="no"])
    396         AC_MSG_CHECKING(for ADOLC)
     415        AC_MSG_CHECKING(for adolc)
    397416
    398417        if test "x$ADOLC_ROOT" = "xno"; then
     
    420439        dnl adic2{{{
    421440        AC_ARG_WITH([adic2-dir],
    422           AS_HELP_STRING([--with-adic2-dir = DIR], [adic2 root directory.]),
     441          AS_HELP_STRING([--with-adic2-dir=DIR], [adic2 root directory.]),
    423442          [ADIC2_ROOT=$withval],[ADIC2_ROOT="no"])
    424         AC_MSG_CHECKING(for ADIC2)
     443        AC_MSG_CHECKING(for adic2)
    425444
    426445        if test "x$ADIC2_ROOT" = "xno"; then
     
    448467        dnl gsl{{{
    449468        AC_ARG_WITH([gsl-dir],
    450           AS_HELP_STRING([--with-gsl-dir = DIR], [gsl root directory.]),
     469          AS_HELP_STRING([--with-gsl-dir=DIR], [gsl root directory.]),
    451470          [GSL_ROOT=$withval],[GSL_ROOT=""])
    452         AC_MSG_CHECKING(for Gsl)
     471        AC_MSG_CHECKING(for gsl)
    453472       
    454473        if test -d "$GSL_ROOT"; then
     
    471490        dnl rose{{{
    472491        AC_ARG_WITH([rose-dir],
    473           AS_HELP_STRING([--with-rose-dir = DIR], [rose root directory.]),
     492          AS_HELP_STRING([--with-rose-dir=DIR], [rose root directory.]),
    474493          [ROSE_ROOT=$withval],[ROSE_ROOT=""])
    475         AC_MSG_CHECKING(for Rose)
     494        AC_MSG_CHECKING(for rose)
    476495       
    477496        if test -d "$ROSE_ROOT"; then
     
    494513        dnl metis{{{
    495514        AC_ARG_WITH([metis-dir],
    496           AS_HELP_STRING([--with-metis-dir = DIR],[metis root directory. necessary for serial build]),
     515          AS_HELP_STRING([--with-metis-dir=DIR],[metis root directory. necessary for serial build]),
    497516          [METIS_ROOT=$withval],[METIS_ROOT=""])
    498517
    499518        if test -d "$METIS_ROOT"; then
    500519
    501                 AC_MSG_CHECKING(for Metis headers and libraries in $METIS_ROOT)
     520                AC_MSG_CHECKING(for metis headers and libraries in $METIS_ROOT)
    502521
    503522                dnl first figure out version of metis: does the VERSION file exist?
     
    566585       
    567586        AC_ARG_WITH([mpi-include],
    568           AS_HELP_STRING([--with-mpi-include = DIR],[mpi include directory, necessary for parallel build]),
     587          AS_HELP_STRING([--with-mpi-include=DIR],[mpi include directory, necessary for parallel build]),
    569588          [MPI_INCLUDE=$withval],[MPI_INCLUDE=""])
    570589       
     
    575594                        HAVE_MPI=no
    576595                else
     596                        HAVE_MPI=yes
    577597                        MPIINCL=-I"$MPI_INCLUDE/"
    578598                        AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
     
    582602                fi
    583603        fi
    584         AC_MSG_RESULT(done)
     604        AC_MSG_RESULT($HAVE_MPI)
    585605        dnl }}}
    586606        dnl petsc{{{
    587607        AC_ARG_WITH([petsc-dir],
    588           AS_HELP_STRING([--with-petsc-dir = DIR],[PETSc root directory, necessary for parallel build]),
     608          AS_HELP_STRING([--with-petsc-dir=DIR],[PETSc root directory, necessary for parallel build]),
    589609          [PETSC_ROOT=$withval],[PETSC_ROOT=""])
    590610               
    591611        if test -d "$PETSC_ROOT"; then
    592                 AC_MSG_CHECKING(for PETSc version)
     612                AC_MSG_CHECKING(for petsc version)
    593613                PETSC_MAJOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MAJOR" | sed 's/#define PETSC_VERSION_MAJOR//' | sed 's/ //g'`
    594614                PETSC_MINOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MINOR" | sed 's/#define PETSC_VERSION_MINOR//' | sed 's/ //g'`
     
    598618
    599619                PETSC_VERSION_DATE_HG=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_DATE_HG" | sed 's/#define PETSC_VERSION_DATE_HG//' | sed 's/ //g' | sed -e 's/\"//g' `
    600                 AC_MSG_CHECKING(wether PETSc is the development version)
     620                AC_MSG_CHECKING(whether petsc is the development version)
    601621                if test x$PETSC_VERSION_DATE_HG = xunknown; then
    602622                        AC_DEFINE([_HAVE_PETSCDEV_],[1],[with PETSc-dev])
     
    608628       
    609629        AC_ARG_WITH([petsc-arch],
    610           AS_HELP_STRING([--with-petsc-arch = DIR],[PETSc arch , necessary for parallel build]),
     630          AS_HELP_STRING([--with-petsc-arch=DIR],[PETSc arch , necessary for parallel build]),
    611631          [PETSC_ARCH=$withval],[PETSC_ARCH=""])
    612632
    613         AC_MSG_CHECKING(for PETSc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)
     633        AC_MSG_CHECKING(for petsc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)
    614634       
    615635        if test -d "$PETSC_ROOT"; then
     
    655675        dnl tao{{{
    656676        AC_ARG_WITH([tao-dir],
    657                 AS_HELP_STRING([--with-tao-dir = DIR], [tao root directory.]),
     677                AS_HELP_STRING([--with-tao-dir=DIR], [tao root directory.]),
    658678                [TAO_ROOT=$withval],[TAO_ROOT=""])
    659         AC_MSG_CHECKING(for Tao)
     679        AC_MSG_CHECKING(for tao)
    660680
    661681        if test -d "$TAO_ROOT"; then
     
    675695        dnl slepc{{{
    676696        AC_ARG_WITH([slepc-dir],
    677           AS_HELP_STRING([--with-slepc-dir = DIR],[slepc root directory]),
     697          AS_HELP_STRING([--with-slepc-dir=DIR],[slepc root directory]),
    678698          [SLEPC_ROOT=$withval],[SLEPC_ROOT=""])
    679699                         
    680         AC_MSG_CHECKING(for Slepc headers and libraries in $SLEPC_ROOT)
     700        AC_MSG_CHECKING(for slepc headers and libraries in $SLEPC_ROOT)
    681701        if test -d "$SLEPC_ROOT"; then
    682702                HAVE_SLEPC=yes
     
    694714        dnl shapelib{{{
    695715        AC_ARG_WITH([shapelib-dir],
    696           AS_HELP_STRING([--with-shapelib-dir = DIR], [shapelib root directory]),
     716          AS_HELP_STRING([--with-shapelib-dir=DIR], [shapelib root directory]),
    697717          [SHAPELIB_ROOT=$withval],[SHAPELIB_ROOT=""])
    698718                         
    699         AC_MSG_CHECKING(for Shapelib headers and libraries in $SHAPELIB_ROOT)
     719        AC_MSG_CHECKING(for shapelib headers and libraries in $SHAPELIB_ROOT)
    700720        if test -d "$SHAPELIB_ROOT"; then
    701721
     
    715735        dnl scalapack{{{
    716736        AC_ARG_WITH([scalapack-dir],
    717           AS_HELP_STRING([--with-scalapack-dir = DIR],[scalapack root directory]),
     737          AS_HELP_STRING([--with-scalapack-dir=DIR],[scalapack root directory]),
    718738          [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT=""])
    719739                         
    720         AC_MSG_CHECKING(for Scalapack headers and libraries in $SCALAPACK_ROOT)
     740        AC_MSG_CHECKING(for scalapack headers and libraries in $SCALAPACK_ROOT)
    721741        if test -d "$SCALAPACK_ROOT"; then
    722742
     
    734754        dnl blas{{{
    735755        AC_ARG_WITH([blas-lapack-dir],
    736           AS_HELP_STRING([--with-blas-lapack-dir = DIR],[blas-lapack root directory]),
     756          AS_HELP_STRING([--with-blas-lapack-dir=DIR],[blas-lapack root directory]),
    737757          [BLASLAPACK_ROOT=$withval],[BLASLAPACK_ROOT=""])
    738758                         
    739         AC_MSG_CHECKING(for Blas and Lapack headers and libraries in $BLASLAPACK_ROOT)
     759        AC_MSG_CHECKING(for blas and lapack headers and libraries in $BLASLAPACK_ROOT)
    740760        if test -d "$BLASLAPACK_ROOT"; then
    741761
     
    767787        dnl mkl{{{
    768788        AC_ARG_WITH([mkl-dir],
    769           AS_HELP_STRING([--with-mkl-dir = DIR],[mkl root directory]),
     789          AS_HELP_STRING([--with-mkl-dir=DIR],[mkl root directory]),
    770790          [MKL_ROOT=$withval],[MKL_ROOT=""])
    771791                         
     
    786806        dnl }}}
    787807        dnl plapack{{{
     808        AC_MSG_CHECKING(for plapack)
     809       
    788810        AC_ARG_WITH([plapack-lib],
    789811          AS_HELP_STRING([--with-plapack-lib = lib],[plapack library]),
    790812          [PLAPACK_LIB=$withval],[PLAPACK_LIB=""])
    791         AC_MSG_CHECKING(for Plapack libraries)
    792813       
    793814        AC_ARG_WITH([plapack-include],
     
    795816                                                         [plapack include ]),
    796817                          [PLAPACK_INCLUDE=$withval],[PLAPACK_INCLUDE=""])
    797         AC_MSG_CHECKING(for Plapack headers)
    798818         
    799819        if test -n "$PLAPACK_LIB"; then
     
    818838        dnl mumps{{{
    819839        AC_ARG_WITH([mumps-dir],
    820           AS_HELP_STRING([--with-mumps-dir = DIR],[mumps root directory]),
     840          AS_HELP_STRING([--with-mumps-dir=DIR],[mumps root directory]),
    821841          [MUMPS_ROOT=$withval],[MUMPS_ROOT=""])
    822842                         
    823         AC_MSG_CHECKING(for Mumps headers and libraries in $MUMPS_ROOT)
     843        AC_MSG_CHECKING(for mumps headers and libraries in $MUMPS_ROOT)
    824844        if test -d "$MUMPS_ROOT"; then
    825845
     
    843863        dnl blacs{{{
    844864        AC_ARG_WITH([blacs-dir],
    845                 AS_HELP_STRING([--with-blacs-dir = DIR],[blacs root directory]),
     865                AS_HELP_STRING([--with-blacs-dir=DIR],[blacs root directory]),
    846866                          [BLACS_ROOT=$withval],[BLACS_ROOT=""])
    847867                         
    848         AC_MSG_CHECKING(for Blacs headers and libraries in $BLACS_ROOT)
     868        AC_MSG_CHECKING(for blacs headers and libraries in $BLACS_ROOT)
    849869        if test -d "$BLACS_ROOT"; then
    850870
     
    864884        dnl hypre{{{
    865885        AC_ARG_WITH([hypre-dir],
    866           AS_HELP_STRING([--with-hypre-dir = DIR],[hypre root directory]),
     886          AS_HELP_STRING([--with-hypre-dir=DIR],[hypre root directory]),
    867887                          [HYPRE_ROOT=$withval],[HYPRE_ROOT=""])
    868888                         
    869         AC_MSG_CHECKING(for Hypre headers and libraries in $HYPRE_ROOT)
     889        AC_MSG_CHECKING(for hypre headers and libraries in $HYPRE_ROOT)
    870890        if test -d "$HYPRE_ROOT"; then
    871891
     
    885905        dnl ml{{{
    886906        AC_ARG_WITH([ml-dir],
    887           AS_HELP_STRING([--with-ml-dir = DIR],[ml root directory]),
     907          AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]),
    888908                          [ML_ROOT=$withval],[ML_ROOT=""])
    889909                         
    890         AC_MSG_CHECKING(for Ml headers and libraries in $ML_ROOT)
     910        AC_MSG_CHECKING(for ml headers and libraries in $ML_ROOT)
    891911        if test -d "$ML_ROOT"; then
    892912
     
    12021222        fi
    12031223
     1224        dnl check that we python version if python compile is specified
     1225        dnl if test "$HAVE_PYTHON" = "yes"  && test "$HAVE_PYTHONVERSION" = "no" ; then
     1226        dnl     AC_MSG_ERROR([need python-version if python compile is required!]);
     1227        dnl fi
     1228
     1229
    12041230        AC_MSG_RESULT(done)
    12051231        dnl }}}
     
    12111237          AS_HELP_STRING([--with-cxxoptflags = CXXOPTFLAGS], [optimization using CXX flags, ex: --with-cxxoptflags=-march=opteron -O3]),
    12121238          [CXXOPTFLAGS=$withval],[CXXOPTFLAGS="-g -O2"])
    1213         AC_MSG_CHECKING(for C++ optimization flags)
     1239        AC_MSG_CHECKING(for c++ optimization flags)
    12141240        AC_SUBST([CXXOPTFLAGS])
    12151241        AC_MSG_RESULT(done)
Note: See TracChangeset for help on using the changeset viewer.