Changeset 2346
- Timestamp:
- Oct 22, 2010, 12:23:33 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/m4/yat_lt_link_ifelse.m4
r2245 r2346 27 27 # 28 28 29 # Based on _KPSE_USE_LIBTOOL by 30 # Peter Breitenlohner <peb@mppmu.mpg.de> shared here 31 # http://www.mail-archive.com/autoconf@gnu.org/msg19948.html 32 29 33 # 30 # serial 034 # serial 1 31 35 # 32 36 33 37 AC_DEFUN([YAT_LT_LINK_IFELSE], 34 38 [ 35 # currently we assume that language is C++ 36 AC_LANG_ASSERT([C++]) 37 AC_REQUIRE([AC_PROG_LIBTOOL]) 38 ac_yat_lt_link_ifelse=yes 39 LT_OUTPUT 40 AC_LANG_CONFTEST([$1]) 41 42 rm -f conftest.lo 43 YAT_RUN_LOG([$SHELL libtool --tag=CXX --mode=compile $CXX $CXXFLAGS $CPPFLAGS -c -o conftest.lo conftest.$ac_ext], [], [ac_yat_lt_link_ifelse=no]) 44 45 rm -f conftest 46 YAT_RUN_LOG([$SHELL libtool --tag=CXX --mode=link $CXX $CXXFLAGS $LDFLAGS -o conftest conftest.lo $LIBS], [], [ac_yat_lt_link_ifelse=no]) 47 48 AS_IF([test x$ac_yat_lt_link_ifelse = xyes], [$2], [$3]) 39 YAT_USE_LIBTOOL_PUSH 40 AC_LINK_IFELSE($@) 41 YAT_USE_LIBTOOL_POP 49 42 ]) # YAT_LT_LINK_IFELSE 50 43 44 AC_DEFUN([YAT_USE_LIBTOOL_PUSH], 45 [ 46 m4_defn([LT_INIT]) 47 m4_ifdef([_YAT_USE_LIBTOOL],, 48 [m4_define([_YAT_USE_LIBTOOL], [yes]) 49 LT_OUTPUT 50 yat_use_libtool_ac_compile=$ac_compile; 51 ac_compile="./libtool --mode=compile --tag=_YAT_USE_LIBTOOL_TAG $ac_link"; 52 yat_use_libtool_ac_link=$ac_link; 53 ac_link="./libtool --mode=link --tag=CXX $ac_link"; dnl 54 ]) dnl 55 ]) # YAT_USE_LIBTOOL_PUSH 51 56 57 AC_DEFUN([YAT_USE_LIBTOOL_POP], 58 [ 59 m4_ifdef([_YAT_USE_LIBTOOL], dnl 60 [m4_undefine([_YAT_USE_LIBTOOL]) 61 ac_compile=$yat_use_libtool_ac_compile; 62 ac_link=$yat_use_libtool_ac_link; 63 ]) 64 ]) # YAT_USE_LIBTOOL_POP 52 65 66 m4_define([_YAT_USE_LIBTOOL_TAG], 67 [AC_LANG_CASE([C], [CC], 68 [C++], [CXX], 69 [Fortran 77], [F77], 70 [Fortran], [FC]) 71 ])
Note: See TracChangeset
for help on using the changeset viewer.