gtk3 optional
[psensor.git] / configure.ac
index 90efaf7..dd68666 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.64])
-AC_INIT([psensor], [0.6.2.11],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor])
+AC_INIT([psensor], [0.6.2.13],[jeanfi@gmail.com],[psensor],[http://wpitchoune.net/psensor])
 
 AM_INIT_AUTOMAKE([-Wall -Werror gnu])
 
@@ -52,11 +52,23 @@ PKG_CHECK_MODULES(XEXT, xext)
 AC_SUBST(XEXT_CFLAGS)
 AC_SUBST(XEXT_LIBS)
 
-# Checks GTK 
-PKG_CHECK_MODULES(GTK, gtk+-2.0 )
+# Checks GTK
+GTK_LIBS=
+PKG_CHECK_MODULES(GTK,
+                 gtk+-3.0,
+                 [AC_DEFINE([HAVE_GTK3],[1],[Use GTK3])],
+                 [AC_MSG_WARN("GTK+ 3 not present")])
+AM_CONDITIONAL(GTK, test -n "$GTK_LIBS")
 AC_SUBST(GTK_CFLAGS)
 AC_SUBST(GTK_LIBS)
 
+if test "$GTK_LIBS" == ""; then
+   PKG_CHECK_MODULES(GTK, gtk+-2.0 )
+   AM_CONDITIONAL(GTK, test -n "$GTK_LIBS")
+   AC_SUBST(GTK_CFLAGS)
+   AC_SUBST(GTK_LIBS)
+fi
+
 # Check GCONF
 PKG_CHECK_MODULES(GCONF, gconf-2.0)
 AC_SUBST(GCONF_CFLAGS)
@@ -76,12 +88,19 @@ AC_SUBST(LIBNOTIFY_LIBS)
 
 # Checks AppIndicator 
 APPINDICATOR_LIBS=
-PKG_CHECK_MODULES(APPINDICATOR, 
+
+PKG_CHECK_MODULES(APPINDICATOR, appindicator3-0.1,
+     [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator3-0.1])],
+     [AC_MSG_WARN(AppIndicator 3-0.1 not present")])
+
+if test "$APPINDICATOR_LIBS" == ""; then
+   PKG_CHECK_MODULES(APPINDICATOR, 
      appindicator-0.1 <= 0.2.9 , 
      [AC_DEFINE([HAVE_APPINDICATOR],[1],[Use AppIndicator 0.2.9])
       AC_DEFINE([HAVE_APPINDICATOR_029],[1],[Use AppIndicator 0.2.9])
      ],
      [AC_MSG_WARN(AppIndicator 0.2.9 not present")])
+fi
 
 if test "$APPINDICATOR_LIBS" == ""; then
    PKG_CHECK_MODULES(APPINDICATOR, 
@@ -221,6 +240,8 @@ AC_CONFIG_FILES([
  icons/hicolor/48x48/Makefile
  icons/hicolor/64x64/Makefile
  icons/ubuntu-mono-dark/status/22/Makefile
+ icons/ubuntu-mono-light/status/22/Makefile
+ icons/ubuntu-mono-dark/apps/22/Makefile
  www/Makefile
  po/Makefile.in
  tests/Makefile