]> www.fi.muni.cz Git - evince.git/commitdiff
Don't use automagic dependencies
authorChristian Persch <chpe@gnome.org>
Thu, 4 Jun 2009 18:03:54 +0000 (20:03 +0200)
committerChristian Persch <chpe@gnome.org>
Thu, 11 Jun 2009 21:38:07 +0000 (23:38 +0200)
Default to enable, and require explicit disabling. Default to disabled
on hildon for the nautilus extension, the thumbnailer and the previewer.

configure.ac
properties/Makefile.am

index 3d80da6cb980d80431da271919cf669e68079f00..8b976fe7e3a81c15bbce4c5b6ed2fb07649f1eae 100644 (file)
@@ -286,56 +286,54 @@ AC_SUBST(FRONTEND_CFLAGS)
 AC_SUBST(FRONTEND_LIBS)
 
 # Check for Nautilus property page build
-AC_ARG_ENABLE(nautilus,
-       [AS_HELP_STRING([--enable-nautilus],[compile the nautilus plugin])],
-       [],
-       [case "$with_platform" in
-           gnome) enable_nautilus=yes ;;
-           hildon) enable_nautilus=no ;;
-         esac])
-
-if test x$enable_nautilus = "xyes" ; then
-       PKG_CHECK_MODULES(NAUTILUS, gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension,
-                       [HAVE_NAUTILUS=yes], [HAVE_NAUTILUS=no])
-       NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
-       AC_SUBST(NAUTILUS_EXTENSION_DIR)
+AC_ARG_ENABLE([nautilus],
+  [AS_HELP_STRING([--enable-nautilus],[compile the nautilus plugin])],
+  [],
+  [case "$with_platform" in
+     gnome) enable_nautilus=yes ;;
+     *) enable_nautilus=no ;;
+    esac])
+
+if test "$enable_nautilus" = "yes" ; then
+  PKG_CHECK_MODULES([NAUTILUS],[gtk+-x11-2.0 $MM gthread-2.0 libnautilus-extension])
+  NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
+  AC_SUBST([nautilusextensiondir],[$NAUTILUS_EXTENSION_DIR])
+  AC_SUBST(NAUTILUS_CFLAGS)
+  AC_SUBST(NAUTILUS_LIBS)
+
+  AC_DEFINE([HAVE_NAUTILUS],[1], [defined if you build the nautilus plugin])
 fi
 
-AC_SUBST(NAUTILUS_CFLAGS)
-AC_SUBST(NAUTILUS_LIBS)
-if test x$HAVE_NAUTILUS = "xyes"; then
-       AC_DEFINE(HAVE_NAUTILUS, 1, [defined if you build the nautilus plugin])
-fi
-AM_CONDITIONAL(HAVE_NAUTILUS, test x$HAVE_NAUTILUS = "xyes")
+AM_CONDITIONAL([ENABLE_NAUTILUS],[test "$enable_nautilus" = "yes"])
 
+# Check for thumbnailer build
 
-dnl Check for thumbnailer build
-AC_ARG_ENABLE(thumbnailer,
-        [AS_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer])],
-       [],
-       [case "$with_platform" in
-           gnome) enable_thumbnailer=yes ;;
-           hildon) enable_thumbnailer=no ;;
-         esac])
+AC_ARG_ENABLE([thumbnailer],
+  [AS_HELP_STRING([--disable-thumbnailer],[disable the GNOME thumbnailer])],
+  [],
+  [case "$with_platform" in
+     gnome) enable_thumbnailer=yes ;;
+     *) enable_thumbnailer=no ;;
+    esac])
 
-AM_CONDITIONAL(ENABLE_THUMBNAILER, test x$enable_thumbnailer = "xyes")
+AM_CONDITIONAL([ENABLE_THUMBNAILER],[test "$enable_thumbnailer" = "yes"])
+
+# ***************
+# Print Previewer
+# ***************
 
-dnl Check for previewer build
 AC_ARG_ENABLE([previewer],
-       [AS_HELP_STRING([--disable-previewer],[disable the GNOME Document Previewer])],
-       [],
-       [case "$with_platform" in
-           gnome) enable_previewer=yes ;;
-           *) enable_previewer=no ;;
-         esac])
+  [AS_HELP_STRING([--disable-previewer],[disable the GNOME Document Previewer])],
+  [],
+  [case "$with_platform" in
+      gnome) enable_previewer=yes ;;
+      *) enable_previewer=no ;;
+    esac])
 
-if test "$enable_previewer" = "yes" ; then
-   PKG_CHECK_MODULES(PREVIEWER, gtk+-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED,
-                    [enable_previewer=yes],[enable_previewer=no])
-   if test x$enable_previewer = "xno" ; then
-      AC_MSG_WARN([Previewer support is disabled since gtk+-unix-print $GTK_REQUIRED or higher was not found])
-   fi
+if test x$enable_previewer = "xyes" ; then
+  PKG_CHECK_MODULES([PREVIEWER],[gtk+-2.0 >= $GTK_REQUIRED gtk+-unix-print-2.0 >= $GTK_REQUIRED gthread-2.0 gio-2.0 >= $GLIB_REQUIRED])
 fi
+
 AM_CONDITIONAL([ENABLE_PREVIEWER],[test "$enable_previewer" = "yes"])
 PREVIEWER_CFLAGS="$PREVIEWER_CFLAGS $GTKUNIXPRINT_CFLAGS $DEBUG_FLAGS"
 PREVIEWER_LIBS="$PREVIEWER_LIBS $GTKUNIXPRINT_LIBS -lz"
@@ -695,7 +693,7 @@ Configure summary:
        GTK+ Unix Print....:  $with_gtk_unix_print
        Keyring Support....:  $with_keyring
        DBUS Support.......:  $enable_dbus
-       Nautilus Plugin....:  $HAVE_NAUTILUS
+       Nautilus Plugin....:  $enable_nautilus
        Thumbnailer........:  $enable_thumbnailer
        Previewer..........:  $enable_previewer
        Gtk-Doc Support....:  $enable_gtk_doc
index 33d831efa9388ebd3a8d839a36a91afb137e4fe2..0d2bf0e229873fef3a87b4b941a854fb07e4c164 100644 (file)
@@ -14,15 +14,10 @@ libevproperties_la_SOURCES=                 \
        ev-properties-view.c                    \
        ev-properties-view.h
 
-if HAVE_NAUTILUS
-EVINCE_PROPERTIES_PAGE = libevince-properties-page.la
-else
-EVINCE_PROPERTIES_PAGE =
-endif
+if ENABLE_NAUTILUS
 
-nautilus_LTLIBRARIES = $(EVINCE_PROPERTIES_PAGE)
+nautilusextension_LTLIBRARIES = libevince-properties-page.la
 
-nautilusdir=$(NAUTILUS_EXTENSION_DIR)
 libevince_properties_page_la_CFLAGS = -I$(top_srcdir)
 libevince_properties_page_la_SOURCES =         \
        ev-properties-main.c
@@ -34,3 +29,5 @@ libevince_properties_page_la_LIBADD =                 \
        $(NAUTILUS_LIBS)
 
 libevince_properties_page_la_LDFLAGS = -module -avoid-version -no-undefined
+
+endif # ENABLE_NAUTILUS