updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / python-appindicator / configure.ac
blob6d79d457a0d3602d2fd2ccdc066942b4071c8040
2 AC_INIT(indicator-application, 0.2.9, ted@canonical.com)
3 AC_COPYRIGHT([Copyright 2009, 2010 Canonical])
5 AC_PREREQ(2.53)
7 AM_CONFIG_HEADER(config.h)
8 AM_INIT_AUTOMAKE(indicator-application, 0.2.9)
10 AM_MAINTAINER_MODE
12 AC_ISC_POSIX
13 AC_PROG_CC
14 AM_PROG_CC_C_O
15 AC_STDC_HEADERS
16 AC_PROG_LIBTOOL
18 AC_SUBST(VERSION)
19 AC_CONFIG_MACRO_DIR([m4])
21 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
23 AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
24 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
26 PKG_PROG_PKG_CONFIG
28 ###########################
29 # GTK Doc
30 ###########################
32 GTK_DOC_CHECK([1.9])
33 AC_CONFIG_MACRO_DIR(m4)
36 ###########################
37 # Dependencies
38 ###########################
40 GTK_REQUIRED_VERSION=2.12
41 INDICATOR_REQUIRED_VERSION=0.3.5
42 DBUSMENUGTK_REQUIRED_VERSION=0.2.2
43 JSON_GLIB_REQUIRED_VERSION=0.7.6
44 DBUS_GLIB_REQUIRED_VERSION=0.82
46 PKG_CHECK_MODULES(INDICATOR, gtk+-2.0 >= $GTK_REQUIRED_VERSION
47                              indicator >= $INDICATOR_REQUIRED_VERSION
48                              json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
49                              dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
50                              dbusmenu-gtk >= $DBUSMENUGTK_REQUIRED_VERSION)
52 AC_SUBST(INDICATOR_CFLAGS)
53 AC_SUBST(INDICATOR_LIBS)
55 ###########################
56 # GObject Introspection
57 ###########################
59 GOBJECT_INTROSPECTION_CHECK([0.6.7])
61 ###########################
62 # Vala API Generation
63 ###########################
65 AC_PATH_PROG([VALA_API_GEN], [vapigen])
67 ###########################
68 # Check to see if we're local
69 ###########################
71 with_localinstall="no"
72 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)
74 ###########################
75 # Indicator Info
76 ###########################
78 if test "x$with_localinstall" = "xyes"; then
79         INDICATORDIR="${libdir}/indicators/2/"
80         INDICATORICONSDIR="${datadir}/libindicate/icons/"
81 else
82         INDICATORDIR=`$PKG_CONFIG --variable=indicatordir indicator`
83         INDICATORICONSDIR=`$PKG_CONFIG --variable=iconsdir indicator`
85 AC_SUBST(INDICATORDIR)
86 AC_SUBST(INDICATORICONSDIR)
88 ###########################
89 # DBus Service Info
90 ###########################
92 if test "x$with_localinstall" = "xyes"; then
93         DBUSSERVICEDIR="${datadir}/dbus-1/services/"
94 else
95         DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`
97 AC_SUBST(DBUSSERVICEDIR)
99 ###########################
100 # Python
101 ###########################
103 PYGTK_REQUIRED=2.14.0
104 PYGOBJECT_REQUIRED=0.22
106 AM_PATH_PYTHON(2.3.5)
107 AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
109 PKG_CHECK_MODULES(APPINDICATOR_PYTHON,
110                   [
111                                         pygtk-2.0 >= $PYGTK_REQUIRED
112                                         gtk+-2.0 >= $GTK_REQUIRED_VERSION
113                                         pygobject-2.0 >= $PYGOBJECT_REQUIRED
114                   ])
115 AC_SUBST(APPINDICATOR_PYTHON_CFLAGS)
116 AC_SUBST(APPINDICATOR_PYTHON_LIBS)
118 AC_MSG_CHECKING(for pygtk defs)
119 PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
120 AC_SUBST(PYGTK_DEFSDIR)
121 AC_MSG_RESULT($PYGTK_DEFSDIR)
123 AC_MSG_CHECKING(for pygtk codegen)
124 PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
125 AC_SUBST(PYGTK_CODEGEN)
126 AC_MSG_RESULT($PYGTK_CODEGEN)
128 ###########################
129 # Files
130 ###########################
132 AC_OUTPUT([
133 Makefile
134 src/Makefile
135 src/appindicator-0.1.pc
136 bindings/Makefile
137 bindings/python/Makefile
138 data/Makefile
139 tests/Makefile
140 example/Makefile
141 docs/Makefile
142 docs/reference/Makefile
143 docs/reference/version.xml
144 docs/reference/libappindicator-docs.sgml
147 ###########################
148 # Results
149 ###########################
151 AC_MSG_NOTICE([
153 Application Indicator Configuration:
155         Prefix:        $prefix
156         Indicator Dir: $INDICATORDIR