Changeset 497 for trunk/configure.in


Ignore:
Timestamp:
Jul 29, 2006 11:07:47 PM (15 years ago)
Author:
dkearney
Message:

added checks to configure.in to find where python and perl live,
added .in files for python and perl build files
configure now builds perl/Makefile.PL and python/setup.py and fits
it with the correct values needed to build and install the module
in the correct directory, where it will live in the rappture distribution.
there had been talk of using env variables to point python and perl
to where these modules live, so that is the current line of thinking.
added queue module for python. the Rappture.queue module's purpose
is to make it easy to send a job to the pbs and condor queues and
track the job using rappture. pbs is kinda complete, condor is not
complete and is still being worked on. the signalHandler and tools
python modules came from left over code that all python rappture
applications might want to include to make the developers life
a little more enjoyable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r493 r497  
    3535AC_PROG_F77([f77 fort77 g77 f90 xlf xlf90 fl32])
    3636
     37dnl perl and python check borrowed from
     38dnl http://www.opensource.apple.com/darwinsource/Current/libxslt-8.1/libxslt/configure.in
     39dnl
     40dnl Perl is just needed for generating some data for XSLtmark
     41dnl
     42
     43AC_ARG_WITH(perl, [  --with-perl[=DIR]         Build Perl bindings if found])
     44AC_CHECK_PROG(PERL, perl, perl, false)
     45dnl AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
     46
     47dnl
     48dnl check for python
     49dnl
     50
     51PYTHON=
     52PYTHON_VERSION=
     53PYTHON_INCLUDES=
     54PYTHON_SITE_PACKAGES=
     55pythondir=
     56AC_ARG_WITH(python, [  --with-python[=DIR]       Build Python bindings if found])
     57if test "$with_python" != "no" ; then
     58    if test -x "$with_python/bin/python"
     59    then
     60        echo Found python in $with_python/bin/python
     61        PYTHON="$with_python/bin/python"
     62    else
     63        if test -x "$with_python"
     64        then
     65            echo Found python in $with_python
     66            PYTHON="$with_python"
     67        else
     68            AC_PATH_PROG(PYTHON, python python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
     69        fi
     70    fi
     71    if test "$PYTHON" != ""
     72    then
     73        PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[0:3]]"`
     74    echo Found Python version $PYTHON_VERSION
     75dnl    LIBXML2_PYTHON=`$PYTHON -c "try : import libxml2 ; print 1
     76dnl except: print 0"`
     77dnl     if test "$LIBXML2_PYTHON" = "1"
     78dnl     then
     79dnl         echo Found libxml2-python module
     80dnl     else
     81dnl         echo Warning: Missing libxml2-python
     82dnl     fi
     83    fi
     84    if test "$PYTHON_VERSION" != ""
     85    then
     86    if test -r $with_python/include/python$PYTHON_VERSION/Python.h -a \
     87       -d $with_python/lib/python$PYTHON_VERSION/site-packages
     88    then
     89        PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
     90        PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
     91    else
     92        if test -r $prefix/include/python$PYTHON_VERSION/Python.h
     93        then
     94            PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
     95            PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     96        else
     97            if test -r /usr/include/python$PYTHON_VERSION/Python.h
     98            then
     99                PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
     100                PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
     101            else
     102                echo could not find python$PYTHON_VERSION/Python.h
     103            fi
     104        fi
     105        if test ! -d "$PYTHON_SITE_PACKAGES"
     106        then
     107            PYTHON_SITE_PACKAGES=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib()"`
     108        fi
     109    fi
     110    fi
     111    if test "$with_python" != ""
     112    then
     113        pythondir='$(PYTHON_SITE_PACKAGES)'
     114    else
     115        pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
     116    fi
     117fi
     118dnl AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
     119dnl if test "$PYTHON_INCLUDES" != ""
     120dnl then
     121dnl     PYTHON_SUBDIR=python
     122dnl else
     123dnl     PYTHON_SUBDIR=
     124dnl fi
     125AC_SUBST(pythondir)
     126dnl AC_SUBST(PYTHON_SUBDIR)
     127
     128AC_SUBST(PERL)
     129AC_SUBST(PYTHON)
     130AC_SUBST(PYTHON_VERSION)
     131AC_SUBST(PYTHON_INCLUDES)
     132AC_SUBST(PYTHON_SITE_PACKAGES)
     133
    37134AC_SUBST(VERSION)
    38135
     
    45142            examples/app-fermi/fortran/Makefile \
    46143            examples/c-example/Makefile \
     144            perl/Makefile.PL \
     145            python/setup.py \
    47146            src/Makefile \
    48147            src/matlab/Makefile \
Note: See TracChangeset for help on using the changeset viewer.