Commit 6f9b691a authored by Andy Wingo Wingo's avatar Andy Wingo Wingo

m4/as-libtool-tags.m4: Ooh, backported from libtool 1.6. Much better. Thanks, Paolo Bonzini!

Original commit message from CVS:
2005-07-18  Andy Wingo  <wingo@pobox.com>

* m4/as-libtool-tags.m4: Ooh, backported from libtool 1.6. Much
better. Thanks, Paolo Bonzini!
parent eaed65b6
2005-07-18 Andy Wingo <wingo@pobox.com>
* m4/as-libtool-tags.m4: Ooh, backported from libtool 1.6. Much
better. Thanks, Paolo Bonzini!
* m4/Makefile.am (EXTRA_DIST):
* m4/as-libtool-tags.m4: New file, tries to disable some CXX and
fortran checks.
......
......@@ -3,6 +3,8 @@ dnl as-libtool-tags.m4 0.1.4
dnl autostars m4 macro for selecting libtool "tags" (languages)
dnl Andy Wingo does not claim credit for this macro
dnl backported from libtool 1.6 by Paolo Bonzini
dnl see http://lists.gnu.org/archive/html/libtool/2003-12/msg00007.html
dnl $Id$
......@@ -11,31 +13,57 @@ dnl AS_LIBTOOL_TAGS([tags...])
dnl example
dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc)
dnl this macro
dnl - Sets CXX, GCJ, and F77 to "no" unless they are in TAGS
dnl - Should be called before AC_PROG_LIBTOOL
dnl When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG
dnl to be more similar to the libtool 1.6 implementation, which
dnl uses an m4 loop and m4 case instead of a shell loop. This
dnl way the CXX/GCJ/F77/RC tests are not always expanded.
dnl AS_LIBTOOL_TAGS
dnl ---------------
dnl tags to enable
AC_DEFUN([AS_LIBTOOL_TAGS],
[
tags=[$1]
[m4_define([_LT_TAGS],[$1])
m4_define([_LT_AC_TAGCONFIG], [
if test -f "$ltmain"; then
if test ! -f "${ofile}"; then
AC_MSG_WARN([output file `$ofile' does not exist])
fi
if -n "$tags"; then
AC_MSG_NOTICE([allowing libtool to support $tag])
fi
if test -z "$LTCC"; then
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
if test -z "$LTCC"; then
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
else
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
fi
fi
if test -n "$tags" && echo CXX | grep "$tags"; then
true
else
CXX=no
fi
if test -n "$tags" && echo F77 | grep "$tags"; then
true
else
F77=no
fi
if test -n "$tags" && echo GCJ | grep "$tags"; then
true
else
GCJ=no
AC_FOREACH([_LT_TAG], _LT_TAGS,
[m4_case(_LT_TAG,
[CXX], [
if test -n "$CXX" && test "X$CXX" != "Xno"; then
AC_LIBTOOL_LANG_CXX_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[F77], [
if test -n "$F77" && test "X$F77" != "Xno"; then
AC_LIBTOOL_LANG_F77_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[GCJ], [
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
AC_LIBTOOL_LANG_GCJ_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[RC], [
if test -n "$RC" && test "X$RC" != "Xno"; then
AC_LIBTOOL_LANG_RC_CONFIG
available_tags="$available_tags _LT_TAG"
fi],
[m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
m4_exit(1)])
])
fi
])dnl _LT_AC_TAG_CONFIG
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment