]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
configure: make gtk optional
authorRay Strode <rstrode@redhat.com>
Fri, 8 Jun 2012 21:21:23 +0000 (17:21 -0400)
committerRay Strode <rstrode@redhat.com>
Fri, 8 Jun 2012 21:21:23 +0000 (17:21 -0400)
https://bugs.freedesktop.org/show_bug.cgi?id=42047

configure.ac
src/plugins/renderers/x11/Makefile.am

index 4b18b04b69968e27b80b1de05c4884bbd42ae5d8..845f22b6d5e56c3c008fbeac311a2f40be9e39ac 100644 (file)
@@ -53,9 +53,14 @@ if test x$enable_pango = xyes; then
   AC_SUBST(PANGO_LIBS)
 fi
 
-PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0 ])
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
+AC_ARG_ENABLE(gtk, AS_HELP_STRING([--enable-gtk],[enable building with gtk, disabled there is no log viewer or x11 redenderer]),enable_gtk=$enableval,enable_gtk=yes)
+AM_CONDITIONAL(ENABLE_GTK,  [test "$enable_gtk" = yes])
+
+if test x$enable_gtk = xyes; then
+  PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.12.0 ])
+  AC_SUBST(GTK_CFLAGS)
+  AC_SUBST(GTK_LIBS)
+fi
 
 AC_ARG_ENABLE(libdrm_intel, AS_HELP_STRING([--enable-libdrm_intel],[enable building with libdrm_intel support]),enable_libdrm_intel=$enableval,enable_libdrm_intel=no)
 AM_CONDITIONAL(ENABLE_LIBDRM_INTEL,  [test "$enable_libdrm_intel" = yes])
@@ -280,6 +285,9 @@ AC_ARG_WITH(log-viewer, AS_HELP_STRING([--with-log-viewer],[Install plymouth log
 AM_CONDITIONAL(WITH_LOG_VIEWER,  [test "$with_log_viewer" = yes])
 
 if test x$with_log_viewer = xyes; then
+  if test x$enable_gtk = xno; then
+    AC_MSG_ERROR([log viewer enabled bug gtk disabled])
+  fi
   AC_ARG_WITH(gdm-autostart-file, AS_HELP_STRING([--with-gdm-autostart-file],[start log viewer from gdm on boot errors]),with_gdm_autostart_file=$withval,with_gdm_autostart_file=yes)
 else
   with_gdm_autostart_file=no
index f3b4dc8e2214047183f6dfb1d77e42efeb5258a9..fd142c05ecd5bbff08a1fd3a7bb69a185f6b8905 100644 (file)
@@ -6,6 +6,7 @@ INCLUDES = -I$(top_srcdir)                                                    \
            -I$(srcdir)/..                                                     \
            -I$(srcdir)
 
+if ENABLE_GTK
 plugindir = $(libdir)/plymouth/renderers
 plugin_LTLIBRARIES = x11.la
 
@@ -16,5 +17,6 @@ x11_la_LIBADD = $(PLYMOUTH_LIBS)                             \
                 ../../../libply/libply.la                    \
                 ../../../libply-splash-core/libply-splash-core.la
 x11_la_SOURCES = $(srcdir)/plugin.c
+endif
 
 MAINTAINERCLEANFILES = Makefile.in