From: Marco Pesenti Gritti Date: Thu, 7 Jul 2005 12:11:25 +0000 (+0000) Subject: Make frontends depend on just libev. Rework and group CFLAGS/LIBS X-Git-Tag: EVINCE_0_3_3~146 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=848665b157185945d190a7a746d054d7f5d5e6e0;p=evince.git Make frontends depend on just libev. Rework and group CFLAGS/LIBS 2005-07-07 Marco Pesenti Gritti * Makefile.am: * backend/Makefile.am: * configure.ac: * cut-n-paste/recent-files/Makefile.am: * cut-n-paste/toolbar-editor/Makefile.am: * cut-n-paste/zoom-control/Makefile.am: * lib/Makefile.am: * pdf/Makefile.am: * pixbuf/Makefile.am: * properties/Makefile.am: * ps/Makefile.am: * shell/Makefile.am: * thumbnailer/Makefile.am: * tiff/Makefile.am: Make frontends depend on just libev. Rework and group CFLAGS/LIBS definitions. Cleanups. --- diff --git a/ChangeLog b/ChangeLog index 1f9dabe4..06090bc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,24 @@ +2005-07-07 Marco Pesenti Gritti + + * Makefile.am: + * backend/Makefile.am: + * configure.ac: + * cut-n-paste/recent-files/Makefile.am: + * cut-n-paste/toolbar-editor/Makefile.am: + * cut-n-paste/zoom-control/Makefile.am: + * lib/Makefile.am: + * pdf/Makefile.am: + * pixbuf/Makefile.am: + * properties/Makefile.am: + * ps/Makefile.am: + * shell/Makefile.am: + * thumbnailer/Makefile.am: + * tiff/Makefile.am: + + Make frontends depend on just libev. + Rework and group CFLAGS/LIBS definitions. + Cleanups. + 2005-07-07 Marco Pesenti Gritti * shell/ev-window: diff --git a/Makefile.am b/Makefile.am index abf8666c..67de0183 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = lib cut-n-paste po help data +SUBDIRS = cut-n-paste po help data # Backends @@ -18,6 +18,10 @@ endif SUBDIRS += backend +# Library + +SUBDIRS += lib + # Properties (library and application) SUBDIRS += properties diff --git a/backend/Makefile.am b/backend/Makefile.am index 391a9deb..30318d88 100644 --- a/backend/Makefile.am +++ b/backend/Makefile.am @@ -1,5 +1,3 @@ -NULL= - INCLUDES= \ -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ @@ -11,8 +9,7 @@ INCLUDES= \ -I$(top_srcdir)/dvi \ $(BACKEND_CFLAGS) \ $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) \ - $(NULL) + $(DISABLE_DEPRECATED) noinst_LTLIBRARIES = libevbackend.la @@ -44,31 +41,26 @@ libevbackend_la_SOURCES= \ ev-selection.h \ ev-selection.c \ ev-document-misc.h \ - ev-document-misc.c \ - $(NULL) + ev-document-misc.c libevbackend_la_LIBADD = \ $(top_builddir)/pdf/libpdfdocument.la \ $(top_builddir)/pixbuf/libpixbufdocument.la \ - $(top_builddir)/ps/libpsdocument.la \ - $(NULL) + $(top_builddir)/ps/libpsdocument.la if ENABLE_DJVU libevbackend_la_LIBADD += \ - $(top_builddir)/djvu/libgtkdjvu.la \ - $(NULL) + $(top_builddir)/djvu/libgtkdjvu.la endif if ENABLE_TIFF libevbackend_la_LIBADD += \ - $(top_builddir)/tiff/libtiffdocument.la \ - $(NULL) + $(top_builddir)/tiff/libtiffdocument.la endif if ENABLE_DVI libevbackend_la_LIBADD += \ - $(top_builddir)/dvi/libgtkdvi.la \ - $(NULL) + $(top_builddir)/dvi/libgtkdvi.la endif BUILT_SOURCES= \ diff --git a/configure.ac b/configure.ac index d333c89f..a0459df9 100644 --- a/configure.ac +++ b/configure.ac @@ -34,26 +34,24 @@ AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) dnl Check dependencies + +# LIB_CFLAGS for helpers and generic widgets. (lib, cut-and-paste) +# BACKEND_CFLAGS for backend implementations. +# FRONTEND_CFLAGS for frontend implementations. (properties, thumbnailer) +# FRONTEND_LIBS +# SHELL_CFLAGS for shell implementation. +# SHELL_LIBS + POPPLER_REQUIRED=0.3.3 DBUS_GLIB_REQUIRED=0.33 GTK_REQUIRED=2.6.0 LIBGNOMEUI_REQUIRED=2.6.0 -PKG_CHECK_MODULES(LIB, gtk+-2.0 >= $GTK_REQUIRED libgnome-2.0) -PKG_CHECK_MODULES(TOOLBAR_EDITOR, gtk+-2.0 >= $GTK_REQUIRED libxml-2.0) -PKG_CHECK_MODULES(RECENT_FILES, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED) -PKG_CHECK_MODULES(ZOOM_CONTROL, gtk+-2.0 >= $GTK_REQUIRED) - -PKG_CHECK_MODULES(SHELL, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gnome-vfs-2.0 libgnomeprint-2.2 >= 2.5.1 libgnomeprintui-2.2 libglade-2.0 gconf-2.0 poppler-glib >= $POPPLER_REQUIRED) -PKG_CHECK_MODULES(THUMBNAILER, gtk+-2.0 >= $GTK_REQUIRED gnome-vfs-2.0) -PKG_CHECK_MODULES(PROPERTIES, gtk+-2.0 >= $GTK_REQUIRED libglade-2.0) - +PKG_CHECK_MODULES(LIB, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED) PKG_CHECK_MODULES(BACKEND, gtk+-2.0 >= $GTK_REQUIRED) -PKG_CHECK_MODULES(DVI, gtk+-2.0 >= $GTK_REQUIRED) -PKG_CHECK_MODULES(PS, gtk+-2.0 >= $GTK_REQUIRED) -PKG_CHECK_MODULES(PDF, gtk+-2.0 >= $GTK_REQUIRED poppler-glib >= $POPPLER_REQUIRED) -PKG_CHECK_MODULES(PIXBUF, gtk+-2.0 >= $GTK_REQUIRED) -PKG_CHECK_MODULES(TIFF, gtk+-2.0 >= $GTK_REQUIRED) +PKG_CHECK_MODULES(FRONTEND_CORE, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libglade-2.0 poppler-glib >= $POPPLER_REQUIRED) +PKG_CHECK_MODULES(POPPLER, poppler-glib >= $POPPLER_REQUIRED) +PKG_CHECK_MODULES(SHELL_CORE, gtk+-2.0 >= $GTK_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED gnome-vfs-2.0 libgnomeprint-2.2 >= 2.5.1 libgnomeprintui-2.2 libglade-2.0 gconf-2.0 poppler-glib >= $POPPLER_REQUIRED) GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` AC_SUBST(GLIB_GENMARSHAL) @@ -81,6 +79,16 @@ if test "x$enable_dbus" = "xyes" ; then AC_DEFINE_UNQUOTED(DBUS_VERSION, $DBUS_VERSION, [DBUS version.]) fi +SHELL_CFLAGS="$SHELL_CORE_CFLAGS $DBUS_CFLAGS" +SHELL_LIBS="$SHELL_CORE_LIBS $DBUS_LIBS -ltiff -lz" +AC_SUBST(SHELL_CFLAGS) +AC_SUBST(SHELL_LIBS) + +FRONTEND_CFLAGS="$FRONTEND_CORE_CFLAGS" +FRONTEND_LIBS="$FRONTEND_CORE_LIBS -ltiff -lz" +AC_SUBST(FRONTEND_CFLAGS) +AC_SUBST(FRONTEND_LIBS) + AM_CONDITIONAL([ENABLE_DBUS], [test "x$enable_dbus" = "xyes"]) AM_CONDITIONAL([ENABLE_METADATA], [test "x$enable_dbus" = "xyes"]) AM_CONDITIONAL([DBUS_TOOL_NO_PREFIX], [test "x$DBUS_VERSION" = "x33"]) diff --git a/cut-n-paste/recent-files/Makefile.am b/cut-n-paste/recent-files/Makefile.am index fc00718c..8550d78f 100644 --- a/cut-n-paste/recent-files/Makefile.am +++ b/cut-n-paste/recent-files/Makefile.am @@ -1,9 +1,6 @@ -NULL = - INCLUDES = \ - $(RECENT_FILES_CFLAGS) \ - $(WARN_CFLAGS) \ - $(NULL) + $(LIB_CFLAGS) \ + $(WARN_CFLAGS) # $(DISABLE_DEPRECATED) diff --git a/cut-n-paste/toolbar-editor/Makefile.am b/cut-n-paste/toolbar-editor/Makefile.am index c2b86e61..fe172f8c 100644 --- a/cut-n-paste/toolbar-editor/Makefile.am +++ b/cut-n-paste/toolbar-editor/Makefile.am @@ -20,14 +20,12 @@ libtoolbareditor_la_SOURCES = \ $(EGGSOURCES) \ $(EGGHEADERS) -libtoolbareditor_la_LIBADD = $(TOOLBAR_EDITOR_LIBS) - libtoolbareditor_la_CPPFLAGS = \ -I$(top_builddir)/lib/egg \ $(AM_CPPFLAGS) libtoolbareditor_la_CFLAGS = \ - $(TOOLBAR_EDITOR_CFLAGS) \ + $(LIB_CFLAGS) \ $(WARN_CFLAGS) \ $(DISABLE_DEPRECATED) \ -DCURSOR_DIR=\"$(pkgdatadir)\" \ diff --git a/cut-n-paste/zoom-control/Makefile.am b/cut-n-paste/zoom-control/Makefile.am index ec8737fa..8b382f9c 100644 --- a/cut-n-paste/zoom-control/Makefile.am +++ b/cut-n-paste/zoom-control/Makefile.am @@ -1,39 +1,15 @@ -noinst_LTLIBRARIES = libephymisc.la libephywidgets.la +noinst_LTLIBRARIES = libephyzoom.la -libephywidgets_la_SOURCES = \ +libephyzoom_la_SOURCES = \ ephy-zoom-action.h \ ephy-zoom-action.c \ ephy-zoom-control.c \ - ephy-zoom-control.h - -libephywidgets_la_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -I$(top_srcdir)/lib \ - -DSHARE_DIR=\"$(pkgdatadir)\" \ - $(AM_CPPFLAGS) - -libephywidgets_la_CFLAGS = \ - $(ZOOM_CONTROL_CFLAGS) \ - $(WARNING_CFLAGS) \ - $(DISABLE_DEPRECATED) \ - $(AM_CFLAGS) - -libephywidgets_la_LIBADD = \ - $(ZOOM_CONTROL_LIBS) - libephymisc.la - -NOINST_H_FILES = \ - ephy-zoom.h - -libephymisc_la_SOURCES = \ + ephy-zoom-control.h \ ephy-zoom.c \ - $(NOINST_H_FILES) - -libephymisc_la_CPPFLAGS = \ - -I$(top_builddir)/lib \ - -DSHARE_DIR=\"$(pkgdatadir)\" \ - $(AM_CPPFLAGS) + ephy-zoom.h -libephymisc_la_CFLAGS = \ - $(ZOOM_CONTROL_CFLAGS) \ - $(AM_CFLAGS) +libephyzoom_la_CFLAGS = \ + -I$(top_srcdir)/lib \ + $(LIB_CFLAGS) \ + $(WARNING_CFLAGS) \ + $(DISABLE_DEPRECATED) diff --git a/lib/Makefile.am b/lib/Makefile.am index f425bee3..148ed613 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,22 +1,17 @@ -NULL= - -INCLUDES= \ - -DEVINCE_UIDIR=\"$(pkgdatadir)\" \ - -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ +INCLUDES = \ $(LIB_CFLAGS) \ $(WARN_CFLAGS) \ - $(DISABLE_DEPRECATED) \ - $(NULL) + $(DISABLE_DEPRECATED) noinst_LTLIBRARIES = libev.la -libev_la_SOURCES= \ +libev_la_SOURCES = \ ev-debug.c \ ev-debug.h \ ev-file-helpers.c \ ev-file-helpers.h \ ev-gui.c \ - ev-gui.h \ - $(NULL) + ev-gui.h -libev_la_LIBADD = $(LIB_LIBS) +libev_la_LIBADD = \ + $(top_builddir)/backend/libevbackend.la diff --git a/pdf/Makefile.am b/pdf/Makefile.am index a2fdea88..bd3522f3 100644 --- a/pdf/Makefile.am +++ b/pdf/Makefile.am @@ -1,15 +1,13 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/backend \ - $(PDF_CFLAGS) \ + $(BACKEND_CFLAGS) \ + $(POPPLER_CFLAGS) \ $(WARN_CXXFLAGS) \ - $(DISABLE_DEPRECATED) \ - -DDATADIR=\""$(datadir)"\" + $(DISABLE_DEPRECATED) noinst_LTLIBRARIES = libpdfdocument.la libpdfdocument_la_SOURCES = \ ev-poppler.cc \ ev-poppler.h - -libpdfdocument_la_LIBADD = $(PDF_LIBS) diff --git a/properties/Makefile.am b/properties/Makefile.am index 5f824aa2..5f9b65d1 100644 --- a/properties/Makefile.am +++ b/properties/Makefile.am @@ -1,23 +1,17 @@ -NULL= - INCLUDES= \ -DDATADIR=\"$(pkgdatadir)\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -I$(top_srcdir)/backend \ - $(PROPERTIES_CFLAGS) \ + $(FRONTEND_CFLAGS) \ $(NAUTILUS_CFLAGS) \ $(DISABLE_DEPRECATED) \ - $(WARN_CFLAGS) \ - $(NULL) + $(WARN_CFLAGS) noinst_LTLIBRARIES = libevproperties.la libevproperties_la_SOURCES= \ ev-properties-view.c \ - ev-properties-view.h \ - $(NULL) - -libevproperties_la_LIBADD = $(PROPERTIES_LIBS) + ev-properties-view.h if HAVE_NAUTILUS EVINCE_PROPERTIES_PAGE = libevince-properties-page.la @@ -32,8 +26,8 @@ libevince_properties_page_la_CFLAGS = -I$(top_srcdir) libevince_properties_page_la_SOURCES = \ ev-properties-main.c -libevince_properties_page_la_LIBADD = \ - $(PROPERTIES_LIBS) \ - libevproperties.la \ - $(top_builddir)/backend/libevbackend.la \ - $(top_builddir)/lib/libev.la +libevince_properties_page_la_LIBADD = \ + $(FRONTEND_LIBS) \ + $(NAUTILUS_LIBS) \ + $(top_builddir)/lib/libev.la \ + libevproperties.la diff --git a/ps/Makefile.am b/ps/Makefile.am index df66b4a5..a0ba27cb 100644 --- a/ps/Makefile.am +++ b/ps/Makefile.am @@ -2,8 +2,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/backend \ -I$(top_srcdir)/lib \ - -DGNOMEICONDIR=\""${prefix}/${DATADIRNAME}/pixmaps"\" \ - $(PS_CFLAGS) \ + $(BACKEND_CFLAGS) \ $(WARN_CFLAGS) # $(DISABLE_DEPRECATED) diff --git a/thumbnailer/Makefile.am b/thumbnailer/Makefile.am index c98df7a0..04cb71c2 100644 --- a/thumbnailer/Makefile.am +++ b/thumbnailer/Makefile.am @@ -1,29 +1,23 @@ @INTLTOOL_SCHEMAS_RULE@ -NULL= - INCLUDES= \ -DDATADIR=\"$(pkgdatadir)\" \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/backend \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \ - $(THUMBNAILER_CFLAGS) \ + $(FRONTEND_CFLAGS) \ $(DISABLE_DEPRECATED) \ - $(WARN_CFLAGS) \ - $(NULL) + $(WARN_CFLAGS) bin_PROGRAMS=evince-thumbnailer evince_thumbnailer_SOURCES= \ evince-thumbnailer.c - $(NULL) evince_thumbnailer_LDADD= \ - $(THUMBNAILER_LIBS) \ - $(top_builddir)/lib/libev.la \ - $(top_builddir)/backend/libevbackend.la \ - $(NULL) + $(FRONTEND_LIBS) \ + $(top_builddir)/lib/libev.la pixmapdir = $(pkgdatadir) pixmap_DATA = pdf-icon.png diff --git a/tiff/Makefile.am b/tiff/Makefile.am index 8d936ee3..d8652add 100644 --- a/tiff/Makefile.am +++ b/tiff/Makefile.am @@ -1,8 +1,7 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/backend \ - $(TIFF_CFLAGS) \ - -DDATADIR=\""$(datadir)"\" + $(BACKEND_CFLAGS) noinst_LTLIBRARIES = libtiffdocument.la @@ -11,7 +10,3 @@ libtiffdocument_la_SOURCES = \ tiff-document.h \ tiff2ps.c \ tiff2ps.h - -libtiffdocument_la_LIBADD = \ - $(TIFF_LIBS) \ - -ltiff