~ubuntu-branches/ubuntu/trusty/pitivi/trusty

« back to all changes in this revision

Viewing changes to common/m4/as-libtool-tags.m4

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-02-04 14:42:30 UTC
  • Revision ID: james.westby@ubuntu.com-20060204144230-9ihvyas6lhgn81k1
Tags: upstream-0.9.9.2
ImportĀ upstreamĀ versionĀ 0.9.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl as-libtool-tags.m4 0.1.4
 
2
 
 
3
dnl autostars m4 macro for selecting libtool "tags" (languages)
 
4
 
 
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
 
8
 
 
9
dnl $Id: as-libtool-tags.m4,v 1.2 2005/07/18 14:54:33 wingo Exp $
 
10
 
 
11
dnl AS_LIBTOOL_TAGS([tags...])
 
12
 
 
13
dnl example
 
14
dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc)
 
15
 
 
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.
 
20
 
 
21
dnl AS_LIBTOOL_TAGS
 
22
dnl ---------------
 
23
dnl tags to enable
 
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])
 
30
    fi
 
31
 
 
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])
 
36
      else
 
37
        AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
 
38
      fi
 
39
    fi
 
40
 
 
41
    AC_FOREACH([_LT_TAG], _LT_TAGS,
 
42
      [m4_case(_LT_TAG,
 
43
      [CXX], [
 
44
    if test -n "$CXX" && test "X$CXX" != "Xno"; then
 
45
      AC_LIBTOOL_LANG_CXX_CONFIG
 
46
      available_tags="$available_tags _LT_TAG"
 
47
    fi],
 
48
      [F77], [
 
49
    if test -n "$F77" && test "X$F77" != "Xno"; then
 
50
      AC_LIBTOOL_LANG_F77_CONFIG
 
51
      available_tags="$available_tags _LT_TAG"
 
52
    fi],
 
53
      [GCJ], [
 
54
    if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
 
55
      AC_LIBTOOL_LANG_GCJ_CONFIG
 
56
      available_tags="$available_tags _LT_TAG"
 
57
    fi],
 
58
      [RC], [
 
59
    if test -n "$RC" && test "X$RC" != "Xno"; then
 
60
      AC_LIBTOOL_LANG_RC_CONFIG
 
61
      available_tags="$available_tags _LT_TAG"
 
62
    fi],
 
63
      [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG")
 
64
      m4_exit(1)])
 
65
    ])
 
66
  fi
 
67
 
 
68
])dnl _LT_AC_TAG_CONFIG
 
69
])