Build Tools

yat-config

The yat-config script provides information on the local version of the library. For instance the following command shows that yat was installed at prefix `/usr/local'

 #> yat-config --prefix
/usr/local

This information can then be used in a Makefile, for example, as follows:

BIN=foo
SRC=$(BIN).cc
OBJECTS=$(SRC:.cc=.o)

CPPFLAGS+=`yat-config --cppflags`
CXXFLAGS+=`yat-config --cxxflags`
LDFLAGS+=`yat-config --ldflags`
LIBS+=`yat-config --libs`

all: $(BIN)

$(BIN): $(OBJECTS) 
  $(CXX) $(LDFLAGS) $(OBJECTS) -o $(BIN) $(LIBS)

.cc.o:
  $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@

clean:; rm -f $(OBJECTS) $(BIN)

From yat 0.6 an alternative CBLAS library can be specified using YAT_CBLAS_LIB environment variable. By default the CBLAS library detected during configuration of yat is used.

For further information on yat-config use `yat-config --help'

Since:
New in yat 0.5

Autoconf Macro

For applications using autoconf there is a macro available in yat.m4. The macro can be called from your configure.ac:

   YAT_CHECK_YAT([minimum-version], [action-if-found], [action-if-not-found]) 

The argument minimum-version should be the number (MAJOR.MINOR or MAJOR.MINOR.PATCH) of the version you require. If yat header files and library are not found or the version is not new enough, macro will complain and execute shell command action-if-not-found. A suitable action-if-not-found could be

   AC_MSG_ERROR([could not find required version of yat])

If the test is successful, HAVE_YAT is defined and action-if-found is executed. The test calls yat-config and sets variables YAT_CPPFLAGS, YAT_CXXFLAGS, YAT_LDFLAGS, YAT_LIBS, and YAT_LA_FILE. These flags can then be used in the Makefile.am. For instance:

   AM_CPPFLAGS = $(YAT_CPPFLAGS)
   AM_CXXFLAGS = $(YAT_CXXFLAGS)
   AM_LDFLAGS = $(YAT_LDFLAGS)
   LDADD = $(YAT_LIBS)

Note:
this macro assumes that yat-config has been installed; yat-config was introduced in yat 0.5 and consequently this macro does not work with yat 0.4.x (or older).

Generated on Mon Nov 7 02:25:52 2011 for yat by  doxygen 1.5.9