aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: bf1f70fac32d0b4de6b8dd0c9d12b2c5e327aca4 (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
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
AC_INIT([indicator-notifications], [0.2.7], [jason.conti@gmail.com])

AM_INIT_AUTOMAKE([-Wall -Werror])

AM_SILENT_RULES([yes])

# Required compilers

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR
AC_STDC_HEADERS
AC_DISABLE_STATIC
AC_PROG_LIBTOOL

# Setup gettext with intltool

IT_PROG_INTLTOOL
GETTEXT_PACKAGE=$PACKAGE
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package])
AC_SUBST(GETTEXT_PACKAGE)

# Helpers for GSettings

GLIB_GSETTINGS

# Required libraries from pkg-config

INDICATOR_REQUIRED_VERSION=0.3.19
GTK3_REQUIRED_VERSION=3.0

INDICATOR3_PKG_NAME=indicator3-0.4

PKG_CHECK_MODULES(INDICATOR, $INDICATOR3_PKG_NAME >= $INDICATOR_REQUIRED_VERSION
                             gtk+-3.0 >= GTK3_REQUIRED_VERSION)

AC_SUBST(INDICATOR_CFLAGS)
AC_SUBST(INDICATOR_LIBS)

# Library directories from pkg-config

with_localinstall="no"
AC_ARG_ENABLE([localinstall],
              [AS_HELP_STRING([--enable-localinstall],
                  [set default library directories instead of asking pkg-config (default is no)])],
              [with_localinstall="yes"],
              [with_localinstall="no"])

if test "x$with_localinstall" = "xyes"; then
  INDICATORDIR="${libdir}/indicators/2/"
else
  INDICATORDIR=`$PKG_CONFIG --variable=indicatordir $INDICATOR3_PKG_NAME`
fi
INDICATORICONSDIR="${datadir}/pixmaps/"

AC_SUBST(INDICATORDIR)
AC_SUBST(INDICATORICONSDIR)

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
  Makefile
  src/Makefile
  data/Makefile
  data/icons/Makefile
  po/Makefile.in
  tests/Makefile
])

AC_OUTPUT

AC_MSG_NOTICE([

Recent Notifications Indicator Configuration:

	Prefix:        $prefix
	Indicator Dir: $INDICATORDIR
])