Changeset 2087


Ignore:
Timestamp:
Oct 20, 2009, 11:22:29 PM (12 years ago)
Author:
Peter
Message:

modified YAT_CPP_ADD_FLAG so flags are ignored also if flag is defined in or AC_DEFINE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_add_flag.m4

    r2086 r2087  
    5151    # 1) it is -I/usr/include
    5252    # 2) it is -I/usr/local/include and CXX is g++
    53     # 3) it is -D* and * is already defined
     53    # 3) it is -D* and * is already defined in $1, $CPPFLAGS, or AC_DEFINE
    5454    ignore=no
    5555    AS_CASE([$yat_flag],
     
    5757            [-I/usr/local/include],[AS_IF([test "x$CXX" = "xg++"],[ignore=yes])],
    5858            [-D*], [yat_def=`echo "$yat_flag" | $SED 's,^-D,,;s,=.*,,'`;
    59                     AX_C_IFDEF([$yat_def],[ignore=yes])])
     59                    yat_save_CPPFLAGS="$CPPFLAGS"
     60                    m4_if([$1], [CPPFLAGS], [], [CPPFLAGS="$$1 $CPPFLAGS"])
     61                    AX_C_IFDEF([$yat_def],[ignore=yes])
     62                    CPPFLAGS="$yat_save_CPPFLAGS"])
    6063
    6164    AS_IF([test x$ignore = xno],
Note: See TracChangeset for help on using the changeset viewer.