Changeset 2376
- Timestamp:
- Dec 20, 2010, 2:17:21 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/m4/yat_lt_link_ifelse.m4
r2346 r2376 32 32 33 33 # 34 # serial 134 # serial 2 35 35 # 36 36 37 # YAT_LT_LINK_IFELSE(PROG, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) 38 # ------------------------------------------------------------- 39 # Same as AC_LINK_IFELSE but linking via libtool 37 40 AC_DEFUN([YAT_LT_LINK_IFELSE], 38 41 [ … … 42 45 ]) # YAT_LT_LINK_IFELSE 43 46 47 # YAT_USE_LIBTOOL_PUSH 48 # -------------------- 49 # Assign `$ac_link' and `$ac_compile' to use libtool. Variables are 50 # saved so they can be restored with YAT_USE_LIBTOOL_POP 44 51 AC_DEFUN([YAT_USE_LIBTOOL_PUSH], 45 52 [ 46 53 m4_defn([LT_INIT]) 47 m4_ifdef([_YAT_USE_LIBTOOL], ,54 m4_ifdef([_YAT_USE_LIBTOOL], [], 48 55 [m4_define([_YAT_USE_LIBTOOL], [yes]) 49 56 LT_OUTPUT … … 51 58 ac_compile="./libtool --mode=compile --tag=_YAT_USE_LIBTOOL_TAG $ac_link"; 52 59 yat_use_libtool_ac_link=$ac_link; 53 ac_link="./libtool --mode=link --tag= CXX $ac_link"; dnl60 ac_link="./libtool --mode=link --tag=_YAT_USE_LIBTOOL_TAG $ac_link"; 54 61 ]) dnl 55 62 ]) # YAT_USE_LIBTOOL_PUSH 56 63 64 # YAT_USE_LIBTOOL_POP 65 # -------------------- 66 67 # Restore values of `$ac_link' and `$ac_compile' to what they were 68 # prior YAT_USE_LIBTOOL_PUSH 57 69 AC_DEFUN([YAT_USE_LIBTOOL_POP], 58 70 [ … … 64 76 ]) # YAT_USE_LIBTOOL_POP 65 77 78 79 # _YAT_USE_LIBTOOL_TAG 80 # -------------------- 81 # internal macro to select tag depending on active library 66 82 m4_define([_YAT_USE_LIBTOOL_TAG], 67 [AC_LANG_CASE([C], [CC], 68 [C++], [CXX], 69 [Fortran 77], [F77], 70 [Fortran], [FC]) 83 [AC_LANG_CASE([C], [CC], dnl 84 [C++], [CXX], dnl 85 [Fortran 77], [F77], dnl 86 [Fortran], [FC]) dnl 71 87 ]) -
trunk/test/yat_lt_link_ifelse_test.sh
r2245 r2376 30 30 31 31 cat >> configure.ac <<EOF 32 AC_MSG_CHECKING([libtool linking]) 33 YAT_LT_LINK_IFELSE([AC_LANG_PROGRAM], 34 [], 35 [AC_MSG_ERROR([cannot libtool link simple program])]) 36 AC_MSG_RESULT([ok]) 37 38 AC_MSG_CHECKING([libtool linking against -lrapakalja]) 39 LIBS=-lrapakalja 40 YAT_LT_LINK_IFELSE([AC_LANG_PROGRAM], 41 [AC_MSG_ERROR([unexpectedly succesful linking with $LIBS])]) 42 AC_MSG_RESULT([no (as expected)]) 43 32 44 YAT_FIND_YAT 33 45 m4_define([PROG], … … 43 55 ]) 44 56 ]) 45 LIBS=-lrapakalja 46 YAT_LT_LINK_IFELSE([PROG], 47 [AC_MSG_ERROR([unexpectedly succesful linking with $LIBS])]) 57 AC_MSG_CHECKING([libtool linking against -lyat]) 48 58 LIBS=\`\$yat_config --link-libtool\`; 49 59 YAT_LT_LINK_IFELSE([PROG], 50 60 [test_result=ok; AC_SUBST(test_result)], 51 61 [AC_MSG_ERROR([cannot libtool link yat])]) 62 AC_MSG_CHECKING([ok]) 52 63 AC_CONFIG_FILES([Makefile]) 53 64 AC_OUTPUT … … 59 70 echo OK; 60 71 else 61 tail -n 30 config.log;72 tail -n 500 config.log; 62 73 exit 1; 63 74 fi
Note: See TracChangeset
for help on using the changeset viewer.