diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-10 10:20:34 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2009-11-10 10:20:34 +0000 |
commit | 5af5b70fa80778721dcea64995afc56815cee374 (patch) | |
tree | 9689f221eef8ff50a9b7b97b0ba85623adefa4c9 /Build/source/libs/teckit/TECkit-2.5.1/m4/ax_prog_rc.m4 | |
parent | c736ef2860429aa9916c9da4cac5b3995df00273 (diff) |
towards TL2010: libs/teckit
git-svn-id: svn://tug.org/texlive/trunk@15955 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/teckit/TECkit-2.5.1/m4/ax_prog_rc.m4')
-rw-r--r-- | Build/source/libs/teckit/TECkit-2.5.1/m4/ax_prog_rc.m4 | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/Build/source/libs/teckit/TECkit-2.5.1/m4/ax_prog_rc.m4 b/Build/source/libs/teckit/TECkit-2.5.1/m4/ax_prog_rc.m4 new file mode 100644 index 00000000000..8cc0d43a2d8 --- /dev/null +++ b/Build/source/libs/teckit/TECkit-2.5.1/m4/ax_prog_rc.m4 @@ -0,0 +1,74 @@ +# -*- m4 -*- +# Process this file with aclocal to produce a aclocal.m4 script. +dnl $Author$ +dnl $Date$ +dnl $Revision$ + +dnl Macros extending known languages to RC compiler +dnl Reference files : c.m4, lang.m4 +dnl @synopsis AC_PROG_RC([COMPILER ...]) + +m4_define([rc_default_file], +[[STRINGTABLE +{ + 100 "FooBar" +}]]) + +# AC_LANG(RC) +# ----------------------- +m4_define([AC_LANG(RC)], +[ac_ext=rc +ac_cpp='' +ac_compile='$RC $RCFLAGS $CPPFLAGS $ax_cv_rc_compile >&AS_MESSAGE_LOG_FD' +ac_link='' +ac_compiler_gnu= +]) + +# *AC_LANG_*(RC)... +# ----------------------- +AU_DEFUN([AC_LANG_RC], [AC_LANG(RC)]) +m4_define([_AC_LANG_ABBREV(RC)], [rc]) +m4_define([_AC_LANG_PREFIX(RC)], [RC]) + +# AC_LANG_SOURCE(RC)(BODY) +# ----------------------- +m4_define([AC_LANG_SOURCE(RC)], +[/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$1]) + +# AC_LANG_*(RC)... +# ----------------------- +m4_define([AC_LANG_PROGRAM(RC)], [m4_error([$0 not supported])]) +m4_define([AC_LANG_CALL(RC)], [m4_error([$0 not supported])]) +m4_define([AC_LANG_FUNC_LINK_TRY(RC)], [m4_error([$0 not supported])]) +m4_define([AC_LANG_BOOL_COMPILE_TRY(RC)], [m4_error([$0 not supported])]) +m4_define([AC_LANG_BOOL_COMPILE_TRY(RC)], [m4_error([$0 not supported])]) +m4_define([AC_LANG_INT_SAVE(RC)], [m4_error([$0 not supported])]) + + +# AC_PROG_RC([COMPILER ...]) +# ----------------------- +# Finds the RC compiler +AC_DEFUN([AC_PROG_RC], +[ AC_REQUIRE([AC_PROG_CC]) + AC_LANG_PUSH([RC]) + AX_PROG_ARGS([RC], [RC compiler]) + m4_ifval([$1], + [AC_CHECK_TOOLS([RC], [$1])], + [AC_CHECK_TOOL([RC], [windres])] + ) + AX_PROG_MSG([$RC], [RC compiler]) + AX_LANG_CONFTEST( rc_default_file , + [ AC_MSG_CHECKING([whether the RC compiler works]) + AC_CACHE_VAL([ax_cv_rc_compile], + [ ax_cv_rc_compile="-o conftest.$ac_objext conftest.$ac_ext" + _AX_COMPILE_IFELSE([], [ ax_cv_rc_compile='' ]) + ]) + ]) + AX_MSG_YN_IFEMPTY([$ax_cv_rc_compile], [], [ AC_MSG_FAILURE([RC compiler "$RC" fails sanity check])]) + AC_LANG_POP +]) |