File: as-libtool-tags.m4

package info (click to toggle)
gst-plugins-bad1.0 1.0.8-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 36,832 kB
  • sloc: ansic: 297,908; cpp: 22,677; sh: 13,303; xml: 6,362; makefile: 4,867; perl: 1,435; objc: 1,273; python: 362; sed: 16
file content (83 lines) | stat: -rw-r--r-- 2,549 bytes parent folder | download | duplicates (82)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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$

dnl AS_LIBTOOL_TAGS([tags...])

dnl example
dnl AS_LIBTOOL_TAGS([]) for only C (no fortran, etc)

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],
[m4_define([_LT_TAGS],[$1])
m4_define([_LT_AC_TAGCONFIG], [
  # redefined LT AC TAGCONFIG
  if test -f "$ltmain"; then
    if test ! -f "${ofile}"; then
      AC_MSG_WARN([output file `$ofile' does not exist])
    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

    AC_FOREACH([_LT_TAG], _LT_TAGS,
      echo THOMAS: tag _LT_TAG
      [m4_case(_LT_TAG,
      [CXX], [
    if test -n "$CXX" && test "X$CXX" != "Xno"; then
      echo "THOMAS: YAY CXX"
      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)])
    ])
    echo THOMAS: available tags: $available_tags
  fi
  # Now substitute the updated list of available tags.
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
    mv "${ofile}T" "$ofile"
    chmod +x "$ofile"
    AC_MSG_NOTICE([updated available libtool tags with $available_tags.])
  else
    rm -f "${ofile}T"
    AC_MSG_ERROR([unable to update list of available tagged configurations.])

  fi

])dnl _LT_AC_TAG_CONFIG
])