~xubuntu-dev/libxfce4util/maverick

« back to all changes in this revision

Viewing changes to m4/depends.m4

  • Committer: Bazaar Package Importer
  • Author(s): Simon Huggins
  • Date: 2004-04-17 12:17:35 UTC
  • Revision ID: james.westby@ubuntu.com-20040417121735-633zpo9necaqqtj6
Tags: upstream-4.0.5
ImportĀ upstreamĀ versionĀ 4.0.5

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
])