Changeset 2394


Ignore:
Timestamp:
Jan 7, 2011, 12:29:37 AM (11 years ago)
Author:
Peter
Message:

use m4_popdef and m4_pushdef rather than define and undefine. Fix typo in test and call YAT_USE_LIBTOOL_PUSH before calling YAT_LT_LINK_IFELSE as that is the prefered way.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/m4/yat_lt_link_ifelse.m4

    r2376 r2394  
    3232
    3333#
    34 # serial 2
     34# serial 3
    3535#
    3636
     
    5353m4_defn([LT_INIT])
    5454m4_ifdef([_YAT_USE_LIBTOOL], [],
    55   [m4_define([_YAT_USE_LIBTOOL], [yes])
    56    LT_OUTPUT
     55  [LT_OUTPUT
    5756   yat_use_libtool_ac_compile=$ac_compile;
    5857   ac_compile="./libtool --mode=compile --tag=_YAT_USE_LIBTOOL_TAG $ac_link";
     
    6059   ac_link="./libtool --mode=link --tag=_YAT_USE_LIBTOOL_TAG $ac_link";
    6160  ]) dnl
     61m4_pushdef([_YAT_USE_LIBTOOL], [yes])
    6262]) # YAT_USE_LIBTOOL_PUSH
    6363
     
    6969AC_DEFUN([YAT_USE_LIBTOOL_POP],
    7070[
    71 m4_ifdef([_YAT_USE_LIBTOOL], dnl
    72   [m4_undefine([_YAT_USE_LIBTOOL])
    73    ac_compile=$yat_use_libtool_ac_compile;
     71m4_popdef([_YAT_USE_LIBTOOL])
     72m4_ifndef([_YAT_USE_LIBTOOL], dnl
     73  [ac_compile=$yat_use_libtool_ac_compile;
    7474   ac_link=$yat_use_libtool_ac_link;
    7575  ])
  • trunk/test/yat_lt_link_ifelse_test.sh

    r2384 r2394  
    3030
    3131cat >> configure.ac <<EOF
     32YAT_USE_LIBTOOL_PUSH
    3233AC_MSG_CHECKING([libtool linking])
    3334YAT_LT_LINK_IFELSE([AC_LANG_PROGRAM],
     
    6061                   [test_result=ok; AC_SUBST(test_result)],
    6162                   [AC_MSG_ERROR([cannot libtool link yat])])
    62 AC_MSG_CHECKING([ok])
     63AC_MSG_RESULT([ok])
    6364AC_CONFIG_FILES([Makefile])
    6465AC_OUTPUT
Note: See TracChangeset for help on using the changeset viewer.