Substitute the correct GTK+ version in pkgconfig file
authorBalló György <ballogyor@gmail.com>
Sat, 1 Aug 2015 18:39:50 +0000 (20:39 +0200)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Fri, 12 Feb 2016 18:32:50 +0000 (20:32 +0200)
configure.ac
lxpanel.pc.in

index b1080f9..3f4880b 100644 (file)
@@ -34,10 +34,12 @@ AC_HELP_STRING([--enable-gtk3],[enable to use gtk-3.0 instead of gtk-2.0]),
 esac],[])
 
 if test "x$enable_gtk3" = "xyes" ; then
 esac],[])
 
 if test "x$enable_gtk3" = "xyes" ; then
-  pkg_modules="$pkg_modules gtk+-3.0 libfm-gtk3 >= 1.2.0 libwnck-3.0"
+  gtk_module="gtk+-3.0"
+  pkg_modules="$pkg_modules $gtk_module libfm-gtk3 >= 1.2.0 libwnck-3.0"
   keybinder_module=keybinder-3.0
 else
   keybinder_module=keybinder-3.0
 else
-  pkg_modules="$pkg_modules gtk+-2.0 >= 2.18.0 libfm-gtk >= 1.2.0 libwnck-1.0"
+  gtk_module="gtk+-2.0 >= 2.18.0"
+  pkg_modules="$pkg_modules $gtk_module libfm-gtk >= 1.2.0 libwnck-1.0"
   keybinder_module=keybinder
 fi
 
   keybinder_module=keybinder
 fi
 
@@ -48,6 +50,7 @@ pkg_modules="$pkg_modules \
 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
 PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
 AC_SUBST(PACKAGE_CFLAGS)
 AC_SUBST(PACKAGE_LIBS)
+AC_SUBST(gtk_module)
 
 PKG_CHECK_MODULES(KEYBINDER, [$keybinder_module])
 AC_SUBST(KEYBINDER_CFLAGS)
 
 PKG_CHECK_MODULES(KEYBINDER, [$keybinder_module])
 AC_SUBST(KEYBINDER_CFLAGS)
index be761a6..81ce11c 100644 (file)
@@ -6,6 +6,6 @@ pluginsdir=${pkglibdir}/plugins
 
 Name: lxpanel
 Description: A lightweight X11 desktop panel
 
 Name: lxpanel
 Description: A lightweight X11 desktop panel
-Requires: gtk+-2.0 libfm >= 1.2.0
+Requires: @gtk_module@ libfm >= 1.2.0
 Version: @VERSION@
 Libs: -L${pkglibdir} -llxpanel
 Version: @VERSION@
 Libs: -L${pkglibdir} -llxpanel