Changeset 1385 for trunk


Ignore:
Timestamp:
Jun 26, 2011, 9:18:50 PM (9 years ago)
Author:
Peter Johansson
Message:

update to latest version of yat macros

Location:
trunk/m4
Files:
1 added
3 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_add_flag.m4

    r1373 r1385  
    1 ## $Id: yat_add_flag.m4 2202 2010-02-21 18:39:13Z peter $
     1## $Id: yat_add_flag.m4 2499 2011-06-26 18:39:42Z peter $
    22
    33# SYNOPSIS
     
    1717# LAST MODIFICATION
    1818#
    19 #   $Date: 2010-02-21 13:39:13 -0500 (Sun, 21 Feb 2010) $
     19#   $Date: 2011-06-26 14:39:42 -0400 (Sun, 26 Jun 2011) $
    2020#
    2121# COPYLEFT
     
    4040
    4141#
    42 # serial 5 
     42# serial 6 
    4343#
    4444# see http://www.gnu.org/software/automake/manual/automake.html#Serials
     
    6464
    6565    AS_VAR_IF([ignore], [no],
    66           [YAT_FIND_STR([$1], [$yat_flag], ,
    67                         [AX_CXXCPP_CHECK_FLAG([$yat_flag], ,,
    68                                               [$1="$$1 $yat_flag"])])])
     66              [AX_CHECK_PREPROC_FLAG([$yat_flag],
     67                                     [AX_APPEND_FLAG([$yat_flag], [$1])])])
    6968  done
    7069]) # YAT_CPP_ADD_FLAG
     
    7372AC_DEFUN([YAT_CXX_ADD_FLAG],
    7473[
    75   AC_PREREQ([2.61]) dnl we use AX_CXX_CHECK_FLAG
    76   for yat_flag in $2; do
    77     YAT_FIND_STR([$1], [$yat_flag], ,
    78                  [AX_CXX_CHECK_FLAG([$yat_flag], ,, [$1="$$1 $yat_flag"])])
    79   done
     74  AC_PREREQ([2.59]) dnl we use AX_APPEND_COMPILE_FLAGS
     75  AX_APPEND_COMPILE_FLAGS([$2], [$1])
    8076]) # YAT_CXX_ADD_FLAG
    8177
    8278AC_DEFUN([YAT_LD_ADD_FLAG],
    8379[
    84   AC_PREREQ([2.61]) dnl we use AX_LD_CHECK_FLAG
     80  AC_PREREQ([2.59]) dnl we use AX_APPEND_LINK_FLAGS
    8581  for yat_flag in $2; do
    8682    # ignore flag if
     
    8985    AS_IF([test "x$yat_flag" = "x-L/usr/lib"],,
    9086          [test "x$CXX" = "xg++" && test "x$yat_flag" = "x-L/usr/local/lib"],,
    91           [YAT_FIND_STR([$1], [$yat_flag], ,
    92                         [AX_LD_CHECK_FLAG([$yat_flag], ,,
    93                                           [$1="$$1 $yat_flag"])])])
     87          [AX_APPEND_LINK_FLAGS([$yat_flag], [$1])])
    9488  done
    9589]) # YAT_LD_ADD_FLAG
    96 
    97 AC_DEFUN([YAT_FIND_STR],
    98 [
    99   # YAT_FIND_STR
    100   found=no;       
    101   for a in $$1; do
    102     AS_IF([test "x$a" = "x$2"],[found=yes])
    103   done
    104 
    105   # ACTION
    106   AS_IF([test "$found" = "yes"], [m4_default([$3], [:])],
    107         [m4_default([$4], [:])])
    108 
    109 ]) # YAT_FIND_STR
    110 
Note: See TracChangeset for help on using the changeset viewer.