~ubuntu-branches/ubuntu/karmic/xfce4-session/karmic

« back to all changes in this revision

Viewing changes to m4/depends.m4

  • Committer: Bazaar Package Importer
  • Author(s): Yves-Alexis Perez
  • Date: 2005-11-06 22:01:12 UTC
  • mto: (4.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20051106220112-5rusox237ymjghsp
Tags: upstream-4.2.3
ImportĀ upstreamĀ versionĀ 4.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl From Benedikt Meurer (benedikt.meurer@unix-ag.uni-siegen.de)
2
 
dnl
3
 
dnl
4
 
 
5
 
AC_DEFUN([BM_DEPEND],
6
 
[
7
 
  PKG_CHECK_MODULES([$1], [$2 >= $3])
8
 
  $1_REQUIRED_VERSION=$3
9
 
  AC_SUBST($1_REQUIRED_VERSION)
10
 
])
11
 
 
12
 
dnl
13
 
dnl BM_DEPEND_CHECK(var, pkg, version, name, helpstring, default)
14
 
dnl
15
 
AC_DEFUN([BM_DEPEND_CHECK],
16
 
[
17
 
  AC_ARG_ENABLE([$4],
18
 
AC_HELP_STRING([--enable-$4], [Enable checking for $5 (default=$6)])
19
 
AC_HELP_STRING([--disable-$4], [Disable checking for $5]),
20
 
    [ac_cv_$1_check=$enableval], [ac_cv_$1_check=$6])
21
 
 
22
 
  if test x"$ac_cv_$1_check" = x"yes"; then
23
 
    AC_MSG_CHECKING([for $2 >= $3])
24
 
    if $PKG_CONFIG --atleast-version=$3 $2 2> /dev/null; then
25
 
      AC_MSG_RESULT([yes])
26
 
      BM_DEPEND([$1], [$2], [$3])
27
 
      AC_DEFINE([HAVE_$1], [1], [Define if you have $2 >= $3])
28
 
    else
29
 
      AC_MSG_RESULT([no])
30
 
    fi
31
 
  fi
32
 
])
33
 
 
34
 
dnl
35
 
dnl XFCE_PANEL_PLUGIN(var, version)
36
 
dnl
37
 
dnl Sets $var_CFLAGS, $var_LIBS and $var_PLUGINSDIR
38
 
dnl
39
 
AC_DEFUN([XFCE_PANEL_PLUGIN],
40
 
[
41
 
  BM_DEPEND([$1], [xfce4-panel-1.0], [$2])
42
 
 
43
 
  dnl Check where to put the plugins to
44
 
  AC_MSG_CHECKING([where to install panel plugins])
45
 
  $1_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir xfce4-panel-1.0`
46
 
  AC_SUBST([$1_PLUGINSDIR])
47
 
  AC_MSG_RESULT([$$1_PLUGINSDIR])
48
 
])
49
 
 
50
 
dnl
51
 
dnl XFCE_MCS_PLUGIN(var, version)
52
 
dnl
53
 
dnl sets $var_CFLAGS, $var_LIBS and $var_PLUGINSDIR
54
 
dnl
55
 
AC_DEFUN([XFCE_MCS_PLUGIN],
56
 
[
57
 
  BM_DEPEND([$1], [xfce-mcs-manager], [$2])
58
 
 
59
 
  dnl Check where to put the plugins to
60
 
  AC_MSG_CHECKING([where to install MCS plugins])
61
 
  $1_PLUGINSDIR=`$PKG_CONFIG --variable=pluginsdir xfce-mcs-manager`
62
 
  AC_SUBST([$1_PLUGINSDIR])
63
 
  AC_MSG_RESULT([$$1_PLUGINSDIR])
64
 
])