Changeset 563 for trunk


Ignore:
Timestamp:
Dec 17, 2006, 8:11:46 PM (18 years ago)
Author:
dkearney
Message:

small adjustments to gauge.tcl to fix errors in number and units recognition.
adjusted configure.in and makefiles to allow user to specify the architecture
they would like to use for compiling matlab bindings. also adjusted the main
makefile not to try to compile bindings for languages it cannot find on the system.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r558 r563  
    7070# matlab bindings
    7171build_matlab:
    72         cd src/matlab; make clean; make RpMatlab; cd -
     72        if test "x@MEX@" != "x" ; then \
     73                cd src/matlab; make clean; make RpMatlab; cd -; \
     74        fi
    7375
    7476install_matlab: build_matlab
    75         cd src/matlab; make install; cd -
     77        if test "x@MEX@" != "x" ; then \
     78                cd src/matlab; make install; cd -; \
     79        fi
    7680
    7781# octave bindings
    7882build_octave:
    79         cd src/octave; make clean; make RpOctave; cd -
     83        if test "x@MKOCTFILE@" != "x" ; then \
     84                cd src/octave; make clean; make RpOctave; cd -; \
     85        fi
    8086
    8187install_octave: build_octave
    82         cd src/octave; make install; cd -
     88        if test "x@MKOCTFILE@" != "x" ; then \
     89                cd src/octave; make install; cd -; \
     90        fi
    8391
    8492build_python:
    85         set -x;
    86         cd python; \
    87         @PYTHON@ setup.py \
    88                 build_ext \
    89                 --library-dirs=@prefix@/lib \
    90                 --include-dirs=@prefix@/include \
    91                 build
     93        if test "x@PYTHON@" != "x" ; then \
     94                set -x; \
     95                cd python; \
     96                @PYTHON@ setup.py \
     97                        build_ext \
     98                        --library-dirs=@prefix@/lib \
     99                        --include-dirs=@prefix@/include \
     100                        build; \
     101        fi
    92102
    93103install_python: build_python
    94         set -x;
    95         cd python; \
    96         @PYTHON@ setup.py install --prefix=@prefix@
     104        if test "x@PYTHON@" != "x" ; then \
     105                set -x; \
     106                cd python; \
     107                @PYTHON@ setup.py install --prefix=@prefix@; \
     108        fi
    97109
    98110build_perl:
    99         set -x;
    100         cd perl; \
    101         @PERL@ Makefile.PL INSTALLSITELIB=@prefix@/lib/perl5 INSTALLSITEMAN3DIR=@prefix@/man/man3; \
    102         make; make test;
     111        if test "x@PERL@" != "x" ; then \
     112                set -x; \
     113                cd perl; \
     114                @PERL@ Makefile.PL INSTALLSITELIB=@prefix@/lib/perl5 INSTALLSITEMAN3DIR=@prefix@/man/man3; \
     115                make; make test; \
     116        fi
    103117
    104118install_perl: build_perl
    105         set -x;
    106         cd perl; make install;
     119        if test "x@PERL@" != "x" ; then \
     120                set -x; \
     121                cd perl; make install; \
     122        fi
    107123
    108124build_pkgs:
  • trunk/configure

    r558 r563  
    675675PYTHON
    676676pythondir
     677MEX_ARCH
    677678PERL_INCLUDES
    678679PYTHON_VERSION
     
    12721273  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    12731274  --with-matlab=DIR         Build Matlab bindings if MEX compiler is found
     1275  --with-matlab-arch=ARCH         Build Matlab bindings for ARCH architecture
    12741276  --with-octave=DIR         Build Octave bindings if MKOCTFILE compiler is found
    12751277  --with-perl=DIR         Build Perl bindings if found
     
    49494951fi
    49504952
     4953
     4954# Check whether --with-matlab_arch was given.
     4955if test "${with_matlab_arch+set}" = set; then
     4956  withval=$with_matlab_arch;
     4957fi
     4958
    49514959MEX=
     4960MEX_ARCH=
    49524961if test "$with_matlab" != "no" ; then
    49534962        if test -x "$with_matlab/bin/mex"
     
    50035012        fi
    50045013    fi
     5014fi
     5015if test "x$with_matlab_arch" != "x" ; then
     5016    MEX_ARCH="-arch=$with_matlab_arch"
    50055017fi
    50065018
     
    59926004PYTHON!$PYTHON$ac_delim
    59936005pythondir!$pythondir$ac_delim
     6006MEX_ARCH!$MEX_ARCH$ac_delim
    59946007PERL_INCLUDES!$PERL_INCLUDES$ac_delim
    59956008PYTHON_VERSION!$PYTHON_VERSION$ac_delim
     
    60036016_ACEOF
    60046017
    6005   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 69; then
     6018  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 70; then
    60066019    break
    60076020  elif $ac_last_try; then
  • trunk/configure.in

    r558 r563  
    3636
    3737AC_ARG_WITH(matlab, [  --with-matlab[=DIR]         Build Matlab bindings if MEX compiler is found])
     38AC_ARG_WITH(matlab_arch, [  --with-matlab-arch[=ARCH]         Build Matlab bindings for ARCH architecture])
    3839dnl AC_CHECK_PROG(MEX, mex, mex, false)
    3940MEX=
     41MEX_ARCH=
    4042if test "$with_matlab" != "no" ; then
    4143    dnl WITH_MATLAB = "yes"
     
    5456    fi
    5557fi
     58if test "x$with_matlab_arch" != "x" ; then
     59    MEX_ARCH="-arch=$with_matlab_arch"
     60fi
     61dnl AC_CHECK_PROG(MEX, mex, mex, false)
    5662dnl AM_CONDITIONAL(WITH_MATLAB, test x$MEX != x)
    5763
     
    170176dnl AM_CONDITIONAL(WITH_PYTHON, test x$PYTHON != x)
    171177
    172 dnl AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
    173 dnl if test "$PYTHON_INCLUDES" != ""
    174 dnl then
    175 dnl     PYTHON_SUBDIR=python
    176 dnl else
    177 dnl     PYTHON_SUBDIR=
    178 dnl fi
    179 
    180178AC_SUBST(pythondir)
    181179dnl AC_SUBST(PYTHON_SUBDIR)
    182180
    183181AC_SUBST(MEX)
     182AC_SUBST(MEX_ARCH)
    184183AC_SUBST(MKOCTFILE)
    185184AC_SUBST(PERL)
  • trunk/gui/scripts/gauge.tcl

    r562 r563  
    218218        set newval [set nv [lindex $args 0]]
    219219        set units $itk_option(-units)
    220         if {$units != ""} {
    221             set nvUnits [Rappture::Units::Search::for $nv]
     220        if {"" != $units} {
     221            set newval [Rappture::Units::convert $newval \
     222                -context $units]
     223            set nvUnits [Rappture::Units::Search::for $newval]
    222224            if { "" == $nvUnits} {
    223225                set msg [Rappture::Units::description $units]
    224                 error "Unrecognized units: $nv\n$mesg"
    225             }
    226             set newval [Rappture::Units::convert $newval \
    227                 -context $units]
     226                error "Unrecognized units: $newval\nEnter value with units $msg"
     227            }
    228228            set nv [Rappture::Units::convert $nv \
    229229                -context $units -to $units -units off]
  • trunk/src/matlab/Makefile.in

    r520 r563  
    1414# define our compiling environment
    1515#
    16 MEX             = @MEX@
     16MEX             = @MEX@ @MEX_ARCH@
    1717
    1818# define our directories
Note: See TracChangeset for help on using the changeset viewer.