summaryrefslogtreecommitdiff
path: root/configure.in.in
blob: e8d2272057602982c8500730157da29b1de99c3d (plain)
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
#MIN_CONFIG
KDE_ENABLE_HIDDEN_VISIBILITY
AM_INIT_AUTOMAKE(aquamarine,0.3.0-svn)

AC_CHECK_RANDOM
AC_CHECK_USLEEP
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"

AC_DEFUN([AQUAMARINE_CHECK_KDECORATION],[HAVE_KDECORATION=0
KDE_CHECK_HEADER(kdecoration.h,HAVE_KDECORATION=1,
 AC_MSG_ERROR([Unable to find KDecoration. Make sure you have the kdebase development package installed.]))
])

AC_ARG_ENABLE(berylsettings, AC_HELP_STRING([--disable-berylsettings], [disable beryl settings]), [berylsettings="${enableval}"], [berylsettings="yes"])
AM_CONDITIONAL(include_bs, test "$berylsettings" = "yes")

KDE_PKG_CHECK_MODULES(XCOMPOSITE, "xcomposite",[],AC_MSG_ERROR([xcomposite not found]))
KDE_PKG_CHECK_MODULES(XDAMAGE, "xdamage",[],AC_MSG_ERROR([xdamage not found]))
KDE_PKG_CHECK_MODULES(DECOLIB, "libberyldecoration",[],AC_MSG_ERROR([libberyldecoration not found]))

if test "$berylsettings" = "yes"; then
  KDE_PKG_CHECK_MODULES(BERYLSETTINGS, "berylsettings",
  	[berylsettings_found="yes"],AC_MSG_WARN([berylsettings not found.]))

  if test "$berylsettings_found" = "yes"; then
    AC_DEFINE(HAVE_BERYL_SETTINGS,1,[check for berylsettings])
    if test -z "$PKG_CONFIG"; then
      AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
	fi

    if test "$PKG_CONFIG" = "no" ; then
      plugindir=$prefix/lib/beryl
    else
      bs_libdir=`$PKG_CONFIG --variable=libdir berylsettings`
      plugindir=$bs_libdir/beryl
    fi
	AC_SUBST(plugindir)
  fi

  AC_SUBST(BERYLSETTINGS_LIBS)
  AC_SUBST(BERYLSETTINGS_CFLAGS)
fi

AM_CONDITIONAL(with_berylsettings, test "$berylsettings_found" = "yes")

AQUAMARINE_CHECK_KDECORATION