Changeset 13737


Ignore:
Timestamp:
10/18/12 13:18:08 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: matlab version does not need to be detected (could not find it for R2012b anyway)

File:
1 edited

Legend:

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

    r13709 r13737  
    111111        AM_CONDITIONAL([MATLAB], [test x$HAVE_MATLAB = xyes])
    112112
    113         dnl 2. if matlab is provided, get version number
     113        dnl 2. Get Matlab libraries
    114114        if test x$HAVE_MATLAB = xyes; then
    115                 AC_MSG_CHECKING([for matlab version])
    116                 MATLAB_VERSION=""
    117 
    118                 dnl For Matlab R2008a and more, the version number is stored in .VERSION
    119                 if test -f "$MATLAB_ROOT/.VERSION" ; then
    120                         MATLAB_VERSION=$(cat $MATLAB_ROOT/.VERSION)
    121                 fi
    122                 dnl Otherwise find version in file stored in bin/util/mex/version.txt
    123                 if test -f "$MATLAB_ROOT/bin/util/mex/version.txt" ; then
    124                         MATLAB_VERSION=$(cat $MATLAB_ROOT/bin/util/mex/version.txt)
    125                 fi
    126 
    127                 dnl check that we found the version
    128                 if test -z "$MATLAB_VERSION" ; then
    129                         AC_MSG_ERROR([Matlab version not found])
    130                 fi
    131 
    132                 case $MATLAB_VERSION in
    133                         @<:@1-9@:>@.@<:@0-9@:>@ | @<:@1-9@:>@@<:@0-9@:>@.@<:@0-9@:>@ | @<:@1-9@:>@.@<:@1-9@:>@@<:@0-9@:>@)
    134                                 MATLAB_MAJOR=$(echo $MATLAB_VERSION | sed -e "s/^\(@<:@0-9@:>@*\)\.@<:@0-9@:>@*.*/\1/")
    135                                 MATLAB_MINOR=$(echo $MATLAB_VERSION | sed -e "s/^@<:@0-9@:>@*\.\(@<:@0-9@:>@*\).*/\1/")
    136                                 ;;
    137                         R2007a)
    138                           MATLAB_MAJOR=7
    139                           MATLAB_MINOR=4
    140                           ;;
    141                         R2008a)
    142                           MATLAB_MAJOR=7
    143                           MATLAB_MINOR=6
    144                           ;;
    145                         R2009a)
    146                           MATLAB_MAJOR=7
    147                           MATLAB_MINOR=8
    148                           ;;
    149                         R2010a)
    150                           MATLAB_MAJOR=7
    151                           MATLAB_MINOR=10
    152                           ;;
    153                         R2010b)
    154                           MATLAB_MAJOR=7
    155                           MATLAB_MINOR=11
    156                           ;;
    157                         R2011a)
    158                           MATLAB_MAJOR=7
    159                           MATLAB_MINOR=12
    160                           ;;
    161                         R2011b)
    162                           MATLAB_MAJOR=7
    163                           MATLAB_MINOR=13
    164                           ;;
    165                         R2012a)
    166                           MATLAB_MAJOR=7
    167                           MATLAB_MINOR=14
    168                           ;;
    169                         R2012b)
    170                           MATLAB_MAJOR=7
    171                           MATLAB_MINOR=15
    172                           ;;
    173                         *)
    174                           AC_MSG_ERROR([can not determine Matlab version number])
    175                         esac
    176                 AC_SUBST([MATLAB_VERSION])
    177                 AC_SUBST([MATLAB_MAJOR])
    178                 AC_SUBST([MATLAB_MINOR])
    179                 AC_MSG_RESULT($MATLAB_VERSION ($MATLAB_MAJOR.$MATLAB_MINOR))
    180 
    181                 dnl 3. Get Matlab libraries
     115
    182116                AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT)
    183117                MATLABINCL=-I"$MATLAB_ROOT/extern/include";
     
    187121                MEXLIB=$( mex -v 2>&1 < /dev/null | grep CXXLIBS     | sed -e "s/         CXXLIBS            = //g")
    188122                MEXEXT=$( mex -v 2>&1 < /dev/null | grep LDEXTENSION | sed -e "s/         LDEXTENSION        = //g")
    189                 dnl dnl OS-dependent variables and checks (old stuff)
    190                 dnl case "${host_os}" in
    191                 dnl     *linux*)
    192                 dnl             if test "${host_cpu}" = "x86_64";
    193                 dnl             then
    194                 dnl                     MEXLIB="-Wl,-rpath-link,$MATLAB_ROOT/bin/glnxa64 -L$MATLAB_ROOT/bin/glnxa64/ -lmx -lmex -lmat -lm"
    195                 dnl                     MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnxa64/mexFunction.map";
    196                 dnl             else
    197                 dnl                     MEXLIB=-L"$MATLAB_ROOT/bin/glnx86/ -lmex"
    198                 dnl                     MEXLINK="-pthread -shared -W2,--version-script,${MATLAB_ROOT}/extern/lib/glnx86/mexFunction.map";
    199                 dnl             fi
    200                 dnl             MEXEXT=`$MATLAB_ROOT/bin/mexext`
    201                 dnl             MEXEXT=".$MEXEXT"
    202                 dnl     ;;
    203                 dnl     *darwin*)
    204                 dnl             dnl mex -v gives all the flags for compilation of mex files
    205                 dnl             dnl if matlab version is 7.9 or more, we must use mexmaci64 (64 bits)
    206                 dnl             MEXLINK="-O -Wl,-flat_namespace -undefined suppress -arch i386 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
    207                 dnl             MEXLIB=" -L$MATLAB_ROOT/bin/maci/ -lmx -lmex -lmat -lstdc++ -largeArrayDims"
    208                 dnl             if test $MATLAB_MAJOR -ge 7; then
    209                 dnl                      if test $MATLAB_MINOR -ge 9; then
    210                 dnl                               MEXLINK="-O -Wl,-flat_namespace -undefined suppress -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci64/mexFunction.map"
    211                 dnl                                      MEXLIB=" -L$MATLAB_ROOT/bin/maci64/ -lmx -lmex -lmat -lstdc++"
    212                 dnl                      fi
    213                 dnl             fi
    214                 dnl             MEXEXT=`$MATLAB_ROOT/bin/mexext`
    215                 dnl             MEXEXT=".$MEXEXT"
    216                 dnl     ;;
    217                 dnl     *cygwin*)
    218                 dnl             if  test $VENDOR = intel-win7-32; then
    219                 dnl                     MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win32\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO -manifest"
    220                 dnl             elif  test $VENDOR = intel-win7-64; then
    221                 dnl                     MEXLIB="-dll -export:mexFunction -LIBPATH:\"$MATLAB_ROOT\extern\lib\win64\microsoft\" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib  -NOLOGO -INCREMENTAL:NO -manifest"
    222                 dnl             fi
    223                 dnl             MEXEXT=`$MATLAB_ROOT/bin/mexext.bat`
    224                 dnl             MEXEXT=".$MEXEXT"
    225                 dnl     ;;
    226                 dnl esac
    227123           AC_MSG_RESULT(done)
    228124
Note: See TracChangeset for help on using the changeset viewer.