~cjcurran/indicator-sound/graceful-crashing

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Conor Curran
  • Date: 2010-01-27 13:21:02 UTC
  • Revision ID: conor.curran@canonical.com-20100127132102-xc5w5ob5kei1iblb
copied contents from lp:~cjcurran/wasilla/soundmenu without the noise

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
AC_INIT(src/indicator-sound.c)
 
3
 
 
4
AC_PREREQ(2.53)
 
5
 
 
6
AM_CONFIG_HEADER(config.h)
 
7
AM_INIT_AUTOMAKE(indicator-sound, 0.1.0)
 
8
 
 
9
AM_MAINTAINER_MODE
 
10
 
 
11
IT_PROG_INTLTOOL([0.35.0])
 
12
 
 
13
AC_ISC_POSIX
 
14
AC_PROG_CC
 
15
AM_PROG_CC_C_O
 
16
AC_STDC_HEADERS
 
17
AC_PROG_LIBTOOL
 
18
 
 
19
AC_SUBST(VERSION)
 
20
AC_CONFIG_MACRO_DIR([m4])
 
21
 
 
22
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
 
23
 
 
24
###########################
 
25
# Dependencies 
 
26
###########################
 
27
 
 
28
GTK_REQUIRED_VERSION=2.12
 
29
INDICATOR_REQUIRED_VERSION=0.3.0
 
30
DBUSMENUGTK_REQUIRED_VERSION=0.2.0
 
31
POLKIT_REQUIRED_VERSION=0.92
 
32
PULSE_AUDIO_REQUIRED_VERSION=0.9.19
 
33
INDICATOR_DISPLAY_OBJECTS=0.1
 
34
 
 
35
PKG_CHECK_MODULES(APPLET, gtk+-2.0 >= $GTK_REQUIRED_VERSION
 
36
                          indicator >= $INDICATOR_REQUIRED_VERSION
 
37
                                                  dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)
 
38
                          
 
39
AC_SUBST(APPLET_CFLAGS)
 
40
AC_SUBST(APPLET_LIBS)
 
41
 
 
42
DBUSMENUGLIB_REQUIRED_VERSION=0.1.1
 
43
 
 
44
PKG_CHECK_MODULES(SOUNDSERVICE, dbusmenu-glib >= $DBUSMENUGLIB_REQUIRED_VERSION
 
45
                                indicator >= $INDICATOR_REQUIRED_VERSION
 
46
                                libpulse-mainloop-glib >= $PULSE_AUDIO_REQUIRED_VERSION)
 
47
 
 
48
AC_SUBST(SOUNDSERVICE_CFLAGS)
 
49
AC_SUBST(SOUNDERVICE_LIBS)
 
50
 
 
51
AC_PATH_PROG(GCONFTOOL, gconftool-2)
 
52
dnl Specify the gconf configuration source,
 
53
dnl default to xml::$(sysconfdir)/gconf/gconf.xml.defaults
 
54
 
 
55
AM_GCONF_SOURCE_2
 
56
 
 
57
PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.0)
 
58
AC_SUBST(GCONF_CFLAGS)
 
59
AC_SUBST(GCONF_LIBS)
 
60
 
 
61
###########################
 
62
# Check to see if we're local
 
63
###########################
 
64
 
 
65
with_localinstall="no"
 
66
AC_ARG_ENABLE(localinstall, AS_HELP_STRING([--enable-localinstall], [install all of the files localy instead of system directories (for distcheck)]), with_localinstall=$enableval, with_localinstall=no)
 
67
 
 
68
###########################
 
69
# Indicator Info
 
70
###########################
 
71
 
 
72
if test "x$with_localinstall" = "xyes"; then
 
73
        INDICATORDIR="${libdir}/indicators/2/"
 
74
        INDICATORICONSDIR="${datadir}/indicator-applet/icons/"
 
75
else
 
76
        INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
 
77
        INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
 
78
fi
 
79
AC_SUBST(INDICATORDIR)
 
80
AC_SUBST(INDICATORICONSDIR)
 
81
 
 
82
###########################
 
83
# DBus Service Info
 
84
###########################
 
85
 
 
86
if test "x$with_localinstall" = "xyes"; then
 
87
        DBUSSERVICEDIR="${datadir}/dbus-1/services/"
 
88
else
 
89
        DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
 
90
fi
 
91
AC_SUBST(DBUSSERVICEDIR)
 
92
 
 
93
##############################
 
94
# Custom Junk
 
95
##############################
 
96
 
 
97
AC_DEFUN([AC_DEFINE_PATH], [
 
98
        test "x$prefix" = xNONE && prefix="$ac_default_prefix"
 
99
        test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
100
        ac_define_path=`eval echo [$]$2`
 
101
        ac_define_path=`eval echo [$]ac_define_path`
 
102
        $1="$ac_define_path"
 
103
        AC_SUBST($1)
 
104
        ifelse($3, ,
 
105
                AC_DEFINE_UNQUOTED($1, "$ac_define_path"),
 
106
                AC_DEFINE_UNQUOTED($1, "$ac_define_path", $3))
 
107
])
 
108
 
 
109
###########################
 
110
# Internationalization
 
111
###########################
 
112
 
 
113
GETTEXT_PACKAGE=indicator-sound
 
114
AC_SUBST(GETTEXT_PACKAGE)
 
115
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain])
 
116
AC_DEFINE_PATH(GNOMELOCALEDIR, "${datadir}/locale", [locale directory])
 
117
 
 
118
AM_GLIB_GNU_GETTEXT
 
119
 
 
120
###########################
 
121
# Files
 
122
###########################
 
123
 
 
124
AC_OUTPUT([
 
125
Makefile
 
126
src/Makefile
 
127
data/Makefile
 
128
po/Makefile.in
 
129
])
 
130
 
 
131
###########################
 
132
# Results
 
133
###########################
 
134
 
 
135
AC_MSG_NOTICE([
 
136
 
 
137
SUS Indicator Configuration:
 
138
 
 
139
        Prefix:        $prefix
 
140
])