Changeset 2693


Ignore:
Timestamp:
Feb 28, 2012, 12:51:40 PM (12 years ago)
Author:
Peter
Message:

cache YAT_CHECK_LIB. refs #696

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat.m4

    r2691 r2693  
    273273    LIBS="$LIBS $YAT_LIBS"
    274274    AC_LANG_ASSERT([C++])
    275     AC_MSG_CHECKING([for utility::version(void) in yat])
    276     AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <string>
    277                                       namespace theplu{
    278                                       namespace yat{
    279                                       namespace utility {
    280                                       std::string version(void);
    281                                       }}}
    282                                     ]],
    283                                     [using namespace theplu::yat::utility;
    284                                      std::string s=version();])],
    285                    [ac_yat_ok="yes";
    286                     AC_MSG_RESULT([yes])
     275    AC_CACHE_CHECK([for utility::version(void) in yat],
     276                   [yat_cv_lib_yat],
     277                   [_YAT_CHECK_LIB_YAT([yat_cv_lib_yat=yes],
     278                                       [yat_cv_lib_yat=no])])
     279
     280    AS_IF([test x$yat_cv_lib_yat = xyes], [
     281                    ac_yat_ok="yes";
    287282                    AC_SUBST(YAT_LDFLAGS)
    288283                    AC_SUBST(YAT_LIBS)
     
    309304]) # YAT_CHECK_LIB
    310305
    311 # Private macro
     306# Private macros
    312307#
    313308# if yat_ac_want_yat = no do nothing
     
    320315        [m4_default([$3], [:])])
    321316])
     317
     318
     319# _YAT_CHECH_LIB_YAT([ACTION-IF_FOUND], [ACTION-IF-NOT-FOUND])
     320#
     321AC_DEFUN([_YAT_CHECK_LIB_YAT],
     322[
     323    AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <string>
     324                                      namespace theplu{
     325                                      namespace yat{
     326                                      namespace utility {
     327                                      std::string version(void);
     328                                      }}}
     329                                    ]],
     330                                    [using namespace theplu::yat::utility;
     331                                     std::string s=version();])],
     332                   [$1], [$2])
     333])
Note: See TracChangeset for help on using the changeset viewer.