0002-configure-make-wmgui-build-optional.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From dbb578450974db5decc24560da4aeaed838849a1 Mon Sep 17 00:00:00 2001
  2. From: Samuel Martin <s.martin49@gmail.com>
  3. Date: Thu, 2 Jan 2014 14:03:07 +0100
  4. Subject: [PATCH] configure: make wmgui build optional
  5. So, make gtk-2 and glib2 dependencies optional (only needed by wmgui)
  6. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  7. ---
  8. Makefile.in | 2 +-
  9. configure.ac | 17 +++++++++++++----
  10. 2 files changed, 14 insertions(+), 5 deletions(-)
  11. diff --git a/Makefile.in b/Makefile.in
  12. index 6d3ac98..3d2fb45 100644
  13. --- a/Makefile.in
  14. +++ b/Makefile.in
  15. @@ -3,7 +3,7 @@
  16. include @top_builddir@/defs.mak
  17. LIB_DIRS = libcwiid
  18. -BIN_DIRS = wmgui wminput lswm
  19. +BIN_DIRS = @WMGUI@ wminput lswm
  20. DOC_DIRS = man doc
  21. ifdef PYTHON
  22. BIND_DIRS = python
  23. diff --git a/configure.ac b/configure.ac
  24. index 82ca3e1..d146cb6 100644
  25. --- a/configure.ac
  26. +++ b/configure.ac
  27. @@ -15,6 +15,11 @@ if test "$YACC" != "bison -y"; then
  28. AC_MSG_ERROR([bison not found])
  29. fi
  30. +AC_ARG_ENABLE(
  31. + [wmgui],
  32. + [AS_HELP_STRING([--disable-wmgui],[Do not build wmgui binary (also drop the gtk-2/glib2 dependency)])],
  33. + [ENABLE_WMGUI="$enableval"],[ENABLE_WMGUI=yes])
  34. +
  35. AC_ARG_WITH(
  36. [python],
  37. [AS_HELP_STRING([--without-python],[compile without python support])],
  38. @@ -98,10 +103,14 @@ else
  39. fi
  40. AC_SUBST(LDCONFIG)
  41. -pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0"
  42. -PKG_CHECK_MODULES([GTK], [$pkg_modules])
  43. -AC_SUBST(GTK_CFLAGS)
  44. -AC_SUBST(GTK_LIBS)
  45. +AS_IF(
  46. + [test "x$ENABLE_WMGUI" = xyes],
  47. + [pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0" ;
  48. + PKG_CHECK_MODULES([GTK], [$pkg_modules])
  49. + AC_SUBST(GTK_CFLAGS)
  50. + AC_SUBST(GTK_LIBS)
  51. + AC_SUBST(WMGUI, wmgui)]
  52. +)
  53. AC_OUTPUT(
  54. [Makefile]
  55. --
  56. 1.8.5.2