1
dnl as-libtool-tags.m4 0.1.4
3
dnl autostars m4 macro for selecting libtool "tags" (languages)
5
dnl Andy Wingo does not claim credit for this macro
6
dnl backported from libtool 1.6 by Paolo Bonzini
7
dnl see http://lists.gnu.org/archive/html/libtool/2003-12/msg00007.html
9
dnl $Id: as-libtool-tags.m4,v 1.2 2005/07/18 14:54:33 wingo Exp $
11
dnl AS_LIBTOOL_TAGS([tags...])
14
dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc)
16
dnl When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG
17
dnl to be more similar to the libtool 1.6 implementation, which
18
dnl uses an m4 loop and m4 case instead of a shell loop. This
19
dnl way the CXX/GCJ/F77/RC tests are not always expanded.
24
AC_DEFUN([AS_LIBTOOL_TAGS],
25
[m4_define([_LT_TAGS],[$1])
26
m4_define([_LT_AC_TAGCONFIG], [
27
if test -f "$ltmain"; then
28
if test ! -f "${ofile}"; then
29
AC_MSG_WARN([output file `$ofile' does not exist])
32
if test -z "$LTCC"; then
33
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
34
if test -z "$LTCC"; then
35
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
37
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
41
AC_FOREACH([_LT_TAG], _LT_TAGS,
44
if test -n "$CXX" && test "X$CXX" != "Xno"; then
45
AC_LIBTOOL_LANG_CXX_CONFIG
46
available_tags="$available_tags _LT_TAG"
49
if test -n "$F77" && test "X$F77" != "Xno"; then
50
AC_LIBTOOL_LANG_F77_CONFIG
51
available_tags="$available_tags _LT_TAG"
54
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
55
AC_LIBTOOL_LANG_GCJ_CONFIG
56
available_tags="$available_tags _LT_TAG"
59
if test -n "$RC" && test "X$RC" != "Xno"; then
60
AC_LIBTOOL_LANG_RC_CONFIG
61
available_tags="$available_tags _LT_TAG"
63
[m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
68
])dnl _LT_AC_TAG_CONFIG