Changeset 2497


Ignore:
Timestamp:
Jun 26, 2011, 7:33:29 PM (10 years ago)
Author:
Peter
Message:

Avoid using deprecated macros AX_{CXXCPP,CXX,LD}_CHECK_FLAG. Instead
use use new macro provided in ax_check_flag.m4 in autoconf macro archive.

Location:
trunk
Files:
1 added
3 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_add_flag.m4

    r2202 r2497  
    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 
  • trunk/test/Makefile.am

    r2490 r2497  
    104104  common_defs.sh
    105105yat_cpp_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
    106   $(top_srcdir)/m4/ax_cxxcpp_check_flag.m4 common_defs.sh
     106  $(top_srcdir)/m4/ax_check_flag.m4 common_defs.sh
    107107yat_cxx_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
    108   $(top_srcdir)/m4/ax_cxx_check_flag.m4 common_defs.sh
     108  $(top_srcdir)/m4/ax_check_flag.m4 common_defs.sh
    109109yat_ld_add_flag_test.log: $(top_srcdir)/m4/yat_add_flag.m4 \
    110   $(top_srcdir)/m4/ax_ld_check_flag.m4 common_defs.sh
     110  $(top_srcdir)/m4/ax_check_flag.m4 common_defs.sh
    111111yat_lt_link_ifelse_test.log: $(top_srcdir)/m4/yat_lt_link_ifelse.m4 \
    112112  common_defs.sh
Note: See TracChangeset for help on using the changeset viewer.