|
Packit |
971217 |
dnl as-libtool-tags.m4 0.1.4
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl autostars m4 macro for selecting libtool "tags" (languages)
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl Andy Wingo does not claim credit for this macro
|
|
Packit |
971217 |
dnl backported from libtool 1.6 by Paolo Bonzini
|
|
Packit |
971217 |
dnl see http://lists.gnu.org/archive/html/libtool/2003-12/msg00007.html
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl $Id$
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl AS_LIBTOOL_TAGS([tags...])
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl example
|
|
Packit |
971217 |
dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc)
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl When AC_LIBTOOL_TAGS is used, I redefine _LT_AC_TAGCONFIG
|
|
Packit |
971217 |
dnl to be more similar to the libtool 1.6 implementation, which
|
|
Packit |
971217 |
dnl uses an m4 loop and m4 case instead of a shell loop. This
|
|
Packit |
971217 |
dnl way the CXX/GCJ/F77/RC tests are not always expanded.
|
|
Packit |
971217 |
|
|
Packit |
971217 |
dnl AS_LIBTOOL_TAGS
|
|
Packit |
971217 |
dnl ---------------
|
|
Packit |
971217 |
dnl tags to enable
|
|
Packit |
971217 |
AC_DEFUN([AS_LIBTOOL_TAGS],
|
|
Packit |
971217 |
[m4_define([_LT_TAGS],[$1])
|
|
Packit |
971217 |
m4_define([_LT_AC_TAGCONFIG], [
|
|
Packit |
971217 |
# redefined LT AC TAGCONFIG
|
|
Packit |
971217 |
if test -f "$ltmain"; then
|
|
Packit |
971217 |
if test ! -f "${ofile}"; then
|
|
Packit |
971217 |
AC_MSG_WARN([output file `$ofile' does not exist])
|
|
Packit |
971217 |
fi
|
|
Packit |
971217 |
|
|
Packit |
971217 |
if test -z "$LTCC"; then
|
|
Packit |
971217 |
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
|
|
Packit |
971217 |
if test -z "$LTCC"; then
|
|
Packit |
971217 |
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
|
|
Packit |
971217 |
else
|
|
Packit |
971217 |
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
|
|
Packit |
971217 |
fi
|
|
Packit |
971217 |
fi
|
|
Packit |
971217 |
|
|
Packit |
971217 |
AC_FOREACH([_LT_TAG], _LT_TAGS,
|
|
Packit |
971217 |
echo THOMAS: tag _LT_TAG
|
|
Packit |
971217 |
[m4_case(_LT_TAG,
|
|
Packit |
971217 |
[CXX], [
|
|
Packit |
971217 |
if test -n "$CXX" && test "X$CXX" != "Xno"; then
|
|
Packit |
971217 |
echo "THOMAS: YAY CXX"
|
|
Packit |
971217 |
AC_LIBTOOL_LANG_CXX_CONFIG
|
|
Packit |
971217 |
available_tags="$available_tags _LT_TAG"
|
|
Packit |
971217 |
fi],
|
|
Packit |
971217 |
[F77], [
|
|
Packit |
971217 |
if test -n "$F77" && test "X$F77" != "Xno"; then
|
|
Packit |
971217 |
AC_LIBTOOL_LANG_F77_CONFIG
|
|
Packit |
971217 |
available_tags="$available_tags _LT_TAG"
|
|
Packit |
971217 |
fi],
|
|
Packit |
971217 |
[GCJ], [
|
|
Packit |
971217 |
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
|
|
Packit |
971217 |
AC_LIBTOOL_LANG_GCJ_CONFIG
|
|
Packit |
971217 |
available_tags="$available_tags _LT_TAG"
|
|
Packit |
971217 |
fi],
|
|
Packit |
971217 |
[RC], [
|
|
Packit |
971217 |
if test -n "$RC" && test "X$RC" != "Xno"; then
|
|
Packit |
971217 |
AC_LIBTOOL_LANG_RC_CONFIG
|
|
Packit |
971217 |
available_tags="$available_tags _LT_TAG"
|
|
Packit |
971217 |
fi],
|
|
Packit |
971217 |
[m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
|
|
Packit |
971217 |
m4_exit(1)])
|
|
Packit |
971217 |
])
|
|
Packit |
971217 |
echo THOMAS: available tags: $available_tags
|
|
Packit |
971217 |
fi
|
|
Packit |
971217 |
# Now substitute the updated list of available tags.
|
|
Packit |
971217 |
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
|
|
Packit |
971217 |
mv "${ofile}T" "$ofile"
|
|
Packit |
971217 |
chmod +x "$ofile"
|
|
Packit |
971217 |
AC_MSG_NOTICE([updated available libtool tags with $available_tags.])
|
|
Packit |
971217 |
else
|
|
Packit |
971217 |
rm -f "${ofile}T"
|
|
Packit |
971217 |
AC_MSG_ERROR([unable to update list of available tagged configurations.])
|
|
Packit |
971217 |
|
|
Packit |
971217 |
fi
|
|
Packit |
971217 |
|
|
Packit |
971217 |
])dnl _LT_AC_TAG_CONFIG
|
|
Packit |
971217 |
])
|