Changeset 718 for trunk/configure.in


Ignore:
Timestamp:
May 9, 2007 1:48:39 PM (14 years ago)
Author:
dkearney
Message:

after the core rappture library (librappture.so) is created the include
files necessary to compile all other bindings are copied to the top level
include directory. python, perl, matlab, octave and tcl bindings now refer
to this top level include directory to find header files.

fortran and c examples are only compiled if we find a compiler, this check
helps prevent builds from failing before the libraries are installed.

added more checks to the configure script

removed rappture search paths from perl's unix build because perl could find
an older version of rappture and compile against it. I would rather the build
fail and have the person enter a valid prefix.

addrd the -fPIC flag to CFLAGS in src2's makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r708 r718  
    22
    33VERSION=0.0.1
     4AC_SUBST(VERSION)
    45
    56#------------------------------------------------------------------------
     
    1920    LIB_SEARCH_DIRS="-L ${libdir}"
    2021fi
     22
     23AC_SUBST(LIB_SEARCH_DIRS)
    2124
    2225AC_PROG_INSTALL
     
    3942AC_CHECK_HEADERS(vector,,AC_MSG_WARN(STL classes missing ?))
    4043
    41 AC_PROG_F77([f77 fort77 g77 f90 xlf xlf90 fl32])
    42 
    43 AC_ARG_WITH(matlab, [  --with-matlab[=DIR]         Build Matlab bindings if MEX compiler is found])
    44 AC_ARG_WITH(matlab_arch, [  --with-matlab-arch[=ARCH]         Build Matlab bindings for ARCH architecture])
    45 AC_ARG_WITH(mexext, [  --with-mexext[=ARCH]         Suggest an extension for building mex files])
    46 dnl AC_CHECK_PROG(MEX, mex, mex, false)
     44AC_PROG_F77([g77 f77 fort77 f90 xlf xlf90 fl32])
     45
     46
     47
     48
     49dnl AC_ARG_ENABLE(
     50dnl     [tcl],
     51dnl     [AS_HELP_STRING([--enable-tcl], [build tcl bindings @<:@default=check@:>@])],
     52dnl     [],
     53dnl     [enable_tcl=check])
     54dnl
     55dnl BUILD_TCL=yes
     56dnl AC_SUBST(BUILD_TCL)
     57
     58
     59dnl AC_ARG_ENABLE (
     60dnl     [matlab],
     61dnl     [AS_HELP_STRING([--enable-matlab], [build matlab bindings @<:@default=check@:>@])],
     62dnl     [],
     63dnl     [enable_matlab=check])
     64dnl BUILD_MATLAB=yes
     65dnl AC_SUBST(BUILD_MATLAB)
     66
     67AC_ARG_WITH(
     68    [matlab],
     69    [AS_HELP_STRING([--with-matlab[=DIR]],
     70        [location of matlab and mex compiler @<:@default=check@:>@])],
     71    [],
     72    [with_matlab=check])
     73
     74AC_ARG_WITH(
     75    [matlab_arch],
     76    [AS_HELP_STRING([--with-matlab-arch[=ARCH]],
     77        [build Matlab bindings for ARCH architecture @<:@default=check@:>@])],
     78    [],
     79    [with_matlab_arch=check])
     80
     81AC_ARG_WITH(
     82    [mexext],
     83    [AS_HELP_STRING([--with-mexext[=ARCH]],
     84        [fallback extension for building mex files @<:@default=check@:>@])],
     85    [],
     86    [with_mexext=check])
     87
    4788MEX=
    4889MEX_ARCH=
    4990MEXEXT=
    50 if test "$with_matlab" != "no" ; then
    51     dnl WITH_MATLAB = "yes"
    52     if test -x "$with_matlab/bin/mex"
    53     then
    54         echo Found mex in $with_matlab/bin/mex
    55         MEX="$with_matlab/bin/mex"
    56     else
    57         if test -x "$with_matlab"
    58         then
    59             echo Found mex in $with_matlab
    60             MEX="$with_matlab"
    61         else
    62             AC_PATH_PROG(MEX, mex)
    63         fi
    64     fi
    65     if test "x$MEX" != "x" ; then
    66         mexext_fxn=`dirname $MEX`/mexext
    67         if test "x$mexext_fxn" != "x"; then
    68             MEXEXT=`$mexext_fxn`
    69             if test "x${MEXEXT}" = "x" ; then
    70                 MEXEXT="mexglx"
     91dnl if test "$enable_matlab" != "no" ; then
     92    AC_MSG_CHECKING([for mex])
     93    if test "$with_matlab" != "no" ; then
     94        dnl WITH_MATLAB = "yes"
     95        if test -x "$with_matlab/bin/mex"
     96        then
     97            echo Found mex in $with_matlab/bin/mex
     98            MEX="$with_matlab/bin/mex"
     99        else
     100            if test -x "$with_matlab"
     101            then
     102                echo Found mex in $with_matlab
     103                MEX="$with_matlab"
     104            else
     105                AC_PATH_PROG(MEX, mex)
    71106            fi
    72             echo Using extension $MEXEXT
    73         fi
    74     fi
    75 fi
    76 if test "x$with_matlab_arch" != "x" ; then
    77     MEX_ARCH="-arch=$with_matlab_arch"
    78 fi
    79 
    80 dnl AM_CONDITIONAL(WITH_MATLAB, test x$MEX != x)
    81 
    82 AC_ARG_WITH(octave, [  --with-octave[=DIR]         Build Octave bindings if MKOCTFILE compiler is found])
    83 dnl AC_CHECK_PROG(MKOCTFILE, mkoctfile, mkoctfile, false)
     107        fi
     108        AC_MSG_RESULT([${MEX}])
     109        if test "x$with_matlab_arch" != "x" ; then
     110            echo "using matlab architecture \"$with_matlab_arch\""
     111            MEX_ARCH="-arch=$with_matlab_arch"
     112        dnl else
     113            dnl # if $with_matlab_arch is blank, get the os name from uname
     114        fi
     115        if test "x$MEX" != "x" ; then
     116            mexext_fxn=`dirname $MEX`/mexext
     117            if test "x$mexext_fxn" != "x"; then
     118                MEXEXT=`$mexext_fxn`
     119                if test "x${MEXEXT}" = "x" ; then
     120                    dnl # we should be doing an os type check instead of default mexglx
     121                    dnl # use $with_matlab_arch
     122                    if test "$with_mexext" != "check" ; then
     123                        MEXEXT="mexglx"
     124                    fi
     125                fi
     126                echo "Using mex file extension \"$MEXEXT\""
     127                AC_MSG_RESULT([${MEXEXT}])
     128            fi
     129        else
     130            echo "can't find the matlab compiler \"mex\""
     131            echo "use --with-matlab=DIR to specify the location of a matlab installation"
     132            exit 1
     133        fi
     134    fi
     135dnl fi
     136AC_SUBST(MEX)
     137AC_SUBST(MEX_ARCH)
     138AC_SUBST(MEXEXT)
     139
     140
     141dnl AC_ARG_ENABLE(
     142dnl     [octave],
     143dnl     [AS_HELP_STRING([--enable-octave], [build octave bindings @<:@default=check@:>@])],
     144dnl     [],
     145dnl     [enable_octave=check])
     146dnl BUILD_OCTAVE=yes
     147dnl AC_SUBST(BUILD_OCTAVE)
     148
     149
     150AC_ARG_WITH(
     151    [octave],
     152    [AS_HELP_STRING([--with-octave[=DIR]],
     153        [location of octave compiler MKOCTFILE @<:@default=check@:>@])],
     154    [],
     155    [with_octave=check])
     156
    84157MKOCTFILE=
    85 if test "$with_octave" != "no" ; then
    86     if test -x "$with_octave/bin/mkoctfile"
    87     then
    88         echo Found octave in $with_octave/bin/mkoctfile
    89         MKOCTFILE="$with_octave/bin/mkoctfile"
    90     else
    91         if test -x "$with_octave"
    92         then
    93             echo Found mkoctfile in $with_octave
    94             MKOCTFILE="$with_octave"
    95         else
    96             AC_PATH_PROG(MKOCTFILE, mkoctfile)
    97         fi
    98     fi
    99 fi
    100 dnl AM_CONDITIONAL(WITH_OCTAVE, test x$MKOCTFILE != x)
     158dnl if test "$enable_octave" != "no" ; then
     159    AC_MSG_CHECKING([for mkoctfile])
     160    if test "$with_octave" != "no" ; then
     161        if test -x "$with_octave/bin/mkoctfile"
     162        then
     163            echo Found octave in $with_octave/bin/mkoctfile
     164            MKOCTFILE="$with_octave/bin/mkoctfile"
     165        else
     166            if test -x "$with_octave"
     167            then
     168                echo Found mkoctfile in $with_octave
     169                MKOCTFILE="$with_octave"
     170            else
     171                AC_PATH_PROG(MKOCTFILE, mkoctfile)
     172            fi
     173        fi
     174    fi
     175    AC_MSG_RESULT([${MKOCTFILE}])
     176dnl fi
     177AC_SUBST(MKOCTFILE)
    101178
    102179
     
    107184dnl
    108185
    109 AC_ARG_WITH(perl, [  --with-perl[=DIR]         Build Perl bindings if found])
    110 dnl AC_CHECK_PROG(PERL, perl, perl, false)
    111 dnl AM_CONDITIONAL(WITH_PERL, test "$PERL" != "false")
     186dnl AC_ARG_ENABLE(
     187dnl     [perl],
     188dnl     [AS_HELP_STRING([--enable-perl], [build perl bindings @<:@default=check@:>@])],
     189dnl     [],
     190dnl     [enable_perl=check])
     191
     192dnl BUILD_PERL=yes
     193dnl AC_SUBST(BUILD_PERL)
     194
     195AC_ARG_WITH(
     196    [perl],
     197    [AS_HELP_STRING([--with-perl[=DIR]], [location of perl @<:@default=check@:>@])],
     198    [],
     199    [with_perl=check])
     200
    112201PERL=
    113202PERL_INCLUDES=
    114203PERL_SITE_PACKAGES=
     204AC_MSG_CHECKING([for mkoctfile])
    115205if test "$with_perl" != "no" ; then
    116206    if test -x "$with_perl/bin/perl"
     
    129219    PERL_SITE_PACKAGES='$(libdir)/perl5'
    130220fi
    131 dnl AM_CONDITIONAL(WITH_PERL, test x$PERL != x)
     221AC_MSG_RESULT([${PERL}])
     222AC_SUBST(PERL)
     223AC_SUBST(PERL_INCLUDES)
     224AC_SUBST(PERL_SITE_PACKAGES)
    132225
    133226dnl
    134227dnl check for python
    135228dnl
     229
     230dnl AC_ARG_ENABLE(
     231dnl     [python],
     232dnl     [AS_HELP_STRING([--enable-pyton], [build python bindings @<:@default=check@:>@])],
     233dnl     [],
     234dnl     [enable_python=check])
     235dnl
     236dnl BUILD_PYTHON=yes
     237dnl AC_SUBST(BUILD_PYTHON)
    136238
    137239PYTHON=
     
    140242PYTHON_SITE_PACKAGES=
    141243pythondir=
    142 AC_ARG_WITH(python, [  --with-python[=DIR]       Build Python bindings if found])
     244AC_ARG_WITH(
     245    [python],
     246    [AS_HELP_STRING([--with-python[=DIR]],[location of python @<:@default=check@:>@])],
     247    [],
     248    [with_python=check])
     249
    143250if test "$with_python" != "no" ; then
    144251    if test -x "$with_python/bin/python"
     
    194301    fi
    195302fi
    196 dnl AM_CONDITIONAL(WITH_PYTHON, test x$PYTHON != x)
    197303
    198304AC_SUBST(pythondir)
    199305dnl AC_SUBST(PYTHON_SUBDIR)
    200306
    201 AC_SUBST(MEX)
    202 AC_SUBST(MEX_ARCH)
    203 AC_SUBST(MEXEXT)
    204 AC_SUBST(MKOCTFILE)
    205 AC_SUBST(PERL)
    206 AC_SUBST(PERL_INCLUDES)
    207 AC_SUBST(PERL_SITE_PACKAGES)
    208307AC_SUBST(PYTHON)
    209308AC_SUBST(PYTHON_VERSION)
    210309AC_SUBST(PYTHON_INCLUDES)
    211310AC_SUBST(PYTHON_SITE_PACKAGES)
    212 AC_SUBST(LIB_SEARCH_DIRS)
    213 
    214 AC_SUBST(VERSION)
     311
    215312
    216313RP_BASE=`pwd`
Note: See TracChangeset for help on using the changeset viewer.