Skip to content

Commit

Permalink
List package dependencies only in configure.ac
Browse files Browse the repository at this point in the history
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
b4n committed Apr 12, 2012
1 parent 890667d commit 5f0963d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions configure.ac
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion geany.pc.in
Expand Up @@ -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
1 change: 1 addition & 0 deletions wscript
Expand Up @@ -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',
Expand Down

0 comments on commit 5f0963d

Please sign in to comment.