Ignore:
Timestamp:
Aug 25, 2010, 7:05:07 PM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/configure.in

    r1874 r1881  
    249249AC_SUBST(MEXEXT)
    250250
     251# Standard octave search (use the installed version of octave)
    251252AC_ARG_WITH(
    252253    [octave],
     
    257258
    258259OCTAVE=
     260OCTAVE2=
     261OCTAVE3=
    259262OCTAVE_VERSION=
    260263OCTAVE_VERSION_MAJOR=
    261264MKOCTFILE=
     265MKOCTFILE2=
     266MKOCTFILE3=
    262267if test "$with_octave" != "no" ; then
    263268  AC_MSG_CHECKING([for octave and mkoctfile])
     
    266271    AC_PATH_PROG(MKOCTFILE, mkoctfile)
    267272  else
    268     AC_PATH_PROG(OCTAVE, octave, [], [$with_octave/bin:$with_octave])
     273    AC_PATH_PROG(OCTAVE, octave, [], [${with_octave}/bin:${with_octave}])
    269274    AC_PATH_PROG(MKOCTFILE, mkoctfile, [],
    270275        [${with_octave}/bin:${with_octave}])
     
    273278    OCTAVE_VERSION=`${OCTAVE} -v | grep version | cut -d' ' -f4`
    274279    OCTAVE_VERSION_MAJOR=`echo ${OCTAVE_VERSION} | cut -d'.' -f1`
    275   fi
    276 fi
     280    if test "${OCTAVE_VERSION_MAJOR}" == "3" ; then
     281      OCTAVE3=$OCTAVE
     282      MKOCTFILE3=$MKOCTFILE
     283    fi
     284    if test "${OCTAVE_VERSION_MAJOR}" == "2" ; then
     285      OCTAVE2=$OCTAVE
     286      MKOCTFILE2=$MKOCTFILE
     287    fi
     288  fi
     289fi
     290
     291# Check if octave2 was designated *in addition* to the installed version.
     292AC_ARG_WITH(
     293    [octave2],
     294    [AS_HELP_STRING([--with-octave2[=DIR]],
     295        [location of octave compiler MKOCTFILE @<:@default=no@:>@])],
     296    [with_octave2=$withval],
     297    [with_octave2=no])
     298
     299if test "$with_octave2" != "no" ; then
     300  AC_MSG_CHECKING([for octave and mkoctfile])
     301  AC_PATH_PROG(octave2, octave, [], [${with_octave2}/bin:${with_octave2}])
     302  AC_PATH_PROG(mkoctfile2, mkoctfile, [],
     303        [${with_octave2}/bin:${with_octave2}])
     304  if test "x${octave2}" != "x" ; then
     305    version=`${octave2} -v | grep version | cut -d' ' -f4`
     306    version_major=`echo ${version} | cut -d'.' -f1`
     307    if test "$version_major" = "2" ; then
     308      OCTAVE2=$octave2
     309      MKOCTFILE2=$mkoctfile2
     310    fi
     311  fi
     312fi
     313# Check if octave3 was designated *in addition* to the installed version.
     314AC_ARG_WITH(
     315    [octave3],
     316    [AS_HELP_STRING([--with-octave3[=DIR]],
     317        [location of octave compiler MKOCTFILE @<:@default=no@:>@])],
     318    [with_octave3=$withval],
     319    [with_octave3=no])
     320if test "$with_octave3" != "no" ; then
     321  AC_MSG_CHECKING([for octave and mkoctfile])
     322  AC_PATH_PROG(octave3, octave, [], [${with_octave3}/bin:${with_octave3}])
     323  AC_PATH_PROG(mkoctfile3, mkoctfile, [],
     324        [${with_octave3}/bin:${with_octave3}])
     325  if test "x${octave3}" != "x" ; then
     326    version=`${octave3} -v | grep version | cut -d' ' -f4`
     327    version_major=`echo ${version} | cut -d'.' -f1`
     328    if test "$version_major" = "3" ; then
     329      OCTAVE3=$with_octave3
     330      MKOCTFILE3=$mkoctfile3
     331    fi
     332  fi
     333fi
     334
     335AC_SUBST(OCTAVE2)
     336AC_SUBST(OCTAVE3)
    277337AC_SUBST(OCTAVE)
    278338AC_SUBST(OCTAVE_VERSION)
    279339AC_SUBST(OCTAVE_VERSION_MAJOR)
    280340AC_SUBST(MKOCTFILE)
    281 
    282 AC_ARG_WITH(
    283     [perl],
    284     [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=yes@:>@])],
    285     [],
    286     [with_perl=yes])
     341AC_SUBST(MKOCTFILE2)
     342AC_SUBST(MKOCTFILE3)
    287343
    288344PERL=
Note: See TracChangeset for help on using the changeset viewer.