Changeset 1087 for trunk/configure.in


Ignore:
Timestamp:
Aug 3, 2008, 11:34:45 PM (16 years ago)
Author:
dkearney
Message:

adjusted how we calculate the library path for perl and ruby bindings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r1082 r1087  
    5151
    5252make_command=""
    53 for m in "$MAKE" make gmake gnumake ; do 
    54   if test "x${m}" != "x" ; then 
    55     if  ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then 
     53for m in "$MAKE" make gmake gnumake ; do
     54  if test "x${m}" != "x" ; then
     55    if  ( sh -c "$m --version" 2>/dev/null | grep GNU >/dev/null ) ; then
    5656      make_command=$m; break;
    5757    fi
     
    121121    for i in "${with_matlab}/bin/mex" "${with_matlab}" ; do
    122122      if test -x "$i" ; then
    123         MEX="$i"; break
     123        MEX="$i"; break
    124124      fi
    125125      if test "x${MEX}" = "x" ; then
    126         AC_ERROR([cannot find mex in $with_matlab])
     126        AC_ERROR([cannot find mex in $with_matlab])
    127127      fi
    128128    done
     
    150150    for i in "${with_octave}/bin/mkoctfile" "${with_octave}" ; do
    151151      if test -x "$i" ; then
    152         MEX="$i"; break
     152        MEX="$i"; break
    153153      fi
    154154      if test "x${MEX}" = "x" ; then
    155         AC_ERROR([cannot find mkoctfile in $with_octave])
     155        AC_ERROR([cannot find mkoctfile in $with_octave])
    156156      fi
    157157    done
     
    170170PERL=
    171171PERL_INCLUDES=
    172 PERL_SITE_PACKAGES=
    173172PERL_ARCHLIB=
     173PERL_VERSION=
     174PERL_VERSION_RV=
    174175if test "$with_perl" != "no" ; then
    175176    AC_MSG_CHECKING([for perl])
     
    181182    if test "x${PERL}" != "x" ; then
    182183      PERL_ARCHLIB=`${PERL} -MConfig -e 'print $Config{archlib}'`
    183       PERL_SITE_PACKAGES='$(libdir)/perl5'
     184      PERL_VERSION=`${PERL} -MConfig -e 'print $Config{version}'`
     185      PERL_VERSION_RV=`echo ${PERL_VERSION} | cut -d'.' -f1-2`
    184186    fi
    185187fi
     
    187189AC_SUBST(PERL)
    188190AC_SUBST(PERL_INCLUDES)
    189 AC_SUBST(PERL_SITE_PACKAGES)
    190191AC_SUBST(PERL_ARCHLIB)
     192AC_SUBST(PERL_VERSION)
     193AC_SUBST(PERL_VERSION_RV)
    191194
    192195PYTHON=""
     
    230233    else
    231234      if test -r $prefix/include/python$PYTHON_VERSION/Python.h; then
    232         PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
    233         PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     235        PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
     236        PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
    234237      else
    235         if test -r /usr/include/python$PYTHON_VERSION/Python.h; then
    236           PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
    237           PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
    238         else
    239           echo could not find python$PYTHON_VERSION/Python.h
    240         fi
     238        if test -r /usr/include/python$PYTHON_VERSION/Python.h; then
     239          PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
     240          PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     241        else
     242          echo could not find python$PYTHON_VERSION/Python.h
     243        fi
    241244      fi
    242245      if test ! -d "$PYTHON_SITE_PACKAGES"; then
    243         PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
     246        PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
    244247      fi
    245248    fi
     
    253256  AC_MSG_CHECKING([for python distutils])
    254257  ${PYTHON} -c "from distutils.core import setup; setup(name='test')" \
    255         build build_ext 2>&1 > /dev/null
     258        build build_ext 2>&1 > /dev/null
    256259  if test $? = 0 ; then
    257260    HAVE_PYTHON_DISTUTILS="yes"
     
    260263  fi
    261264  AC_MSG_RESULT([$HAVE_PYTHON_DISTUTILS])
    262  
     265
    263266  if test "${HAVE_PYTHON_DISTUTILS}" = "yes"; then
    264267    #
     
    270273       print distutils.sysconfig.get_python_inc();"`
    271274      if test -n "${incdir}"; then
    272         python_path="-I${incdir}"
     275        python_path="-I${incdir}"
    273276      fi
    274277      PYTHON_CPPFLAGS=$python_path
     
    281284    AC_MSG_CHECKING([location of site-packages])
    282285    PYTHON_SITE_DIR="`${PYTHON} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(0);'`"
    283    
     286
    284287    PYTHON_CFLAGS="`$PYTHON -c 'from distutils import sysconfig; flags = [[\"-I\" + sysconfig.get_python_inc(0), \"-I\" + sysconfig.get_python_inc(1), \" \".join(sysconfig.get_config_var(\"CFLAGS\").split())]]; print \" \".join(flags);'`"
    285288    PYTHON_LDFLAGS="`$PYTHON -c 'from distutils import sysconfig; libs = sysconfig.get_config_var(\"LIBS\").split() + sysconfig.get_config_var(\"SYSLIBS\").split(); libs.append(\"-lpython\"+sysconfig.get_config_var(\"VERSION\")); print \" \".join(libs);'`"
     
    301304RUBY_DEV_PKG="no"
    302305
    303 AC_ARG_WITH(ruby, 
    304   AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]), 
     306AC_ARG_WITH(ruby,
     307  AS_HELP_STRING([--with-ruby=PATH], [absolute path to ruby executable]),
    305308  [rappture_with_ruby=$with_val])
    306 if test "${rappture_with_ruby}" != "no" ; then 
     309if test "${rappture_with_ruby}" != "no" ; then
    307310  if test "${rappture_with_ruby}" = "yes" ; then
    308311    AC_PATH_PROG(RUBY, ruby)
    309312  else
    310     AC_PATH_PROG(RUBY, ruby, 
     313    AC_PATH_PROG(RUBY, ruby,
    311314      [${rappture_with_ruby}/bin/ruby:${rappture_with_ruby}])
    312315  fi
     
    314317AC_SUBST(RUBY)
    315318
     319RUBY_VERSION_RV=
     320RUBY_PLATFORM=
    316321if test "x${RUBY}" != "x" ; then
    317322  AX_PROG_RUBY_VERSION
     323  RUBY_VERSION_RV=`echo ${RUBY_VERSION} | cut -d'.' -f1-2`
     324  RUBY_PLATFORM=`ruby -e 'puts RUBY_PLATFORM'`
    318325  ac_mkmf_result=`${RUBY} -r mkmf -e ";" 2>&1`
    319326  if test -z "$ac_mkmf_result"; then
     
    323330fi
    324331AC_SUBST(HAVE_RUBY_DEVEL)
     332AC_SUBST(RUBY_VERSION_RV)
     333AC_SUBST(RUBY_PLATFORM)
    325334
    326335RP_BASE=`pwd`
     
    366375dnl read Makefile.in and write Makefile
    367376AC_OUTPUT( [
    368         Makefile
    369         packages/Makefile
    370         src/Makefile
    371         src/core/Makefile
    372         src/core2/Makefile
    373         src/objects/Makefile
    374         gui/Makefile
    375         gui/apps/Makefile
    376         gui/apps/rappture
    377         gui/apps/rappture.env
    378         gui/apps/simsim
    379         gui/pkgIndex.tcl
    380         gui/scripts/Makefile
    381         lang/Makefile
    382         lang/perl/Makefile
    383         lang/perl/Makefile.PL
    384         lang/python/Makefile
    385         lang/python/setup.py
    386         lang/matlab/Makefile
    387         lang/octave/Makefile
    388         lang/ruby/Makefile
    389         lang/ruby/build.rb
    390         lang/tcl/Makefile
    391         lang/tcl/pkgIndex.tcl
    392         lang/tcl/src/Makefile
    393         lang/tcl/scripts/Makefile
    394         lang/tcl/tests/Makefile
    395         lib/Makefile
    396         examples/Makefile
    397         examples/3D/Makefile
    398         examples/app-fermi/Makefile
    399         examples/app-fermi/2.0/Makefile
    400         examples/app-fermi/cee/Makefile
    401         examples/app-fermi/fortran/Makefile
    402         examples/app-fermi/matlab/Makefile
    403         examples/app-fermi/octave/Makefile
    404         examples/app-fermi/perl/Makefile
    405         examples/app-fermi/python/Makefile
    406         examples/app-fermi/ruby/Makefile
    407         examples/app-fermi/tcl/Makefile
    408         examples/app-fermi/wrapper/Makefile
    409         examples/app-fermi/wrapper/cee/Makefile
    410         examples/app-fermi/wrapper/python/Makefile
    411         examples/app-fermi/wrapper/tcl/Makefile
    412         examples/c-example/Makefile
    413         examples/canvas/Makefile
    414         examples/demo.bash
    415         examples/graph/Makefile
    416         examples/zoo/Makefile
    417         examples/zoo/binary/Makefile
    418         examples/zoo/boolean/Makefile
    419         examples/zoo/choice/Makefile
    420         examples/zoo/cloud/Makefile
    421         examples/zoo/cloud/matlab/Makefile
    422         examples/zoo/curve/Makefile
    423         examples/zoo/enable/Makefile
    424         examples/zoo/field/Makefile
    425         examples/zoo/group/Makefile
    426         examples/zoo/image/Makefile
    427         examples/zoo/image/docs/Makefile
    428         examples/zoo/image/examples/Makefile 
    429         examples/zoo/integer/Makefile
    430         examples/zoo/integer2/Makefile
    431         examples/zoo/loader/Makefile
    432         examples/zoo/loader/examples/Makefile
    433         examples/zoo/log/Makefile
    434         examples/zoo/note/Makefile
    435         examples/zoo/note/docs/Makefile
    436         examples/zoo/number/Makefile
    437         examples/zoo/number2/Makefile
    438         examples/zoo/phase/Makefile
    439         examples/zoo/sequence/Makefile
    440         examples/zoo/sequence/examples/Makefile
    441         examples/zoo/string/Makefile
    442         examples/zoo/structure/Makefile
    443         examples/zoo/structure/examples/Makefile
    444         examples/zoo/table/Makefile
    445         test/Makefile
    446         test/src/Makefile
     377    Makefile
     378    packages/Makefile
     379    src/Makefile
     380    src/core/Makefile
     381    src/core2/Makefile
     382    src/objects/Makefile
     383    gui/Makefile
     384    gui/apps/Makefile
     385    gui/apps/rappture
     386    gui/apps/rappture.env
     387    gui/apps/simsim
     388    gui/pkgIndex.tcl
     389    gui/scripts/Makefile
     390    lang/Makefile
     391    lang/perl/Makefile
     392    lang/perl/Makefile.PL
     393    lang/python/Makefile
     394    lang/python/setup.py
     395    lang/matlab/Makefile
     396    lang/octave/Makefile
     397    lang/ruby/Makefile
     398    lang/ruby/build.rb
     399    lang/tcl/Makefile
     400    lang/tcl/pkgIndex.tcl
     401    lang/tcl/src/Makefile
     402    lang/tcl/scripts/Makefile
     403    lang/tcl/tests/Makefile
     404    lib/Makefile
     405    examples/Makefile
     406    examples/3D/Makefile
     407    examples/app-fermi/Makefile
     408    examples/app-fermi/2.0/Makefile
     409    examples/app-fermi/cee/Makefile
     410    examples/app-fermi/fortran/Makefile
     411    examples/app-fermi/matlab/Makefile
     412    examples/app-fermi/octave/Makefile
     413    examples/app-fermi/perl/Makefile
     414    examples/app-fermi/python/Makefile
     415    examples/app-fermi/ruby/Makefile
     416    examples/app-fermi/tcl/Makefile
     417    examples/app-fermi/wrapper/Makefile
     418    examples/app-fermi/wrapper/cee/Makefile
     419    examples/app-fermi/wrapper/python/Makefile
     420    examples/app-fermi/wrapper/tcl/Makefile
     421    examples/c-example/Makefile
     422    examples/canvas/Makefile
     423    examples/demo.bash
     424    examples/graph/Makefile
     425    examples/zoo/Makefile
     426    examples/zoo/binary/Makefile
     427    examples/zoo/boolean/Makefile
     428    examples/zoo/choice/Makefile
     429    examples/zoo/cloud/Makefile
     430    examples/zoo/cloud/matlab/Makefile
     431    examples/zoo/curve/Makefile
     432    examples/zoo/enable/Makefile
     433    examples/zoo/field/Makefile
     434    examples/zoo/group/Makefile
     435    examples/zoo/image/Makefile
     436    examples/zoo/image/docs/Makefile
     437    examples/zoo/image/examples/Makefile
     438    examples/zoo/integer/Makefile
     439    examples/zoo/integer2/Makefile
     440    examples/zoo/loader/Makefile
     441    examples/zoo/loader/examples/Makefile
     442    examples/zoo/log/Makefile
     443    examples/zoo/note/Makefile
     444    examples/zoo/note/docs/Makefile
     445    examples/zoo/number/Makefile
     446    examples/zoo/number2/Makefile
     447    examples/zoo/phase/Makefile
     448    examples/zoo/sequence/Makefile
     449    examples/zoo/sequence/examples/Makefile
     450    examples/zoo/string/Makefile
     451    examples/zoo/structure/Makefile
     452    examples/zoo/structure/examples/Makefile
     453    examples/zoo/table/Makefile
     454    test/Makefile
     455    test/src/Makefile
    447456])
Note: See TracChangeset for help on using the changeset viewer.