Skip to content
Browse files

List package dependencies only in configure.ac

This prevents from having to update both configure.ac and geany.pc.in
every time our dependencies (e.g. GTK version) change.
  • Loading branch information...
1 parent 890667d commit 5f0963d4706d40d6beefd844d2c7e7b25847a191 @b4n b4n committed Apr 12, 2012
Showing with 6 additions and 3 deletions.
  1. +4 −2 configure.ac
  2. +1 −1 geany.pc.in
  3. +1 −0 wscript
View
6 configure.ac
@@ -57,8 +57,10 @@ GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
# GTK/GLib/GIO checks
-gtk_modules="gtk+-2.0 >= 2.16 glib-2.0 >= 2.20 gio-2.0 >= 2.20 gmodule-2.0"
-PKG_CHECK_MODULES([GTK], [$gtk_modules])
+gtk_modules="gtk+-2.0 >= 2.16 glib-2.0 >= 2.20"
+gtk_modules_private="gio-2.0 >= 2.20 gmodule-2.0"
+PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
+AC_SUBST([DEPENDENCIES], [$gtk_modules])
AC_SUBST([GTK_CFLAGS])
AC_SUBST([GTK_LIBS])
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
View
2 geany.pc.in
@@ -8,7 +8,7 @@ localedir=@localedir@
Name: Geany
Description: A fast and lightweight IDE using GTK2
-Requires: gtk+-2.0 >= 2.16.0
+Requires: @DEPENDENCIES@
Version: @VERSION@
Libs: -L${libdir}
Cflags: -DGTK -I${includedir}/geany -I${includedir}/geany/tagmanager -I${includedir}/geany/scintilla
View
1 wscript
@@ -346,6 +346,7 @@ def build(bld):
bld.new_task_gen(
source = 'geany.pc.in',
dct = {'VERSION' : VERSION,
+ 'DEPENDENCIES': 'gtk+-2.0 >= 2.16 glib-2.0 >= 2.20',
'prefix': bld.env['PREFIX'],
'exec_prefix': '${prefix}',
'libdir': '${exec_prefix}/lib',

0 comments on commit 5f0963d

Please sign in to comment.
Something went wrong with that request. Please try again.