Changeset 498 for trunk


Ignore:
Timestamp:
Jul 30, 2006, 10:12:56 AM (18 years ago)
Author:
dkearney
Message:

added checks for matlab's mex compiler and octave's mkoctfile
added hooks for mex and mkoctfile inside src's makefile

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r497 r498  
     1all: rplib bindings
     2install: install_rplib install_bindings install_examples
     3
    14###########################################################################
    25# Makefile - build and install all Rappture libraries
    36#############################################################################
    47
     8
    59rplib:
    610        set -x;
    7         cd src; make clean; make librappture; cd -
    8 #       make install
     11        cd src; make clean; make librappture;
     12
     13install_rplib:
     14        set -x;
     15        cd src; make install
    916
    1017bindings:
     
    1522        cd -
    1623#       make RpTcl;
    17         make RpPython;
    18         make RpPerl;
     24        make build_python_bindings;
     25        make build_perl_bindings;
     26
     27install_bindings:
    1928
    2029#############################################################################
     
    2938        cd examples/c-example; make clean; make; cd -
    3039
     40install_examples: examples
     41
    3142#############################################################################
    3243
    33 RpPython:
     44build_python_bindings:
    3445        set -x;
    3546        cd python; \
     
    3849                --library-dirs=@prefix@/lib \
    3950                --include-dirs=@prefix@/include/core \
    40                 install \
    41                 --prefix=@prefix@ \
     51                build
    4252
    43 RpPerl:
     53install_python_bindings: build_python_bindings
     54        set -x;
     55        cd python; \
     56        @PYTHON@ setup.py install --prefix=@prefix@
     57
     58build_perl_bindings:
    4459        set -x;
    4560        cd perl; \
    4661        @PERL@ Makefile.PL PREFIX=@prefix@; \
    47         make; \
    48         make test; \
    49         make install;
     62        make; make test;
     63
     64install_perl_bindings: build_perl_bindings
     65        set -x;
     66        cd perl; make install;
    5067
    5168clean:
  • trunk/configure

    r497 r498  
    310310#endif"
    311311
    312 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 PERL PYTHON pythondir PYTHON_VERSION PYTHON_INCLUDES PYTHON_SITE_PACKAGES VERSION RP_BASE LIBOBJS LTLIBOBJS'
     312ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 MEX MKOCTFILE PERL PYTHON pythondir PYTHON_VERSION PYTHON_INCLUDES PYTHON_SITE_PACKAGES VERSION RP_BASE LIBOBJS LTLIBOBJS'
    313313ac_subst_files=''
    314314
     
    861861  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    862862  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
     863  --with-matlab=DIR         Build Matlab bindings if MEX compiler is found
     864  --with-octave=DIR         Build Octave bindings if MKOCTFILE compiler is found
    863865  --with-perl=DIR         Build Perl bindings if found
    864866  --with-python=DIR       Build Python bindings if found
     
    42394241
    42404242# Provide some information about the compiler.
    4241 echo "$as_me:4241:" \
     4243echo "$as_me:4243:" \
    42424244     "checking for Fortran 77 compiler version" >&5
    42434245ac_compiler=`set X $ac_compile; echo $2`
     
    43834385
    43844386
    4385 
    4386 # Check whether --with-perl or --without-perl was given.
    4387 if test "${with_perl+set}" = set; then
    4388   withval="$with_perl"
     4387# Check whether --with-matlab or --without-matlab was given.
     4388if test "${with_matlab+set}" = set; then
     4389  withval="$with_matlab"
    43894390
    43904391fi;
    4391 # Extract the first word of "perl", so it can be a program name with args.
    4392 set dummy perl; ac_word=$2
     4392if test "$with_matlab" != "no" ; then
     4393    if test -x "$with_matlab/bin/mex"
     4394    then
     4395        echo Found matlab in $with_matlab/bin/mex
     4396        MEX="$with_matlab/bin/mex"
     4397    else
     4398        if test -x "$with_matlab"
     4399        then
     4400            echo Found mex in $with_matlab
     4401            MEX="$with_matlab"
     4402        else
     4403            # Extract the first word of "mex", so it can be a program name with args.
     4404set dummy mex; ac_word=$2
    43934405echo "$as_me:$LINENO: checking for $ac_word" >&5
    43944406echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
    4395 if test "${ac_cv_prog_PERL+set}" = set; then
     4407if test "${ac_cv_path_MEX+set}" = set; then
    43964408  echo $ECHO_N "(cached) $ECHO_C" >&6
    43974409else
    4398   if test -n "$PERL"; then
    4399   ac_cv_prog_PERL="$PERL" # Let the user override the test.
    4400 else
    4401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4410  case $MEX in
     4411  [\\/]* | ?:[\\/]*)
     4412  ac_cv_path_MEX="$MEX" # Let the user override the test with a path.
     4413  ;;
     4414  *)
     4415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
    44024416for as_dir in $PATH
    44034417do
     
    44064420  for ac_exec_ext in '' $ac_executable_extensions; do
    44074421  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    4408     ac_cv_prog_PERL="perl"
     4422    ac_cv_path_MEX="$as_dir/$ac_word$ac_exec_ext"
    44094423    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
    44104424    break 2
     
    44134427done
    44144428
    4415   test -z "$ac_cv_prog_PERL" && ac_cv_prog_PERL="false"
    4416 fi
    4417 fi
    4418 PERL=$ac_cv_prog_PERL
     4429  ;;
     4430esac
     4431fi
     4432MEX=$ac_cv_path_MEX
     4433
     4434if test -n "$MEX"; then
     4435  echo "$as_me:$LINENO: result: $MEX" >&5
     4436echo "${ECHO_T}$MEX" >&6
     4437else
     4438  echo "$as_me:$LINENO: result: no" >&5
     4439echo "${ECHO_T}no" >&6
     4440fi
     4441
     4442        fi
     4443    fi
     4444fi
     4445
     4446
     4447
     4448# Check whether --with-octave or --without-octave was given.
     4449if test "${with_octave+set}" = set; then
     4450  withval="$with_octave"
     4451
     4452fi;
     4453if test "$with_octave" != "no" ; then
     4454    if test -x "$with_octave/bin/mkoctfile"
     4455    then
     4456        echo Found octave in $with_octave/bin/mkoctfile
     4457        MKOCTFILE="$with_octave/bin/mkoctfile"
     4458    else
     4459        if test -x "$with_octave"
     4460        then
     4461            echo Found mkoctfile in $with_octave
     4462            MKOCTFILE="$with_octave"
     4463        else
     4464            # Extract the first word of "mkoctfile", so it can be a program name with args.
     4465set dummy mkoctfile; ac_word=$2
     4466echo "$as_me:$LINENO: checking for $ac_word" >&5
     4467echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     4468if test "${ac_cv_path_MKOCTFILE+set}" = set; then
     4469  echo $ECHO_N "(cached) $ECHO_C" >&6
     4470else
     4471  case $MKOCTFILE in
     4472  [\\/]* | ?:[\\/]*)
     4473  ac_cv_path_MKOCTFILE="$MKOCTFILE" # Let the user override the test with a path.
     4474  ;;
     4475  *)
     4476  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4477for as_dir in $PATH
     4478do
     4479  IFS=$as_save_IFS
     4480  test -z "$as_dir" && as_dir=.
     4481  for ac_exec_ext in '' $ac_executable_extensions; do
     4482  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     4483    ac_cv_path_MKOCTFILE="$as_dir/$ac_word$ac_exec_ext"
     4484    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4485    break 2
     4486  fi
     4487done
     4488done
     4489
     4490  ;;
     4491esac
     4492fi
     4493MKOCTFILE=$ac_cv_path_MKOCTFILE
     4494
     4495if test -n "$MKOCTFILE"; then
     4496  echo "$as_me:$LINENO: result: $MKOCTFILE" >&5
     4497echo "${ECHO_T}$MKOCTFILE" >&6
     4498else
     4499  echo "$as_me:$LINENO: result: no" >&5
     4500echo "${ECHO_T}no" >&6
     4501fi
     4502
     4503        fi
     4504    fi
     4505fi
     4506
     4507
     4508
     4509
     4510# Check whether --with-perl or --without-perl was given.
     4511if test "${with_perl+set}" = set; then
     4512  withval="$with_perl"
     4513
     4514fi;
     4515if test "$with_perl" != "no" ; then
     4516    if test -x "$with_perl/bin/perl"
     4517    then
     4518        echo Found perl in $with_perl/bin/perl
     4519        PERL="$with_perl/bin/perl"
     4520    else
     4521        if test -x "$with_perl"
     4522        then
     4523            echo Found perl in $with_perl
     4524            PERL="$with_perl"
     4525        else
     4526            # Extract the first word of "perl", so it can be a program name with args.
     4527set dummy perl; ac_word=$2
     4528echo "$as_me:$LINENO: checking for $ac_word" >&5
     4529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
     4530if test "${ac_cv_path_PERL+set}" = set; then
     4531  echo $ECHO_N "(cached) $ECHO_C" >&6
     4532else
     4533  case $PERL in
     4534  [\\/]* | ?:[\\/]*)
     4535  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
     4536  ;;
     4537  *)
     4538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     4539for as_dir in $PATH
     4540do
     4541  IFS=$as_save_IFS
     4542  test -z "$as_dir" && as_dir=.
     4543  for ac_exec_ext in '' $ac_executable_extensions; do
     4544  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     4545    ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
     4546    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     4547    break 2
     4548  fi
     4549done
     4550done
     4551
     4552  ;;
     4553esac
     4554fi
     4555PERL=$ac_cv_path_PERL
     4556
    44194557if test -n "$PERL"; then
    44204558  echo "$as_me:$LINENO: result: $PERL" >&5
     
    44254563fi
    44264564
     4565        fi
     4566    fi
     4567fi
    44274568
    44284569
     
    45294670    fi
    45304671fi
     4672
     4673
    45314674
    45324675
     
    52045347s,@FFLAGS@,$FFLAGS,;t t
    52055348s,@ac_ct_F77@,$ac_ct_F77,;t t
     5349s,@MEX@,$MEX,;t t
     5350s,@MKOCTFILE@,$MKOCTFILE,;t t
    52065351s,@PERL@,$PERL,;t t
    52075352s,@PYTHON@,$PYTHON,;t t
  • trunk/configure.in

    r497 r498  
    3535AC_PROG_F77([f77 fort77 g77 f90 xlf xlf90 fl32])
    3636
     37AC_ARG_WITH(matlab, [  --with-matlab[=DIR]         Build Matlab bindings if MEX compiler is found])
     38dnl AC_CHECK_PROG(MEX, mex, mex, false)
     39if test "$with_matlab" != "no" ; then
     40    if test -x "$with_matlab/bin/mex"
     41    then
     42        echo Found matlab in $with_matlab/bin/mex
     43        MEX="$with_matlab/bin/mex"
     44    else
     45        if test -x "$with_matlab"
     46        then
     47            echo Found mex in $with_matlab
     48            MEX="$with_matlab"
     49        else
     50            AC_PATH_PROG(MEX, mex)
     51        fi
     52    fi
     53fi
     54
     55
     56AC_ARG_WITH(octave, [  --with-octave[=DIR]         Build Octave bindings if MKOCTFILE compiler is found])
     57dnl AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile, false)
     58if test "$with_octave" != "no" ; then
     59    if test -x "$with_octave/bin/mkoctfile"
     60    then
     61        echo Found octave in $with_octave/bin/mkoctfile
     62        MKOCTFILE="$with_octave/bin/mkoctfile"
     63    else
     64        if test -x "$with_octave"
     65        then
     66            echo Found mkoctfile in $with_octave
     67            MKOCTFILE="$with_octave"
     68        else
     69            AC_PATH_PROG(MKOCTFILE, mkoctfile)
     70        fi
     71    fi
     72fi
     73
     74
    3775dnl perl and python check borrowed from
    3876dnl http://www.opensource.apple.com/darwinsource/Current/libxslt-8.1/libxslt/configure.in
     
    4280
    4381AC_ARG_WITH(perl, [  --with-perl[=DIR]         Build Perl bindings if found])
    44 AC_CHECK_PROG(PERL, perl, perl, false)
     82dnl AC_CHECK_PROG(PERL, perl, perl, false)
    4583dnl AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
     84if test "$with_perl" != "no" ; then
     85    if test -x "$with_perl/bin/perl"
     86    then
     87        echo Found perl in $with_perl/bin/perl
     88        PERL="$with_perl/bin/perl"
     89    else
     90        if test -x "$with_perl"
     91        then
     92            echo Found perl in $with_perl
     93            PERL="$with_perl"
     94        else
     95            AC_PATH_PROG(PERL, perl)
     96        fi
     97    fi
     98fi
    4699
    47100dnl
     
    72125    then
    73126        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
    74     echo Found Python version $PYTHON_VERSION
    75 dnl    LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1
    76 dnl except: print 0"`
    77 dnl     if test "$LIBXML2_PYTHON" = "1"
    78 dnl     then
    79 dnl         echo Found libxml2-python module
    80 dnl     else
    81 dnl         echo Warning: Missing libxml2-python
    82 dnl     fi
     127        echo Using python version $PYTHON_VERSION
    83128    fi
    84129    if test "$PYTHON_VERSION" != ""
     
    126171dnl AC_SUBST(PYTHON_SUBDIR)
    127172
     173AC_SUBST(MEX)
     174AC_SUBST(MKOCTFILE)
    128175AC_SUBST(PERL)
    129176AC_SUBST(PYTHON)
  • trunk/src/Makefile.in

    r491 r498  
    2424DEBUG_PLUS      = -g -DDEBUG
    2525# PY              = $(RP_INSTALL_BASE)/bin/python
    26 PY              = python
    27 MEX             = mex
    28 OCT             = mkoctfile
     26PY              = @PYTHON@
     27MEX             = @MEX@
     28OCT             = @MKOCTFILE@
    2929LN              = ln
    3030
  • trunk/src/matlab/Makefile.in

    r489 r498  
    1414# define our compiling environment
    1515#
    16 MEX             = mex
     16MEX             = @MEX@
    1717
    1818# define our directories
  • trunk/src/octave/Makefile.in

    r489 r498  
    1414# define our compiling environment
    1515#
    16 OCT             = mkoctfile
     16OCT             = @MKOCTFILE@
    1717
    1818# define our directories
Note: See TracChangeset for help on using the changeset viewer.