[gnome-panel/merge-gnome-applets] Fix cpufreq applet build



commit fbb3df27e7a6ab2102cc24e442cd28a32572873c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Tue May 27 23:19:56 2014 +0300

    Fix cpufreq applet build

 applets/Makefile.am             |    4 ++
 applets/cpufreq/src/Makefile.am |    8 ++-
 configure.ac                    |   99 +++++++++++++++++++++++++++++++++++++++
 gnome-applets/Makefile.am       |    4 --
 gnome-applets/configure.ac      |   99 ---------------------------------------
 5 files changed, 109 insertions(+), 105 deletions(-)
---
diff --git a/applets/Makefile.am b/applets/Makefile.am
index 43b6bb5..55d3657 100644
--- a/applets/Makefile.am
+++ b/applets/Makefile.am
@@ -13,4 +13,8 @@ if BUILD_BATTSTAT_APPLET
 SUBDIRS += battstat
 endif
 
+if BUILD_CPUFREQ_APPLET
+SUBDIRS += cpufreq
+endif
+
 -include $(top_srcdir)/git.mk
diff --git a/applets/cpufreq/src/Makefile.am b/applets/cpufreq/src/Makefile.am
index 8dfd9fe..71f1d5c 100644
--- a/applets/cpufreq/src/Makefile.am
+++ b/applets/cpufreq/src/Makefile.am
@@ -5,8 +5,11 @@ endif
 SUBDIRS = $(selector_SUBDIR)
 
 AM_CPPFLAGS = \
+       -I$(srcdir)/../../../libpanel-applet \
+       -I$(top_builddir)/libpanel-applet \
+       -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
        -DCPUFREQ_MENU_UI_DIR=\""$(pkgdatadir)/ui"\"            \
-       $(GNOME_APPLETS_CFLAGS)                                 \
+       $(LIBPANEL_APPLET_CFLAGS) \
        $(LIBGLADE_CFLAGS)                                      \
        $(DBUS_CFLAGS)                                          \
        $(WARN_CFLAGS)
@@ -31,7 +34,8 @@ cpufreq_applet_SOURCES =  \
        cpufreq-monitor-cpuinfo.c       cpufreq-monitor-cpuinfo.h
 
 cpufreq_applet_LDADD =  \
-       $(GNOME_APPLETS_LIBS)           \
+       ../../../libpanel-applet/libpanel-applet-4.la \
+       $(LIBPANEL_APPLET_LIBS) \
        $(LIBGLADE_LIBS)                \
        $(LIBCPUFREQ_LIBS)              \
        $(DBUS_LIBS)
diff --git a/configure.ac b/configure.ac
index df4dc1a..6a85b47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,7 @@ LIBRSVG_REQUIRED=2.36.2
 GUCHARMAP3_REQUIRED=2.33.0
 HAL_REQUIRED=0.5.3
 UPOWER_REQUIRED=0.9.4
+POLKIT_REQUIRED=0.92
 
 dnl pkg-config dependency checks
 
@@ -312,6 +313,41 @@ case $host in
        ;;
 esac
 
+dnl -- check for glib/gobject (required) --------------------------------------
+PKG_CHECK_MODULES(CPUFREQ_SELECTOR, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
+AC_SUBST(CPUFREQ_SELECTOR_CFLAGS)
+AC_SUBST(CPUFREQ_SELECTOR_LIBS)
+
+dnl -- check for dbus (required for cpufreq-selector)
+PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, HAVE_DBUS=yes, 
HAVE_DBUS=no)
+
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+dnl -- check for PolicyKit and PolicyKit-gnome (optional) -----------------------------------------
+POLKIT_CFLAGS=
+POLKIT_LIBS=
+AC_ARG_ENABLE([polkit],
+    AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support @<:@default auto@:>@]),
+    enable_polkit=$enableval,
+    enable_polkit=auto)
+if test "x$enable_polkit" != "xno"; then
+    PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= $POLKIT_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, 
HAVE_POLKIT=yes, HAVE_POLKIT=no)
+    if test "x$enable_polkit" = "xyes" -a "x$HAVE_POLKIT" = "xno"; then
+        AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found])
+    fi
+fi
+dnl - This is only so the printout at the end of configure is correct -
+if test "x$enable_polkit" = "xno"; then
+   HAVE_POLKIT=no
+fi
+if test "x$HAVE_POLKIT" = "xyes"; then
+    AC_DEFINE(HAVE_POLKIT, [1], [PolicyKit available])
+fi
+AM_CONDITIONAL(HAVE_POLKIT, test "x$HAVE_POLKIT" = "xyes")
+AC_SUBST(POLKIT_CFLAGS)
+AC_SUBST(POLKIT_LIBS)
+
 dnl -- check for libhal (optional) --------------------------------------------
 HAL_CFLAGS=
 HAL_LIBS=
@@ -382,6 +418,60 @@ fi
 CPPFLAGS=$savecppflags
 
 dnl ***************************************************************************
+dnl *** cpufreq applet check                                                ***
+dnl ***************************************************************************
+
+dnl --disable-cpufreq=(yes|no)
+AC_ARG_ENABLE(cpufreq,
+             [  --disable-cpufreq[@<:@=no/yes@:>@]
+                          don't build cpu frequency scaling monitor applet
+                         [@<:@default: no@:>@]],,
+             disable_cpufreq=no)
+
+dnl --enable-frequency-selector=(yes/no)
+AC_ARG_ENABLE(frequency-selector,
+             [  --enable-frequency-selector[@<:@=yes/no@:>@]
+                         build frequency selector [@<:@default: yes@:>@]], enable_selector=$enableval,
+             enable_selector=yes)
+
+dnl --enable-suid=(yes/no)
+AC_ARG_ENABLE(suid,
+       [  --enable-suid[@<:@=yes/no@:>@]  suid root the frequency selector executable
+                   [@<:@default: yes@:>@]], ,
+       suid=yes)
+
+if test "x$HAVE_POLKIT" = "xyes"; then
+   suid=no
+fi
+
+AC_CHECK_HEADER(cpufreq.h, have_libcpufreq=yes, have_libcpufreq=no)
+LIBCPUFREQ_LIBS=
+if test "x$have_libcpufreq" = "xyes"; then
+   AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.])
+   LIBCPUFREQ_LIBS=-lcpufreq
+fi
+AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes)
+AC_SUBST(LIBCPUFREQ_LIBS)
+
+build_cpufreq_applet=no
+
+if test x$disable_cpufreq = xno; then
+   case "${host}" in
+      *linux*)
+         build_cpufreq_applet=yes
+        ;;
+      *)
+         AC_MSG_WARN([${host} is not supported by cpufreq applet, not building])
+        build_cpufreq_applet=no
+        ;;
+   esac
+fi
+
+AM_CONDITIONAL(BUILD_CPUFREQ_APPLET, test x$build_cpufreq_applet = xyes)
+AM_CONDITIONAL(BUILD_CPUFREQ_SELECTOR, test x$enable_selector = xyes)
+AM_CONDITIONAL(CPUFREQ_SELECTOR_SUID, test x$suid = xyes)
+
+dnl ***************************************************************************
 dnl *** battstat specific checks                                            ***
 dnl ***************************************************************************
 
@@ -505,6 +595,11 @@ applets/charpick/help/Makefile
 applets/charpick/Makefile
 applets/clock/Makefile
 applets/clock/pixmaps/Makefile
+applets/cpufreq/help/Makefile
+applets/cpufreq/Makefile
+applets/cpufreq/pixmaps/Makefile
+applets/cpufreq/src/cpufreq-selector/Makefile
+applets/cpufreq/src/Makefile
 applets/fish/Makefile
 applets/notification_area/Makefile
 applets/wncklet/Makefile
@@ -565,6 +660,10 @@ echo "
              - battstat                $build_battstat_applet
              - charpick                always
                 - gucharmap support    $have_gucharmap
+             - cpufreq                 $build_cpufreq_applet
+                - building selector    $enable_selector
+                - using PolicyKit      $HAVE_POLKIT
+                - enabling suid bit    $suid
 
             Using HAL:                 $HAVE_HAL
             Using UPOWER:              $HAVE_UPOWER
diff --git a/gnome-applets/Makefile.am b/gnome-applets/Makefile.am
index 8a61dfa..e4ab40a 100644
--- a/gnome-applets/Makefile.am
+++ b/gnome-applets/Makefile.am
@@ -16,10 +16,6 @@ if APPLET_MODEMLIGHTS
 modemlights_SUBDIRS = $(modemlights_applets)
 endif
 
-if BUILD_CPUFREQ_APPLET
-cpufreq_SUBDIR = cpufreq
-endif
-
 if BUILD_INVEST_APPLET
 invest_applet_SUBDIR = invest-applet
 endif
diff --git a/gnome-applets/configure.ac b/gnome-applets/configure.ac
index 95cf6f3..f71fb59 100644
--- a/gnome-applets/configure.ac
+++ b/gnome-applets/configure.ac
@@ -26,7 +26,6 @@ DBUS_GLIB_REQUIRED=0.74
 GNOME_ICON_THEME_REQUIRED=2.15.91
 LIBXML_REQUIRED=2.5.0
 GWEATHER_REQUIRED=3.5.0
-POLKIT_REQUIRED=0.92
 NETWORKMANAGER_REQUIRED=0.7
 GST10_REQUIRED=0.10.2
 dnl ***************************************************************************
@@ -163,41 +162,6 @@ fi
 AC_SUBST(LIBNOTIFY_CFLAGS)
 AC_SUBST(LIBNOTIFY_LIBS)
 
-dnl -- check for glib/gobject (required) --------------------------------------
-PKG_CHECK_MODULES(CPUFREQ_SELECTOR, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
-AC_SUBST(CPUFREQ_SELECTOR_CFLAGS)
-AC_SUBST(CPUFREQ_SELECTOR_LIBS)
-
-dnl -- check for dbus (required for cpufreq-selector)
-PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, HAVE_DBUS=yes, 
HAVE_DBUS=no)
-
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-dnl -- check for PolicyKit and PolicyKit-gnome (optional) -----------------------------------------
-POLKIT_CFLAGS=
-POLKIT_LIBS=
-AC_ARG_ENABLE([polkit],
-    AC_HELP_STRING([--enable-polkit], [Enable PolicyKit support @<:@default auto@:>@]),
-    enable_polkit=$enableval,
-    enable_polkit=auto)
-if test "x$enable_polkit" != "xno"; then
-    PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= $POLKIT_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, 
HAVE_POLKIT=yes, HAVE_POLKIT=no)
-    if test "x$enable_polkit" = "xyes" -a "x$HAVE_POLKIT" = "xno"; then
-        AC_MSG_ERROR([PolicyKit support explicitly requested but dependencies not found])
-    fi
-fi
-dnl - This is only so the printout at the end of configure is correct -
-if test "x$enable_polkit" = "xno"; then
-   HAVE_POLKIT=no
-fi
-if test "x$HAVE_POLKIT" = "xyes"; then
-    AC_DEFINE(HAVE_POLKIT, [1], [PolicyKit available])
-fi
-AM_CONDITIONAL(HAVE_POLKIT, test "x$HAVE_POLKIT" = "xyes")
-AC_SUBST(POLKIT_CFLAGS)
-AC_SUBST(POLKIT_LIBS)
-
 dnl -- check for Python/GNOME modules (optional) ------------------------------
 PKG_CHECK_MODULES(PYGOBJECT, pygobject-3.0, HAVE_PYGOBJECT="yes", HAVE_PYGOBJECT="no")
 
@@ -373,60 +337,6 @@ dnl fi
 AM_CONDITIONAL(APPLET_MODEMLIGHTS, test "x$BUILD_MODEM_LIGHTS" = "xyes")
 
 dnl ***************************************************************************
-dnl *** cpufreq applet check                                                ***
-dnl ***************************************************************************
-
-dnl --disable-cpufreq=(yes|no)
-AC_ARG_ENABLE(cpufreq,
-             [  --disable-cpufreq[@<:@=no/yes@:>@]
-                          don't build cpu frequency scaling monitor applet
-                         [@<:@default: no@:>@]],,
-             disable_cpufreq=no)
-
-dnl --enable-frequency-selector=(yes/no)
-AC_ARG_ENABLE(frequency-selector,
-             [  --enable-frequency-selector[@<:@=yes/no@:>@]
-                         build frequency selector [@<:@default: yes@:>@]], enable_selector=$enableval,
-             enable_selector=yes)
-
-dnl --enable-suid=(yes/no)
-AC_ARG_ENABLE(suid,
-       [  --enable-suid[@<:@=yes/no@:>@]  suid root the frequency selector executable
-                   [@<:@default: yes@:>@]], ,
-       suid=yes)
-
-if test "x$HAVE_POLKIT" = "xyes"; then
-   suid=no
-fi
-
-AC_CHECK_HEADER(cpufreq.h, have_libcpufreq=yes, have_libcpufreq=no)
-LIBCPUFREQ_LIBS=
-if test "x$have_libcpufreq" = "xyes"; then
-   AC_DEFINE([HAVE_LIBCPUFREQ], [1], [Have libcpufreq.])
-   LIBCPUFREQ_LIBS=-lcpufreq
-fi
-AM_CONDITIONAL(HAVE_LIBCPUFREQ, test x$have_libcpufreq = xyes)
-AC_SUBST(LIBCPUFREQ_LIBS)
-
-build_cpufreq_applet=no
-
-if test x$disable_cpufreq = xno; then
-   case "${host}" in
-      *linux*)
-         build_cpufreq_applet=yes
-        ;;
-      *)
-         AC_MSG_WARN([${host} is not supported by cpufreq applet, not building])
-        build_cpufreq_applet=no
-        ;;
-   esac
-fi
-
-AM_CONDITIONAL(BUILD_CPUFREQ_APPLET, test x$build_cpufreq_applet = xyes)
-AM_CONDITIONAL(BUILD_CPUFREQ_SELECTOR, test x$enable_selector = xyes)
-AM_CONDITIONAL(CPUFREQ_SELECTOR_SUID, test x$suid = xyes)
-
-dnl ***************************************************************************
 dnl *** invest-applet specific checks                                       ***
 dnl ***************************************************************************
 
@@ -509,11 +419,6 @@ AC_OUTPUT([
 gnome-applets.spec
 Makefile
 po/Makefile.in
-cpufreq/help/Makefile
-cpufreq/Makefile
-cpufreq/pixmaps/Makefile
-cpufreq/src/cpufreq-selector/Makefile
-cpufreq/src/Makefile
 drivemount/help/Makefile
 drivemount/Makefile
 geyes/help/Makefile
@@ -556,10 +461,6 @@ gnome-applets-$VERSION configure summary:
        Source code location:           ${srcdir}
        Compiler:                       ${CC}
 
-        - cpufreq                      $build_cpufreq_applet
-               - building selector     $enable_selector
-               - using PolicyKit       $HAVE_POLKIT
-               - enabling suid bit     $suid
         - drivemount                   always
         - geyes                        always
         - gweather                     $build_libgweather_applets


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]