diff options
author | Jiri Vanek <[email protected]> | 2012-07-31 14:34:51 +0200 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2012-07-31 14:34:51 +0200 |
commit | 23d0dd5fc14e28bbc575c3006823c659cabf47b5 (patch) | |
tree | f9ce00d7553da466d37bba2fa9138f0a16c6e281 | |
parent | 4079dff2ae2b7e47d6a79949f02f6d5a95385598 (diff) |
Introduced configure option --with-gtk=2|3|default to be able
to compile against different version of GTK+ (2.x or 3.x).
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | acinclude.m4 | 40 |
4 files changed, 50 insertions, 1 deletions
@@ -8,6 +8,7 @@ Danesh Dadachanji <[email protected]> Adam Domurad <[email protected]> Thomas Fitzsimmons <[email protected]> Mark Greenwood <[email protected]> +Peter Hatina <[email protected]> Andrew John Hughes <[email protected]> Matthias Klose <[email protected]> Michał Górny < [email protected] > @@ -1,3 +1,12 @@ +2012-07-31 Jiri Vanek <[email protected]> + Peter Hatina <[email protected]> + + Introduced configure option --with-gtk=2|3|default to be able + to compile against different version of GTK+ (2.x or 3.x). + * NEWS: mentioned bug fix + * acinclude.m4: (ITW_GTK_CHECK_VERSION) macro for getting GTK+ version + (ITW_GTK_CHECK) macro for checking GTK+ version + 2012-07-24 Adam Domurad <[email protected]> * plugin/icedteanp/IcedTeaPluginUtils.cc @@ -25,6 +25,7 @@ New in release 1.3 (2012-XX-XX): - PR918: java applet windows uses a low resulution black/white icon - RH838417: Disambiguate signed applet security prompt from certificate warning - RH838559: Disambiguate signed applet security prompt from certificate warning + - RH720836: project can be compiled against GTK+ 2 or 3 librarie New in release 1.2 (2011-XX-XX): * Security updates: diff --git a/acinclude.m4 b/acinclude.m4 index bdddb77..1ab4c9a 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -359,13 +359,51 @@ AC_ARG_ENABLE([plugin], AC_MSG_RESULT(${enable_plugin}) ]) +dnl ITW_GTK_CHECK_VERSION([gtk version]) +AC_DEFUN([ITW_GTK_CHECK_VERSION], +[ + AC_MSG_CHECKING([for GTK$1 version]) + GTK_VER=`$PKG_CONFIG --modversion gtk+-$1.0` + AC_MSG_RESULT([$GTK_VER]) +]) + +dnl ITW_GTK_CHECK([gtk version]) +AC_DEFUN([ITW_GTK_CHECK], +[ + case "$1" in + default) + PKG_CHECK_MODULES(GTK, gtk+-3.0, + [ITW_GTK_CHECK_VERSION([3])], + [PKG_CHECK_MODULES(GTK, gtk+-2.0, + [ITW_GTK_CHECK_VERSION([2])], + [AC_MSG_ERROR([GTK $1 not found])] + )] + ) + ;; + *) + PKG_CHECK_MODULES(GTK, gtk+-$1.0, + [ITW_GTK_CHECK_VERSION([$1])], + [AC_MSG_ERROR([GTK $1 not found])] + ) + ;; + esac +]) + AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES], [ dnl Check for plugin support headers and libraries. dnl FIXME: use unstable AC_REQUIRE([IT_CHECK_PLUGIN]) if test "x${enable_plugin}" = "xyes" ; then - PKG_CHECK_MODULES(GTK, gtk+-2.0) + AC_ARG_WITH([gtk], + [AS_HELP_STRING([--with-gtk=[2|3|default]], + [the GTK+ version to use (default: 3)])], + [case "$with_gtk" in + 2|3|default) ;; + *) AC_MSG_ERROR([invalid GTK version specified]) ;; + esac], + [with_gtk=default]) + ITW_GTK_CHECK([$with_gtk]) PKG_CHECK_MODULES(GLIB, glib-2.0) AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) |