Changeset 3053


Ignore:
Timestamp:
Jun 13, 2013, 10:20:38 AM (8 years ago)
Author:
Peter
Message:

refs #757. new macro linking against bam stuff in libyat

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat.m4

    r2856 r3053  
    11## $Id$
    22#
    3 # serial 8  (yat 0.10)
     3# serial 9  (yat 0.11)
    44#
    55# see http://www.gnu.org/software/automake/manual/automake.html#Serials
     
    309309]) # YAT_CHECK_LIB
    310310
     311
     312# YAT_CHECK_LIB_WITH_BAM
     313AC_DEFUN([YAT_CHECK_LIB_WITH_BAM],
     314[
     315  AC_PREREQ([2.60]) dnl we use YAT_FIND_YAT
     316  AC_REQUIRE([YAT_FIND_YAT])  dnl
     317  ac_yat_save_CPPFLAGS=$CPPFLAGS
     318  ac_yat_save_CXXFLAGS=$CXXFLAGS
     319  ac_yat_save_LDFLAGS=$LDFLAGS
     320  ac_yat_save_LIBS=$LIBS
     321  CPPFLAGS="$CPPFLAGS $YAT_CPPFLAGS"
     322  CXXFLAGS="$CXXFLAGS $YAT_CXXFLAGS"
     323  LDFLAGS="$LDFLAGS $YAT_LDFLAGS"
     324  LIBS="$LIBS $YAT_LIBS"
     325  AC_LANG_ASSERT([C++])
     326  AC_CACHE_CHECK([for class BamInFile],
     327                 [yat_cv_lib_with_bam],
     328                 [AC_LINK_IFELSE([
     329                     AC_LANG_PROGRAM([[@%:@include <yat/omic/BamFile.h>]],
     330                                     [using namespace theplu::yat::omic;
     331                                      InBamFile is("myfile");])
     332                   ],[
     333                     yat_cv_lib_with_bam=yes
     334                   ],[
     335                     yat_cv_lib_with_bam=no
     336                   ])
     337                 ])
     338
     339  # restore FLAGS
     340  CPPFLAGS=$ac_yat_save_CPPFLAGS
     341  CXXFLAGS=$ac_yat_save_CXXFLAGS
     342  LDFLAGS=$ac_yat_save_LDFLAGS
     343  LIBS=$ac_yat_save_LIBS
     344  AS_CASE([$yat_cv_lib_with_bam], [yes], [$1], [no], [$2])
     345]) # YAT_CHECK_LIB_WITH_BAM
     346
     347
    311348# Private macros
    312349#
  • trunk/test/Makefile.am

    r3042 r3053  
    9595test/yat_msg_error_test.sh \
    9696test/yat_msg_error_test2.sh \
     97test/yat_m4_with_bam_test.sh \
    9798test/yat_m4_test.sh \
    9899test/yat_m4_test2.sh \
Note: See TracChangeset for help on using the changeset viewer.