Changeset 1467


Ignore:
Timestamp:
08/05/10 17:44:43 (21 months ago)
Author:
Freddie Akeroyd
Message:

Add nexus-config (uses pkg-config) Refs #228

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r1445 r1467  
    130130        FC= 
    131131        WITH_F90=no 
     132fi 
     133 
     134AC_ARG_WITH([matlabroot], AC_HELP_STRING([--with-matlabroot=path to matlab install dir], [Specify location of matlab installation directory]), 
     135        [], [with_matlabroot=no]) 
     136if test x"$with_matlabroot" != x"no" ; then 
     137    MATLABROOT="$with_matlabroot" 
     138fi 
     139AC_PATH_PROG(MATLAB,matlab,[],[$MATLABROOT/bin:/usr/local/matlab/bin:/opt/matlab/bin:$PATH]) 
     140if test x"$MATLABROOT" = x -a x"$MATLAB" != x; then 
     141    MATLABROOT=`dirname $MATLAB`/.. 
    132142fi 
    133143 
     
    719729AM_CONDITIONAL(HAVE_OPENGENIE, [test ! -z "$OPENGENIEROOT"]) 
    720730AM_CONDITIONAL(HAVE_DOXYGEN, [test ! -z "$DOXYGEN"]) 
     731AM_CONDITIONAL(HAVE_MATLAB, [test ! -z "$MATLAB"]) 
    721732AM_CONDITIONAL(HAVE_PDFLATEX, [test ! -z "$PDFLATEX"]) 
    722733AM_CONDITIONAL(HAVE_DOT, [test ! -z "$DOT"]) 
     
    728739AC_CONFIG_FILES(test/Makefile test/atlocal) 
    729740AM_MISSING_PROG([AUTOM4TE], [autom4te]) 
     741 
     742if test X$MATLAB != X; then 
     743    for i in glnxa64 glnxi64 glnx86 maci maci64; do 
     744        if test -r "$MATLABROOT/bin/$i"; then 
     745                MATLAB_ARCH="$i" 
     746        fi 
     747    done 
     748    case $MATLAB_ARCH in 
     749        glnx86) 
     750            MATLAB_MEXSUFFIX=mexglx 
     751            ;; 
     752        glnxa64) 
     753            MATLAB_MEXSUFFIX=mexa64 
     754            ;; 
     755        glnxi64) 
     756            MATLAB_MEXSUFFIX=mexi64 
     757            ;; 
     758        maci) 
     759            MATLAB_MEXSUFFIX=mexmaci 
     760            ;; 
     761    esac 
     762    AC_SUBST(MATLAB_MEXSUFFIX) 
     763    AC_SUBST(MATLAB_ARCH) 
     764    AC_SUBST(MATLABROOT) 
     765fi 
    730766 
    731767LINUX_DISTRIBUTION 
     
    783819                macosx_install_kit/pkg.config 
    784820                scripts/Makefile 
     821                scripts/nexus-config 
    785822                scripts/nexus.pc:scripts/nexus_pc.in 
    786823                scripts/nxbuild]) 
     
    818855IDLBINDING=`if test -n "$IDLROOT" ; then echo yes ; else echo no ; fi`  
    819856PYTHONBINDING=`if test -n "$HAVE_PYTHON_FALSE" ; then echo yes; else echo no ; fi`  
     857MATLABBINDING=`if test -n "$MATLAB" ; then echo "yes (matlabroot=$MATLABROOT)"; else echo no ; fi` 
     858 
    820859if test -n "$SWIG" ; then  
    821860    SWIGBINDING="yes (" 
     
    852891                SWIG:          ${SWIGBINDING} 
    853892                 IDL:          ${IDLBINDING} (--with-idlroot=${IDLROOT}, --with-idldlm=${IDLDLM}) 
     893                 MATLAB:               ${MATLABBINDING} (--with-matlabroot=${MATLABROOT}) 
    854894              PYTHON:          ${PYTHONBINDING} (PYTHONROOT=${PYTHONROOT}, numpy found: $PYTHON_numpy_found) 
    855895 
  • trunk/scripts/Makefile.am

    r513 r1467  
    11pkgconfigdir            = ${libdir}/pkgconfig 
    2 nodist_bin_SCRIPTS      = nxbuild 
     2nodist_bin_SCRIPTS      = nxbuild nexus-config 
    33 
    4 EXTRA_DIST              = nxbuild.in nexus_pc.in 
     4EXTRA_DIST              = nxbuild.in nexus_pc.in nexus-config.in 
    55 
    66pkgconfig_DATA          = nexus.pc 
  • trunk/scripts/nexus_pc.in

    r949 r1467  
    1010Requires: 
    1111Conflicts: 
    12 Libs:   -L${libdir} -lNeXus @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ @LIBS@ 
    13 Cflags: -I${includedir} @HDF4_CPPFLAGS@ @HDF5_CPPFLAGS@ @XML_CPPFLAGS@ 
     12Libs:   -L${libdir} -lNeXusCPP -lNeXus @HDF4_LDFLAGS@ @HDF5_LDFLAGS@ @XML_LDFLAGS@ @LIBS@ 
     13Cflags: -I${includedir}/nexus -I${includedir} @HDF4_CPPFLAGS@ @HDF5_CPPFLAGS@ @XML_CPPFLAGS@ 
Note: See TracChangeset for help on using the changeset viewer.