~ted/indicator-datetime/lp773987

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Charles Kerr
  • Date: 2012-02-15 22:31:31 UTC
  • mfrom: (143.3.1 indicator-datetime)
  • Revision ID: charles.kerr@canonical.com-20120215223131-fcuy6zd0f9ij2o6c
lp:~ballogy/indicator-datetime/make-ccpanel-optional

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
                           gdk-3.0 >= GDK_REQUIRED_VERSION
104
104
                           gconf-2.0 >= GCONF_REQUIRED_VERSION)
105
105
 
106
 
PKG_CHECK_MODULES(PREF, gio-2.0 >= $GIO_REQUIRED_VERSION
107
 
                              gtk+-3.0 >= $GTK3_REQUIRED_VERSION
108
 
                              timezonemap
109
 
                              libgnome-control-center
110
 
                              polkit-gobject-1)
 
106
###########################
 
107
# Control Center panel
 
108
###########################
 
109
 
 
110
AC_ARG_WITH([ccpanel],
 
111
            AS_HELP_STRING([--with-ccpanel], [enable Control Center panel]),,
 
112
            with_ccpanel=auto)
 
113
 
 
114
if test x"$with_ccpanel" != x"no" ; then
 
115
   PKG_CHECK_MODULES([PREF],
 
116
                     [gio-2.0 >= $GIO_REQUIRED_VERSION
 
117
                      gtk+-3.0 >= $GTK3_REQUIRED_VERSION
 
118
                      timezonemap
 
119
                      libgnome-control-center
 
120
                      polkit-gobject-1],
 
121
                     [have_ccpanel=yes],
 
122
                     [have_ccpanel=no])
 
123
   if test x${have_ccpanel} = xyes; then
 
124
      AC_DEFINE(HAVE_CCPANEL, 1, [Define to 1 to enable Control Center panel])
 
125
      PKG_CHECK_MODULES(LIBMAP, gio-2.0 >= $GIO_REQUIRED_VERSION
 
126
                                      gtk+-3.0 >= $GTK3_REQUIRED_VERSION)
 
127
   fi
 
128
   if test x${with_ccpanel} = xyes && test x${have_ccpanel} = xno; then
 
129
     AC_MSG_ERROR([Control Center panel configured but not found])
 
130
   fi
 
131
else
 
132
   have_ccpanel=no
 
133
fi
 
134
AM_CONDITIONAL(BUILD_CCPANEL, test x${have_ccpanel} = xyes)
111
135
 
112
136
###########################
113
137
# Grab the GSettings Macros
148
172
# Control Center Info
149
173
###########################
150
174
 
151
 
AS_IF([test "x$with_localinstall" = "xyes"],
152
 
        [
153
 
        CCPANELDIR="${libdir}/control-center-1/panels/"
154
 
        ],
155
 
        [
156
 
        CCPANELDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center`
 
175
AS_IF([test "x$have_ccpanel" = "xyes"],
 
176
        [
 
177
        AS_IF([test "x$with_localinstall" = "xyes"],
 
178
                [
 
179
                CCPANELDIR="${libdir}/control-center-1/panels/"
 
180
                ],
 
181
                [
 
182
                CCPANELDIR=`$PKG_CONFIG --variable=extensiondir libgnome-control-center`
 
183
                ])
 
184
 
 
185
        AC_SUBST(CCPANELDIR)
157
186
        ])
158
 
 
159
 
AC_SUBST(CCPANELDIR)
160
 
 
161
187
###########################
162
188
# DBus Service Info
163
189
###########################
220
246
 
221
247
        Prefix:        $prefix
222
248
        Indicator Dir: $INDICATORDIR
 
249
        CC Panel:      $have_ccpanel
223
250
        CC Panel Dir:  $CCPANELDIR
224
251
])