diff options
author | Javier <dev.git@javispedro.com> | 2014-05-24 20:21:52 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2014-05-24 20:21:52 +0200 |
commit | bdbf194737ebe10a5061648fcd44279c82d4c6f2 (patch) | |
tree | c119bf3d4200734a54801db47bcf137eb6f07303 | |
parent | 9bfa7f4a218c8458f411ad50561ac86485d89383 (diff) | |
download | topmenu-gtk-bdbf194737ebe10a5061648fcd44279c82d4c6f2.tar.gz topmenu-gtk-bdbf194737ebe10a5061648fcd44279c82d4c6f2.zip |
add wnck3 autodetection for gtk3
-rw-r--r-- | config.h.in | 3 | ||||
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | libtopmenu-server/Makefile.am | 8 |
3 files changed, 20 insertions, 7 deletions
diff --git a/config.h.in b/config.h.in index 7467fba..0b8a065 100644 --- a/config.h.in +++ b/config.h.in @@ -42,6 +42,9 @@ /* Define if you have libwnck-1.0 */ #undef HAVE_WNCK1 +/* Define if you have libwnck-3.0 */ +#undef HAVE_WNCK3 + /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR diff --git a/configure.ac b/configure.ac index 6383e9d..a7cb8c3 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_ARG_WITH([gtk-module-dir], [], [with_gtk_module_dir=$with_gtk_libdir/gtk-$with_gtk.0/modules]) AC_ARG_WITH([wnck], - [AS_HELP_STRING([--with-wnck], [support window management using [wnck1|matewnck] @<:@default=check@:>@])], + [AS_HELP_STRING([--with-wnck], [support window management using [wnck1|wnck3|matewnck] @<:@default=check@:>@])], [], [with_wnck=check]) @@ -45,9 +45,19 @@ AC_PROG_LIBTOOL PKG_CHECK_MODULES([GTK], [gtk+-x11-$with_gtk.0]) AS_IF([test "x$with_gtk" = x3], - [], + [AS_IF([test "x$with_wnck" = xwnck3 -o "x$with_wnck" = xcheck], + [PKG_CHECK_MODULES([WNCK3], [libwnck-3.0], + [ + AC_DEFINE([HAVE_WNCK3], [1], [Define if you have libwnck-3.0]) + with_wnck=libwnck3 + ], + [if test "x$with_wnck" = xwnck3; then + AC_MSG_FAILURE([--with-wnck=wnck3 was given, but test for libwnck-3.0 failed]) + fi] + )])], + [AS_IF([test "x$with_wnck" = xwnck1 -o "x$with_wnck" = xcheck], - [PKG_CHECK_MODULES([WNCK], [libwnck-1.0], + [PKG_CHECK_MODULES([WNCK1], [libwnck-1.0], [ AC_DEFINE([HAVE_WNCK1], [1], [Define if you have libwnck-1.0]) with_wnck=libwnck1 diff --git a/libtopmenu-server/Makefile.am b/libtopmenu-server/Makefile.am index 98de595..b910248 100644 --- a/libtopmenu-server/Makefile.am +++ b/libtopmenu-server/Makefile.am @@ -2,15 +2,15 @@ if GTK3 lib_LTLIBRARIES = libtopmenu-server-gtk3.la libtopmenu_server_gtk3_la_SOURCES = topmenu-server.c topmenu-server.h topmenu-widget.c topmenu-widget.h -libtopmenu_server_gtk3_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK_CFLAGS) $(MATEWNCK_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" -libtopmenu_server_gtk3_la_LIBADD = $(GTK_LIBS) $(WNCK_LIBS) $(MATEWNCK_LIBS) +libtopmenu_server_gtk3_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK3_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" +libtopmenu_server_gtk3_la_LIBADD = $(GTK_LIBS) $(WNCK3_LIBS) else lib_LTLIBRARIES = libtopmenu-server-gtk2.la libtopmenu_server_gtk2_la_SOURCES = topmenu-server.c topmenu-server.h topmenu-widget.c topmenu-widget.h -libtopmenu_server_gtk2_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK_CFLAGS) $(MATEWNCK_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" -libtopmenu_server_gtk2_la_LIBADD = $(GTK_LIBS) $(WNCK_LIBS) $(MATEWNCK_LIBS) +libtopmenu_server_gtk2_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK1_CFLAGS) $(MATEWNCK_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" +libtopmenu_server_gtk2_la_LIBADD = $(GTK_LIBS) $(WNCK1_LIBS) $(MATEWNCK_LIBS) endif |